Commit 876b4ef2 authored by Simon Marlow's avatar Simon Marlow
Browse files

minor cleanup; remove one use of fromJust

parent 1eeb06aa
...@@ -44,7 +44,7 @@ import BasicTypes ( RecFlag(..) ) ...@@ -44,7 +44,7 @@ import BasicTypes ( RecFlag(..) )
import Digraph ( SCC(..), stronglyConnComp ) import Digraph ( SCC(..), stronglyConnComp )
import Bag import Bag
import Outputable import Outputable
import Maybes ( orElse, fromJust, isJust ) import Maybes ( orElse, isJust )
import Util ( filterOut ) import Util ( filterOut )
import Monad ( foldM ) import Monad ( foldM )
\end{code} \end{code}
...@@ -315,9 +315,8 @@ depAnalBinds binds_w_dus ...@@ -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, edges = [ (node, key, [key | n <- nameSetToList uses,
let mb_key = lookupNameEnv key_map n, Just key <- [lookupNameEnv key_map n] ])
isJust mb_key ])
| (node@(_,_,uses), key) <- keyd_nodes ] | (node@(_,_,uses), key) <- keyd_nodes ]
key_map :: NameEnv Int -- Which binding it comes from key_map :: NameEnv Int -- Which binding it comes from
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment