Skip to content
  • Jan Stolarek's avatar
    Reject top-level typed TH splices. Fixes #10945 · 1750ebc2
    Jan Stolarek authored
    When TemplateHaskell language extension is enabled it is valid to have
    top-level expressions.  Each such expression is treated as a contents
    of a splice.  The problem arises with typed splices.  They are not valid
    at the top level and therefore we should interpret them not as a splice
    but as a top-level expression (aka. implicit splice).  So saying:
    
    $$foo
    
    is equivalent of:
    
    $( $$foo )
    
    This patch makes sure that this is indeed the case.  Until now we
    incorrectly treated typed splices as explicit splices.
    1750ebc2