Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / typecheck / should_fail / T13105.hs
1 {-# LANGUAGE UnicodeSyntax, MagicHash, DataKinds, PolyKinds, TypeFamilies #-}
2
3 -- from Conal Elliott
4 -- Actually, this *should* work. But I want to put it in the testsuite
5 -- as a succeeding "compile_fail" test to make sure that we don't panic.
6
7 module RepRep where
8
9 import GHC.Exts
10
11 type family RepRep a ∷ RuntimeRep
12
13 class HasRep a where
14 type Rep a ∷ TYPE (RepRep a)
15 repr ∷ a → Rep a
16 abst ∷ Rep a → a
17
18 type instance RepRep Int = IntRep
19
20 instance HasRep Int where
21 type Rep Int = Int#
22 abst n = I# n
23 repr (I# n) = n