package ppx_make

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

Install

Dune Dependency

Authors

Maintainers

Sources

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

Description

[@@deriving] plugin to generate make functions

Published: 24 Jan 2024

README

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

Dependencies (2)

  1. ppxlib >= "0.10.0"
  2. dune >= "2.7"

Dev Dependencies (4)

  1. odoc with-doc
  2. bisect_ppx with-test
  3. ppx_show with-test
  4. ounit2 with-test

Conflicts

None

OCaml

Innovation. Community. Security.