[commit: testsuite] master: Add test for T7878 (48dc03b)

José Pedro Magalhães jpm at cs.uu.nl
Thu May 9 11:28:19 CEST 2013


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

On branch  : master

https://github.com/ghc/testsuite/commit/48dc03b414e90d40e4cc6b1a8fe3b6a7c0ef7181

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

commit 48dc03b414e90d40e4cc6b1a8fe3b6a7c0ef7181
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date:   Thu May 9 10:26:57 2013 +0100

    Add test for T7878

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

 tests/generics/T7878.hs       |    3 +++
 tests/generics/T7878A.hs      |    7 +++++++
 tests/generics/T7878A.hs-boot |    3 +++
 tests/generics/T7878B.hs      |    3 +++
 tests/generics/all.T          |    7 ++++++-
 5 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/tests/generics/T7878.hs b/tests/generics/T7878.hs
new file mode 100644
index 0000000..a2a09dc
--- /dev/null
+++ b/tests/generics/T7878.hs
@@ -0,0 +1,3 @@
+module T7878C where
+
+import T7878A
diff --git a/tests/generics/T7878A.hs b/tests/generics/T7878A.hs
new file mode 100644
index 0000000..7f923d7
--- /dev/null
+++ b/tests/generics/T7878A.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE DeriveGeneric #-}
+module T7878A where
+
+import T7878B
+import GHC.Generics
+
+data Test deriving Generic
diff --git a/tests/generics/T7878A.hs-boot b/tests/generics/T7878A.hs-boot
new file mode 100644
index 0000000..f45d1d0
--- /dev/null
+++ b/tests/generics/T7878A.hs-boot
@@ -0,0 +1,3 @@
+module T7878A where
+
+data Test -- The panic occurs regardless of whether this line is included
diff --git a/tests/generics/T7878B.hs b/tests/generics/T7878B.hs
new file mode 100644
index 0000000..6e38a7b
--- /dev/null
+++ b/tests/generics/T7878B.hs
@@ -0,0 +1,3 @@
+module T7878B where
+
+import {-# SOURCE #-} T7878A
diff --git a/tests/generics/all.T b/tests/generics/all.T
index 7a88487..267fbe6 100644
--- a/tests/generics/all.T
+++ b/tests/generics/all.T
@@ -24,4 +24,9 @@ test('GenCannotDoRep1_4', normal, compile_fail, [''])
 test('GenCannotDoRep1_5', normal, compile_fail, [''])
 test('GenCannotDoRep1_6', normal, compile_fail, [''])
 test('GenCannotDoRep1_7', normal, compile_fail, [''])
-test('GenCannotDoRep1_8', normal, compile_fail, [''])
\ No newline at end of file
+test('GenCannotDoRep1_8', normal, compile_fail, [''])
+
+test('T7878', extra_clean(['T7878A.o'     ,'T7878A.hi'
+                          ,'T7878A.o-boot','T7878A.hi-boot'
+                          ,'T7878B.o'     ,'T7878B.hi']), 
+              multimod_compile, ['T7878', '-v0'])





More information about the ghc-commits mailing list