blob: df546b9df292ae664b9db1891b4f8dd4c18434ff (
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
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module T16326_TH where
import Control.Monad.IO.Class
import Data.Kind
import Data.Proxy
import Language.Haskell.TH hiding (Type)
import System.IO
data Foo :: forall a -> a -> Type
type family Foo2 :: forall a -> a -> Type where
Foo2 = Foo
$(do info <- reify ''Foo2
liftIO $ hPutStrLn stderr $ pprint info
dec <- [d| data Nested :: forall a. forall b -> forall c.
forall d -> forall e.
Proxy '[a,b,c,d,e] -> Type |]
liftIO $ hPutStrLn stderr $ pprint dec
pure dec)
|