sig
  type item = Biocaml_line.t
  module Error : sig type t = [ `premature_end_of_input ] end
  val of_char_stream : char Stream.t -> item Stream.t
  val of_channel : in_channel -> item Stream.t
  val to_channel : item Stream.t -> out_channel -> unit
  module Buffer :
    sig
      type t = Biocaml_lines.Buffer.t
      exception No_next_line
      val make : ?filename:string -> unit -> t
      val feed_line : t -> item -> unit
      val feed_string : t -> string -> unit
      val queued_lines : t -> int
      val is_empty : t -> bool
      val next_line : t -> item option
      val next_line_exn : t -> item
      val current_position : t -> Biocaml_pos.t
      val contents : t -> item list * string option
      val empty : t -> unit
    end
  module Transform :
    sig
      val string_to_item : unit -> (string, item) Biocaml_transform.t
      val group2 :
        unit ->
        (item, (item * item, [> `premature_end_of_input ]) Core.Std.Result.t)
        Biocaml_transform.t
      val item_to_string :
        ?buffer:[ `clear of int | `reset of int ] ->
        unit -> (item, string) Biocaml_transform.t
      val make :
        ?name:string ->
        ?filename:string ->
        next:(Buffer.t ->
              [ `not_ready | `output of ('b, 'errnext) Core.Result.t ]) ->
        on_error:([ `incomplete_input of
                      Biocaml_pos.t * item list * string option
                  | `next of 'errnext ] -> 'err) ->
        unit -> (string, ('b, 'err) Core.Result.t) Biocaml_transform.t
      val make_merge_error :
        ?name:string ->
        ?filename:string ->
        next:(Buffer.t ->
              [ `not_ready
              | `output of
                  ('a,
                   [> `incomplete_input of
                        Biocaml_pos.t * item list * string option ]
                   as 'b)
                  Core.Result.t ]) ->
        unit -> (string, ('a, 'b) Core.Result.t) Biocaml_transform.t
    end
end