sig
  type char_seq = string
  type int_seq = int list
  type 'a item = 'Biocaml_fasta.item = { header : string; sequence : 'a; }
  module Tags :
    sig
      type t =
        Biocaml_fasta.Tags.t = {
        forbid_empty_lines : bool;
        only_header_comment : bool;
        sharp_comments : bool;
        semicolon_comments : bool;
        max_items_per_line : int option;
        sequence : [ `char_sequence of char list option | `int_sequence ];
      }
      val char_sequence_default : t
      val int_sequence_default : t
      val is_char_sequence : t -> bool
      val is_int_sequence : t -> bool
      val to_string : t -> string
      val of_string :
        string -> (t, [> `tags_of_string of exn ]) Core.Result.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  module Error :
    sig
      type string_to_raw_item =
          [ `empty_line of Biocaml_pos.t
          | `incomplete_input of Biocaml_pos.t * string list * string option
          | `malformed_partial_sequence of Biocaml_pos.t * string
          | `sequence_is_too_long of Biocaml_pos.t * string ]
      type t =
          [ `empty_line of Biocaml_pos.t
          | `incomplete_input of Biocaml_pos.t * string list * string option
          | `malformed_partial_sequence of Biocaml_pos.t * string
          | `sequence_is_too_long of Biocaml_pos.t * string
          | `unnamed_char_seq of char_seq
          | `unnamed_int_seq of int_seq ]
      val sexp_of_string_to_raw_item : string_to_raw_item -> Sexplib.Sexp.t
      val string_to_raw_item_of_sexp : Sexplib.Sexp.t -> string_to_raw_item
      val sexp_of_t : t -> Sexplib.Sexp.t
      val t_of_sexp : Sexplib.Sexp.t -> t
    end
  exception Error of Error.t
  val in_channel_to_char_seq_item_stream :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t ->
    in_channel -> (char_seq item, [> Error.t ]) Core.Result.t Stream.t
  val in_channel_to_int_seq_item_stream :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t ->
    in_channel -> (int_seq item, [> Error.t ]) Core.Result.t Stream.t
  val in_channel_to_char_seq_item_stream_exn :
    ?buffer_size:int ->
    ?filename:string -> ?tags:Tags.t -> in_channel -> char_seq item Stream.t
  val in_channel_to_int_seq_item_stream_exn :
    ?buffer_size:int ->
    ?filename:string -> ?tags:Tags.t -> in_channel -> int_seq item Stream.t
  type 'a raw_item =
      [ `comment of string | `header of string | `partial_sequence of 'a ]
  val in_channel_to_char_seq_raw_item_stream :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t ->
    in_channel -> (char_seq raw_item, [> Error.t ]) Core.Result.t Stream.t
  val in_channel_to_int_seq_raw_item_stream :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t ->
    in_channel -> (int_seq raw_item, [> Error.t ]) Core.Result.t Stream.t
  val in_channel_to_char_seq_raw_item_stream_exn :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t -> in_channel -> char_seq raw_item Stream.t
  val in_channel_to_int_seq_raw_item_stream_exn :
    ?buffer_size:int ->
    ?filename:string ->
    ?tags:Tags.t -> in_channel -> int_seq raw_item Stream.t
  val char_seq_raw_item_to_string : char_seq raw_item -> string
  val int_seq_raw_item_to_string : int_seq raw_item -> string
  module Transform :
    sig
      val string_to_char_seq_raw_item :
        ?filename:string ->
        ?tags:Tags.t ->
        unit ->
        (string, (char_seq raw_item, [> Error.t ]) Core.Result.t)
        Biocaml_transform.t
      val char_seq_raw_item_to_item :
        unit ->
        (char_seq raw_item,
         (char_seq item, [> `unnamed_char_seq of char_seq ]) Core.Result.t)
        Biocaml_transform.t
      val char_seq_item_to_raw_item :
        ?tags:Tags.t ->
        unit -> (char_seq item, char_seq raw_item) Biocaml_transform.t
      val char_seq_raw_item_to_string :
        ?tags:Tags.t ->
        unit -> (char_seq raw_item, string) Biocaml_transform.t
      val string_to_int_seq_raw_item :
        ?filename:string ->
        ?tags:Tags.t ->
        unit ->
        (string, (int_seq raw_item, [> Error.t ]) Core.Result.t)
        Biocaml_transform.t
      val int_seq_raw_item_to_item :
        unit ->
        (int_seq raw_item,
         (int_seq item, [> `unnamed_int_seq of int_seq ]) Core.Result.t)
        Biocaml_transform.t
      val int_seq_item_to_raw_item :
        ?tags:Tags.t ->
        unit -> (int_seq item, int_seq raw_item) Biocaml_transform.t
      val int_seq_raw_item_to_string :
        ?tags:Tags.t ->
        unit -> (int_seq raw_item, string) Biocaml_transform.t
    end
  module Random :
    sig
      type specification =
          [ `non_sequence_probability of float | `tags of Tags.t ]
      val specification_of_string :
        string ->
        (specification list, [> `fasta of [> `parse_specification of exn ] ])
        Core.Std.Result.t
      val get_tags : [> specification ] list -> Tags.t option
      val unit_to_random_char_seq_raw_item :
        [> specification ] list ->
        ((unit, char_seq raw_item) Biocaml_transform.t,
         [> `inconsistent_tags of [> `int_sequence ] ])
        Core.Result.t
    end
  val sexp_of_char_seq : char_seq -> Sexplib.Sexp.t
  val char_seq_of_sexp : Sexplib.Sexp.t -> char_seq
  val sexp_of_int_seq : int_seq -> Sexplib.Sexp.t
  val int_seq_of_sexp : Sexplib.Sexp.t -> int_seq
  val sexp_of_item : ('-> Sexplib.Sexp.t) -> 'a item -> Sexplib.Sexp.t
  val item_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a item
  val sexp_of_raw_item :
    ('-> Sexplib.Sexp.t) -> 'a raw_item -> Sexplib.Sexp.t
  val raw_item_of_sexp :
    (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a raw_item
end