Fix #11287.
[ghc.git] / testsuite / tests / th / TH_spliceE3.hs
1 -- test the representation of literals and also explicit type annotations
2
3 module TH_repE1
4 where
5
6 import Language.Haskell.TH
7
8 $( do let emptyListExpr :: ExpQ
9 emptyListExpr = [| [] |]
10
11 singletonListExpr :: ExpQ
12 singletonListExpr = [| [4] |]
13
14 listExpr :: ExpQ
15 listExpr = [| [4,5,6] |]
16
17 consExpr :: ExpQ
18 consExpr = [| 4:5:6:[] |]
19
20 [d| foo = ($emptyListExpr, $singletonListExpr, $listExpr, $consExpr) |]
21 )
22
23 bar = $( [| case undefined of
24 [1] -> 1 |] )
25