sig
type 'a result = [ `Error of string | `Ok of 'a ]
val ret : 'a -> 'a Assemblage.Cmd.result
val error : string -> 'a Assemblage.Cmd.result
val bind :
'a Assemblage.Cmd.result ->
('a -> 'b Assemblage.Cmd.result) -> 'b Assemblage.Cmd.result
val map :
'a Assemblage.Cmd.result -> ('a -> 'b) -> 'b Assemblage.Cmd.result
val get : 'a Assemblage.Cmd.result -> 'a
val on_error :
?level:Assemblage.Log.level -> use:'a -> 'a Assemblage.Cmd.result -> 'a
val ignore_error : use:'a -> 'a Assemblage.Cmd.result -> 'a
val reword_error :
?replace:bool ->
string -> 'a Assemblage.Cmd.result -> 'a Assemblage.Cmd.result
val exn_error :
?msg:(Printexc.raw_backtrace -> exn -> 'a -> string) ->
('a -> 'b) -> 'a -> 'b Assemblage.Cmd.result
val ( >>= ) :
'a Assemblage.Cmd.result ->
('a -> 'b Assemblage.Cmd.result) -> 'b Assemblage.Cmd.result
val ( >>| ) :
'a Assemblage.Cmd.result -> ('a -> 'b) -> 'b Assemblage.Cmd.result
module Infix :
sig
val ( >>= ) :
'a Assemblage.Cmd.result ->
('a -> 'b Assemblage.Cmd.result) -> 'b Assemblage.Cmd.result
val ( >>| ) :
'a Assemblage.Cmd.result -> ('a -> 'b) -> 'b Assemblage.Cmd.result
end
type path = Assemblage.Path.t
module Path :
sig
val exists : Assemblage.Cmd.path -> bool Assemblage.Cmd.result
val move :
?force:bool ->
Assemblage.Cmd.path ->
Assemblage.Cmd.path -> unit Assemblage.Cmd.result
end
module File :
sig
val exists : Assemblage.Cmd.path -> bool Assemblage.Cmd.result
val dev_null : Assemblage.Cmd.path
val delete :
?maybe:bool -> Assemblage.Cmd.path -> unit Assemblage.Cmd.result
val temp : string -> Assemblage.Cmd.path Assemblage.Cmd.result
val with_inf :
(Pervasives.in_channel -> 'a -> 'b Assemblage.Cmd.result) ->
Assemblage.Cmd.path -> 'a -> 'b Assemblage.Cmd.result
val read : Assemblage.Cmd.path -> string Assemblage.Cmd.result
val read_lines :
Assemblage.Cmd.path -> string list Assemblage.Cmd.result
val with_outf :
(Pervasives.out_channel -> 'a -> 'b Assemblage.Cmd.result) ->
Assemblage.Cmd.path -> 'a -> 'b Assemblage.Cmd.result
val write : Assemblage.Cmd.path -> string -> unit Assemblage.Cmd.result
val write_lines :
Assemblage.Cmd.path -> string list -> unit Assemblage.Cmd.result
val write_subst :
(string * string) list ->
Assemblage.Cmd.path -> string -> unit Assemblage.Cmd.result
end
module Dir :
sig
val exists : Assemblage.Cmd.path -> bool Assemblage.Cmd.result
val getcwd : unit -> Assemblage.Cmd.path Assemblage.Cmd.result
val chdir : Assemblage.Cmd.path -> unit Assemblage.Cmd.result
val fold_files_rec :
?skip:string list ->
(string -> 'a -> 'a Assemblage.Cmd.result) ->
'a -> string list -> 'a Assemblage.Cmd.result
end
module Vcs :
sig
type t = [ `Git | `Hg ]
val exists :
Assemblage.Cmd.path ->
Assemblage.Cmd.Vcs.t -> bool Assemblage.Cmd.result
val find :
Assemblage.Cmd.path ->
Assemblage.Cmd.Vcs.t option Assemblage.Cmd.result
val get :
Assemblage.Cmd.path -> Assemblage.Cmd.Vcs.t Assemblage.Cmd.result
val head :
?dirty:bool ->
Assemblage.Cmd.path ->
Assemblage.Cmd.Vcs.t -> string Assemblage.Cmd.result
val describe :
?dirty:bool ->
Assemblage.Cmd.path ->
Assemblage.Cmd.Vcs.t -> string Assemblage.Cmd.result
end
val env : string -> string option
val get_env : string -> string Assemblage.Cmd.result
val exists : string -> bool Assemblage.Cmd.result
val exec_ret : string -> string list -> int
val exec : string -> string list -> unit Assemblage.Cmd.result
val read :
?trim:bool -> string -> string list -> string Assemblage.Cmd.result
val read_lines : string -> string list -> string list Assemblage.Cmd.result
val write :
string ->
string list -> Assemblage.Cmd.path -> unit Assemblage.Cmd.result
end