build with ocamlbuild by default
[deriving.git] / lib / dump.mli
blobafbb40e3f831617b101e32f417fc2d7b540a6b45
1 module type Dump =
2 sig
3 type a
4 val to_buffer : Buffer.t -> a -> unit
5 val to_string : a -> string
6 val to_channel : out_channel -> a -> unit
7 val from_stream : char Stream.t -> a
8 val from_string : string -> a
9 val from_channel : in_channel -> a
10 end
12 module Defaults
13 (P : sig
14 type a
15 val to_buffer : Buffer.t -> a -> unit
16 val from_stream : char Stream.t -> a
17 end) : Dump with type a = P.a
19 exception Dump_error of string
21 module Dump_int32 : Dump with type a = Int32.t
22 module Dump_int64 : Dump with type a = Int64.t
23 module Dump_nativeint : Dump with type a = Nativeint.t
24 module Dump_int : Dump with type a = int
25 module Dump_char : Dump with type a = char
26 module Dump_string : Dump with type a = string
27 module Dump_float : Dump with type a = float
28 module Dump_num : Dump with type a = Num.num
29 module Dump_bool : Dump with type a = bool
30 module Dump_unit : Dump with type a = unit
31 module Dump_list (P : Dump) : Dump with type a = P.a list
32 module Dump_option (P : Dump) : Dump with type a = P.a option
34 module Dump_undumpable (P : sig type a val tname : string end)
35 : Dump with type a = P.a
36 module Dump_via_marshal (P : sig type a end)
37 : Dump with type a = P.a