Copyright | (c) Galois Inc 2015-2020 |
---|---|
License | BSD3 |
Maintainer | Rob Dockins <[email protected]> |
Stability | provisional |
Safe Haskell | None |
Language | Haskell2010 |
What4.Config
Description
This module provides access to persistent configuration settings, and is designed for access both by Haskell client code of the What4 library, and by users of the systems ultimately built using the library, for example, from within a user-facing REPL.
Configurations are defined dynamically by combining a collection of configuration option descriptions. This allows disparate modules to define their own configuration options, rather than having to define the options for all modules in a central place. Every configuration option has a name, which consists of a nonempty sequence of period-separated strings. The intention is that option names should conform to a namespace hierarchy both for organizational purposes and to avoid namespace conflicts. For example, the options for an "asdf" module might be named as:
- asdf.widget
- asdf.frob
- asdf.max_bound
At runtime, a configuration consists of a collection of nested
finite maps corresponding to the namespace tree of the existing
options. A configuration option may be queried or set either by
using a raw string representation of the name (see
getOptionSettingFromText
), or by using a ConfigOption