ppx_make
ppx_make copied to clipboard
[@@ deriving] plugin to generate make functions.
[@@deriving make]
[@@deriving] plugin to generate make functions.
Installation
ppx_make can be installed via OCaml Package Manager.
$ opam install ppx_make
Usage
Please see the documentation.
Example
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