Thu May 6 09:15:23 PDT 2010 [email protected]
* Add a HsExplicitFlag to SpliceDecl, to improve Trac #4042
The issue here is that
g :: A -> A
f
data A = A
is treated as if you'd written $(f); that is the call of
f is a top-level Template Haskell splice. This patch
makes sure that we *first* check the -XTemplateHaskellFlag
and bleat about a parse error if it's off. Othewise we
get strange seeing "A is out of scope" errors.
M ./compiler/hsSyn/HsDecls.lhs -2 +6
M ./compiler/parser/RdrHsSyn.lhs -2 +2
M ./compiler/rename/RnExpr.lhs -1 +1
M ./compiler/rename/RnSource.lhs -1 +12
M ./compiler/typecheck/TcRnDriver.lhs -3 +3
View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20100506161523-1287e-e0737ecff8f417936e2ebc1132a4a6d618c6640e.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc