summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-05-06 12:37:00 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2017-05-06 12:37:04 -0400
commited0c7f8b1f91651203db4a0ee5931d47e1e6ab51 (patch)
tree8d9f83f21605273925ccdaede5edcec9cb362229 /testsuite/tests
parent4a6cb5efe8e55717dfbbb677aa95e3b825d8de05 (diff)
downloadhaskell-ed0c7f8b1f91651203db4a0ee5931d47e1e6ab51.tar.gz
Add regression test for #13651
Commit eb55ec2941239dee05afc6be818b129efe51660e ended up fixing #13651, so let's add a regression test for it.
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_compile/T13651.hs14
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13651.hs b/testsuite/tests/typecheck/should_compile/T13651.hs
new file mode 100644
index 0000000000..43ae633534
--- /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 34b8184069..6db86a8627 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, [''])