package ppx_factory

  1. Overview
  2. Docs
val expr_from_core_type : loc:Ppxlib.Location.t -> Ppxlib.core_type -> (Ppxlib.expression, Loc_err.t) Stdlib.result

Return the default expression for the given core type, located at loc or a located error if a default expression can't be deduced. E.g. expr_from_core_type ~loc [%type int] is [%expr 0].

val expr_from_core_type_exn : loc:Ppxlib.Location.t -> Ppxlib.core_type -> Ppxlib.expression

Same as expr_from_core_type but raises instead of returning a result

Structure generator

Signature generator

val _name_from_type_name : string -> string

Return the name of the default value derived from a type with the given name.