Test Trac #12925
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 5 Dec 2016 17:18:19 +0000 (17:18 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 5 Dec 2016 17:40:08 +0000 (17:40 +0000)
testsuite/tests/typecheck/should_compile/T12925.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T12925.hs b/testsuite/tests/typecheck/should_compile/T12925.hs
new file mode 100644 (file)
index 0000000..986aa51
--- /dev/null
@@ -0,0 +1,12 @@
+module Bug where
+
+data Foo a x = Foo x
+
+refoo :: Foo a x -> Foo b x
+{-# NOINLINE refoo #-}
+refoo (Foo x) = Foo x
+
+{-# RULES
+
+"refoo/refoo" forall s.
+  refoo (refoo s) = s  #-}
index de7f147..e2d65bd 100644 (file)
@@ -555,4 +555,4 @@ test('T12734', normal, compile, [''])
 test('T12734a', normal, compile_fail, [''])
 test('T12763', normal, compile, [''])
 test('T12797', normal, compile, [''])
-
+test('T12925', normal, compile, [''])