cconv

Combinators for Type Conversion in OCaml, and ppx_deriving plugin.
Library cconv_psexp
Module CConvPSexp

Polymorphic Variants S-expressions

These S-expressions are compatible with ocaml-containers' S-expressions. Howerver, they do not add any dependency and can be used without containers.

type 'a or_error = [
| `Ok of 'a
| `Error of string
]
type t = [
| `Atom of string
| `List of t list
]
val output : t CConv.Encode.output
val source : t CConv.Decode.source
val encode : 'src CConv.Encode.encoder -> 'src -> t
val decode_exn : 'into CConv.Decode.decoder -> t -> 'into
val decode : 'into CConv.Decode.decoder -> t -> 'into or_error