[GHC] #16013: :kind! accepts unsaturated type aliases
GHC
ghc-devs at haskell.org
Sat Dec 8 13:46:31 UTC 2018
#16013: :kind! accepts unsaturated type aliases
-------------------------------------+-------------------------------------
Reporter: dmwit | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.3
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dmwit):
Okay, so further thinking, I'd like to retract part of the complaint. I
believe I understand why it decides on kind `*`, and agree that's a
sensible answer. (Namely: I thought in my head `Id :: k -> k`, but the
compiler chose `Id :: k -> *`, following exactly the rules set out in the
documentation, so the compiler was right and I was wrong. And I thought in
my head `Id a = a` matches all types so `Id Foo` should reduce to `Foo` if
it works at all, but the compiler thought `Id a = a` only matches when `a
:: *`, so `Id Foo` is a stuck term not one that can reduce, and again the
compiler was right and I was wrong.)
But I still think it should probably complain about applying a type family
or type alias to an unsaturated type alias.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16013#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list