ppx_make

Ppxlib based make deriver
README

ppxlib based make deriver

Installation

ppx_make can be installed via OCaml Package Manager.

$ opam install ppx_make

Usage

To use this library, add (preprocess (pps ppx_make)) to the library/executable configuration in dune file.

Syntax

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

Please check the test for more examples.

Install
Published
24 Aug 2021
Sources
v0.3.0.tar.gz
md5=7517e7f7ea82ba4d04a834b8a8c95cd2
sha512=8be282a395ef73b6bd66ac756c5b4f1e7af3abc695d58e9635248a33082b812fff8fa68fd40546137d678d1d1a532144e5c8869ad19244bf1a37337c504b79a8
Dependencies
odoc
with-doc
ounit2
with-test
ppxlib
>= "0.10.0"
dune
>= "2.7"
Reverse Dependencies