[GHC] #9357: Kind-polymorphic type family accepts unlifted type arguments
GHC
ghc-devs at haskell.org
Thu Jan 21 10:10:55 UTC 2016
#9357: Kind-polymorphic type family accepts unlifted type arguments
-------------------------------------+-------------------------------------
Reporter: kosmikus | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.8.2
checker) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts | Unknown/Multiple
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
If Phab:D1807 is merged then this limitation will once again be lifted
allowing. As it stands, this works,
{{{#!hs
{-# LANGUAGE PolyKinds TypeFamilies MagicHash DataKinds TypeInType #-}
import GHC.Exts
import GHC.Types
class BoxIt (a :: TYPE 'Unlifted) where
type Boxed a :: *
boxed :: a -> Boxed a
instance BoxIt Char# where
type Boxed Char# = Char
boxed x = C# x
main :: IO ()
main = print $ boxed 'c'#
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9357#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list