summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2019-07-25 11:13:20 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-26 09:49:51 -0400
commit26314386789e3717427bab4bcb97755535bb12d4 (patch)
treefeb337bb49a715621c726badb46748b49d61e4d8
parent7c9fb2f0eb7d362c569a05bd509a1571f9257678 (diff)
downloadhaskell-26314386789e3717427bab4bcb97755535bb12d4.tar.gz
Add regression test for #16946
-rw-r--r--testsuite/tests/typecheck/should_compile/T16946.hs12
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T16946.hs b/testsuite/tests/typecheck/should_compile/T16946.hs
new file mode 100644
index 0000000000..e824f7cec8
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T16946.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE RankNTypes, TypeFamilies, PolyKinds, FunctionalDependencies #-}
+module T16946 where
+
+import Data.Kind
+
+class CatMonad (c :: k -> k -> Type) (m :: forall (x :: k) (y :: k). c x y -> Type -> Type) | c -> m where
+ type Id c :: c x x
+
+ xpure :: a -> m (Id c) a
+
+boom :: forall k (c :: k -> k -> Type) (m :: forall (x :: k) (y :: k). c x y -> Type -> Type) a. CatMonad c m => a -> m (Id c) a
+boom = xpure
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 906ee4ba1b..9e9d48659d 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -684,3 +684,4 @@ test('UnlifNewUnify', normal, compile, [''])
test('UnliftedNewtypesLPFamily', normal, compile, [''])
test('UnliftedNewtypesDifficultUnification', normal, compile, [''])
test('T16832', normal, ghci_script, ['T16832.script'])
+test('T16946', normal, compile, [''])