• simonpj@microsoft.com's avatar
    Add a HsExplicitFlag to SpliceDecl, to improve Trac #4042 · 302e2e29
    simonpj@microsoft.com authored
    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.
    302e2e29
RnSource.lhs 45 KB