package ppx_make

  1. Overview
  2. Docs
[@@deriving make]

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.4.tar.gz
md5=008594f8821d807126f40c94d68f5a89
sha512=72de3f6a4f355261afadc2800c3a773ef92914a507323af46d640df33162f6dc588bd91e1a774979101b2f533c6c01713b39a118b01aa9716ccaacfe0fc9e387

README.md.html

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

Innovation. Community. Security.