sig
module Fmt :
sig
type 'a formatter = Format.formatter -> 'a -> unit
val pp : Format.formatter -> ('a, Format.formatter, unit) format -> 'a
val rpp : ('a, Format.formatter, unit) format -> Format.formatter -> 'a
val nop : 'a formatter
val pp_cut : unit formatter
val pp_sp : unit formatter
val pp_str : string formatter
val pp_int : int formatter
val pp_bool : bool formatter
val pp_larrow : unit formatter
val pp_rarrow : unit formatter
val pp_opt :
?pp_none:unit formatter -> 'a formatter -> 'a option formatter
val pp_list :
?pp_sep:unit formatter -> 'a formatter -> 'a list formatter
val pp_text : string formatter
val pp_lines : string formatter
val pp_doomed : string formatter
val pp_if_utf8 : 'a formatter -> 'a formatter -> 'a formatter
type style =
[ `Black
| `Blue
| `Bold
| `Cyan
| `Green
| `Magenta
| `None
| `Red
| `Underline
| `White
| `Yellow ]
val pp_styled : style -> 'a formatter -> 'a formatter
val pp_styled_str : style -> string formatter
val utf8_enabled : unit -> bool
val set_utf8_enabled : bool -> unit
type style_tags = [ `Ansi | `None ]
val style_tags : unit -> Assemblage.Private.Fmt.style_tags
val set_style_tags : Assemblage.Private.Fmt.style_tags -> unit
end
module Log :
sig
type level = Log.level = Show | Error | Warning | Info | Debug
val msg :
?header:string ->
level -> ('a, Format.formatter, unit, unit) format4 -> 'a
val kmsg :
?header:string ->
(unit -> 'a) ->
level -> ('b, Format.formatter, unit, 'a) format4 -> 'b
val show :
?header:string -> ('a, Format.formatter, unit, unit) format4 -> 'a
val err :
?header:string -> ('a, Format.formatter, unit, unit) format4 -> 'a
val warn :
?header:string -> ('a, Format.formatter, unit, unit) format4 -> 'a
val info :
?header:string -> ('a, Format.formatter, unit, unit) format4 -> 'a
val debug :
?header:string -> ('a, Format.formatter, unit, unit) format4 -> 'a
val level : unit -> level option
val set_level : level option -> unit
val set_formatter :
[ `All | `Level of level ] -> Format.formatter -> unit
val err_count : unit -> int
val warn_count : unit -> int
end
module Cmd :
sig
module Vcs :
sig
type t = [ `Git | `Hg ]
val exists : Cmd.path -> t -> bool Cmd.result
val find : Cmd.path -> t option Cmd.result
val get : Cmd.path -> t Cmd.result
val head : ?dirty:bool -> Cmd.path -> t -> string Cmd.result
val describe : ?dirty:bool -> Cmd.path -> t -> string Cmd.result
val override_kind : unit -> t option
val set_override_kind : t option -> unit
val override_exec : unit -> string option
val set_override_exec : string option -> unit
end
type 'a result = [ `Error of string | `Ok of 'a ]
val ret : 'a -> 'a result
val error : string -> 'a result
val bind : 'a result -> ('a -> 'b result) -> 'b result
val map : 'a result -> ('a -> 'b) -> 'b result
val get : 'a result -> 'a
val on_error : ?level:Log.level -> use:'a -> 'a result -> 'a
val ignore_error : use:'a -> 'a result -> 'a
val reword_error : ?replace:bool -> string -> 'a result -> 'a result
val exn_error :
?msg:(Printexc.raw_backtrace -> exn -> 'a -> string) ->
('a -> 'b) -> 'a -> 'b result
val ( >>= ) : 'a result -> ('a -> 'b result) -> 'b result
val ( >>| ) : 'a result -> ('a -> 'b) -> 'b result
module Infix :
sig
val ( >>= ) : 'a result -> ('a -> 'b result) -> 'b result
val ( >>| ) : 'a result -> ('a -> 'b) -> 'b result
end
type path = Path.t
module Path :
sig
val exists : path -> bool result
val move : ?force:bool -> path -> path -> unit result
end
module File :
sig
val exists : path -> bool result
val dev_null : path
val delete : ?maybe:bool -> path -> unit result
val temp : string -> path result
val with_inf :
(in_channel -> 'a -> 'b result) -> path -> 'a -> 'b result
val read : path -> string result
val read_lines : path -> string list result
val with_outf :
(out_channel -> 'a -> 'b result) -> path -> 'a -> 'b result
val write : path -> string -> unit result
val write_lines : path -> string list -> unit result
val write_subst :
(string * string) list -> path -> string -> unit result
end
module Dir :
sig
val exists : path -> bool result
val getcwd : unit -> path result
val chdir : path -> unit result
val fold_files_rec :
?skip:string list ->
(string -> 'a -> 'a result) -> 'a -> string list -> 'a result
end
val env : string -> string option
val get_env : string -> string result
val exists : string -> bool result
val exec_ret : string -> string list -> int
val exec : string -> string list -> unit result
val read : ?trim:bool -> string -> string list -> string result
val read_lines : string -> string list -> string list result
val write : string -> string list -> path -> unit result
end
module Conf :
sig
type t
type 'a value = 'a Conf.value
val const : 'a -> 'a value
val app : ('a -> 'b) value -> 'a value -> 'b value
val ( $ ) : ('a -> 'b) value -> 'a value -> 'b value
val true_ : bool value
val false_ : bool value
val neg : bool value -> bool value
val ( &&& ) : bool value -> bool value -> bool value
val ( ||| ) : bool value -> bool value -> bool value
val pick_if : bool value -> 'a value -> 'a value -> 'a value
module Option :
sig
val wrap : 'a value option -> 'a option value
val some : 'a value -> 'a option value
val get : ?none:'a value -> 'a option value -> 'a value
end
type 'a parser = string -> [ `Error of string | `Ok of 'a ]
type 'a printer = Format.formatter -> 'a -> unit
type 'a converter = 'a parser * 'a printer
val parser : 'a converter -> 'a parser
val printer : 'a converter -> 'a printer
type 'a key = 'a Conf.key
val key :
?public:bool ->
?docs:string ->
?docv:string ->
?doc:string -> string -> 'a converter -> 'a value -> 'a key
val value : 'a key -> 'a value
type scheme = string * (string * t)
type def = Conf.def
val def : 'a key -> 'a -> def
val defv : 'a key -> 'a value -> def
val scheme :
?doc:string -> ?base:scheme -> string -> def list -> scheme
val project_version : string key
val docs_project : string
val debug : bool key
val profile : bool key
val warn_error : bool key
val test : bool key
val doc : bool key
val jobs : int key
val docs_build_properties : string
val root_dir : Path.t key
val build_dir : Path.rel key
val docs_build_directories : string
val ocaml_native_tools : bool key
val ocaml_version : (int * int * int * string option) key
val ocaml_byte : bool key
val ocaml_native : bool key
val ocaml_native_dynlink : bool key
val ocaml_js : bool key
val ocaml_annot : bool key
val ocaml_build_ast : bool key
val ocaml_dumpast : string key
val ocamlc : string key
val ocamlopt : string key
val js_of_ocaml : string key
val ocamlmklib : string key
val ocamldep : string key
val ocamllex : string key
val ocamlyacc : string key
val ocaml : string key
val ocamlrun : string key
val ocamldebug : string key
val ocamlprof : string key
val ocamlfind : string key
val opam : string key
val opam_installer : string key
val opam_admin : string key
val docs_ocaml_system : string
val c_dynlink : bool key
val c_js : bool key
val cc : string key
val pkg_config : string key
val docs_c_system : string
val uname : string key
val host_os : string key
val host_arch : string key
val host_word_size : int key
val target_os : string key
val target_arch : string key
val target_word_size : int key
val docs_machine_information : string
val echo : string key
val cd : string key
val ln : string key
val cp : string key
val mv : string key
val rm : string key
val rmdir : string key
val mkdir : string key
val cat : string key
val make : string key
val docs_system_utilities : string
val bool : bool converter
val int : int converter
val string : string converter
val path : Path.t converter
val abs_path : Path.abs converter
val rel_path : Path.rel converter
val enum : (string * 'a) list -> 'a converter
val version : (int * int * int * string option) converter
module Key :
sig
type t = V : 'a key -> Assemblage.Private.Conf.Key.t
val hide_type : 'a key -> Assemblage.Private.Conf.Key.t
val equal :
Assemblage.Private.Conf.Key.t ->
Assemblage.Private.Conf.Key.t -> bool
val compare :
Assemblage.Private.Conf.Key.t ->
Assemblage.Private.Conf.Key.t -> int
val id : 'a key -> int
val name : 'a key -> string
val public : 'a key -> bool
val converter : 'a key -> 'a converter
val default : 'a key -> 'a value
val doc : 'a key -> string option
val docv : 'a key -> string option
val docs : 'a key -> string option
module Set :
sig
type elt = t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> t * bool * t
val find : elt -> t -> elt
val of_list : elt list -> Assemblage.Private.Conf.Key.t
end
module Map :
sig
type key = t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val dom :
'a Assemblage.Private.Conf.Key.t ->
Assemblage.Private.Conf.Key.Set.t
end
end
val empty : Assemblage.Private.Conf.t
val is_empty : Assemblage.Private.Conf.t -> bool
val mem : Assemblage.Private.Conf.t -> 'a key -> bool
val add :
Assemblage.Private.Conf.t -> 'a key -> Assemblage.Private.Conf.t
val set :
Assemblage.Private.Conf.t ->
'a key -> 'a value -> Assemblage.Private.Conf.t
val rem :
Assemblage.Private.Conf.t -> 'a key -> Assemblage.Private.Conf.t
val merge :
Assemblage.Private.Conf.t ->
Assemblage.Private.Conf.t -> Assemblage.Private.Conf.t
val find : Assemblage.Private.Conf.t -> 'a key -> 'a value option
val get : Assemblage.Private.Conf.t -> 'a key -> 'a value
val pp : Format.formatter -> Assemblage.Private.Conf.t -> unit
val of_keys :
Assemblage.Private.Conf.Key.Set.t -> Assemblage.Private.Conf.t
val domain :
Assemblage.Private.Conf.t -> Assemblage.Private.Conf.Key.Set.t
val pp_key_dup :
Format.formatter -> Assemblage.Private.Conf.Key.t -> unit
val deps : 'a value -> Assemblage.Private.Conf.Key.Set.t
val eval : Assemblage.Private.Conf.t -> 'a value -> 'a
val doc_project : string
val doc_build_properties : string
val doc_build_directories : string
val doc_ocaml_system : string
val doc_c_system : string
val doc_machine_information : string
val doc_system_utilities : string
end
module Args :
sig
type t = Args.t
val v : ?exists:bool Conf.value -> Ctx.t -> string list Conf.value -> t
val vc : ?exists:bool Conf.value -> Ctx.t -> string list -> t
val empty : t
val is_empty : t -> bool
val append : t -> t -> t
val ( @@@ ) : t -> t -> t
val concat : t list -> t
val linkall : t
val thread : t
val vmthread : t
val cclib : string list -> t
val ccopt : string list -> t
val stub : string -> t
val deps : t -> Assemblage.Private.Conf.Key.Set.t
val pp : Assemblage.Private.Conf.t -> Format.formatter -> t -> unit
val for_ctx :
Assemblage.Private.Conf.t -> Assemblage.Ctx.t -> t -> string list
end
module Acmd :
sig
type args = Assemblage.Private.Args.t
type cmd = Acmd.cmd
val cmd : string Conf.key -> cmd Conf.value
val static : string -> cmd
type t = Acmd.t
val v :
?stdin:Path.t ->
?stdout:Path.t -> ?stderr:Path.t -> cmd -> string list -> t
module Args :
sig
val add : 'a -> 'a list -> 'a list
val adds : 'a list -> 'a list -> 'a list
val add_if : bool -> 'a -> 'a list -> 'a list
val adds_if : bool -> 'a list -> 'a list -> 'a list
val fadd_if : bool -> ('b -> 'a) -> 'b -> 'a list -> 'a list
val fadds_if : bool -> ('b -> 'a list) -> 'b -> 'a list -> 'a list
val path_arg : ?opt:string -> Path.t -> string list -> string list
val path_args :
?opt:string -> Path.t list -> string list -> string list
val path : Path.t -> ext:Path.ext -> Path.t
end
val dev_null : Path.t Conf.value
val cd : (Path.t -> t) Conf.value
val ln : (Path.t -> Path.t -> t) Conf.value
val ln_rel : (Path.t -> Path.t -> t) Conf.value
val cp : (Path.t -> Path.t -> t) Conf.value
val mv : (Path.t -> Path.t -> t) Conf.value
val rm_files : (?f:bool -> Path.t list -> t) Conf.value
val rm_dirs : (?f:bool -> ?r:bool -> Path.t list -> t) Conf.value
val mkdir : (Path.t -> t) Conf.value
val stamp : (Path.t -> string -> t) Conf.value
val cmd_key : t -> string Assemblage.Private.Conf.key option
val cmd_name : t -> string
val args : t -> string list
val stdin : t -> Assemblage.Path.t option
val stdout : t -> Assemblage.Path.t option
val stderr : t -> Assemblage.Path.t option
val pp : Format.formatter -> t -> unit
val ctx : Assemblage.Ctx.t -> t -> Assemblage.Ctx.t
val args_with_ctx :
Assemblage.Private.Conf.t ->
Assemblage.Ctx.t -> Assemblage.Private.Acmd.args -> t -> string list
end
module Action :
sig
type t = Action.t
val v :
?log:string ->
?ctx:Ctx.t ->
?inputs:Path.t list -> ?outputs:Path.t list -> Acmd.t list -> t
val ctx : t -> Ctx.t
val inputs : t -> Path.t list
val outputs : t -> Path.t list
val cmds : t -> Acmd.t list
val log : t -> string option
val products : t -> Path.t list
val symlink : (Path.t -> Path.t -> t) Conf.value
val list_inputs : t list -> Path.t list
val list_outputs : t list -> Path.t list
val list_products : t list -> Path.t list
val args : t -> Assemblage.Private.Args.t
val pp : Assemblage.Private.Conf.t -> Format.formatter -> t -> unit
end
module Part :
sig
type kind = Part.kind
val pp_kind : Format.formatter -> kind -> unit
type usage =
[ `Build | `Dev | `Doc | `Other of string | `Outcome | `Test ]
val pp_usage : Format.formatter -> usage -> unit
type meta = Part.meta
val meta_key : unit -> ('a -> meta) * (meta -> 'a option)
val meta_nil : meta
type +'a t = 'a Part.t constraint 'a = [< part_kind ]
val v :
?usage:usage ->
?exists:bool Conf.value ->
?args:Args.t ->
?meta:meta ->
?needs:[< part_kind ] part list ->
?root:Path.rel Conf.value ->
?actions:(kind part -> Action.t list Conf.value) ->
?check:(kind part -> bool Conf.value) ->
string -> [< part_kind > `Base ] part
val kind : [< part_kind ] part -> kind
val name : [< part_kind ] part -> string
val usage : [< part_kind ] part -> usage
val exists : [< part_kind ] part -> bool Conf.value
val meta : [< part_kind ] part -> meta
val get_meta : (meta -> 'a option) -> [< part_kind ] t -> 'a
val root : [< part_kind ] part -> Path.rel Conf.value
val root_path : [< part_kind ] part -> Path.t Conf.value
val needs : [< part_kind ] part -> kind t list
val actions : [< part_kind ] part -> Action.t list Conf.value
val check : [< part_kind ] part -> bool Conf.value
val id : [< part_kind ] part -> int
val equal : [< part_kind ] part -> [< part_kind ] part -> bool
val compare : [< part_kind ] part -> [< part_kind ] part -> int
val redefine :
?check:(kind part -> bool Conf.value) ->
?actions:(kind part -> Action.t list Conf.value) ->
([< part_kind ] as 'a) part -> 'a part
val file :
?usage:usage ->
?exists:bool Conf.value -> Path.t -> [< part_kind > `Base ] part
val integrate :
?add_need:(kind part -> bool) ->
([< part_kind ] as 'a) part -> [< part_kind ] part -> 'a part
val coerce : ([< part_kind ] as 'a) -> [< part_kind ] part -> 'a part
val coerce_if :
([< part_kind ] as 'a) -> [< part_kind ] part -> 'a part option
val list_actions : kind part list -> Action.t list Conf.value
val list_uniquify : kind part list -> kind part list
val list_keep :
(([< part_kind ] as 'a) part -> bool) -> 'a part list -> 'a part list
val list_keep_map :
(([< part_kind ] as 'a) part -> 'b option) -> 'a part list -> 'b list
val list_keep_kind :
([< part_kind ] as 'a) -> [< part_kind ] part list -> 'a part list
val list_keep_kinds :
kind list -> ([< part_kind ] as 'a) part list -> 'a part list
val list_fold :
('a -> ([< part_kind ] as 'b) part -> 'a) -> 'a -> 'b part list -> 'a
val list_fold_kind :
([< part_kind ] as 'b) ->
('a -> 'b part -> 'a) -> 'a -> [< part_kind ] part list -> 'a
val list_fold_rec :
('a -> kind part -> 'a) -> 'a -> kind part list -> 'a
val list_fold_kind_rec :
([< part_kind ] as 'b) ->
('a -> 'b t -> 'a) -> 'a -> kind t list -> 'a
module Set :
sig
type elt = kind part
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> t * bool * t
val find : elt -> t -> elt
val of_list : kind part list -> t
end
module Map :
sig
type key = kind part
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val dom : 'a t -> Set.t
end
val args :
[< Assemblage.part_kind ] Assemblage.part ->
Assemblage.Private.Args.t
val ctx : [< Assemblage.part_kind ] Assemblage.part -> Assemblage.Ctx.t
val deps :
[< Assemblage.part_kind ] Assemblage.part ->
Assemblage.Private.Conf.Key.Set.t
end
module Project :
sig
type t = Project.t
val v :
?exists:bool Conf.value ->
?args:Args.t ->
?schemes:Conf.scheme list ->
string -> parts:[< part_kind ] part list -> project
val name : project -> string
val exists : Assemblage.project -> bool Assemblage.Private.Conf.value
val args : Assemblage.project -> Assemblage.Private.Args.t
val schemes : Assemblage.project -> Assemblage.Private.Conf.scheme list
val parts :
Assemblage.project -> Assemblage.part_kind Assemblage.part list
val deps : Assemblage.project -> Assemblage.Private.Conf.Key.Set.t
val conf : Assemblage.project -> Assemblage.Private.Conf.t
val with_conf :
Assemblage.project -> Assemblage.Private.Conf.t -> Assemblage.project
val eval : Assemblage.project -> 'a Assemblage.Private.Conf.value -> 'a
val eval_key :
Assemblage.project -> 'a Assemblage.Private.Conf.key -> 'a
val version : Assemblage.project -> string
val products :
?kind:[ `Any | `Input | `Output | `Source ] ->
Assemblage.project -> Assemblage.Path.Set.t
val watermark_string : ?suffix:string -> t -> string
val pp_signature : Format.formatter -> t -> unit
val list : unit -> Assemblage.project list
end
end