[GHC] #16013: :kind! accepts unsaturated type aliases
GHC
ghc-devs at haskell.org
Sat Dec 8 13:30:41 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
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Here's a ghci session:
{{{
> :set -XTypeFamilies -XPolyKinds
> type family Id (a :: k)
> type instance Id a = a
> type Foo x = Maybe
> :kind! Id Foo
Id Foo :: *
= Id Foo
}}}
I think the final `:kind!` query should throw an error instead,
complaining that `Foo` hasn't been given enough arguments. (But even if
you disagree, and think it should be allowed, `*` is clearly not the right
kind!)
Using a normal type alias in place of the type family for `Id` also allows
the query incorrectly, though it does at least report a sensible kind.
Although I think it shouldn't matter, I have checked with `-ignore-dot-
ghci` to make sure I haven't accidentally turned LiberalTypeSynonyms on.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16013>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list