summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CodeGen.lhs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2006-10-10 14:32:25 +0000
committersimonpj@microsoft.com <unknown>2006-10-10 14:32:25 +0000
commitafaceeff37e6347113399f6ec8a61dfcbd22dcac (patch)
treefd7cf93cd5851b23f4b4ee9ea76275a48de7def1 /compiler/codeGen/CodeGen.lhs
parenta92a7502797818f8d0823b3e3b37147c14bd9cb9 (diff)
downloadhaskell-afaceeff37e6347113399f6ec8a61dfcbd22dcac.tar.gz
Do not filter the type envt after each GHCi stmt
Fixes Trac #925 A new comment in TcRnDriver in tcRnStmt reads thus: At one stage I removed any shadowed bindings from the type_env; they are inaccessible but might, I suppose, cause a space leak if we leave them there. However, with Template Haskell they aren't necessarily inaccessible. Consider this GHCi session Prelude> let f n = n * 2 :: Int Prelude> fName <- runQ [| f |] Prelude> $(return $ AppE fName (LitE (IntegerL 7))) 14 Prelude> let f n = n * 3 :: Int Prelude> $(return $ AppE fName (LitE (IntegerL 7))) In the last line we use 'fName', which resolves to the *first* 'f' in scope. If we delete it from the type env, GHCi crashes because it doesn't expect that.
Diffstat (limited to 'compiler/codeGen/CodeGen.lhs')
0 files changed, 0 insertions, 0 deletions