|
Distribution.Configuration | Portability | portable | Stability | alpha | Maintainer | Isaac Jones <ijones@syntaxpolice.org> |
|
|
|
Description |
Configurations
|
|
Synopsis |
|
|
|
Documentation |
|
|
A flag can represent a feature to be included, or a way of linking
a target against its dependencies, or in fact whatever you can think of.
| Constructors | | Instances | |
|
|
|
A ConfVar represents the variable type used.
| Constructors | | Instances | |
|
|
|
A boolean expression parameterized over the variable type used.
| Constructors | | Instances | |
|
|
|
Parse a configuration condition from a string.
|
|
|
:: Condition c | | -> (c -> Either d Bool) | (partial) variable assignment
| -> (Condition d, [d]) | | Simplify the condition and return its free variables.
|
|
|
|
Constructors | | Instances | |
|
|
|
|
|
|
|
:: Monoid a | | => [(String, [Bool])] | Domain for each flag name, will be tested in order.
| -> String | OS name, as returned by System.Info.os
| -> String | arch name, as returned by System.Info.arch
| -> (String, Version) | Compiler name + version
| -> [CondTree ConfVar [d] a] | | -> ([d] -> DepTestRslt [d]) | Dependency test function.
| -> Either [d] ([a], [d], [(String, Bool)]) | | Try to find a flag assignment that satisfies the constaints of all trees.
Returns either the missing dependencies, or a tuple containing the
resulting data, the associated dependencies, and the chosen flag
assignments.
In case of failure, the _smallest_ number of of missing dependencies is
returned. [XXX: Could also be specified with a function argument.]
XXX: The current algorithm is rather naive. A better approach would be to:
- Rule out possible paths, by taking a look at the associated dependencies.
- Infer the required values for the conditions of these paths, and
calculate the required domains for the variables used in these
conditions. Then picking a flag assignment would be linear (I guess).
This would require some sort of SAT solving, though, thus it's not
implemented unless we really need it.
|
|
|
|
Flatten a CondTree. This will resolve the CondTree by taking all
possible paths into account. Note that since branches represent exclusive
choices this may not result in a "sane" result.
|
|
|
Result of dependency test. Isomorphic to Maybe d but renamed for
clarity.
| Constructors | | Instances | |
|
|
Produced by Haddock version 0.9 |