[GHC] #14420: Data families should not instantiate to non-Type kinds
GHC
ghc-devs at haskell.org
Fri Nov 3 19:41:18 UTC 2017
#14420: Data families should not instantiate to non-Type kinds
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.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:
-------------------------------------+-------------------------------------
{{{#!hs
data family Any :: k -- allowable now due to fix for #12369
type family F (a :: Bool) :: Nat where
F True = 0
F False = 1
F Any = 2
}}}
{{{
ghci> :kind! F True
F True :: Nat
= 0
ghci> :kind! F False
F False :: Nat
= 1
ghci> :kind! F Any
F Any :: Nat
= 2
}}}
Oh dear.
We should require that any instantiation of a data family be to a kind
that ends in `Type`.
Inspired by comment:31:ticket:9429
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14420>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list