[commit: testsuite] master: Tests for Trac #8221 (25bf8e4)
git at git.haskell.org
git at git.haskell.org
Wed Sep 4 15:20:43 CEST 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/25bf8e405257bfde89ec18ef3731e230313560d2/testsuite
>---------------------------------------------------------------
commit 25bf8e405257bfde89ec18ef3731e230313560d2
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Sep 4 13:27:21 2013 +0100
Tests for Trac #8221
>---------------------------------------------------------------
25bf8e405257bfde89ec18ef3731e230313560d2
tests/simplCore/should_compile/Makefile | 3 +++
tests/simplCore/should_compile/T8221.hs | 6 ++++++
tests/simplCore/should_compile/T8221a.hs | 8 ++++++++
tests/simplCore/should_compile/T8221b.hs | 3 +++
tests/simplCore/should_compile/all.T | 5 +++++
5 files changed, 25 insertions(+)
diff --git a/tests/simplCore/should_compile/Makefile b/tests/simplCore/should_compile/Makefile
index 417c948..cea7070 100644
--- a/tests/simplCore/should_compile/Makefile
+++ b/tests/simplCore/should_compile/Makefile
@@ -108,3 +108,6 @@ T7995:
$(RM) -f T7995.hi T7995.o
'$(TEST_HC)' $(TEST_HC_OPTS) -package ghc -ddump-rule-firings -c -O T7995.hs | grep 'text/str'
+T8221:
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221a.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221.hs
diff --git a/tests/simplCore/should_compile/T8221.hs b/tests/simplCore/should_compile/T8221.hs
new file mode 100644
index 0000000..88a9241
--- /dev/null
+++ b/tests/simplCore/should_compile/T8221.hs
@@ -0,0 +1,6 @@
+module T8221 where
+
+import T8221a
+
+data Located e = L () e deriving Eq
+
diff --git a/tests/simplCore/should_compile/T8221a.hs b/tests/simplCore/should_compile/T8221a.hs
new file mode 100644
index 0000000..87dfc84
--- /dev/null
+++ b/tests/simplCore/should_compile/T8221a.hs
@@ -0,0 +1,8 @@
+module T8221a where
+
+import Data.IORef
+
+data Link a = Link !(IORef (Link a)) | X
+
+instance Eq (Link a) where
+ (==) (Link x) (Link y) = x==y
diff --git a/tests/simplCore/should_compile/T8221b.hs b/tests/simplCore/should_compile/T8221b.hs
new file mode 100644
index 0000000..ef396cf
--- /dev/null
+++ b/tests/simplCore/should_compile/T8221b.hs
@@ -0,0 +1,3 @@
+module T8221b where
+
+data Link a = Link a !(Link a)
diff --git a/tests/simplCore/should_compile/all.T b/tests/simplCore/should_compile/all.T
index 9431dc3..2b91799 100644
--- a/tests/simplCore/should_compile/all.T
+++ b/tests/simplCore/should_compile/all.T
@@ -187,3 +187,8 @@ test('T7995',
['$MAKE -s --no-print-directory T7995'])
test('T8196', normal, compile, [''])
+test('T8221b', normal, compile, [''])
+test('T8221',
+ extra_clean(['T8221a.hi', 'T8221a.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory T8221'])
More information about the ghc-commits
mailing list