# Ppx\_make a ppxlib based make deriver

**URL:** <https://discuss.ocaml.org/t/ppx-make-a-ppxlib-based-make-deriver/7932>\
**Category:** Community\
**Created:** [May 28, 2021, 11:55pm UTC](https://discuss.ocaml.org/t/ppx-make-a-ppxlib-based-make-deriver/7932 "2021-05-28T23:55:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bn-d](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bn-d/32/6471_2.png) [@bn-d](https://discuss.ocaml.org/u/bn-d)\
**Post date:** [May 28, 2021, 11:55pm UTC](https://discuss.ocaml.org/t/ppx-make-a-ppxlib-based-make-deriver/7932/1 "2021-05-28T23:55:54Z")

</div>

I recently wrote `ppx_make` and now it is available on [opam](https://opam.ocaml.org/packages/ppx_make/)! This package is not a direct reimplement of the `make` deriver in `ppx_deriving`, but very similar. It has several differences (the list might not be complete):

- add support for option: `val make_t : ?value:t -> unit -> t`
- add support for tuple: `val make_t : ?v0 -> ?v1 -> ... -> unit -> t`
- add support for variant, including embedded record: `make_choice_name_of_t : ... -> unit -> t`
- add support for multiple `[@main]` in record
- `unit` is required for all make function unless `[@main]` presents. This is to ensure forward-compatibility
  - i.e. the use of the make of `{ a:int; b:int }` will work with the make of `{ a:int; b:int; c:int option }`

- ditch the `[@split]`

> **[erebuxy/ppx\_make](https://github.com/erebuxy/ppx_make)**
>
> ppxlib based make deriver. Contribute to erebuxy/ppx\_make development by creating an account on GitHub.
