Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bn-d/ppx_make
[@@ deriving] plugin to generate make functions.
https://github.com/bn-d/ppx_make
ocaml ppxlib
Last synced: about 1 month ago
JSON representation
[@@ deriving] plugin to generate make functions.
- Host: GitHub
- URL: https://github.com/bn-d/ppx_make
- Owner: bn-d
- License: mit
- Created: 2021-05-19T23:41:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T01:20:56.000Z (11 months ago)
- Last Synced: 2024-08-04T01:28:29.540Z (5 months ago)
- Topics: ocaml, ppxlib
- Language: OCaml
- Homepage: https://boni.ng/ppx_make/ppx_make/index.html
- Size: 430 KB
- Stars: 15
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - ppx_make - d | 11 | (OCaml)
README
# [@@deriving make]
[![OCaml][ocaml-badge]](#)
[![CI][ci-badge]](https://github.com/bn-d/ppx_make/actions/workflows/build.yml)
[![GitHub release status][release-badge]](https://github.com/bn-d/ppx_make/releases)
[![Coverage Status][coveralls-badge]](https://coveralls.io/github/bn-d/ppx_make?branch=main)[ocaml-badge]: https://img.shields.io/badge/-OCaml-EC6813?logo=ocaml&labelColor=white
[ci-badge]: https://github.com/bn-d/ppx_make/actions/workflows/build.yml/badge.svg?branch=master
[release-badge]: https://img.shields.io/github/v/release/bn-d/ppx_make
[coveralls-badge]: https://coveralls.io/repos/github/bn-d/ppx_make/badge.svg?branch=main`[@@deriving]` plugin to generate make functions.
## Installation
`ppx_make` can be installed via [OCaml Package Manager](https://opam.ocaml.org/packages/ppx_make/).
```sh
$ opam install ppx_make
```## Usage
Please see the [documentation](https://boni.ng/ppx_make/ppx_make/index.html).## Example
```ocaml
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
```