Manipulate the lines of a file.
module Biocaml_lines: sigtypeitem =Biocaml_line.t
Lines.item is a Line.tmodule Error: sigLines module.typet =[ `premature_end_of_input ]
`premature_end_of_input - expected more lines than available.endval of_char_stream : char Stream.t -> item Stream.tval of_channel : Pervasives.in_channel -> item Stream.tval to_channel : item Stream.t -> Pervasives.out_channel -> unitmodule Buffer: sigtype t
exception No_next_line
next_line_exn.val make : ?filename:string -> unit -> tfilename is used only
for error reporting; it should be set to the name of the file,
if any, from which you will feed the buffer.val feed_line : t -> Biocaml_lines.item -> unitval feed_string : t -> string -> unitval queued_lines : t -> intval is_empty : t -> boolnext_line returns
None, is_empty p = true means that the content did not end
with a complete line.val peek_line : t -> Biocaml_lines.item optionval next_line : t -> Biocaml_lines.item optionval next_line_exn : t -> Biocaml_lines.itemNo_next_line if there is no line
to return.val current_position : t -> Biocaml_pos.tval contents : t -> Biocaml_lines.item list * string optionendmodule Transform: sigLines.item.val string_to_item : unit -> (string, Biocaml_lines.item) Biocaml_transform.tval group2 : unit ->
(Biocaml_lines.item,
(Biocaml_lines.item * Biocaml_lines.item, [> `premature_end_of_input ])
Core.Std.Result.t)
Biocaml_transform.tval item_to_string : ?buffer:[ `clear of int | `reset of int ] ->
unit -> (Biocaml_lines.item, string) Biocaml_transform.tLine.items to strings (in other
words a buffer with the lines plus their end-of-line
character).val make : ?name:string ->
?filename:string ->
next:(Biocaml_lines.Buffer.t ->
[ `not_ready | `output of ('b, 'errnext) Core.Result.t ]) ->
on_error:([ `incomplete_input of Biocaml_pos.t * string list * string option
| `next of 'errnext ] -> 'err) ->
unit -> (string, ('b, 'err) Core.Result.t) Biocaml_transform.tval make_merge_error : ?name:string ->
?filename:string ->
next:(Biocaml_lines.Buffer.t ->
[ `not_ready
| `output of
('a,
[> `incomplete_input of
Biocaml_pos.t * string list * string option ]
as 'b)
Core.Result.t ]) ->
unit -> (string, ('a, 'b) Core.Result.t) Biocaml_transform.tmake but merge `incomplete_input _ with the
errors of ~next (which must be polymorphic variants).endval item_of_sexp : Sexplib.Sexp.t -> itemval sexp_of_item : item -> Sexplib.Sexp.tend