Coercible: Test case for now broken(?) corner case
authorJoachim Breitner <mail@joachim-breitner.de>
Tue, 20 May 2014 08:52:14 +0000 (10:52 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 20 May 2014 08:52:14 +0000 (10:52 +0200)
involving a non-terminating newtype. This worked before 7e78faf03.
Probably not a problem, but still better to have a test case for it. See
ticket #9117.

testsuite/tests/typecheck/should_compile/T9117_2.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T9117_2.hs b/testsuite/tests/typecheck/should_compile/T9117_2.hs
new file mode 100644 (file)
index 0000000..e7b08d8
--- /dev/null
@@ -0,0 +1,10 @@
+module T9117_2 where
+
+
+import Data.Coerce
+
+newtype Foo a = Foo (Foo a)
+newtype Age = MkAge Int
+
+ex1 :: (Foo Age) -> (Foo Int)
+ex1 = coerce
index 2c3efad..07d05b8 100644 (file)
@@ -419,3 +419,4 @@ test('T8762', normal, compile, [''])
 test('MutRec', normal, compile, [''])
 test('T8856', normal, compile, [''])
 test('T9117', normal, compile, [''])
+test('T9117_2', expect_broken('9117'), compile, [''])