Module LineShtream


module LineShtream: sig .. end
Shtreams of Line.ts. This module is the result of applying AnyShtream.Make to the module LineShtream.LineElem. Thus, shtreams handled by this module are compatible with the shtreams of Shtream, StringShtream, and modules created by AnyShtream.Make, but this module provides additional functions for reading and writing 'a Line.t Shtream.ts.

This module specializes shtream-creating functions to store source information in the resulting lines.


type sourced = < delim : Line.absent; fstab : Line.absent; group : Line.absent;
key_value : Line.absent; mailcap : Line.absent; passwd : Line.absent;
ps : Line.absent; seq : Line.present; source : Line.present;
stat : Line.absent >
A line with source and sequence information. This is the AnyShtream.ELEM.initial type for LineShtream.
module LineElem: AnyShtream.ELEM 
  with type 'a elem = 'a Line.t
   and type initial = sourced

(** Most of the types and values in {!LineShtream} come from the
 * result of apply {!AnyShtream.Make}. *)
include
include AnyShtream.ANYSHTREAM
val line_reader : ?source:Line.source -> Reader.t -> Pervasives.in_channel -> initial elem
Construct a Line.t reader from a record reader. This is like AnyShtream.ANYSHTREAM.elem_reader, but allows specifying a Line.source to store in the lines.
val annotate : Line.source ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i; stat : 'j >
Line.t t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : Line.present; source : Line.present;
stat : 'j >
Line.t t