Skip to content

bn-d/ppx_make

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[@@deriving make]

OCaml CI GitHub release status Coverage Status

[@@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