Add test for #8186
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 27 Aug 2013 21:38:41 +0000 (17:38 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 28 Aug 2013 03:06:58 +0000 (23:06 -0400)
testsuite/tests/th/T8186.hs [new file with mode: 0644]
testsuite/tests/th/T8186.stdout [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T8186.hs b/testsuite/tests/th/T8186.hs
new file mode 100644 (file)
index 0000000..1580a9c
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE TemplateHaskell, ParallelListComp #-}
+
+module Main where
+
+list = [ (x,y) | x <- [1..10], x `mod` 2 == 0 | y <- [2,6..50] ]
+
+list' = $( [| [ (x,y) | x <- [1..10], x `mod` 2 == 0 | y <- [2,6..50] ] |] )
+
+main = do putStrLn (show list)
+          putStrLn (show list')
+          putStrLn $ show (list == list')
\ No newline at end of file
diff --git a/testsuite/tests/th/T8186.stdout b/testsuite/tests/th/T8186.stdout
new file mode 100644 (file)
index 0000000..cd4aa8b
--- /dev/null
@@ -0,0 +1,3 @@
+[(2,2),(4,6),(6,10),(8,14),(10,18)]
+[(2,2),(4,6),(6,10),(8,14),(10,18)]
+True
index fcb743f..455f45d 100644 (file)
@@ -284,4 +284,6 @@ test('T8028',
 
 test('TH_Roles1', normal, compile_fail, ['-v0'])
 test('TH_Roles2', normal, compile, ['-v0 -ddump-tc'])
-test('TH_Roles3', normal, compile, ['-v0 -dsuppress-uniques'])
\ No newline at end of file
+test('TH_Roles3', normal, compile, ['-v0 -dsuppress-uniques'])
+
+test('T8186', normal, compile_and_run, ['-v0'])
\ No newline at end of file