The empty configuration. $$\text{empty} : \text{Config}$$
Equations
Instances For
Look up a key in the configuration. $$\text{lookup} : \text{String} \to \text{Config} \to \text{Option Value}$$
Equations
- Data.Configurator.lookup key config = Std.HashMap.get? config key
Instances For
Look up a key with a default fallback. $$\text{lookupDefault} : \text{Value} \to \text{String} \to \text{Config} \to \text{Value}$$
Equations
- Data.Configurator.lookupDefault default_ key config = (Data.Configurator.lookup key config).getD default_
Instances For
Look up a key, returning an error if not found. $$\text{require} : \text{String} \to \text{Config} \to \text{Except String Value}$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parse a configuration file content into a Config.
$$\text{parseConfig} : \text{String} \to \text{Except String Config}$$
Parse rules:
- Lines starting with
#are comments (after trimming) - Empty lines are ignored
key = valueformat- Values can be: quoted strings, numbers, true/false
- Dotted keys:
a.b.c = valuecreates a flat lookup under key "a.b.c"
Equations
- One or more equations did not get rendered due to their size.
Instances For
Load a configuration file from disk. $$\text{load} : \text{String} \to \text{IO Config}$$
Equations
- One or more equations did not get rendered due to their size.