Mark AutoDeriveTypeable as deprecated
[ghc.git] / testsuite / tests / typecheck / should_compile / T10348.hs
1 {-# LANGUAGE GADTs, DataKinds, KindSignatures, StandaloneDeriving, TypeOperators #-}
2
3 module T10348 where
4
5 import GHC.TypeLits
6 import Data.Typeable
7 import Data.Proxy
8
9 data Foo (n :: Nat) where
10 Hey :: KnownNat n => Foo n
11
12 deriving instance Show (Foo n)
13
14 data T t where
15 T :: (Show t, Typeable t) => t -> T t
16
17 deriving instance Show (T n)
18
19 hey :: KnownNat n => T (Foo n)
20 hey = T Hey
21
22 ho :: T (Foo 42)
23 ho = T Hey
24
25 f1 :: KnownNat a => Proxy a -> TypeRep
26 f1 = typeRep
27
28 g2 :: KnownSymbol a => Proxy a -> TypeRep
29 g2 = typeRep
30
31 pEqT :: (KnownSymbol a, KnownSymbol b) => Proxy a -> Proxy b -> Maybe (a :~: b)
32 pEqT Proxy Proxy = eqT