summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_run/T11465a.hs
blob: 93d72545e3e7bc21925e507f11e6bf5b5c03e0cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE DataKinds #-}

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'#