blob: 3cb57d1cea6c947f553aabe27a851a24946ce505 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DataKinds, PolyKinds #-}
module Main where
import Data.Kind
import Language.Haskell.TH
type Id1 a = a
type Id2 k (a :: k) = a
data Proxy1 (a :: Id1 k) = Proxy1
data Proxy2 (a :: Id2 * k) = Proxy2
$(return [])
main :: IO ()
main = do
putStrLn $(reify ''Proxy1 >>= stringE . pprint)
putStrLn $(reify ''Proxy2 >>= stringE . pprint)
|