Q package:cabal-install-solver

Options for goal qualification (used in qualifyDeps) See also defaultQualifyOptions
Qualified flag name.
Qualified stanza name.
Qualified package version.
Qualified package name.
Any dependency on base is considered independent This makes it possible to have base shims.
If we depend on an executable from a package (via build-tools), we should solve for the dependencies of that package separately (since we're not going to actually try to link it.) We qualify for EACH package separately; e.g., Exe pn1 pn2 qualifies the build-tools dependency on pn2 from package pn1. (If we tracked only pn1, that would require a consistent dependency resolution for all of the depended upon executables from a package; if we tracked only pn2, that would require us to pick only one version of an executable over the entire install plan.)
Setup dependency By rights setup dependencies ought to be nestable; after all, the setup dependencies of a package might themselves have setup dependencies, which are independent from everything else. However, this very quickly leads to infinite search trees in the solver. Therefore we limit ourselves to a single qualifier (within a given namespace).
Top-level dependency in this namespace
A qualified entity. Pairs a package path with the entity.
Qualifier of a package within a namespace (see PackagePath)
integer division truncated toward zero WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
simultaneous quot and rem WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
Do we have a version of base relying on another version of base?
Apply built-in rules for package qualifiers Although the behaviour of qualifyDeps depends on the QualifyOptions, it is important that these QualifyOptions are _static_. Qualification does NOT depend on flag assignment; in other words, it behaves the same no matter which choices the solver makes (modulo the global QualifyOptions); we rely on this in linkDeps (see comment there). NOTE: It's the _dependencies_ of a package that may or may not be independent from the package itself. Package flag choices must of course be consistent.
The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq. The Haskell Report defines no laws for Eq. However, instances are encouraged to follow these properties:
  • Reflexivity x == x = True
  • Symmetry x == y = y == x
  • Transitivity if x == y && y == z = True, then x == z = True
  • Extensionality if x == y = True and f is a function whose return type is an instance of Eq, then f x == f y = True
  • Negation x /= y = not (x == y)
Minimal complete definition: either == or /=.
deepseq: fully evaluates the first argument, before returning the second. The name deepseq is used to illustrate the relationship to seq: where seq is shallow in the sense that it only evaluates the top level of its argument, deepseq traverses the entire data structure evaluating it completely. deepseq can be useful for forcing pending exceptions, eradicating space leaks, or forcing lazy I/O to happen. It is also useful in conjunction with parallel Strategies (see the parallel package). There is no guarantee about the ordering of evaluation. The implementation may evaluate the components of the structure in any order or in parallel. To impose an actual order on evaluation, use pseq from Control.Parallel in the parallel package.
Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

Examples

Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.
>>> sequenceA [Just 1, Just 2, Just 3]
Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3]
Right [1,2,3]
The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.
>>> sequenceA [Just 1, Just 2, Just 3, Nothing]
Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4]
Left 4
Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.