X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FCSE.lhs;h=782e564bb2698d12eb10d2e238f512edb6a02703;hb=7331582b8f67e005cbb839248eff492127f9bcbe;hp=11eec3e684b6d64214c55eb561adc646ffd3e2ca;hpb=de905f504a3e129e2c4a1906d7e0a26e36cd6c4b;p=ghc-hetmet.git diff --git a/compiler/simplCore/CSE.lhs b/compiler/simplCore/CSE.lhs index 11eec3e..782e564 100644 --- a/compiler/simplCore/CSE.lhs +++ b/compiler/simplCore/CSE.lhs @@ -21,8 +21,10 @@ import CoreLint ( showPass, endPass ) import Outputable import StaticFlags ( opt_PprStyle_Debug ) import BasicTypes ( isAlwaysActive ) -import Util ( mapAccumL, lengthExceeds ) +import Util ( lengthExceeds ) import UniqFM + +import Data.List \end{code} @@ -334,7 +336,7 @@ addBinder :: CSEnv -> Id -> (CSEnv, Id) addBinder env@(CS cs in_scope sub) v | not (v `elemInScopeSet` in_scope) = (CS cs (extendInScopeSet in_scope v) sub, v) | isId v = (CS cs (extendInScopeSet in_scope v') (extendVarEnv sub v v'), v') - | not (isId v) = WARN( True, ppr v ) + | otherwise = WARN( True, ppr v ) (CS emptyUFM in_scope sub, v) -- This last case is the unusual situation where we have shadowing of -- a type variable; we have to discard the CSE mapping