package shcaml

  1. Overview
  2. Docs
type 'a t = 'a Shtream.t
type 'a co_t = 'a Shtream.co_t
exception Failure
exception CoFailure
val from : (int -> 'a option) -> 'a t
val close : 'a t -> unit
val of_list : 'a list -> 'a t
val list_of : 'a t -> 'a list
val of_stream : 'a Stream.t -> 'a t
val stream_of : 'a t -> 'a Stream.t
val npeek : ?n:int -> 'a t -> 'a list
val peek : ?n:int -> 'a t -> 'a option
val empty : 'a t -> unit
val is_empty : 'a t -> bool
val status : 'a t -> Proc.status option
val junk : ?n:int -> 'a t -> unit
val next : 'a t -> 'a
val next' : 'a t -> 'a option
val iter : ('a -> unit) -> 'a t -> unit
val filter : ('a -> bool) -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val concat_map : ('a -> 'b list) -> 'a t -> 'b t
val fold_left : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val fold_right : ('a -> 'b Lazy.t -> 'b) -> 'a t -> 'b -> 'b
val nil : unit -> 'a t
val insert : 'a -> 'a t -> unit
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a 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 : error_handler Pervasives.ref
val ignore_errors : error_handler
val warn_on_errors : error_handler
val die_on_errors : error_handler
val die_silently_on_errors : error_handler
val coshtream_of : ?procref:Channel.procref -> ('a t -> 'b) -> 'a co_t
val conil : unit -> 'a co_t
val conext : 'a co_t -> 'a -> unit
val coclose : 'a co_t -> unit
val annihilate : 'a t -> 'a co_t -> unit
val from_low : ?close:(unit -> unit) -> (int -> 'a) -> 'a t
val claim : 'a t -> 'a t
val set_reader : 'a t -> (Pervasives.in_channel -> 'a) -> unit
val hint_reader : 'a t -> Reader.t -> unit
type protector = Util.protector
val add_protection : protector -> 'a t -> unit
val add_cleanup : (unit -> unit) -> 'a t -> unit
module Elem : ELEM
type 'a elem = 'a Elem.elem
type initial = Elem.initial
val elem_reader : Reader.t -> Pervasives.in_channel -> initial elem
val output : ?channel:Pervasives.out_channel -> ?init:('a elem -> string) -> ?term:('a elem -> string) -> ?show:('a elem -> string) -> 'a elem t -> unit
val channel_of : ?procref:Channel.procref -> ?before:(unit -> unit) -> ?after:(unit -> unit) -> ?init:('a elem -> string) -> ?term:('a elem -> string) -> ?show:('a elem -> string) -> 'a elem t -> Pervasives.in_channel
val string_list_of : ?show:('a elem -> string) -> 'a elem t -> string list
val string_stream_of : ?show:('a elem -> string) -> 'a elem t -> string Stream.t
val of_file : ?reader:(Pervasives.in_channel -> initial elem) -> string -> initial elem t
val of_command : ?procref:Channel.procref -> ?dups:Channel.dup_spec -> ?reader:(Pervasives.in_channel -> initial elem) -> string -> initial elem t
val of_program : ?procref:Channel.procref -> ?dups:Channel.dup_spec -> ?reader:(Pervasives.in_channel -> initial elem) -> ?path:bool -> string -> ?argv0:string -> string list -> initial elem t
val of_thunk : ?procref:Channel.procref -> ?dups:Channel.dup_spec -> ?reader:(Pervasives.in_channel -> initial elem) -> (unit -> unit) -> initial elem t
val of_string_list : ?parse:(string -> initial elem) -> string list -> initial elem t
val of_string_stream : ?parse:(string -> initial elem) -> string Stream.t -> initial elem t
OCaml

Innovation. Community. Security.