package ppx_repr

  1. Overview
  2. Docs

Parameters

Signature

val parse_lib : Ppxlib.expression -> string option

parse_lib e is Some "foo" or None if e is a string option, and raises a located exception otherwise. Intended to be used for parsing the lib argument to the derivers.

val expand_typ : ?lib:string -> Ppxlib.core_type -> Ppxlib.expression
val derive_str : ?name:string -> ?lib:string -> (Ppxlib.rec_flag * Ppxlib.type_declaration list) -> Ppxlib.structure_item list

Deriver for Irmin type representations.

  • ?name: overrides the default name of the generated type representation;
  • ?lib: overrides the default location for the primitive Irmin typereps. ~lib:None will assume that the typereps are available in the same namespace.
val derive_sig : ?name:string -> ?lib:string -> (Ppxlib.rec_flag * Ppxlib.type_declaration list) -> Ppxlib.signature_item list

Deriver for Irmin type representation signatures.

Optional arguments have the same meaning as in derive_str.

OCaml

Innovation. Community. Security.