module Generic_core_repr:sig..end
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'at ='a repr
repr might be referred to as Repr.ttype repr_fun = {
|
f : |
val repr : 'a Ty.T.ty -> 'a reprval view : 'a Ty.T.ty -> 'a reprGeneric_core_repr.reprval ext : 'a Ty.pat -> repr_fun -> unitext t f extends function repr with a new case for type t defined by f.val repr_name : string