package ppx_poly_record

  1. Overview
  2. Docs
ppx for polymorphic records

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_poly_record-1.1.3.tar.gz
sha256=763f965577f9f6fd0e7f9aca6b89316a97a42fb42002a59d1aa9353c78cde2b0
md5=55d77b34dac40c566875d5e220e04a74

Description

Polymorphic record in OCaml

This ppx adds an extension point [%poly_record <exp>] for polymorphic record.

In side [%poly_record <exp>], the record syntax { l = e; .. }, { e with l = e'; .. }, r.l and r.l <- e become for polymorphic records whose type is _ Ppx_poly_record.Poly_record.t. The field information is encoded into OCaml's object type. For example:

# [%poly_record { x = 1; y = 1.0 }];;
- : < x : int; y : float > Ppx_poly_record.Poly_record.t = <abstr>

Implementation of _ PPx_poly_record.Poly_record.t is not by OCaml objects: it has no method table inside therefore safely serializable between different programs if its fields have no functional value.

Published: 12 Apr 2017

Dependencies (4)

  1. ppxx >= "1.4.0" & < "1.5.0"
  2. omake build
  3. ocamlfind build
  4. ocaml >= "4.03.0"

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.