Commit fdf6cc72 authored by's avatar
Browse files

Add a test for #1849

parent 4ff945c7
: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"))
AppT (AppT ArrowT (ConT GHC.Types.Int)) (ConT GHC.Types.Int)
AppT ListT (ConT GHC.Types.Int)
AppT (AppT (TupleT 2) (ConT GHC.Types.Int)) (ConT GHC.Types.Int)
......@@ -268,3 +268,4 @@ test('T7532',
['T7532', '-v0'])
test('T2222', normal, compile, ['-v0'])
test('T1849', normal, ghci_script, ['T1849.script'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment