sig
exception Failure
type 'a t
exception CoFailure
type 'a co_t
val from : (int -> 'a option) -> 'a Shtream.t
val close : 'a Shtream.t -> unit
val of_list : 'a list -> 'a Shtream.t
val list_of : 'a Shtream.t -> 'a list
val of_stream : 'a Stream.t -> 'a Shtream.t
val stream_of : 'a Shtream.t -> 'a Stream.t
val npeek : ?n:int -> 'a Shtream.t -> 'a list
val peek : ?n:int -> 'a Shtream.t -> 'a option
val empty : 'a Shtream.t -> unit
val is_empty : 'a Shtream.t -> bool
val status : 'a Shtream.t -> Proc.status option
val junk : ?n:int -> 'a Shtream.t -> unit
val next : 'a Shtream.t -> 'a
val next' : 'a Shtream.t -> 'a option
val iter : ('a -> unit) -> 'a Shtream.t -> unit
val filter : ('a -> bool) -> 'a Shtream.t -> 'a Shtream.t
val map : ('a -> 'b) -> 'a Shtream.t -> 'b Shtream.t
val concat_map : ('a -> 'b list) -> 'a Shtream.t -> 'b Shtream.t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b Shtream.t -> 'a
val fold_right : ('a -> 'b Lazy.t -> 'b) -> 'a Shtream.t -> 'b -> 'b
val nil : unit -> 'a Shtream.t
val insert : 'a -> 'a Shtream.t -> unit
val cons : 'a -> 'a Shtream.t -> 'a Shtream.t
val append : 'a Shtream.t -> 'a Shtream.t -> 'a Shtream.t
val try_again : unit -> 'a
val warn : ('a, unit, string, 'b) Pervasives.format4 -> 'a
val fail_with : Proc.status -> 'a
type error_handler = [ `Exception of exn | `Warning of string ] -> unit
val current_error_handler : Shtream.error_handler Pervasives.ref
val ignore_errors : Shtream.error_handler
val warn_on_errors : Shtream.error_handler
val die_on_errors : Shtream.error_handler
val die_silently_on_errors : Shtream.error_handler
val coshtream_of :
?procref:Channel.procref -> ('a Shtream.t -> 'b) -> 'a Shtream.co_t
val conil : unit -> 'a Shtream.co_t
val conext : 'a Shtream.co_t -> 'a -> unit
val coclose : 'a Shtream.co_t -> unit
val annihilate : 'a Shtream.t -> 'a Shtream.co_t -> unit
val from_low : ?close:(unit -> unit) -> (int -> 'a) -> 'a Shtream.t
val claim : 'a Shtream.t -> 'a Shtream.t
val set_reader : 'a Shtream.t -> (Pervasives.in_channel -> 'a) -> unit
val hint_reader : 'a Shtream.t -> Reader.t -> unit
type protector = Util.protector
val add_protection : Shtream.protector -> 'a Shtream.t -> unit
val add_cleanup : (unit -> unit) -> 'a Shtream.t -> unit
val channel_of :
?procref:Channel.procref ->
?before:(unit -> unit) ->
?after:(unit -> unit) ->
('a -> unit) -> 'a Shtream.t -> Pervasives.in_channel
val of_channel :
?hint:(Reader.raw_line -> 'a) ->
(Pervasives.in_channel -> 'a) -> Pervasives.in_channel -> 'a Shtream.t
val of_file :
?hint:(Reader.raw_line -> 'a) ->
(Pervasives.in_channel -> 'a) -> string -> 'a Shtream.t
val of_command :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?hint:(Reader.raw_line -> 'a) ->
(Pervasives.in_channel -> 'a) -> string -> 'a Shtream.t
val of_program :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?hint:(Reader.raw_line -> 'a) ->
(Pervasives.in_channel -> 'a) ->
?path:bool -> string -> ?argv0:string -> string list -> 'a Shtream.t
val of_thunk :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?hint:(Reader.raw_line -> 'a) ->
(Pervasives.in_channel -> 'a) -> (unit -> unit) -> 'a Shtream.t
module type COMMON =
sig
exception Failure
type 'a t
exception CoFailure
type 'a co_t
val from : (int -> 'a option) -> 'a Shtream.COMMON.t
val close : 'a Shtream.COMMON.t -> unit
val of_list : 'a list -> 'a Shtream.COMMON.t
val list_of : 'a Shtream.COMMON.t -> 'a list
val of_stream : 'a Stream.t -> 'a Shtream.COMMON.t
val stream_of : 'a Shtream.COMMON.t -> 'a Stream.t
val npeek : ?n:int -> 'a Shtream.COMMON.t -> 'a list
val peek : ?n:int -> 'a Shtream.COMMON.t -> 'a option
val empty : 'a Shtream.COMMON.t -> unit
val is_empty : 'a Shtream.COMMON.t -> bool
val status : 'a Shtream.COMMON.t -> Proc.status option
val junk : ?n:int -> 'a Shtream.COMMON.t -> unit
val next : 'a Shtream.COMMON.t -> 'a
val next' : 'a Shtream.COMMON.t -> 'a option
val iter : ('a -> unit) -> 'a Shtream.COMMON.t -> unit
val filter : ('a -> bool) -> 'a Shtream.COMMON.t -> 'a Shtream.COMMON.t
val map : ('a -> 'b) -> 'a Shtream.COMMON.t -> 'b Shtream.COMMON.t
val concat_map :
('a -> 'b list) -> 'a Shtream.COMMON.t -> 'b Shtream.COMMON.t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b Shtream.COMMON.t -> 'a
val fold_right :
('a -> 'b Lazy.t -> 'b) -> 'a Shtream.COMMON.t -> 'b -> 'b
val nil : unit -> 'a Shtream.COMMON.t
val insert : 'a -> 'a Shtream.COMMON.t -> unit
val cons : 'a -> 'a Shtream.COMMON.t -> 'a Shtream.COMMON.t
val append :
'a Shtream.COMMON.t -> 'a Shtream.COMMON.t -> 'a Shtream.COMMON.t
val try_again : unit -> 'a
val warn : ('a, unit, string, 'b) Pervasives.format4 -> 'a
val fail_with : Proc.status -> 'a
type error_handler = [ `Exception of exn | `Warning of string ] -> unit
val current_error_handler : Shtream.COMMON.error_handler Pervasives.ref
val ignore_errors : Shtream.COMMON.error_handler
val warn_on_errors : Shtream.COMMON.error_handler
val die_on_errors : Shtream.COMMON.error_handler
val die_silently_on_errors : Shtream.COMMON.error_handler
val coshtream_of :
?procref:Channel.procref ->
('a Shtream.COMMON.t -> 'b) -> 'a Shtream.COMMON.co_t
val conil : unit -> 'a Shtream.COMMON.co_t
val conext : 'a Shtream.COMMON.co_t -> 'a -> unit
val coclose : 'a Shtream.COMMON.co_t -> unit
val annihilate : 'a Shtream.COMMON.t -> 'a Shtream.COMMON.co_t -> unit
val from_low :
?close:(unit -> unit) -> (int -> 'a) -> 'a Shtream.COMMON.t
val claim : 'a Shtream.COMMON.t -> 'a Shtream.COMMON.t
val set_reader :
'a Shtream.COMMON.t -> (Pervasives.in_channel -> 'a) -> unit
val hint_reader : 'a Shtream.COMMON.t -> Reader.t -> unit
type protector = Util.protector
val add_protection :
Shtream.COMMON.protector -> 'a Shtream.COMMON.t -> unit
val add_cleanup : (unit -> unit) -> 'a Shtream.COMMON.t -> unit
end
end