package ppx_units

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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.