package mirage
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ade8c410b2de3997c4a513f53f6c990dac6af508161e20df01b64fa7975ca5be
sha512=42fddf09be84c4251417145b88d4f63b41db1b29c9622b2b4e4508e31146f227a16875e670da96251208745f79a42f0b7d2bd8b44b883a705381b4c97a4255b8
doc/mirage.functoria/Functoria/Key/index.html
Module Functoria.Key
Configuration command-line arguments.
module Arg : sig ... endTerms for cross-stage arguments.
Configuration Keys
The type for configuration keys. Keys are used to parameterize the choice of module implementation.
create n a is the key named n whose contents is determined by parsing the command-line argument a.
Configuration Values
The type for configure-time and run-time values. Values are either pure or obtained by composing other values. Values might have data dependencies, which form an (implicit) directed and acyclic graph that need to be evaluated.
val pure : 'a -> 'a valuepure x is a value without any dependency.
f $ v is is the value resulting from the application of f'value to v's value. $ is the usual app operator for applicative functor.
val default : 'a value -> 'adefault v returns the default value for v.
Abstract Keys
The type for abstract keys.
val name : t -> stringname t is the string given as t's name when t was created.
module Set : sig ... endSet implements sets over t elements.
Parsing context
type context := Context.tThe type for values holding parsing context.
val context : Set.t -> context Cmdliner.Term.tcontext ks is a Cmdliner term that evaluates into a parsing context for command-line arguments.
mem c v is true iff all the dependencies of v have been evaluated.
eval c v evaluates v in c's context, using default values if necessary.
get c k is k's value in c's context. If k is not present in c, it is k's default value.
find c k is k's value in c's context or None if k is not present in c.