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.
Showing with 24 additions and 9 deletions