summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/rnfail052.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_fail/rnfail052.hs')
-rw-r--r--testsuite/tests/rename/should_fail/rnfail052.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/rnfail052.hs b/testsuite/tests/rename/should_fail/rnfail052.hs
new file mode 100644
index 0000000000..63a0dfd6d1
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/rnfail052.hs
@@ -0,0 +1,15 @@
+-- Error messages when you use 'forall' *without* the RankN flags
+-- Test cases similar to Trac #2114
+
+module ShouldFail where
+
+f :: forall a. a->a
+f = error "ur"
+
+g :: Int -> (forall a. a-> a) -> Int
+g = error "ur"
+
+data S = MkS (forall a. a->a)
+ -- This one complains about 'a' and 'forall' not in scope
+ -- because they aren't implicitly quantified,
+ -- whereas implicit quantification deals with the first two