cvs commit: fptools/ghc/compiler/prelude PrelNames.lhs
fptools/ghc/compiler/rename RnExpr.lhs RnSource.lhs
Simon Peyton Jones
simonpj at microsoft.com
Wed Oct 26 08:05:03 EDT 2005
simonpj 2005/10/26 05:05:03 PDT
Modified files:
ghc/compiler/prelude PrelNames.lhs
ghc/compiler/rename RnExpr.lhs RnSource.lhs
Log:
MERGE TO STABLE
Fix two small Template Haskell bugs.
(1) A bug in the renaming of [d| brackets |]. The problem was
that when we renamed the bracket we messed up the name cache, because
the module was still that of the parent module. Now we set a fake
module before renaming it.
TH_spliceDecl4 is the test.
(2) An expression splice can in principle mention *any* variable,
so the renamer really has to assume that it does when doing depdendency
analysis. For example
f = ...
h = ...$(thing "f")...
The renamer had better not put 'h' before 'f', else the type checker
won't find a defn for 'f' in the type envt.
TH_spliceE5 is the test
Revision Changes Path
1.100 +1 -0 fptools/ghc/compiler/prelude/PrelNames.lhs
1.144 +25 -10 fptools/ghc/compiler/rename/RnExpr.lhs
1.177 +35 -6 fptools/ghc/compiler/rename/RnSource.lhs
More information about the Cvs-ghc
mailing list