sig
  type ('input, 'output) t = ('input, 'output) Biocaml_transform.t
  exception Feeding_stopped_transform of string
  val make :
    ?name:string ->
    feed:('input -> unit) ->
    next:(bool -> [ `end_of_stream | `not_ready | `output of 'output ]) ->
    unit -> ('input, 'output) t
  val feed : ('input, 'output) t -> 'input -> unit
  val next :
    ('input, 'output) t ->
    [ `end_of_stream | `not_ready | `output of 'output ]
  val stop : ('input, 'output) t -> unit
  val name : ('input, 'output) t -> string option
  val identity : ?name:string -> unit -> ('a, 'a) t
  val to_stream_fun :
    ('input, 'output) t -> 'input Stream.t -> 'output Stream.t
  val in_channel_strings_to_stream :
    ?buffer_size:int -> in_channel -> (string, 'output) t -> 'output Stream.t
  val on_input : ('b, 'c) t -> f:('-> 'b) -> ('a, 'c) t
  val on_output : ('a, 'b) t -> f:('-> 'c) -> ('a, 'c) t
  val compose : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t
  val mix :
    ('a1, 'b1) t -> ('a2, 'b2) t -> f:('b1 -> 'b2 -> 'c) -> ('a1 * 'a2, 'c) t
  val filter_compose :
    ('il, 'ol) t ->
    ('ir, 'our) t ->
    destruct:('ol -> [ `No of 'filtered | `Yes of 'ir ]) ->
    reconstruct:([ `Done of 'our | `Filtered of 'filtered ] -> 'result) ->
    ('il, 'result) t
  val split_and_merge :
    ('il, 'ol) t ->
    ('ir, 'our) t ->
    split:('input -> [ `left of 'il | `right of 'ir ]) ->
    merge:([ `left of 'ol | `right of 'our ] -> 'output) ->
    ('input, 'output) t
  val make_result :
    ?name:string ->
    feed:('input -> unit) ->
    next:(bool ->
          [ `end_of_stream | `not_ready | `output of ('a, 'b) Core.Result.t ]) ->
    unit -> ('input, ('a, 'b) Core.Result.t) t
  val on_ok :
    ('input, ('ok, 'error) Core.Result.t) t ->
    f:('ok -> 'still_ok) -> ('input, ('still_ok, 'error) Core.Result.t) t
  val on_error :
    ('input, ('ok, 'error) Core.Result.t) t ->
    f:('error -> 'another_errror) ->
    ('input, ('ok, 'another_errror) Core.Result.t) t
  val compose_results :
    on_error:([ `left of 'error_left | `right of 'error_right ] -> 'error) ->
    ('input_left, ('middle, 'error_left) Core.Result.t) t ->
    ('middle, ('output_right, 'error_right) Core.Result.t) t ->
    ('input_left, ('output_right, 'error) Core.Result.t) t
  val compose_results_merge_error :
    ('a, ('b, 'el) Core.Result.t) t ->
    ('b, ('d, 'er) Core.Result.t) t ->
    ('a, ('d, [ `left of 'el | `right of 'er ]) Core.Result.t) t
  val compose_result_left :
    ('input_left, ('middle, 'error) Core.Result.t) t ->
    ('middle, 'output_right) t ->
    ('input_left, ('output_right, 'error) Core.Result.t) t
  class type ['input, 'output] object_t =
    object
      method feed : 'input -> unit
      method next : [ `end_of_stream | `not_ready | `output of 'output ]
      method stop : unit
    end
  val to_object : ('a, 'b) t -> ('a, 'b) object_t
  val of_object : ('a, 'b) object_t -> ('a, 'b) t
  module Line_oriented :
    sig
      type parsing_buffer = Biocaml_transform.Line_oriented.parsing_buffer
      val parsing_buffer : ?filename:string -> unit -> parsing_buffer
      val feed_line : parsing_buffer -> string -> unit
      val feed_string : parsing_buffer -> string -> unit
      val queued_lines : parsing_buffer -> int
      val is_empty : parsing_buffer -> bool
      val next_line : parsing_buffer -> string option
      exception No_next_line
      val next_line_exn : parsing_buffer -> string
      val current_position : parsing_buffer -> Biocaml_pos.t
      val contents : parsing_buffer -> string list * string option
      val empty : parsing_buffer -> unit
      val make :
        ?name:string ->
        ?filename:string ->
        next:(parsing_buffer ->
              [ `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) t
      val make_merge_error :
        ?name:string ->
        ?filename:string ->
        next:(parsing_buffer ->
              [ `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) t
      val lines : unit -> (string, string) t
    end
  module Printer_queue :
    sig
      type 'a t = 'Biocaml_transform.Printer_queue.t
      val make :
        ?buffer:[ `clear of int | `reset of int ] ->
        to_string:('-> string) -> unit -> 'a t
      val feed : 'a t -> '-> unit
      val flush : 'a t -> string
      val is_empty : 'a t -> bool
    end
  val make_general :
    ?name:string ->
    next:(unit -> [ `end_of_stream | `not_ready | `output of 'output ]) ->
    feed:('input -> unit) ->
    stop:(unit -> unit) -> unit -> ('input, 'output) t
end