module LineElem: AnyShtream.ELEM
with type 'a elem = 'a Line.t
and type initial = sourced
The element type may be polymorphic, in which case the conversion
of elements to strings must handle any element. The conversion
from strings (or reading from channels) is monomorphic, returning
shtream elements of a particular type.
type 'a
elem
The element type for the resulting shtream module. This type is
parameterized so that a shtream module might handle a family of
types. The function
AnyShtream.ELEM.string_of
needs handle
'a elem
for any
'a
.
type
initial
The parameter to
AnyShtream.ELEM.elem
for values returned by conversions from
strings. That is,
initial elem
is the type of shtream elements when
first read from a string or channel.
val reader : unit -> Pervasives.in_channel -> initial elem
Make a reader of shtream elements. The reader may be stateful;
a new one will be instantiated for each shtream.
val of_string : unit -> string -> initial elem
Make a parser of shtream elements. The parser may be stateful;
a new one will be instantiated for each shtream.
val string_of : unit -> 'a elem -> string
Make a convertor of shtream elements to strings. The resulting
function may be stateful; a new one will be instantiated for
shtream output operation.