diff options
Diffstat (limited to 'testsuite/tests/th/T14869.hs')
-rw-r--r-- | testsuite/tests/th/T14869.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/th/T14869.hs b/testsuite/tests/th/T14869.hs new file mode 100644 index 0000000000..c58d4e2720 --- /dev/null +++ b/testsuite/tests/th/T14869.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeInType #-} +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) |