[GHC] #11400: * is not an indexed type family
GHC
ghc-devs at haskell.org
Mon Jan 11 18:08:55 UTC 2016
#11400: * is not an indexed type family
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
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):
This whole thing is very much a design compromise.
It would be fully backward compatible simply to disallow `*` in
`TypeInType` code, in favor of `Type`. Of course it's backward compatible,
as `TypeInType` is new. But it has a terrible migration story, because you
can't use `Type` for `*` in GHC 7.x.
So I did a bit of parser hackery to get this to hold together. But it
really only works when parsing a normal type. Other places where types
appear in unusual situations don't work out so well. (For example, type
instance heads and Haskell98 data constructors.) Could this be fixed? I'm
sure it could, but it's quite painful each time.
I'm quite happy to change designs around this issue. Or for someone to do
more parser hackery to get `*` to work in more contexts.
This ticket has the same fix as #11307, which is to have new abstract
syntax for type instance heads.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11400#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list