summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T22647.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T22647.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T22647.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T22647.hs b/testsuite/tests/typecheck/should_compile/T22647.hs
new file mode 100644
index 0000000000..10cf5a98e8
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T22647.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE TypeApplications, KindSignatures, DataKinds, TypeFamilies, FlexibleInstances #-}
+
+module T22647 where
+
+import Data.Kind
+
+data D = D
+type family F :: D -> Type
+
+class C f where
+ meth :: f
+
+instance C (f (p :: D)) where -- f :: D -> Type
+ meth = error "urk1"
+
+instance C (g (q :: Type)) where -- g :: Type -> Type
+ meth = error "urk2"
+
+x = meth :: F 'D
+
+y = meth :: [Type]