sig
module Input :
sig
type nonrec 'a t =
'a RingBuffer.Committed.t = {
mutable contents : 'a RingBuffer.t;
mutable mark : int option;
}
type mark = Weak of int | Uniq of int
val pp_with_mark : Format.formatter -> int * int * 'a t -> unit
val pp : Format.formatter -> 'a t -> unit
val copy : 'a t -> int -> 'a RingBuffer.t
val prepare : 'a t -> int -> 'a RingBuffer.t
val equal : mark -> mark -> bool
val mark : 'a t -> mark
val unmark : mark -> 'a t -> unit
val forget : mark -> 'a t -> unit
val write : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
val write_string : 'a t -> string -> int -> int -> unit
val create_bytes : int -> Internal_buffer.st t
val create_bigstring : int -> Internal_buffer.bs t
val create_by : proof:'a Internal_buffer.t -> int -> 'a t
val size : 'a t -> int
val peek : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
val read : 'a t -> 'a Internal_buffer.t -> int -> int -> unit
val read_space : 'a t -> ('a Internal_buffer.t * int * int) option
val write_space : 'a t -> ('a Internal_buffer.t * int * int) option
val transmit :
'a t -> ('a Internal_buffer.t -> int -> int -> int) -> int
val ravailable : 'a t -> int
val wavailable : 'a t -> int
val radvance : 'a t -> int -> unit
val wadvance : 'a t -> int -> unit
val get : 'a t -> char
val rollback : 'a t -> 'a Internal_buffer.t -> unit
val proof : 'a t -> 'a Internal_buffer.t
val savailable : 'a t -> int
end
type s = Parser.s = Complete | Incomplete
val pp : Format.formatter -> s -> unit
type err = Parser.err = ..
type ('a, 'input) state =
('a, 'input) Parser.state =
Read of { buffer : 'input Input.t; k : int -> s -> ('a, 'input) state;
}
| Done of 'a
| Fail of string list * err
type ('a, 'input) k = 'input Input.t -> s -> 'a
type ('a, 'input) fail =
(string list -> err -> ('a, 'input) state, 'input) k
type ('a, 'r, 'input) success = ('a -> ('r, 'input) state, 'input) k
type 'a t =
'a Parser.t = {
f :
'r 'input.
(('r, 'input) fail -> ('a, 'r, 'input) success -> ('r, 'input) state,
'input)
k;
}
val return : 'a -> 'a t
val fail : err -> 'a t
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
val ( <|> ) : 'a t -> 'a t -> 'a t
val ( <$> ) : ('a -> 'b) -> 'a t -> 'b t
val ( <* ) : 'a t -> 'b t -> 'a t
val ( *> ) : 'a t -> 'b t -> 'b t
val ( <*> ) : ('a -> 'b) t -> 'a t -> 'b t
val fix : ('a t -> 'a t) -> 'a t
val lift : ('a -> 'b) -> 'a t -> 'b t
val lift2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val lift3 : ('a -> 'b -> 'c -> 'd) -> 'a t -> 'b t -> 'c t -> 'd t
val run : 'input Input.t -> 'a t -> ('a, 'input) state
val only : 'input Input.t -> 'a t -> ('a, 'input) state
type err += Satisfy
type err += String
type err += Repeat
val peek_chr : char option t
val peek_chr_exn : char t
val advance : int -> unit t
val satisfy : (char -> bool) -> char t
val string : (string -> string) -> string -> string t
val store : Buffer.t -> (char -> bool) -> int t
val recognize : (char -> bool) -> string t
val char : char -> char t
val many : 'a t -> 'a list t
val one : 'a t -> 'a list t
val option : 'a -> 'a t -> 'a t
val take : int -> string t
val list : 'a t list -> 'a list t
val count : int -> 'a t -> 'a list t
val repeat : int option -> int option -> (char -> bool) -> string t
end