Fix tests due to issue #7021
[ghc.git] / testsuite / tests / th / T7021a.hs
1 {-# LANGUAGE ConstraintKinds, TemplateHaskell, PolyKinds, TypeFamilies #-}
2
3 module T7021a where
4
5 import GHC.Prim
6 import Language.Haskell.TH
7
8 type IOable a = (Show a, Read a)
9 type family ALittleSilly :: Constraint
10
11 data Proxy a = Proxy
12
13 foo :: IOable a => a
14 foo = undefined
15
16 baz :: a b => Proxy a -> b
17 baz = undefined
18
19 bar :: ALittleSilly => a
20 bar = undefined
21
22 test :: Q Exp
23 test = do
24 Just fooName <- lookupValueName "foo"
25 Just bazName <- lookupValueName "baz"
26 Just barName <- lookupValueName "bar"
27 reify fooName
28 reify bazName
29 reify barName
30 [t| (Show a, (Read a, Num a)) => a -> a |]
31 [| \_ -> 0 |]