Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/bd7c1a44c2f3fe8a1665f694d746cef00ce73e27

>---------------------------------------------------------------

commit bd7c1a44c2f3fe8a1665f694d746cef00ce73e27
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Mar 16 14:46:18 2012 +0000

    Test Trac #5833

>---------------------------------------------------------------

 tests/th/T5883.hs     |   12 ++++++++++++
 tests/th/T5883.stderr |   12 ++++++++++++
 tests/th/all.T        |    1 +
 3 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/tests/th/T5883.hs b/tests/th/T5883.hs
new file mode 100644
index 0000000..c33cc69
--- /dev/null
+++ b/tests/th/T5883.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeFamilies    #-}
+module T5883 where
+
+import Language.Haskell.TH
+
+$( [d|
+        data Unit = Unit
+        instance Show Unit where
+          show _ = ""
+          {-# INLINE show #-}
+  |])
diff --git a/tests/th/T5883.stderr b/tests/th/T5883.stderr
new file mode 100644
index 0000000..0b0f705
--- /dev/null
+++ b/tests/th/T5883.stderr
@@ -0,0 +1,12 @@
+T5883.hs:1:1: Splicing declarations
+    [d| data Unit = Unit
+        
+        instance Show Unit where
+          show _ = ""
+          {-# INLINE show #-} |]
+  ======>
+    T5883.hs:(7,4)-(12,4)
+    data Unit = Unit
+    instance Show Unit where
+      {-# INLINE show #-}
+      show _ = ""
diff --git a/tests/th/all.T b/tests/th/all.T
index 0bff91e..7aae9a0 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -221,4 +221,5 @@ test('T5700', extra_clean(['T5700a.hi','T5700a.o']),
               multimod_compile, ['T5700','-v0 -ddump-splices'])
 test('T5721', normal, compile, ['-v0'])
 test('T1541', normal, compile, ['-v0'])
+test('T5883', normal, compile, ['-v0 -dsuppress-uniques -ddump-splices'])
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to