summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/rnfail052.hs
blob: 63a0dfd6d12b94e4fede3d36226538e57dc50f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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