summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T19682b.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T19682b.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T19682b.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T19682b.hs b/testsuite/tests/typecheck/should_compile/T19682b.hs
new file mode 100644
index 0000000000..f0ba98a99b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T19682b.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module T19682b where
+
+type family Arg x where
+ Arg (a -> b) = a
+
+type family Res x where
+ Res (a -> b) = b
+
+class C a
+instance C (a -> b)
+
+f :: (C x, x ~ (Arg x -> Res x)) => x
+f = undefined
+
+g = f