Expunge ThFake, cure Trac #2632
authorsimonpj@microsoft.com <unknown>
Fri, 3 Oct 2008 14:04:23 +0000 (14:04 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 3 Oct 2008 14:04:23 +0000 (14:04 +0000)
commit08a9d7341402232672fcff9062454e6ba1ae8bd1
tree8b279ffd806873e904eb374e24afe399925a5cc5
parent0f853fa103066ba5e3427e824550f038f66da28c
Expunge ThFake, cure Trac #2632

This patch fixes a dirty hack (the fake ThFake module), which in turn
was causing Trac #2632.

The new scheme is that the top-level binders in a TH [d| ... |] decl splice
get Internal names.  That breaks a previous invariant that things like
TyCons always have External names, but these TyCons are never long-lived;
they live only long enough to typecheck the TH quotation; the result is
discarded.  So it seems cool.

Nevertheless -- Template Haskell folk: please test your code.  The testsuite
is OK but it's conceivable that I've broken something in TH.  Let's see.
compiler/basicTypes/RdrName.lhs
compiler/iface/IfaceEnv.lhs
compiler/prelude/PrelNames.lhs
compiler/rename/RnBinds.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnNames.lhs
compiler/rename/RnSource.lhs
compiler/typecheck/TcEnv.lhs
compiler/typecheck/TcRnDriver.lhs