blob: c6894b6817eff57579d50caea9c35a481f7e645b (
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
|
{-# LANGUAGE TemplateHaskell #-}
-- Test the use of tupleDataName, tupleTypeName
module TH_tuple1a where
import Language.Haskell.TH
tp2, tp1, tp2u, tp1u :: Q Exp
tp2 = sigE (appsE [conE (tupleDataName 2),
litE (integerL 1),
litE (integerL 2)])
(appT (appT (conT (tupleTypeName 2))
(conT ''Integer))
(conT ''Integer))
tp1 = sigE (appsE [conE (tupleDataName 1),
litE (integerL 1)])
(appT (conT (tupleTypeName 1))
(conT ''Integer))
tp2u = sigE (appsE [conE (unboxedTupleDataName 2),
litE (integerL 1),
litE (integerL 2)])
(appT (appT (conT (unboxedTupleTypeName 2))
(conT ''Integer))
(conT ''Integer))
tp1u = sigE (appsE [conE (unboxedTupleDataName 1),
litE (integerL 1)])
(appT (conT (unboxedTupleTypeName 1))
(conT ''Integer))
|