[GHC] #12503: Template Haskell regression: GHC erroneously thinks a type variable is also a kind
GHC
ghc-devs at haskell.org
Fri Feb 10 15:34:53 UTC 2017
#12503: Template Haskell regression: GHC erroneously thinks a type variable is also
a kind
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: goldfire
Type: bug | Status: patch
Priority: high | Milestone: 8.2.1
Component: Template Haskell | Version: 8.0.1
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3022
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"283a346586e5bf711ecd8cc61263d87771f8f744/ghc"
283a3465/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="283a346586e5bf711ecd8cc61263d87771f8f744"
Prevent Template Haskell splices from throwing a spurious TypeInType error
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
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12503#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list