[GHC] #15869: Discrepancy between seemingly equivalent type synonym and type family
GHC
ghc-devs at haskell.org
Fri Jan 18 19:38:11 UTC 2019
#15869: Discrepancy between seemingly equivalent type synonym and type family
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.6.2
checker) | Keywords: TypeFamilies,
Resolution: | 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 RyanGlScott):
I wonder if (3) has anything to do with #9269? `KindOf2 A` is a bit weird
in that it's an application of a type family that returns `forall a -> a
-> Type`, which is a polymorphic type. Normally, GHC disallows that—you
wouldn't be able to define `type family FAA where FAA = forall a -> a ->
Type`, for instance. Yet `KindOf2` offers a way around this restriction,
so perhaps (3) is a manifestation of GHC trying to deal with something it
doesn't know how to reason about.
Then again, `KindOf2 A` seems to work in other places, as comment:1
demonstrates. It's just in type family equations where things go haywire.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15869#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list