summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T2714.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T2714.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T2714.hs b/testsuite/tests/typecheck/should_fail/T2714.hs
new file mode 100644
index 0000000000..80f838c37c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T2714.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
+-- Trac #2714
+
+module T2714 where
+
+f :: ((a -> b) -> b) -> (forall c. c -> a)
+f = ffmap
+
+ffmap :: Functor f => (p->q) -> f p -> f q
+ffmap = error "urk"
+
+{-
+ a ~ f q
+ c ~ f p
+ (p->q) ~ (a->b) -> b
+
+ =>
+ a ~ f q
+ c ~ f p
+ p ~ a->b
+ q ~ b
+ =>
+ a ~ f b
+ c ~ f (a->b)
+-} \ No newline at end of file