package ppx_units

  1. Overview
  2. Docs
Generate unit types for every record field

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.0.tar.gz
md5=ae627f403e258a49dba179bfca0b631c
sha512=ed057812b22bc1edda39091801c4229babdc2708d3a629d1d896ab0cb4e651dea3c9db32a9ed9d69fa2058677a0f5d9921546b92e7e32d3f6626825191553e11

README.md.html

ppx_units

ppx_units is a simple deriver to automatically generate single variant types from record type definitions.

type person = {
  id: string;
  first_name: int [@unit "FN"];
} [@@deriving units]

will generate

type id = ID

type first_name = FN
OCaml

Innovation. Community. Security.