Pretty-printer no longer butchers function arrow fixity
[ghc.git] / testsuite / tests / printer / T13942.hs
1 {-# LANGUAGE TemplateHaskell #-}
2 {-# OPTIONS_GHC -ddump-splices -dsuppress-uniques #-}
3 module T13942 where
4
5 $([d| f :: Either Int (Int -> Int)
6 f = undefined
7 |])
8
9 {-
10
11 Note: to debug
12
13 ~/inplace/bin/ghc-stage2 --interactive
14 load the following
15 --------------------------------------
16 import Language.Haskell.TH
17
18 foo :: IO ()
19 foo = do
20 r <- runQ ([d| f :: Either Int (Int -> Int)
21 f = undefined
22 |])
23 print r
24
25 ----------------------------------------
26 foo
27 [SigD f_0 (AppT (AppT (ConT Data.Either.Either) (ConT GHC.Types.Int)) (AppT (AppT ArrowT (ConT GHC.Types.Int)) (ConT GHC.Types.Int)))
28 ,ValD (VarP f_0) (NormalB (VarE GHC.Err.undefined)) []]
29
30 [SigD f_0
31 (AppT (AppT (ConT Data.Either.Either)
32 (ConT GHC.Types.Int))
33 (AppT (AppT ArrowT
34 (ConT GHC.Types.Int))
35 (ConT GHC.Types.Int)))
36 -}