| 1 |
open Common |
| 2 |
open Type_class |
| 3 |
|
| 4 |
module type Make_binable_without_uuid_spec = sig |
| 5 |
module Binable : Binable.Minimal.S |
| 6 |
|
| 7 |
type t |
| 8 |
|
| 9 |
val to_binable : t -> Binable.t |
| 10 |
val of_binable : Binable.t -> t |
| 11 |
end |
| 12 |
|
| 13 |
module type Make_binable1_without_uuid_spec = sig |
| 14 |
module Binable : Binable.Minimal.S1 |
| 15 |
|
| 16 |
type 'a t |
| 17 |
|
| 18 |
val to_binable : 'a t -> 'a Binable.t |
| 19 |
val of_binable : 'a Binable.t -> 'a t |
| 20 |
end |
| 21 |
|
| 22 |
module type Make_binable2_without_uuid_spec = sig |
| 23 |
module Binable : Binable.Minimal.S2 |
| 24 |
|
| 25 |
type ('a, 'b) t |
| 26 |
|
| 27 |
val to_binable : ('a, 'b) t -> ('a, 'b) Binable.t |
| 28 |
val of_binable : ('a, 'b) Binable.t -> ('a, 'b) t |
| 29 |
end |
| 30 |
|
| 31 |
module type Make_binable3_without_uuid_spec = sig |
| 32 |
module Binable : Binable.Minimal.S3 |
| 33 |
|
| 34 |
type ('a, 'b, 'c) t |
| 35 |
|
| 36 |
val to_binable : ('a, 'b, 'c) t -> ('a, 'b, 'c) Binable.t |
| 37 |
val of_binable : ('a, 'b, 'c) Binable.t -> ('a, 'b, 'c) t |
| 38 |
end |
| 39 |
|
| 40 |
module type Make_binable_with_uuid_spec = sig |
| 41 |
include Make_binable_without_uuid_spec |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
val caller_identity : Shape.Uuid.t |
| 46 |
end |
| 47 |
|
| 48 |
module type Make_binable1_with_uuid_spec = sig |
| 49 |
include Make_binable1_without_uuid_spec |
| 50 |
|
| 51 |
val caller_identity : Shape.Uuid.t |
| 52 |
end |
| 53 |
|
| 54 |
module type Make_binable2_with_uuid_spec = sig |
| 55 |
include Make_binable2_without_uuid_spec |
| 56 |
|
| 57 |
val caller_identity : Shape.Uuid.t |
| 58 |
end |
| 59 |
|
| 60 |
module type Make_binable3_with_uuid_spec = sig |
| 61 |
include Make_binable3_without_uuid_spec |
| 62 |
|
| 63 |
val caller_identity : Shape.Uuid.t |
| 64 |
end |
| 65 |
|
| 66 |
module type Make_iterable_binable_spec = sig |
| 67 |
type t |
| 68 |
type el |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
val caller_identity : Shape.Uuid.t |
| 73 |
|
| 74 |
val module_name : string option |
| 75 |
val length : t -> int |
| 76 |
val iter : t -> f:(el -> unit) -> unit |
| 77 |
val init : len:int -> next:(unit -> el) -> t |
| 78 |
val bin_size_el : el Size.sizer |
| 79 |
val bin_write_el : el Write.writer |
| 80 |
val bin_read_el : el Read.reader |
| 81 |
val bin_shape_el : Shape.t |
| 82 |
end |
| 83 |
|
| 84 |
module type Make_iterable_binable1_spec = sig |
| 85 |
type 'a t |
| 86 |
type 'a el |
| 87 |
|
| 88 |
val caller_identity : Shape.Uuid.t |
| 89 |
val module_name : string option |
| 90 |
val length : 'a t -> int |
| 91 |
val iter : 'a t -> f:('a el -> unit) -> unit |
| 92 |
val init : len:int -> next:(unit -> 'a el) -> 'a t |
| 93 |
val bin_size_el : ('a, 'a el) Size.sizer1 |
| 94 |
val bin_write_el : ('a, 'a el) Write.writer1 |
| 95 |
val bin_read_el : ('a, 'a el) Read.reader1 |
| 96 |
val bin_shape_el : Shape.t -> Shape.t |
| 97 |
end |
| 98 |
|
| 99 |
module type Make_iterable_binable2_spec = sig |
| 100 |
type ('a, 'b) t |
| 101 |
type ('a, 'b) el |
| 102 |
|
| 103 |
val caller_identity : Shape.Uuid.t |
| 104 |
val module_name : string option |
| 105 |
val length : ('a, 'b) t -> int |
| 106 |
val iter : ('a, 'b) t -> f:(('a, 'b) el -> unit) -> unit |
| 107 |
val init : len:int -> next:(unit -> ('a, 'b) el) -> ('a, 'b) t |
| 108 |
val bin_size_el : ('a, 'b, ('a, 'b) el) Size.sizer2 |
| 109 |
val bin_write_el : ('a, 'b, ('a, 'b) el) Write.writer2 |
| 110 |
val bin_read_el : ('a, 'b, ('a, 'b) el) Read.reader2 |
| 111 |
val bin_shape_el : Shape.t -> Shape.t -> Shape.t |
| 112 |
end |
| 113 |
|
| 114 |
module type Make_iterable_binable3_spec = sig |
| 115 |
type ('a, 'b, 'c) t |
| 116 |
type ('a, 'b, 'c) el |
| 117 |
|
| 118 |
val caller_identity : Shape.Uuid.t |
| 119 |
val module_name : string option |
| 120 |
val length : ('a, 'b, 'c) t -> int |
| 121 |
val iter : ('a, 'b, 'c) t -> f:(('a, 'b, 'c) el -> unit) -> unit |
| 122 |
val init : len:int -> next:(unit -> ('a, 'b, 'c) el) -> ('a, 'b, 'c) t |
| 123 |
val bin_size_el : ('a, 'b, 'c, ('a, 'b, 'c) el) Size.sizer3 |
| 124 |
val bin_write_el : ('a, 'b, 'c, ('a, 'b, 'c) el) Write.writer3 |
| 125 |
val bin_read_el : ('a, 'b, 'c, ('a, 'b, 'c) el) Read.reader3 |
| 126 |
val bin_shape_el : Shape.t -> Shape.t -> Shape.t -> Shape.t |
| 127 |
end |
| 128 |
|
| 129 |
|
| 130 |
module type Utils = sig |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
val size_header_length : int |
| 145 |
|
| 146 |
val bin_read_size_header : int Read.reader |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
val bin_write_size_header : int Write.writer |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
val bin_dump : ?header:bool -> 'a writer -> 'a -> buf |
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
val bin_read_stream |
| 182 |
: ?max_size:int |
| 183 |
-> read:(buf -> pos:int -> len:int -> unit) |
| 184 |
-> 'a reader |
| 185 |
-> 'a |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
module Of_minimal (S : Binable.Minimal.S) : Binable.S with type t := S.t |
| 190 |
module Of_minimal1 (S : Binable.Minimal.S1) : Binable.S1 with type 'a t := 'a S.t |
| 191 |
|
| 192 |
module type Make_binable_with_uuid_spec = Make_binable_with_uuid_spec |
| 193 |
module type Make_binable1_with_uuid_spec = Make_binable1_with_uuid_spec |
| 194 |
module type Make_binable2_with_uuid_spec = Make_binable2_with_uuid_spec |
| 195 |
module type Make_binable3_with_uuid_spec = Make_binable3_with_uuid_spec |
| 196 |
|
| 197 |
module Make_binable_with_uuid (Bin_spec : Make_binable_with_uuid_spec) : |
| 198 |
Binable.S with type t := Bin_spec.t |
| 199 |
|
| 200 |
module Make_binable1_with_uuid (Bin_spec : Make_binable1_with_uuid_spec) : |
| 201 |
Binable.S1 with type 'a t := 'a Bin_spec.t |
| 202 |
|
| 203 |
module Make_binable2_with_uuid (Bin_spec : Make_binable2_with_uuid_spec) : |
| 204 |
Binable.S2 with type ('a, 'b) t := ('a, 'b) Bin_spec.t |
| 205 |
|
| 206 |
module Make_binable3_with_uuid (Bin_spec : Make_binable3_with_uuid_spec) : |
| 207 |
Binable.S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) Bin_spec.t |
| 208 |
|
| 209 |
module type Make_binable_without_uuid_spec = Make_binable_without_uuid_spec |
| 210 |
module type Make_binable1_without_uuid_spec = Make_binable1_without_uuid_spec |
| 211 |
module type Make_binable2_without_uuid_spec = Make_binable2_without_uuid_spec |
| 212 |
module type Make_binable3_without_uuid_spec = Make_binable3_without_uuid_spec |
| 213 |
|
| 214 |
module Make_binable_without_uuid (Bin_spec : Make_binable_without_uuid_spec) : |
| 215 |
Binable.S with type t := Bin_spec.t |
| 216 |
[@@alert legacy "Use [Make_binable_with_uuid] if possible."] |
| 217 |
|
| 218 |
module Make_binable1_without_uuid (Bin_spec : Make_binable1_without_uuid_spec) : |
| 219 |
Binable.S1 with type 'a t := 'a Bin_spec.t |
| 220 |
[@@alert legacy "Use [Make_binable1_with_uuid] if possible."] |
| 221 |
|
| 222 |
module Make_binable2_without_uuid (Bin_spec : Make_binable2_without_uuid_spec) : |
| 223 |
Binable.S2 with type ('a, 'b) t := ('a, 'b) Bin_spec.t |
| 224 |
[@@alert legacy "Use [Make_binable2_with_uuid] if possible."] |
| 225 |
|
| 226 |
module Make_binable3_without_uuid (Bin_spec : Make_binable3_without_uuid_spec) : |
| 227 |
Binable.S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) Bin_spec.t |
| 228 |
[@@alert legacy "Use [Make_binable3_with_uuid] if possible."] |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
module type Make_iterable_binable_spec = Make_iterable_binable_spec |
| 233 |
module type Make_iterable_binable1_spec = Make_iterable_binable1_spec |
| 234 |
module type Make_iterable_binable2_spec = Make_iterable_binable2_spec |
| 235 |
module type Make_iterable_binable3_spec = Make_iterable_binable3_spec |
| 236 |
|
| 237 |
module Make_iterable_binable (Iterable_spec : Make_iterable_binable_spec) : |
| 238 |
Binable.S with type t := Iterable_spec.t |
| 239 |
|
| 240 |
module Make_iterable_binable1 (Iterable_spec : Make_iterable_binable1_spec) : |
| 241 |
Binable.S1 with type 'a t := 'a Iterable_spec.t |
| 242 |
|
| 243 |
module Make_iterable_binable2 (Iterable_spec : Make_iterable_binable2_spec) : |
| 244 |
Binable.S2 with type ('a, 'b) t := ('a, 'b) Iterable_spec.t |
| 245 |
|
| 246 |
module Make_iterable_binable3 (Iterable_spec : Make_iterable_binable3_spec) : |
| 247 |
Binable.S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) Iterable_spec.t |
| 248 |
end |