summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-02-26 17:25:52 +0000
committerIan Lynagh <igloo@earth.li>2012-02-26 17:25:52 +0000
commitbb6657df9685b71f2ca2246539b6e4db26191b10 (patch)
treefacf6a22bc72ce64ab990dac7e02cf7cd422e44d
parentd785049f4cba5a6f69938ffc6ec0399b39feb472 (diff)
downloadhaskell-bb6657df9685b71f2ca2246539b6e4db26191b10.tar.gz
Fix warnings in utils/GraphOps.hs
-rw-r--r--compiler/utils/GraphOps.hs38
1 files changed, 31 insertions, 7 deletions
diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs
index 2c7a4daaa9..7bf3ecdffb 100644
--- a/compiler/utils/GraphOps.hs
+++ b/compiler/utils/GraphOps.hs
@@ -1,10 +1,3 @@
-{-# OPTIONS -fno-warn-missing-signatures #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
-- | Basic operations on graphs.
--
@@ -197,6 +190,10 @@ addConflicts conflicts getClass
$ uniqSetToList conflicts)
+addConflictSet1 :: Uniquable k
+ => k -> (k -> cls) -> UniqSet k
+ -> UniqFM (Node k cls color)
+ -> UniqFM (Node k cls color)
addConflictSet1 u getClass set
= case delOneFromUniqSet set u of
set' -> adjustWithDefaultUFM
@@ -292,6 +289,14 @@ coalesceGraph
coalesceGraph aggressive triv graph
= coalesceGraph' aggressive triv graph []
+coalesceGraph'
+ :: (Uniquable k, Ord k, Eq cls, Outputable k)
+ => Bool
+ -> Triv k cls color
+ -> Graph k cls color
+ -> [(k, k)]
+ -> ( Graph k cls color
+ , [(k, k)])
coalesceGraph' aggressive triv graph kkPairsAcc
= let
-- find all the nodes that have coalescence edges
@@ -358,6 +363,16 @@ coalesceNodes aggressive triv graph (k1, k2)
| otherwise
= (graph, Nothing)
+coalesceNodes_merge
+ :: (Uniquable k, Ord k, Eq cls, Outputable k)
+ => Bool
+ -> Triv k cls color
+ -> Graph k cls color
+ -> k -> k
+ -> Node k cls color
+ -> Node k cls color
+ -> (Graph k cls color, Maybe (k, k))
+
coalesceNodes_merge aggressive triv graph kMin kMax nMin nMax
-- sanity checks
@@ -394,6 +409,15 @@ coalesceNodes_merge aggressive triv graph kMin kMax nMin nMax
in coalesceNodes_check aggressive triv graph kMin kMax node
+coalesceNodes_check
+ :: (Uniquable k, Ord k, Eq cls, Outputable k)
+ => Bool
+ -> Triv k cls color
+ -> Graph k cls color
+ -> k -> k
+ -> Node k cls color
+ -> (Graph k cls color, Maybe (k, k))
+
coalesceNodes_check aggressive triv graph kMin kMax node
-- Unless we're coalescing aggressively, if the result node is not trivially