[GHC] #9357: Kind-polymorphic type family accepts unlifted type arguments
GHC
ghc-devs at haskell.org
Thu Jul 24 10:10:42 UTC 2014
#9357: Kind-polymorphic type family accepts unlifted type arguments
-------------------------------------+-------------------------------------
Reporter: kosmikus | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.8.2
checker) | Operating System:
Keywords: | Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: GHC
Difficulty: Unknown | accepts invalid program
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
The following code is accepted by ghc-7.8.2 and ghc-7.6.3:
{{{#!hs
{-# LANGUAGE TypeFamilies, MagicHash, PolyKinds #-}
import GHC.Exts
type family F (a :: k) :: *
type instance F Int# = ()
}}}
In nearly all other places, it seems that unlifted types are explicitly
forbidden. I'm also not allowed to actually apply `F` to `Int#` after
defining the type family like this. So I think the compiler should
probably reject the `type instance`.
(BTW, is it actually clear that using `#` as an argument kind to a type
family or as an index kind for a GADT is in any way harmful?)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9357>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list