summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T16881.hs
blob: eed4f2670d265371050219565f3dc2c32d1a27ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TemplateHaskell #-}
module Main where

import Language.Haskell.TH

foo :: String -> $(tupleT 1 `appT` conT ''String)
foo x = $(tupE [[| x |]])

bar :: $(tupleT 1 `appT` conT ''String) -> String
bar $(tupP [[p| x |]]) = x

main :: IO ()
main = do
  foo undefined `seq` putStrLn "hello"
  putStrLn $ bar $ foo "world"