[commit: testsuite] master: Test Trac #7321 (739f06d)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/739f06defcaa80ee446a64bbecccce621233fd6f

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

commit 739f06defcaa80ee446a64bbecccce621233fd6f
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Oct 12 16:32:08 2012 +0100

    Test Trac #7321

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

 tests/gadt/Makefile  |    5 +++++
 tests/gadt/T7321.hs  |    6 ++++++
 tests/gadt/T7321a.hs |    5 +++++
 tests/gadt/all.T     |    4 ++++
 4 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/tests/gadt/Makefile b/tests/gadt/Makefile
index 7a2288f..2df535b 100644
--- a/tests/gadt/Makefile
+++ b/tests/gadt/Makefile
@@ -11,6 +11,11 @@ gadt17:
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c Gadt17_help.hs
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c gadt17.hs
 
+T7321:
+	@$(RM) T7321a.hi T7321.hi
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T7321a.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T7321.hs
+
 gadt23:
 	$(RM) gadt23 gadt23.hi gadt23.o Gadt23_AST.hi Gadt23_AST.o
 	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make gadt23.hs
diff --git a/tests/gadt/T7321.hs b/tests/gadt/T7321.hs
new file mode 100644
index 0000000..14b3cd0
--- /dev/null
+++ b/tests/gadt/T7321.hs
@@ -0,0 +1,6 @@
+module T7321 where
+
+import T7321a
+
+foo :: Exp a
+foo = error "urk"
diff --git a/tests/gadt/T7321a.hs b/tests/gadt/T7321a.hs
new file mode 100644
index 0000000..14d22a9
--- /dev/null
+++ b/tests/gadt/T7321a.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE GADTs #-}
+module T7321a where
+
+data Exp a where
+   LamE :: (Exp a -> Exp b) -> Exp (Exp a -> Exp b)
diff --git a/tests/gadt/all.T b/tests/gadt/all.T
index f28e28d..e68d126 100644
--- a/tests/gadt/all.T
+++ b/tests/gadt/all.T
@@ -116,3 +116,7 @@ test('FloatEq', normal, compile, [''])
 test('T7205', normal, compile, [''])
 test('T7293', normal, compile_fail, [''])
 test('T7294', normal, compile, [''])
+test('T7321',
+     extra_clean(['T7321a.hi', 'T7321a.o']),
+     run_command,
+     ['$MAKE -s --no-print-directory T7321'])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.