summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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, [''])