[@@deriving]
plugin to generate make functions.
ppx_make
can be installed via OCaml Package Manager.
$ opam install ppx_make
Please see the documentation.
type my_type = {
my_field : int;
my_option : int option;
my_list : int list;
my_string : string;
my_default : int; [@default 1024]
}
[@@deriving make]
(* the deriver will automatically generate the function below *)
val make_my_type :
my_field:int ->
?my_option:int ->
?my_list:int list ->
?my_string:string ->
?my_default:int ->
unit ->
my_type