summaryrefslogtreecommitdiff
path: root/compiler/utils/GraphOps.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-05-25 19:07:51 +0100
committerIan Lynagh <igloo@earth.li>2011-05-25 20:47:26 +0100
commita5f5a70c41b4bce2715bf5d478171fbaf060cddf (patch)
treee9be157af01bcb2c9a4ac51e01d3b9c71c0d4307 /compiler/utils/GraphOps.hs
parentea3a9edda14f952042fa262abd37cc4fa0c1dd6d (diff)
downloadhaskell-sdoc.tar.gz
More DynFlags + SDocsdoc
Diffstat (limited to 'compiler/utils/GraphOps.hs')
-rw-r--r--compiler/utils/GraphOps.hs8
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 )