module Repr: Generic_core_repr
type ('a, 'b)
repr_by = {
|
repr_ty : |
(* |
Representation type.
| *) |
|
to_repr : |
(* |
Conversion from the abstract type to the representation.
| *) |
|
from_repr : |
(* |
Partial conversion from representation to the abstract type. May fail if the representation isn't valid.
| *) |
|
default : |
(* |
Default value, used temporarily when converting cyclic data.
| *) |
|
update : |
(* |
Restore the cycles.
| *) |
(a,b) repr_by
explains how a
is represented by b
.type 'a
repr =
| |
Repr : |
a repr
means: a
is
representable.type'a
t ='a repr
repr
might be referred to as Repr.t
type
repr_fun = {
|
f : |
val repr : 'a Ty.T.ty -> 'a repr
val view : 'a Ty.T.ty -> 'a repr
Generic_core_repr.repr
val ext : 'a Ty.pat -> repr_fun -> unit
ext t f
extends function repr
with a new case for type t
defined by f
.val repr_name : string