Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type ComponentsGraph = Graph (Node ComponentName Component)
- type ComponentsWithDeps = [(Component, [ComponentName])]
- mkComponentsGraph :: ComponentRequestedSpec -> PackageDescription -> Either [ComponentName] ComponentsGraph
- componentsGraphToList :: ComponentsGraph -> ComponentsWithDeps
- dispComponentsWithDeps :: ComponentsWithDeps -> Doc
- componentCycleMsg :: [ComponentName] -> Doc
Documentation
type ComponentsGraph = Graph (Node ComponentName Component) #
A graph of source-level components by their source-level dependencies
type ComponentsWithDeps = [(Component, [ComponentName])] #
A list of components associated with the source level dependencies between them.
mkComponentsGraph :: ComponentRequestedSpec -> PackageDescription -> Either [ComponentName] ComponentsGraph #
componentsGraphToList :: ComponentsGraph -> ComponentsWithDeps #
Given the package description and a PackageDescription
(used
to determine if a package name is internal or not), sort the
components in dependency order (fewest dependencies first). This is
NOT necessarily the build order (although it is in the absence of
Backpack.)
dispComponentsWithDeps :: ComponentsWithDeps -> Doc #
Pretty-print ComponentsWithDeps
.
componentCycleMsg :: [ComponentName] -> Doc #
Error message when there is a cycle; takes the SCC of components.