Module Ppxlib__.Deriving.Args

Specification of generator arguments

type ('a, 'b) t
type 'a param
val empty : ('m'mt
val arg : Ppxlib__.Import.string ‑> (Ppxlib__.Import.expression'a ‑> 'a Ppxlib__.Import.option'a Ppxlib__.Import.optionPpxlib.Ast_pattern.t ‑> 'a Ppxlib__.Import.option param
val flag : Ppxlib__.Import.string ‑> Ppxlib__.Import.bool param

Flag matches punned labelled argument, i.e. of the form ~foo. It returns true iff the argument is present.

val (+>) : ('m1'a ‑> 'm2t ‑> 'a param ‑> ('m1'm2t

For convenience, so that one can write the following without having to open both Ast_pattern and Deriving.Args:

        Deriving.Args.(empty
                       +> arg_option "foo" (estring __)
                       +> arg_option "bar" (pack2 (eint __ ** eint __))
                       +> flag "dotdotdot"
                      )
include module type of sig ... end with type (a, b, c) t := (a, b, c) Ppxlib.Ast_pattern.t
type ('a, 'b, 'c) t = ('a'b'cPpxlib__.Ast_pattern0.t
val parse : ('a'b'ct ‑> Ppxlib.Location.t ‑> ?⁠on_error:(Ppxlib__.Import.unit ‑> 'c) ‑> 'a ‑> 'b ‑> 'c
val __ : ('a'a ‑> 'b'bt
val __' : ('a'a Ppxlib.Loc.t ‑> 'b'bt
val alt : ('a'b'ct ‑> ('a'b'ct ‑> ('a'b'ct
val alt_option : ('a'v ‑> 'b'ct ‑> ('a'b'ct ‑> ('a'v Ppxlib__.Import.option ‑> 'b'ct
val (|||) : ('a'b'ct ‑> ('a'b'ct ‑> ('a'b'ct
val map : ('a'b'ct ‑> f:('d ‑> 'b) ‑> ('a'd'ct
val map' : ('a'b'ct ‑> f:(Ppxlib.Location.t ‑> 'd ‑> 'b) ‑> ('a'd'ct
val map_result : ('a'b'ct ‑> f:('c ‑> 'd) ‑> ('a'b'dt
val (>>|) : ('a'b'ct ‑> ('d ‑> 'b) ‑> ('a'd'ct
val map0 : ('a'b'ct ‑> f:'v ‑> ('a'v ‑> 'b'ct
val map1 : ('a'v1 ‑> 'b'ct ‑> f:('v1 ‑> 'v) ‑> ('a'v ‑> 'b'ct
val map2 : ('a'v1 ‑> 'v2 ‑> 'b'ct ‑> f:('v1 ‑> 'v2 ‑> 'v) ‑> ('a'v ‑> 'b'ct
val map0' : ('a'b'ct ‑> f:(Ppxlib.Location.t ‑> 'v) ‑> ('a'v ‑> 'b'ct
val map1' : ('a'v1 ‑> 'b'ct ‑> f:(Ppxlib.Location.t ‑> 'v1 ‑> 'v) ‑> ('a'v ‑> 'b'ct
val map2' : ('a'v1 ‑> 'v2 ‑> 'b'ct ‑> f:(Ppxlib.Location.t ‑> 'v1 ‑> 'v2 ‑> 'v) ‑> ('a'v ‑> 'b'ct
val nil : ('b Ppxlib__.Import.list'a'at
val (^::) : ('a'b'ct ‑> ('a Ppxlib__.Import.list'c'dt ‑> ('a Ppxlib__.Import.list'b'dt
val many : ('a'b ‑> 'b'ct ‑> ('a Ppxlib__.Import.list'c Ppxlib__.Import.list ‑> 'd'dt
val int : Ppxlib__.Import.int ‑> (Ppxlib__.Import.int'a'at
val char : Ppxlib__.Import.char ‑> (Ppxlib__.Import.char'a'at
val string : Ppxlib__.Import.string ‑> (Ppxlib__.Import.string'a'at
val float : Ppxlib__.Import.float ‑> (Ppxlib__.Import.float'a'at
val int32 : Ppxlib__.Import.int32 ‑> (Ppxlib__.Import.int32'a'at
val int64 : Ppxlib__.Import.int64 ‑> (Ppxlib__.Import.int64'a'at
val nativeint : Ppxlib__.Import.nativeint ‑> (Ppxlib__.Import.nativeint'a'at
val bool : Ppxlib__.Import.bool ‑> (Ppxlib__.Import.bool'a'at
val cst : to_string:('a ‑> Ppxlib__.Import.string) ‑> ?⁠equal:('a ‑> 'a ‑> Ppxlib__.Import.bool) ‑> 'a ‑> ('a'b'bt
val none : ('b Ppxlib__.Import.option'a'at
val some : ('a'b'ct ‑> ('a Ppxlib__.Import.option'b'ct
val pair : ('a1'b'ct ‑> ('a2'c'dt ‑> ('a1 * 'a2'b'dt
val (**) : ('a1'b'ct ‑> ('a2'c'dt ‑> ('a1 * 'a2'b'dt
val triple : ('a1'b'ct ‑> ('a2'c'dt ‑> ('a3'd'et ‑> ('a1 * 'a2 * 'a3'b'et
val loc : ('a'b'ct ‑> ('a Ppxlib.Loc.t'b'ct
val pack0 : ('a'b'ct ‑> ('aPpxlib__.Import.unit ‑> 'b'ct
val pack2 : ('a'b ‑> 'c ‑> 'd'et ‑> ('a, ('b * 'c) ‑> 'd'et
val pack3 : ('a'b ‑> 'c ‑> 'd ‑> 'e'ft ‑> ('a, ('b * 'c * 'd) ‑> 'e'ft
val labelled : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.arg_label'a'bPpxlib__.Ast_pattern0.t
val optional : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.arg_label'a'bPpxlib__.Ast_pattern0.t
val class_infos : virt:(Ppxlib__.Import.virtual_flag'a'bPpxlib__.Ast_pattern0.t ‑> params:((Ppxlib__.Import.core_type * Ppxlib__.Import.variance) list, 'b'cPpxlib__.Ast_pattern0.t ‑> name:(string, 'c'dPpxlib__.Ast_pattern0.t ‑> expr:('e'd'fPpxlib__.Ast_pattern0.t ‑> ('e Ppxlib__.Import.class_infos'a'fPpxlib__.Ast_pattern0.t
val pconst_integer : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (char option, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.constant'a'cPpxlib__.Ast_pattern0.t
val pconst_char : (char, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.constant'a'bPpxlib__.Ast_pattern0.t
val pconst_string : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (string option, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.constant'a'cPpxlib__.Ast_pattern0.t
val pconst_float : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (char option, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.constant'a'cPpxlib__.Ast_pattern0.t
val constructor_declaration : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> args:(Ppxlib__.Import.constructor_arguments'b'cPpxlib__.Ast_pattern0.t ‑> res:(Ppxlib__.Import.core_type option, 'c'dPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.constructor_declaration'a'dPpxlib__.Ast_pattern0.t
val ptyp_var : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.core_type'a'bPpxlib__.Ast_pattern0.t
val pdir_string : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.directive_argument'a'bPpxlib__.Ast_pattern0.t
val pdir_int : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (char option, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.directive_argument'a'cPpxlib__.Ast_pattern0.t
val pdir_bool : (bool, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.directive_argument'a'bPpxlib__.Ast_pattern0.t
val pexp_setinstvar : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.expression'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.expression'a'cPpxlib__.Ast_pattern0.t
val pexp_unreachable : (Ppxlib__.Import.expression'a'aPpxlib__.Ast_pattern0.t
val include_infos : mod_:('a'b'cPpxlib__.Ast_pattern0.t ‑> ('a Ppxlib__.Import.include_infos'b'cPpxlib__.Ast_pattern0.t
val label_declaration : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> mutable_:(Ppxlib__.Import.mutable_flag'b'cPpxlib__.Ast_pattern0.t ‑> type_:(Ppxlib__.Import.core_type'c'dPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.label_declaration'a'dPpxlib__.Ast_pattern0.t
val location : start:(Ppxlib__.Import.position'a'bPpxlib__.Ast_pattern0.t ‑> end_:(Ppxlib__.Import.position'b'cPpxlib__.Ast_pattern0.t ‑> ghost:(bool, 'c'dPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.location'a'dPpxlib__.Ast_pattern0.t
val lident : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.longident'a'bPpxlib__.Ast_pattern0.t
val module_binding : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> expr:(Ppxlib__.Import.module_expr'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.module_binding'a'cPpxlib__.Ast_pattern0.t
val module_declaration : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> type_:(Ppxlib__.Import.module_type'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.module_declaration'a'cPpxlib__.Ast_pattern0.t
val module_type_declaration : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> type_:(Ppxlib__.Import.module_type option, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.module_type_declaration'a'cPpxlib__.Ast_pattern0.t
val ppat_var : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.pattern'a'bPpxlib__.Ast_pattern0.t
val ppat_alias : (Ppxlib__.Import.pattern'a'bPpxlib__.Ast_pattern0.t ‑> (string, 'b'cPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.pattern'a'cPpxlib__.Ast_pattern0.t
val ppat_unpack : (string, 'a'bPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.pattern'a'bPpxlib__.Ast_pattern0.t
val position : fname:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> lnum:(int, 'b'cPpxlib__.Ast_pattern0.t ‑> bol:(int, 'c'dPpxlib__.Ast_pattern0.t ‑> cnum:(int, 'd'ePpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.position'a'ePpxlib__.Ast_pattern0.t
val nonrecursive : (Ppxlib__.Import.rec_flag'a'aPpxlib__.Ast_pattern0.t
val ptype_abstract : (Ppxlib__.Import.type_kind'a'aPpxlib__.Ast_pattern0.t
val value_description : name:(string, 'a'bPpxlib__.Ast_pattern0.t ‑> type_:(Ppxlib__.Import.core_type'b'cPpxlib__.Ast_pattern0.t ‑> prim:(string list, 'c'dPpxlib__.Ast_pattern0.t ‑> (Ppxlib__.Import.value_description'a'dPpxlib__.Ast_pattern0.t
val contravariant : (Ppxlib__.Import.variance'a'aPpxlib__.Ast_pattern0.t
val true_ : (Ppxlib__.Import.bool'a'at
val false_ : (Ppxlib__.Import.bool'a'at
val eint : (Ppxlib__.Import.int'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val echar : (Ppxlib__.Import.char'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val estring : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val efloat : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val eint32 : (Ppxlib__.Import.int32'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val eint64 : (Ppxlib__.Import.int64'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val enativeint : (Ppxlib__.Import.nativeint'a'bt ‑> (Ppxlib__.Import.expression'a'bt
val pint : (Ppxlib__.Import.int'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pchar : (Ppxlib__.Import.char'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pstring : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pfloat : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pint32 : (Ppxlib__.Import.int32'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pint64 : (Ppxlib__.Import.int64'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val pnativeint : (Ppxlib__.Import.nativeint'a'bt ‑> (Ppxlib__.Import.pattern'a'bt
val single_expr_payload : (Ppxlib__.Import.expression'a'bt ‑> (Ppxlib__.Import.payload'a'bt
val no_label : (Ppxlib__.Import.expression'a'bt ‑> (Ppxlib__.Import.Asttypes.arg_label * Ppxlib__.Import.expression'a'bt
val attribute : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.payload'b'ct ‑> (Ppxlib__.Import.attribute'a'ct
val extension : (Ppxlib__.Import.string'a'bt ‑> (Ppxlib__.Import.payload'b'ct ‑> (Ppxlib__.Import.attribute'a'ct
val elist : (Ppxlib__.Import.expression'a ‑> 'a'bt ‑> (Ppxlib__.Import.expression'b Ppxlib__.Import.list ‑> 'c'ct
val of_func : (context ‑> Ppxlib.Location.t ‑> 'a ‑> 'b ‑> 'c) ‑> ('a'b'ct
val to_func : ('a'b'ct ‑> context ‑> Ppxlib.Location.t ‑> 'a ‑> 'b ‑> 'c