summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T3920.hs
blob: e5e9e17e69500d8cd17c45b5e4e96063e7a6055e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE EmptyDataDecls, TypeFamilies, TemplateHaskell #-}
module Main where

import Language.Haskell.TH hiding (Type)
import Data.Kind (Type)

type family S :: (Type -> (Type -> Type -> Type))
              -> (Type -> Type) -> Type

$(return [])

test :: String
test = $(do
        test <- [d|
                type family T :: (Type -> (Type -> Type -> Type))
                              -> (Type -> Type) -> Type |]
        blah <- reify ''S
        return (LitE (StringL (pprint test ++ "\n" ++ pprint blah))))

main = putStrLn test