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