blob: d3626cf19862a7cf3def40eb89615ccba5ac8bd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeInType #-}
import GHC.Exts
import GHC.Types
class BoxIt (a :: TYPE 'WordRep) 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'#
|