summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T1849.script
blob: 861b8d43d3b6ecf36db2dcfcb670a8ae79ef5c68 (plain)
1
2
3
4
5
6
7
8
9
10
:set -XTemplateHaskell
import Language.Haskell.TH
let seeType n = do VarI _ t _ _ <- reify n; runIO $ putStrLn $ show t; [| return True |]
let f = undefined :: Int -> Int
let g = undefined :: [Int]
let h = undefined :: (Int, Int)
$(seeType (mkName "f"))
$(seeType (mkName "g"))
$(seeType (mkName "h"))