sig
type 'a t
type 'a io = 'a CCMonadIO.t
type 'a with_finalizer
type 'a or_error = [ `Error of string | `Ok of 'a ]
val ( >>= ) : 'a CCMonadIO.t -> ('a -> 'b CCMonadIO.t) -> 'b CCMonadIO.t
val return : 'a -> 'a CCMonadIO.t
val repeat : int -> 'a CCMonadIO.t -> 'a list CCMonadIO.t
val repeat' : int -> 'a CCMonadIO.t -> unit CCMonadIO.t
val map : ('a -> 'b) -> 'a CCMonadIO.t -> 'b CCMonadIO.t
val ( >|= ) : 'a CCMonadIO.t -> ('a -> 'b) -> 'b CCMonadIO.t
val bind :
?finalize:unit CCMonadIO.t ->
('a -> 'b CCMonadIO.t) -> 'a CCMonadIO.t -> 'b CCMonadIO.t
val pure : 'a -> 'a CCMonadIO.t
val ( <*> ) : ('a -> 'b) CCMonadIO.t -> 'a CCMonadIO.t -> 'b CCMonadIO.t
val lift : ('a -> 'b) -> 'a CCMonadIO.t -> 'b CCMonadIO.t
val lift2 :
('a -> 'b -> 'c) -> 'a CCMonadIO.t -> 'b CCMonadIO.t -> 'c CCMonadIO.t
val lift3 :
('a -> 'b -> 'c -> 'd) ->
'a CCMonadIO.t -> 'b CCMonadIO.t -> 'c CCMonadIO.t -> 'd CCMonadIO.t
val sequence : 'a CCMonadIO.t list -> 'a list CCMonadIO.t
val sequence_map : ('a -> 'b CCMonadIO.t) -> 'a list -> 'b list CCMonadIO.t
val fail : string -> 'a CCMonadIO.t
val ( >>>= ) :
'a CCMonadIO.with_finalizer -> ('a -> 'b CCMonadIO.t) -> 'b CCMonadIO.t
val run : 'a CCMonadIO.t -> 'a CCMonadIO.or_error
exception IO_error of string
val run_exn : 'a CCMonadIO.t -> 'a
val register_printer : (exn -> string option) -> unit
val with_in :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> Pervasives.in_channel CCMonadIO.with_finalizer
val read :
Pervasives.in_channel -> Bytes.t -> int -> int -> int CCMonadIO.t
val read_line : Pervasives.in_channel -> string option CCMonadIO.t
val read_lines : Pervasives.in_channel -> string list CCMonadIO.t
val read_all : Pervasives.in_channel -> string CCMonadIO.t
val with_out :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> Pervasives.out_channel CCMonadIO.with_finalizer
val with_out_a :
?mode:int ->
?flags:Pervasives.open_flag list ->
string -> Pervasives.out_channel CCMonadIO.with_finalizer
val write :
Pervasives.out_channel -> string -> int -> int -> unit CCMonadIO.t
val write_str : Pervasives.out_channel -> string -> unit CCMonadIO.t
val write_buf : Pervasives.out_channel -> Buffer.t -> unit CCMonadIO.t
val write_line : Pervasives.out_channel -> string -> unit CCMonadIO.t
val flush : Pervasives.out_channel -> unit CCMonadIO.t
module Seq :
sig
type 'a t
val map :
('a -> 'b CCMonadIO.io) -> 'a CCMonadIO.Seq.t -> 'b CCMonadIO.Seq.t
val map_pure : ('a -> 'b) -> 'a CCMonadIO.Seq.t -> 'b CCMonadIO.Seq.t
val filter_map :
('a -> 'b option) -> 'a CCMonadIO.Seq.t -> 'b CCMonadIO.Seq.t
val filter : ('a -> bool) -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val flat_map :
('a -> 'b CCMonadIO.Seq.t CCMonadIO.io) ->
'a CCMonadIO.Seq.t -> 'b CCMonadIO.Seq.t
val take : int -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val drop : int -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val take_while :
('a -> bool CCMonadIO.io) -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val drop_while :
('a -> bool CCMonadIO.io) -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val general_iter :
('b -> 'a -> [ `Continue of 'b * 'c option | `Stop ] CCMonadIO.io) ->
'b -> 'a CCMonadIO.Seq.t -> 'c CCMonadIO.Seq.t
val tee :
('a -> unit CCMonadIO.io) list ->
'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val iter :
('a -> 'b CCMonadIO.io) -> 'a CCMonadIO.Seq.t -> unit CCMonadIO.io
val length : 'a CCMonadIO.Seq.t -> int CCMonadIO.io
val fold :
('b -> 'a -> 'b CCMonadIO.io) ->
'b -> 'a CCMonadIO.Seq.t -> 'b CCMonadIO.io
val fold_pure :
('b -> 'a -> 'b) -> 'b -> 'a CCMonadIO.Seq.t -> 'b CCMonadIO.io
type 'a step_result = Yield of 'a | Stop
type 'a gen = unit -> 'a CCMonadIO.Seq.step_result CCMonadIO.io
val of_fun : 'a CCMonadIO.Seq.gen -> 'a CCMonadIO.Seq.t
val empty : 'a CCMonadIO.Seq.t
val singleton : 'a -> 'a CCMonadIO.Seq.t
val cons : 'a -> 'a CCMonadIO.Seq.t -> 'a CCMonadIO.Seq.t
val of_list : 'a list -> 'a CCMonadIO.Seq.t
val of_array : 'a array -> 'a CCMonadIO.Seq.t
val chunks :
size:int -> Pervasives.in_channel -> string CCMonadIO.Seq.t
val lines : Pervasives.in_channel -> string CCMonadIO.Seq.t
val words : string CCMonadIO.Seq.t -> string CCMonadIO.Seq.t
val output :
?sep:string ->
Pervasives.out_channel -> string CCMonadIO.Seq.t -> unit CCMonadIO.io
end
module File :
sig
type t = string
val to_string : CCMonadIO.File.t -> string
val make : string -> CCMonadIO.File.t
val exists : CCMonadIO.File.t -> bool CCMonadIO.io
val is_directory : CCMonadIO.File.t -> bool CCMonadIO.io
val remove : CCMonadIO.File.t -> unit CCMonadIO.io
val read_dir :
?recurse:bool ->
CCMonadIO.File.t -> CCMonadIO.File.t CCMonadIO.Seq.t CCMonadIO.io
val walk :
CCMonadIO.File.t ->
([ `Dir | `File ] * CCMonadIO.File.t) CCMonadIO.Seq.t CCMonadIO.io
end
module Raw : sig val wrap : (unit -> 'a) -> 'a CCMonadIO.t end
end