summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-09-04 13:27:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2013-09-04 13:27:21 +0100
commitcab84ec1fb2b07722ee63960aa65fc2515cbcc9f (patch)
treee6a8f05c43b5088c80598cae4984589e4f7dd7ee /testsuite/tests/simplCore
parent6f0cf01db4f834ec80c21f50adfbacd6faba10a9 (diff)
downloadhaskell-cab84ec1fb2b07722ee63960aa65fc2515cbcc9f.tar.gz
Tests for Trac #8221
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile3
-rw-r--r--testsuite/tests/simplCore/should_compile/T8221.hs6
-rw-r--r--testsuite/tests/simplCore/should_compile/T8221a.hs8
-rw-r--r--testsuite/tests/simplCore/should_compile/T8221b.hs3
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T5
5 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 417c948b45..cea7070caa 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/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/testsuite/tests/simplCore/should_compile/T8221.hs b/testsuite/tests/simplCore/should_compile/T8221.hs
new file mode 100644
index 0000000000..88a9241b22
--- /dev/null
+++ b/testsuite/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/testsuite/tests/simplCore/should_compile/T8221a.hs b/testsuite/tests/simplCore/should_compile/T8221a.hs
new file mode 100644
index 0000000000..87dfc84117
--- /dev/null
+++ b/testsuite/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/testsuite/tests/simplCore/should_compile/T8221b.hs b/testsuite/tests/simplCore/should_compile/T8221b.hs
new file mode 100644
index 0000000000..ef396cf0d9
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T8221b.hs
@@ -0,0 +1,3 @@
+module T8221b where
+
+data Link a = Link a !(Link a)
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 9431dc3dbf..2b917995b6 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/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'])