definition: |
dependenciesAsGraph :: ResolutionResult -> Maybe DG.DotGraph dependenciesAsGraph (ResolutionFailure _) = Nothing dependenciesAsGraph (ResolutionSuccess pkg deppkgs) = let allpkgs = pkg : deppkgs alldepnames = map (\p -> (name p, map (\ (Dependency p' _) -> p') (dependencies p))) allpkgs showPkg pn = maybe pn packageId (find ((== pn) . name) allpkgs) deps = map (\ (p,dp) -> (showPkg p, map showPkg dp)) alldepnames in Just $ DG.dgraph ("Dependencies of " ++ name pkg) (map (\s -> DG.Node s []) (nub (map fst deps ++ concatMap snd deps))) (map (\ (s,t) -> DG.Edge s t []) (nub (concatMap (\ (p,ds) -> map (\d -> (p,d)) ds) deps))) |
demand: |
argument 1 |
deterministic: |
deterministic operation |
documentation: |
--- Shows a successful resolution as a (Graphviz) dot graph. |
failfree: |
_ |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{({ResolutionFailure}) |-> {Nothing} || ({ResolutionSuccess}) |-> _} |
name: |
dependenciesAsGraph |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
ResolutionResult -> Prelude.Maybe Data.GraphViz.DotGraph |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |