Module Assemblage.Ctx

module Ctx: sig .. end
Command execution contexts.

Execution contexts define an indirect addressing mechanism used to inject arguments on the command lines of action commands.

The exact context associated to a command execution depends on the part, the action (via the ctx argument of Assemblage.Action.v), and the name of the command being executed.



Context elements


type tag = [ `Tag of string ] 
The type for user defined tags.
type language = [ `C | `Js | `Lang of string | `OCaml ] 
The type for informing about the broad type of products being handled by an action.
type build_phase = [ `Archive of [ `Shared | `Static ]
| `Compile
| `Dep
| `Doc
| `Gen
| `Link
| `Pp ]
The type for informing about build phases.
type source = [ `Src of Assemblage.Path.ext ] 
The type for informing about source products.
type target = [ `Target of [ `Byte | `Js | `Native | `Other of string | `Src ] ] 
The type for informing about compilation targets.
type cmd = [ `Cmd of string Assemblage.Conf.key | `Cmd_static of string ] 
The type for informing about the command being executed.
type part_usage = [ `Build | `Dev | `Doc | `Other of string | `Outcome | `Test ] 
The type for part usages.
type part_kind = [ `Base | `Bin | `Dir | `Doc | `Lib | `Pkg | `Run | `Unit ] 
The type for part kinds.
type part = [ `Part of
[ `Base
| `Bin
| `Build
| `Dev
| `Dir
| `Doc
| `Lib
| `Name of string
| `Other of string
| `Outcome
| `Pkg
| `Run
| `Test
| `Unit ] ]
The type for informing about a part. Its name, kind and usages.
type elt = [ `Archive of [ `Shared | `Static ]
| `C
| `Cmd of string Assemblage.Conf.key
| `Cmd_static of string
| `Compile
| `Dep
| `Doc
| `Gen
| `Js
| `Lang of string
| `Link
| `OCaml
| `Part of
[ `Base
| `Bin
| `Build
| `Dev
| `Dir
| `Doc
| `Lib
| `Name of string
| `Other of string
| `Outcome
| `Pkg
| `Run
| `Test
| `Unit ]
| `Pp
| `Src of Assemblage.Path.ext
| `Tag of string
| `Target of [ `Byte | `Js | `Native | `Other of string | `Src ] ]
The type for context elements.
val pp_elt : Format.formatter -> elt -> unit
pp_elt ppf e prints an unspecified representation of e on ppf.

Contexts


type t 
The type for contexts. A context is a set of context elements.
val v : elt list -> t
v els is the context with elements els.
val matches : t -> t -> bool
matches c c' is true if context c matches c', that is if c is a subset of c'.
val pp : Format.formatter -> t -> unit
pp ppf c prints an unspecified representation of c on ppf.
include Set.S