
#12503: Template Haskell regression: GHC erroneously thinks a type variable is also a kind -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new 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): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Yuck yuck yuck. The problem is that this code assumes that two variables with the same `OccName` are the same. This will always be true in user- written code. But it's not true with `Exact` names. Ryan's suggestion to fix this makes some sense, but it's very heavy. I will propose something altogether radical: skip the check for `Exact` names. This check serves but one purpose: to allow people who want `-XPolyKinds` but are skittish about `-XTypeInType` to know that they have wandered into `-XTypeInType`-land. I foresee a future where `-XTypeInType` and `-XPolyKinds` become synonymous (not unlike how `-XRankNTypes` and `-XRank2Types` are synonymous) and this whole check can be dropped. Template Haskell already is somewhat anarchic about when it requires extensions. This choice would contribute to the anarchy, but in a very small way. And it's very easy to just skip the check! To be clear: the only people this hurts are people who want to avoid `-XTypeInType` while still using Template Haskell and who happen to use TH to generate some code that is accepted only with `-XTypeInType`. (And who like the letter `k`.) I argue that this set of people is small. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12503#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler