Add Fixity info for infix types
[ghc.git] / testsuite / tests / th / T2222.hs
1
2 {-# LANGUAGE TemplateHaskell #-}
3 module ReifyPlusTypeInferenceBugs where
4
5 import Language.Haskell.TH
6 import System.IO
7
8 a = 1
9
10 $(return [])
11
12 b = $(do VarI _ t _ <- reify 'a
13 runIO $ putStrLn ("inside b: " ++ pprint t)
14 [| undefined |])
15
16 c = $([| True |])
17
18 $(return [])
19
20 d = $(do VarI _ t _ <- reify 'c
21 runIO $ putStrLn ("inside d: " ++ pprint t)
22 [| undefined |] )
23
24 $(do VarI _ t _ <- reify 'c
25 runIO $ putStrLn ("type of c: " ++ pprint t)
26 return [] )
27
28 e = $([| True |])
29
30 $(return [])
31
32 f = $(do VarI _ t _ <- reify 'e
33 runIO $ putStrLn ("inside f: " ++ pprint t)
34 [| undefined |] )
35
36 $(do VarI _ t _ <- reify 'e
37 runIO $ putStrLn ("type of e: " ++ pprint t)
38 return [] )
39
40 $( runIO $ do hFlush stdout
41 hFlush stderr
42 return [] )