3 (* representation of values of user-defined types *)
6 val make
: ?constructor
:int -> id list
-> t
9 (* Utilities for serialization *)
12 include Monad.Monad_state_type
with type state
= s
13 module Utils
(T
: Typeable.Typeable
) (E
: Eq.Eq
with type a
= T.a
) : sig
14 val allocate
: T.a
-> (id
-> unit m
) -> id m
15 val store_repr
: id
-> Repr.t
-> unit m
19 (* Utilities for deserialization *)
22 include Monad.Monad_state_type
with type state
= s
23 module Utils
(T
: Typeable.Typeable
) : sig
24 val sum
: (int * id list
-> T.a m
) -> (id
-> T.a m
)
25 val tuple
: (id list
-> T.a m
) -> (id
-> T.a m
)
26 val record
: (T.a
-> id list
-> T.a m
) -> int -> (id
-> T.a m
)
30 exception UnpicklingError
of string
31 exception UnknownTag
of int * string
36 module T
: Typeable.Typeable
with type a
= a
37 module E
: Eq.Eq
with type a
= a
38 val pickle
: a
-> id
Write.m
39 val unpickle
: id
-> a
Read.m
40 val to_buffer
: Buffer.t
-> a
-> unit
41 val to_string
: a
-> string
42 val to_channel
: out_channel
-> a
-> unit
43 val from_stream
: char
Stream.t
-> a
44 val from_string
: string -> a
45 val from_channel
: in_channel
-> a
51 module T
: Typeable.Typeable
with type a
= a
52 module E
: Eq.Eq
with type a
= a
53 val pickle
: a
-> id
Write.m
54 val unpickle
: id
-> a
Read.m
55 end) : Pickle
with type a
= S.a
57 module Pickle_unit
: Pickle
with type a
= unit
58 module Pickle_bool
: Pickle
with type a
= bool
59 module Pickle_int
: Pickle
with type a
= int
60 module Pickle_char
: Pickle
with type a
= char
61 module Pickle_float
: Pickle
with type a
= float
62 module Pickle_num
: Pickle
with type a
= Num.num
63 module Pickle_string
: Pickle
with type a
= string
64 module Pickle_option
(V0
: Pickle
) : Pickle
with type a
= V0.a
option
65 module Pickle_list
(V0
: Pickle
) : Pickle
with type a
= V0.a list
66 module Pickle_ref
(S
: Pickle
) : Pickle
with type a
= S.a
ref
68 module Pickle_from_dump
70 (E
: Eq.Eq
with type a
= P.a
)
71 (T
: Typeable.Typeable
with type a
= P.a
)
72 : Pickle
with type a
= P.a