summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T14869.hs
blob: 4b0dcdc171f0286dc5f6f49eb892cd11dee3d6e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
module T14869 where

import Data.Kind
import GHC.Exts
import Language.Haskell.TH (pprint, reify, stringE)

type MyConstraint = Constraint
type MyLiftedRep  = LiftedRep

type family Foo1 :: Type
type family Foo2 :: Constraint
type family Foo3 :: MyConstraint
type family Foo4 :: TYPE MyLiftedRep

$(pure [])

foo1, foo2, foo3 :: String
foo1 = $(reify ''Foo1 >>= stringE . pprint)
foo2 = $(reify ''Foo2 >>= stringE . pprint)
foo3 = $(reify ''Foo3 >>= stringE . pprint)
foo4 = $(reify ''Foo4 >>= stringE . pprint)