package sexp_grammar

  1. Overview
  2. Docs
type t

Represents the result of folding over a grammar.

type list_t

Represents the result of folding over a list grammar.

The remaining functions correspond to grammar constructors. Excludes the constructors related to recursive grammars: Tycon, Tyvar, and Recursive.

val any : Base.string -> t
val bool : t
val char : t
val integer : t
val float : t
val string : t
val option : t -> t
val union : t Base.list -> t
val list : list_t -> t
val empty : list_t
val cons : t -> list_t -> list_t
val many : t -> list_t
val record : (Base.string, list_t Sexp_grammar__.Sexp_grammar_intf.Field.t * (Base.string, Base.Sexp.t) Base.List.Assoc.t) Base.List.Assoc.t -> allow_extra_fields:Base.bool -> list_t
val variant : (Base.string, list_t Base.option * (Base.string, Base.Sexp.t) Base.List.Assoc.t) Base.List.Assoc.t -> case_sensitivity: Sexp_grammar__.Sexp_grammar_intf.{Sexp_grammar}1.case_sensitivity -> t
val lazy_ : t Base.Lazy.t -> t
val tag : t -> Base.string -> Base.Sexp.t -> t
val of_lazy_recursive : t Base.Lazy.t -> t

Allows folds to tie the knot for recursive grammars. Must not force its argument immediately.

OCaml

Innovation. Community. Security.