summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T13776.hs
blob: 6082825592ec6b5a006bd8da7ff9c90c98f25677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE TemplateHaskell #-}

module T13776 where

import Language.Haskell.TH

spliceTy1 :: $(conT ''(,) `appT` conT ''Int `appT` conT ''Int)
spliceTy1 = (1,2)

spliceTy2 :: $(conT ''[] `appT` conT ''Int)
spliceTy2 = []

spliceExp1 :: (Int, Int)
spliceExp1 = $(conE '(,) `appE` litE (integerL 1) `appE` litE (integerL 1))

spliceExp2 :: [Int]
spliceExp2 = $(conE '[])

splicePat1 :: (Int, Int) -> ()
splicePat1 $(conP '(,) [litP (integerL 1), litP (integerL 1)]) = ()

splicePat2 :: [Int] -> ()
splicePat2 $(conP '[] []) = ()