summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T20356.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T20356.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T20356.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T20356.hs b/testsuite/tests/typecheck/should_fail/T20356.hs
new file mode 100644
index 0000000000..6a847cb22a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T20356.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies, PolyKinds, ConstraintKinds #-}
+
+module T20356 where
+
+import GHC.Types
+
+type family Id (a :: k -> Constraint) :: l -> Constraint
+type instance Id f = f
+
+type T :: Constraint -> Constraint
+type T = Id Eq
+
+data Proxy p = MkProxy
+
+id' :: f a -> f a
+id' x = x
+
+z = id' (MkProxy @T)