Tests for Trac #8221
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 4 Sep 2013 12:27:21 +0000 (13:27 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 4 Sep 2013 12:27:21 +0000 (13:27 +0100)
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T8221.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T8221a.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T8221b.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T

index 417c948..cea7070 100644 (file)
@@ -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 (file)
index 0000000..88a9241
--- /dev/null
@@ -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 (file)
index 0000000..87dfc84
--- /dev/null
@@ -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 (file)
index 0000000..ef396cf
--- /dev/null
@@ -0,0 +1,3 @@
+module T8221b where
+
+data Link a = Link a !(Link a)
index 9431dc3..2b91799 100644 (file)
@@ -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'])