Declarations after top-level splice are ignored
Declarations that appear after a top-level splice seem to be ignored without any warning. In the attached Main, the identifier afterSplice is not recognized:
Main.hs:6:11: Not in scope: `afterSplice'
The error disappears if the declaration of afterSplice is put before dummySplice, or if the declaration for problem is removed (in which case afterSplice is declared correctly, as can be seen with in ghci.)
I could track the problem back to at least ghc-7.0.4.
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Template Haskell |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |