projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1eeb06a
)
minor cleanup; remove one use of fromJust
author
Simon Marlow
<simonmar@microsoft.com>
Thu, 2 Mar 2006 14:08:18 +0000
(14:08 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Thu, 2 Mar 2006 14:08:18 +0000
(14:08 +0000)
ghc/compiler/rename/RnBinds.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/rename/RnBinds.lhs
b/ghc/compiler/rename/RnBinds.lhs
index
7ee82b5
..
13035e7
100644
(file)
--- a/
ghc/compiler/rename/RnBinds.lhs
+++ b/
ghc/compiler/rename/RnBinds.lhs
@@
-44,7
+44,7
@@
import BasicTypes ( RecFlag(..) )
import Digraph ( SCC(..), stronglyConnComp )
import Bag
import Outputable
import Digraph ( SCC(..), stronglyConnComp )
import Bag
import Outputable
-import Maybes ( orElse, fromJust, isJust )
+import Maybes ( orElse, isJust )
import Util ( filterOut )
import Monad ( foldM )
\end{code}
import Util ( filterOut )
import Monad ( foldM )
\end{code}
@@
-315,9
+315,8
@@
depAnalBinds binds_w_dus
keyd_nodes = bagToList binds_w_dus `zip` [0::Int ..]
keyd_nodes = bagToList binds_w_dus `zip` [0::Int ..]
- edges = [ (node, key, [fromJust mb_key | n <- nameSetToList uses,
- let mb_key = lookupNameEnv key_map n,
- isJust mb_key ])
+ edges = [ (node, key, [key | n <- nameSetToList uses,
+ Just key <- [lookupNameEnv key_map n] ])
| (node@(_,_,uses), key) <- keyd_nodes ]
key_map :: NameEnv Int -- Which binding it comes from
| (node@(_,_,uses), key) <- keyd_nodes ]
key_map :: NameEnv Int -- Which binding it comes from