Test Trac #5217
authorSimon Peyton Jones <simonpj@microsoft.com>
Sat, 11 Jun 2011 15:37:26 +0000 (16:37 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sat, 11 Jun 2011 15:37:26 +0000 (16:37 +0100)
testsuite/tests/ghc-regress/th/T5217.hs [new file with mode: 0644]
testsuite/tests/ghc-regress/th/T5217.stderr [new file with mode: 0644]
testsuite/tests/ghc-regress/th/all.T

diff --git a/testsuite/tests/ghc-regress/th/T5217.hs b/testsuite/tests/ghc-regress/th/T5217.hs
new file mode 100644 (file)
index 0000000..9dd1f1c
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE GADTs #-}\r
+\r
+module T5217 where\r
+import Language.Haskell.TH\r
+\r
+$([d| data T a b where { T1 :: Int -> T Int Char \r
+                       ; T2 :: a -> T a a\r
+                       ; T3 :: a -> T [a] a\r
+                       ; T4 :: a -> b -> T b [a] } |])\r
+\r
+\r
diff --git a/testsuite/tests/ghc-regress/th/T5217.stderr b/testsuite/tests/ghc-regress/th/T5217.stderr
new file mode 100644 (file)
index 0000000..891bb7f
--- /dev/null
@@ -0,0 +1,14 @@
+T5217.hs:1:1: Splicing declarations\r
+    [d| data T a b\r
+            where\r
+              T1 :: Int -> T Int Char\r
+              T2 :: a -> T a a\r
+              T3 :: a -> T [a] a\r
+              T4 :: a -> b -> T b [a] |]\r
+  ======>\r
+    T5217.hs:(6,3)-(9,53)\r
+    data T a b\r
+        = (b ~ Char, a ~ Int) => T1 Int |\r
+          b ~ a => T2 a |\r
+          a ~ [b] => T3 b |\r
+          forall a. b ~ [a] => T4 a a\r
index aa96bc6..48e14cb 100644 (file)
@@ -179,3 +179,4 @@ test('TH_viewPatPrint', normal, compile_and_run, [''])
 test('T4436', normal, compile, ['-v0 -ddump-splices'])
 test('T4949', normal, compile, ['-v0'])
 test('T5126', normal, compile, ['-v0'])
+test('T5217', normal, compile, ['-v0 -dsuppress-uniques -ddump-splices'])