Distribution.Backpack.ComponentsGraph

Cabal-2.0.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Backpack.ComponentsGraph (signature[?])

Description

See https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

Synopsis

- type ComponentsGraph = [(Component, [ComponentName])]
- dispComponentsGraph :: ComponentsGraph -> Doc
- toComponentsGraph :: ComponentRequestedSpec -> PackageDescription -> Either [ComponentName] ComponentsGraph
- componentCycleMsg :: [ComponentName] -> Doc

# Documentation

type ComponentsGraph = [(Component, [ComponentName])] Source #

A components graph is a source level graph tracking the dependencies between components in a package.

dispComponentsGraph :: ComponentsGraph -> Doc Source #

Pretty-print a `ComponentsGraph`.

toComponentsGraph :: ComponentRequestedSpec -> PackageDescription -> Either [ComponentName] ComponentsGraph Source #

Given the package description and a `PackageDescription` (used to determine if a package name is internal or not), create a graph of dependencies between the components. This is NOT necessarily the build order (although it is in the absence of Backpack.)

componentCycleMsg :: [ComponentName] -> Doc Source #

Error message when there is a cycle; takes the SCC of components.