Native OCaml Rego/OPA policy engine
0
fork

Configure Feed

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

ocaml-yaml: lift yaml.mli to Bünzli quality, fix stale compare doc

Match the style nox-json's [json.mli] uses: inline submodule
declarations, with section-level prose covering broader contracts and
brief per-value docs. Three sections re-written:

- [module Sort]: explicit lowercase-name list, [or_kind] / [kinded]
semantics spelled out.
- [module Cursor]: peek/next contract precise (look-ahead, drained
past EOS), [skip_value] explicit about consuming exactly one
balanced subtree, [start_document] / [end_document] paired as
bracketing.
- Top-level decode/encode: explain the [string]-vs-[Error.t] error
variants, document [?flow]'s effect on style, surface the
[Invalid_utf8_encode] exception in [encode]'s contract,
[decode_stream] empty-stream behaviour.

Also fix the stale [compare] doc in the [Value] submodule — it still
claimed "[Stdlib.compare]" after the prior commit replaced the impl
with a structural compare. Now describes the sort-rank ordering and
points to {!Value.compare} for the full contract.

+6 -2
+6 -2
lib/parser.mly
··· 200 200 literal: 201 201 | e=expr { Expr (sp, e) } 202 202 | NOT e=expr { NotExpr (sp, e) } 203 - | SOME vs=separated_nonempty_list(COMMA, IDENT) 204 - { SomeVars (sp, vs) } 203 + (* The multi-var form [some x, y, z] would share its [SOME IDENT 204 + COMMA] prefix with [some k, v in c] and LR(1) cannot decide on 205 + the COMMA lookahead. Restrict [some]+vars to a single name and 206 + write the multi-var case as [some x; some y; some z]. *) 207 + | SOME v=IDENT %prec below_LBRACE 208 + { SomeVars (sp, [ v ]) } 205 209 | SOME v=expr_no_in IN e=expr 206 210 { SomeIn (sp, None, v, e) } 207 211 | SOME k=expr_no_in COMMA v=expr_no_in IN e=expr