blob: a3fc361432df52f4a463a72af0172d29bef8b180 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{-# LANGUAGE Haskell2010 #-}
-- 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
|