Module Ppx_deriving_biniou

val some : 'a -> 'a option
val map_location : ('a -> 'b) -> 'a Ppxlib.loc -> 'b Ppxlib.loc
val lident : string -> Ppxlib.longident
val longident : loc:Ppxlib.location -> string -> Ppxlib.Longident.t Ppxlib.loc
val map_longident : (string -> string) -> Ppxlib.longident -> Ppxlib.longident
val ldotl : string -> Ppxlib.longident -> Ppxlib.longident

Like Ldot but on the left.

type direction =
  1. | To_biniou
  2. | Of_biniou
val direction_to_string : ?exn:bool -> direction -> string

Convert a direction to a string. The optional argument ?exn, true by default, adds a suffix _exn to the Of_biniou string only.

val mangle_lid : ?exn:bool -> direction -> Ppxlib.Longident.t -> Ppxlib.Longident.t
val mangle_lid' : loc:Ppxlib.location -> ?exn:bool -> direction -> Ppxlib.Longident.t -> Ppxlib.Longident.t Ppxlib.loc
val mangle_type_decl : ?exn:bool -> direction -> Ppxlib.type_declaration -> string
val mangle_type_decl' : loc:Ppxlib.location -> ?exn:bool -> direction -> Ppxlib.type_declaration -> string Ppxlib.loc
val mangle_type_var : dir:direction -> string -> string

Given a type variable, produce the name of its serialiser.

val mangle_type_var' : loc:Ppxlib.location -> dir:direction -> string -> string Ppxlib.loc
type options = {
  1. alias : bool;
}
val parse_options : (string * Ppxlib.expression) list -> options
val attr_suppress_warning_32 : loc:Ppxlib.location -> Astlib.Ast_502.Parsetree.attribute

An attribute that suppresses warning 32, “unused-value-declaration”.

val attr_suppress_warning_39 : loc:Ppxlib.location -> Astlib.Ast_502.Parsetree.attribute

An attribute that suppresses warning 39, “unused-rec-flag”.

val core_type_to_serialiser_type : dir:'a -> Ppxlib.core_type -> Ppxlib.core_type
val type_decl_to_serialiser_type : dir:direction -> ?exn:bool -> Ppxlib.type_declaration -> Ppxlib.core_type
val catchall : loc:Ppxlib__.Location.t -> string -> Ppxlib__.Import.case

For pattern matching, provide a catch-all that raises Ppx_deriving_biniou_runtime.Could_not_convert.

module Core_type_to_serialiser : sig ... end
include module type of struct include Core_type_to_serialiser end
val core_type_to_serialiser : dir:direction -> Ppxlib.core_type -> Ppxlib.expression

Given a core_type, return a Parsetree expression that is a function converting to or from biniou, depending on the direction argument.

module Type_decl_to_serialiser : sig ... end
include module type of struct include Type_decl_to_serialiser end
val type_decl_to_serialiser : dir:direction -> Ppxlib.type_declaration -> Ppxlib.expression

Given a type_decl, return a Parsetree expression that is a function converting to or from biniou, depending on the direction argument.

val type_decl_add_fun_params : dir:direction -> Ppxlib.type_declaration -> Ppxlib.expression -> Ppxlib.expression

Given an expression, wrap it in a function (expression) that grabs the _tvar_a_<dir>_biniou arguments, if needed.

val type_decl_apply_fun_params : dir:direction -> Ppxlib.type_declaration -> Ppxlib.expression -> Ppxlib.expression

Given an expression, wrap it in an application (expression) that passes it the _tvar_a_<dir>_biniou arguments, if needed.

val value_binding_with_constraint : loc:Ppxlib__.Location.t -> pat:Ppxlib__.Import.pattern -> expr:Ppxlib__.Import.expression -> constraint_:Ppxlib.core_type -> attributes:Ppxlib.attributes -> Ppxlib__.Import.value_binding
val type_decls_to_serialiser_str : dir:direction -> Ppxlib.type_declaration list -> Ppxlib.structure
val type_decls_to_aliases_str : options:options -> Ppxlib.type_declaration list -> Ppxlib.structure
val type_decl_to_serialiser_vd : loc:Ppxlib__.Location.t -> dir:direction -> ?exn:bool -> Ppxlib.type_declaration -> Ppxlib.value_description
val type_decl_to_serialiser_vds : to_biniou:bool -> of_biniou:bool -> options:options -> loc:Ppxlib__.Location.t -> Ppxlib.type_declaration -> Ppxlib.value_description list
val type_decl_str : to_biniou:bool -> of_biniou:bool -> options:(string * Ppxlib.expression) list -> path:'a -> Ppxlib.type_declaration list -> Ppxlib.structure
val type_decl_sig : to_biniou:bool -> of_biniou:bool -> options:(string * Ppxlib.expression) list -> path:'a -> Ppxlib.type_declaration list -> Ppxlib.signature