summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T3899a.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/T3899a.hs')
-rw-r--r--testsuite/tests/th/T3899a.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/th/T3899a.hs b/testsuite/tests/th/T3899a.hs
new file mode 100644
index 0000000000..2ac985136f
--- /dev/null
+++ b/testsuite/tests/th/T3899a.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T3899a where
+
+
+import Language.Haskell.TH
+import Control.Monad
+
+data Cons a b = Cons a b
+data Nil = Nil
+
+nestedTuple n = do
+ xs <- replicateM n (newName "x")
+ return $ LamE [foldr (\v prev -> ConP 'Cons [VarP v,prev]) (ConP 'Nil []) xs]
+ (TupE $ map VarE xs)