summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/rnfail052.hs
blob: bffb7e0d963a9ccaba61c903b82eb3f046ac3ac2 (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 #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