Module Assemblage.Acmd.Args

module Args: sig .. end
Action command argument combinators.

A few convience function to help in the definition of command arguments.

FIXME. Not really happy about this module, its name and contents.



Combinators


val add : 'a -> 'a list -> 'a list
add v l is v :: l.
val adds : 'a list -> 'a list -> 'a list
adds l l' adds l in front of l'.
val add_if : bool -> 'a -> 'a list -> 'a list
add_if c v l is add v l if c is true and l otherwise.
val adds_if : bool -> 'a list -> 'a list -> 'a list
adds_if c l l' if adds l l' if c is true and l' otherwise.
val fadd_if : bool -> ('b -> 'a) -> 'b -> 'a list -> 'a list
add_if c f v l is add (f v) l if c is true and l otherwise.
val fadds_if : bool -> ('b -> 'a list) -> 'b -> 'a list -> 'a list
fadds_if c (f v) l is adds (f v) l if c is true and l otherwise.
val path_arg : ?opt:string -> Assemblage.Path.t -> string list -> string list
path_arg p l is Path.to_string p :: l. If opt is present it is prepended in front of the path.
val path_args : ?opt:string -> Assemblage.Path.t list -> string list -> string list
path_args ?opt ps l is like Assemblage.Acmd.Args.path_arg but for each element of ps. If opt is present it is prepended in front of each path.
val path : Assemblage.Path.t -> ext:Assemblage.Path.ext -> Assemblage.Path.t
path ext is Assemblage.Path.change_ext path ext.