package ppx_make

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

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.2.tar.gz
md5=98ac1871b2b18f37bca7abb5c391594e
sha512=deaae2097086b42822a2f2b929abe074c84397f6a87f36706043cae1917aee985ce91dc933833e8ddb51302bea6d929f65c8d95b8a1721a942a9398f3a6ee01f

Description

Ppxlib based [@@deriving] plugin to generate make functions

Published: 12 Feb 2023

README

[@@deriving make]

ppxlib based make deriver

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 (2)

  1. odoc with-doc
  2. ounit2 with-test

Conflicts

None

OCaml

Innovation. Community. Security.