Object.Case
Case objects.
Case objects are used to describe objects whose members depend on the tag value of a distinguished case member. See an example.
type 'a jsont := 'a t
The type for mapping a case object represented by 'case
belonging to a common type represented by 'cases
depending on the value of a case member of type 'tag
.
map ~dec v obj
defines the object map obj
as being the case for the tag value v
of the case member. dec
indicates how to inject the object case into the type common to all cases.
Raises Invalid_argument
if obj
is not a direct result of finish
, that is if obj
does not describe an object.
The type for a case of the type 'cases
. This is map
with its 'case
representation hidden.