[commit: ghc] master: Add regression test for #13651 (ed0c7f8)

git at git.haskell.org git at git.haskell.org
Sat May 6 16:39:09 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ed0c7f8b1f91651203db4a0ee5931d47e1e6ab51/ghc

>---------------------------------------------------------------

commit ed0c7f8b1f91651203db4a0ee5931d47e1e6ab51
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Sat May 6 12:37:00 2017 -0400

    Add regression test for #13651
    
    Commit eb55ec2941239dee05afc6be818b129efe51660e ended up fixing #13651, so
    let's add a regression test for it.


>---------------------------------------------------------------

ed0c7f8b1f91651203db4a0ee5931d47e1e6ab51
 testsuite/tests/typecheck/should_compile/T13651.hs | 14 ++++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 2 files changed, 15 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T13651.hs b/testsuite/tests/typecheck/should_compile/T13651.hs
new file mode 100644
index 0000000..43ae633
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T13651.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-}
+module T13651 where
+
+type family F r s = f | f -> r s
+
+type instance F (Bar h (Foo r)) (Bar h (Foo s)) = Bar h (Bar r s)
+
+data Bar s b
+data Foo a
+
+foo :: (F cr cu ~ Bar h (Bar r u),
+        F cu cs ~ Bar (Foo h) (Bar u s))
+    => Bar h (Bar r u) -> Bar (Foo h) (Bar u s) -> Foo (cr -> cs)
+foo = undefined
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 34b8184..6db86a8 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -558,3 +558,4 @@ test('T13526', normal, compile, [''])
 test('T13603', normal, compile, [''])
 test('T13333', normal, compile, [''])
 test('T13585', [extra_files(['T13585.hs', 'T13585a.hs', 'T13585b.hs'])], run_command, ['$MAKE -s --no-print-directory T13585'])
+test('T13651', normal, compile, [''])



More information about the ghc-commits mailing list