X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FCSE.lhs;h=495ea42fc457242d6a19db995602b68fc79322f7;hb=24b1e13657c3e06e7c97eeab9a6c4f2a0cdd9193;hp=93b0b8dd6044245808996d66d7bed9c7646b1a69;hpb=ac4a2563ee5b8d6bb9d0a366fe0ff3ed3fde4bb2;p=ghc-hetmet.git diff --git a/compiler/simplCore/CSE.lhs b/compiler/simplCore/CSE.lhs index 93b0b8d..495ea42 100644 --- a/compiler/simplCore/CSE.lhs +++ b/compiler/simplCore/CSE.lhs @@ -23,6 +23,7 @@ import StaticFlags ( opt_PprStyle_Debug ) import BasicTypes ( isAlwaysActive ) import Util ( lengthExceeds ) import UniqFM +import FastString import Data.List \end{code} @@ -328,7 +329,7 @@ extendCSEnv (CS cs in_scope sub) expr expr' = WARN( result `lengthExceeds` 4, short_msg $$ nest 2 long_msg ) result where result = new ++ old - short_msg = ptext SLIT("extendCSEnv: long list, length") <+> int (length result) + short_msg = ptext (sLit "extendCSEnv: long list, length") <+> int (length result) long_msg | opt_PprStyle_Debug = (text "hash code" <+> text (show hash)) $$ ppr result | otherwise = empty @@ -343,7 +344,7 @@ extendSubst (CS cs in_scope sub) x y = CS cs in_scope (extendVarEnv sub x y) addBinder :: CSEnv -> Id -> (CSEnv, Id) addBinder (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') + | isIdVar v = (CS cs (extendInScopeSet in_scope v') (extendVarEnv sub v v'), v') | otherwise = WARN( True, ppr v ) (CS emptyUFM in_scope sub, v) -- This last case is the unusual situation where we have shadowing of