• Ryan Scott's avatar
    Prevent Template Haskell splices from throwing a spurious TypeInType error · 283a3465
    Ryan Scott authored
    Summary:
    There was a rather annoying corner case where splicing poly-kinded
    Template Haskell declarations could trigger an error muttering about
    `TypeInType` not being enabled, whereas the equivalent non-TH code would
    compile without issue. This was causing by overzealous validity check in the
    renamer, wherein failed to distinguish between two different `Exact` names
    with the same `OccName`. As a result, it mistakenly believed some type
    variables were being used as both type and kind variables simultaneously! Ack.
    
    This avoids the issue by simply disabling the aforementioned validity check
    for Exact names. Fixes #12503.
    
    Test Plan: ./validate
    
    Reviewers: austin, bgamari, goldfire
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3022
    283a3465
all.T 16 KB