Make.Io
Input/Output functions for the given datum.
val read : ?ver:string -> ?fmt:string -> string -> T.t
read ?ver ?fmt file
reads datum from a file
val load : ?ver:string -> ?fmt:string -> Core_kernel.In_channel.t -> T.t
load ?ver ?fmt channel
loads datum from the input channel
val load_all :
?ver:string ->
?fmt:string ->
?rev:bool ->
Core_kernel.In_channel.t ->
T.t list
read_all ?ver ?fmt ?rev channel
reads a sequence of datums stored in the storage accessed via channel
and returns it as a list. If rev
is true
(defaults to false
) then a list will be reversed (slightly faster).
val scan :
?ver:string ->
?fmt:string ->
Core_kernel.In_channel.t ->
unit ->
T.t option
scan ?ver ?fmt channel
creates a stream of data, that are loaded consequently from the channel
val write : ?ver:string -> ?fmt:string -> string -> T.t -> unit
write ?ver ?fmt file datum
writes the datum
to the file
val save :
?ver:string ->
?fmt:string ->
Core_kernel.Out_channel.t ->
T.t ->
unit
save ?ver ?fmt channel datum
saves the datum
to the channel
val save_all :
?ver:string ->
?fmt:string ->
Core_kernel.Out_channel.t ->
T.t list ->
unit
save_all ?ver ?fmt data channel
saves a list of data into a channel
val dump :
?ver:string ->
?fmt:string ->
Core_kernel.Out_channel.t ->
(unit -> T.t option) ->
unit
dump ?ver ?fmt chan stream
dumps a stream
(represented by a next
function) into channel.
val show : ?ver:string -> ?fmt:string -> T.t -> unit
show ?ver ?fmt datum
saves datum to standard output channel, using a default_printer
if fmt
is not specified. Does nothing the printer is not set up.
val print :
?ver:string ->
?fmt:string ->
Stdlib.Format.formatter ->
T.t ->
unit
print ?ver ?fmt ppf
prints datum to a given formatter, using a default_printer
if fmt
is left unspecified.