diff options
author | Ian Lynagh <igloo@earth.li> | 2011-05-25 19:07:51 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-05-25 20:47:26 +0100 |
commit | a5f5a70c41b4bce2715bf5d478171fbaf060cddf (patch) | |
tree | e9be157af01bcb2c9a4ac51e01d3b9c71c0d4307 /compiler/utils/GraphOps.hs | |
parent | ea3a9edda14f952042fa262abd37cc4fa0c1dd6d (diff) | |
download | haskell-sdoc.tar.gz |
More DynFlags + SDocsdoc
Diffstat (limited to 'compiler/utils/GraphOps.hs')
-rw-r--r-- | compiler/utils/GraphOps.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs index 1fa4199aa2..55c22ade2a 100644 --- a/compiler/utils/GraphOps.hs +++ b/compiler/utils/GraphOps.hs @@ -21,6 +21,7 @@ where import GraphBase +import DynFlags import Outputable import Unique import UniqSet @@ -510,12 +511,13 @@ scanGraph match graph -- validateGraph :: (Uniquable k, Outputable k, Eq color) - => SDoc -- ^ extra debugging info to display on error + => DynFlags + -> SDoc -- ^ extra debugging info to display on error -> Bool -- ^ whether this graph is supposed to be colored. -> Graph k cls color -- ^ graph to validate -> Graph k cls color -- ^ validated graph -validateGraph doc isColored graph +validateGraph dflags doc isColored graph -- Check that all edges point to valid nodes. | edges <- unionManyUniqSets @@ -525,7 +527,7 @@ validateGraph doc isColored graph , nodes <- mkUniqSet $ map nodeId $ eltsUFM $ graphMap graph , badEdges <- minusUniqSet edges nodes , not $ isEmptyUniqSet badEdges - = pprPanic "GraphOps.validateGraph" + = pprPanic dflags "GraphOps.validateGraph" ( text "Graph has edges that point to non-existant nodes" $$ text " bad edges: " <> vcat (map ppr $ uniqSetToList badEdges) $$ doc ) |