ghc-7.0.4: The GHC API

Digraph

# Documentation

data Graph node Source

Instances

Outputable node => Outputable (Graph node) |

graphFromVerticesAndAdjacency :: Ord key => [(node, key)] -> [(key, key)] -> Graph (node, key)Source

graphFromEdgedVertices :: Ord key => [(node, key, [key])] -> Graph (node, key, [key])Source

data SCC vertex Source

Constructors

AcyclicSCC vertex |
CyclicSCC [vertex] |

Instances

Functor SCC |
Outputable a => Outputable (SCC a) |

flattenSCC :: SCC a -> [a]Source

flattenSCCs :: [SCC a] -> [a]Source

stronglyConnCompG :: Graph node -> [SCC node]Source

topologicalSortG :: Graph node -> [node]Source

verticesG :: Graph node -> [node]Source

edgesG :: Graph node -> [Edge node]Source

hasVertexG :: Graph node -> node -> Bool Source

reachableG :: Graph node -> node -> [node]Source

transposeG :: Graph node -> Graph nodeSource

outdegreeG :: Graph node -> node -> Maybe Int Source

indegreeG :: Graph node -> node -> Maybe Int Source

vertexGroupsG :: Graph node -> [[node]]Source

emptyG :: Graph node -> Bool Source

componentsG :: Graph node -> [[node]]Source

stronglyConnCompFromEdgedVertices :: Ord key => [(node, key, [key])] -> [SCC node]Source

stronglyConnCompFromEdgedVerticesR :: Ord key => [(node, key, [key])] -> [SCC (node, key, [key])]Source

tabulate :: Bounds -> [Vertex] -> Table Int Source

preArr :: Bounds -> Forest Vertex -> Table Int Source

components :: IntGraph -> Forest VertexSource

undirected :: IntGraph -> IntGraphSource

back :: IntGraph -> Table Int -> IntGraphSource

cross :: IntGraph -> Table Int -> Table Int -> IntGraphSource

forward :: IntGraph -> IntGraph -> Table Int -> IntGraphSource

path :: IntGraph -> Vertex -> Vertex -> Bool Source

bcc :: IntGraph -> Forest [Vertex]Source

do_label :: IntGraph -> Table Int -> Tree Vertex -> Tree (Vertex, Int, Int)Source

bicomps :: Tree (Vertex, Int, Int) -> Forest [Vertex]Source

collect :: Tree (Vertex, Int, Int) -> (Int, Tree [Vertex])Source