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.