summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T22762.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T22762.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T22762.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T22762.hs b/testsuite/tests/typecheck/should_compile/T22762.hs
new file mode 100644
index 0000000000..512e6e8ecd
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T22762.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE UndecidableInstances #-}
+module T22762 where
+
+import Data.Kind
+
+type Const :: a -> b -> a
+type family Const x y where
+ Const x _ = x
+
+type F :: (forall (b :: Bool) -> Const Type b) -> Type
+data F f
+
+type G :: forall (b :: Bool) -> Type
+data G b
+
+type H :: Type
+type family H where
+ H = F G