ppx_poly_recordversion
Ppx for polymorphic records
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.
Author | Jun Furuse |
---|---|
Published | |
Homepage | https://bitbucket.org/camlspotter/ppx_poly_record |
Issue Tracker | https://bitbucket.org/camlspotter/ppx_poly_record/issues?status=new&status=open |
Maintainer | jun.furuse@gmail.com |
Dependencies | |
Source [http] | https://github.com/ocaml/opam-source-archives/raw/main/ppx_poly_record-1.1.2.tar.gz sha256=00c574ade346bd74e9c7ef519c1bb8f1cde0c7155d9326b2513fe9ea2facadd4 md5=6a9a807939c1941d602bb56ae1b1526c |
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/ppx_poly_record/ppx_poly_record.1.1.2/opam |
No package is dependent