Declarative JSON data manipulation for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

encodings: document and apply Error builder/raiser pair convention

Per the updated ocaml-encodings skill, every typed error helper ships
as a pair: [foo meta ~args] builds a [t], [fail_foo meta ~args]
raises it. Callers can either accumulate errors (build only) or
abort immediately (raise) without the vocabulary fragmenting.

- SKILL.md: document the convention in the Error section.
- loc/README.md: clarify that [exception Loc.Error] is the single
shared raise site and re-exports use the pair naming.
- loc/test/test_loc.ml: rename test cases to the [fail_*] verbs
(Error.fail_expected, Error.fail_push_array).
- xml/xml.mli: update the Error facade doc to point at
[Error.fail_sort] / [Error.fail_kinded_sort] (the raising verbs)
rather than [sort] / [kinded_sort] (the builders).
- oci/spec/error.ml: use [Json.Error.failf] instead of [fail] + an
intermediate format, keeping the structured path/meta.
- json/sort.mli: tiny docstring cleanup ({!Loc.Path} -> "path").

+1 -1
+1 -1
lib/sort.mli
··· 3 3 All rights reserved. SPDX-License-Identifier: ISC 4 4 ---------------------------------------------------------------------------*) 5 5 6 - (** JSON value sorts, used as labels in error contexts and {!Loc.Path} frames. 6 + (** JSON value sorts, used as labels in error contexts and path frames. 7 7 8 8 A {e sort} is the closed enumeration of node categories the JSON grammar 9 9 defines (RFC 8259): null, bool, number, string, array, object. A {e kind} is