HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecabal-install-solver-3.12.1.0Haskell2010

Distribution.Solver.Types.ComponentDeps

Fine-grained package dependencies

Like many others, this module is meant to be "double-imported":

import Distribution.Solver.Types.ComponentDeps (
    Component
  , ComponentDep
  , ComponentDeps
  )
import qualified Distribution.Solver.Types.ComponentDeps as CD
  • 3 types
  • 18 values

Fine-grained package dependencies

4 declarations
datadata Component
#
Instances8Eq, Ord, Show, Generic, Binary, Pretty, …
newtypenewtype ComponentDeps a
#

Fine-grained dependencies for a package.

Typically used as ComponentDeps [Dependency], to represent the list of dependencies for each named component within a package.

Instances12Functor, Foldable, Traversable, Eq, Ord, Show, …

Constructing ComponentDeps

valuefromInstalled :: a -> ComponentDeps a
#

ComponentDeps for installed packages.

We assume that installed packages only record their library dependencies.

Deconstructing ComponentDeps

valueflatDeps :: Monoid a => ComponentDeps a -> a
#

All dependencies of a package.

This is just a synonym for fold, but perhaps a use of flatDeps is more obvious than a use of fold, and moreover this avoids introducing lots of #ifdefs for 7.10 just for the use of fold.

valuenonSetupDeps :: Monoid a => ComponentDeps a -> a
#

All dependencies except the setup dependencies.

Prior to the introduction of setup dependencies in version 1.24 this would have been _all_ dependencies.