[commit: packages/hoopl] master: Remove redundant constraints, discovered by -fwarn-redundant-constraints (b38e92f)
git at git.haskell.org
git at git.haskell.org
Tue Jan 6 09:41:39 UTC 2015
Repository : ssh://git@git.haskell.org/hoopl
On branch : master
Link : http://git.haskell.org/packages/hoopl.git/commitdiff/b38e92f67cabfa0d0ed12ac93c2d431f2391de70
>---------------------------------------------------------------
commit b38e92f67cabfa0d0ed12ac93c2d431f2391de70
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Jan 6 09:36:37 2015 +0000
Remove redundant constraints, discovered by -fwarn-redundant-constraints
>---------------------------------------------------------------
b38e92f67cabfa0d0ed12ac93c2d431f2391de70
src/Compiler/Hoopl/Dataflow.hs | 2 +-
src/Compiler/Hoopl/Graph.hs | 5 ++---
src/Compiler/Hoopl/Show.hs | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/Compiler/Hoopl/Dataflow.hs b/src/Compiler/Hoopl/Dataflow.hs
index 23254ca..d798f82 100644
--- a/src/Compiler/Hoopl/Dataflow.hs
+++ b/src/Compiler/Hoopl/Dataflow.hs
@@ -736,7 +736,7 @@ normalizeGraph g = (mapGraphBlocks dropFact g, facts g)
exitFacts (JustO (DBlock f b)) = mapSingleton (entryLabel b) f
bodyFacts :: LabelMap (DBlock f n C C) -> FactBase f
bodyFacts body = mapFoldWithKey f noFacts body
- where f :: forall t a x. (NonLocal t) => Label -> DBlock a t C x -> LabelMap a -> LabelMap a
+ where f :: forall t a x. Label -> DBlock a t C x -> LabelMap a -> LabelMap a
f lbl (DBlock f _) fb = mapInsert lbl f fb
--- implementation of the constructors (boring)
diff --git a/src/Compiler/Hoopl/Graph.hs b/src/Compiler/Hoopl/Graph.hs
index 79fbfbb..21ded58 100644
--- a/src/Compiler/Hoopl/Graph.hs
+++ b/src/Compiler/Hoopl/Graph.hs
@@ -67,7 +67,7 @@ bodyUnion :: forall a . LabelMap a -> LabelMap a -> LabelMap a
bodyUnion = mapUnionWithKey nodups
where nodups l _ _ = error $ "duplicate blocks with label " ++ show l
-bodyList :: NonLocal (block n) => Body' block n -> [(Label,block n C C)]
+bodyList :: Body' block n -> [(Label,block n C C)]
bodyList body = mapToList body
addBlock :: NonLocal thing
@@ -308,8 +308,7 @@ preorder_dfs :: NonLocal (block n) => Graph' block n O x -> [block n C C]
-- Better to get [A,B,C,D]
-graphDfs :: (NonLocal (block n))
- => (LabelMap (block n C C) -> block n O C -> LabelSet -> [block n C C])
+graphDfs :: (LabelMap (block n C C) -> block n O C -> LabelSet -> [block n C C])
-> (Graph' block n O x -> [block n C C])
graphDfs _ (GNil) = []
graphDfs _ (GUnit{}) = []
diff --git a/src/Compiler/Hoopl/Show.hs b/src/Compiler/Hoopl/Show.hs
index 877a530..8a8b35f 100644
--- a/src/Compiler/Hoopl/Show.hs
+++ b/src/Compiler/Hoopl/Show.hs
@@ -20,9 +20,9 @@ import Compiler.Hoopl.Label
type Showing n = forall e x . n e x -> String
-showGraph :: forall n e x . (NonLocal n) => Showing n -> Graph n e x -> String
+showGraph :: forall n e x . Showing n -> Graph n e x -> String
showGraph node = g
- where g :: (NonLocal n) => Graph n e x -> String
+ where g :: Graph n e x -> String
g GNil = ""
g (GUnit block) = b block
g (GMany g_entry g_blocks g_exit) =
More information about the ghc-commits
mailing list