blob: d0e6e8a14dd32a923f72d47039bde1348b9caf45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE RankNTypes, NamedWildCards #-}
-- See Trac #11098
module NamedWildcardExplicitForall where
foo :: forall _a . _a -> _a -- _a is a type variable
foo = not
bar :: _a -> _a -- _a is a named wildcard
bar = not
baz :: forall _a . _a -> _b -> (_a, _b) -- _a is a variable, _b is a wildcard
baz x y = (not x, not y)
qux :: _a -> (forall _a . _a -> _a) -> _a -- the _a bound by forall is a tyvar
qux x f = let _ = f 7 in not x -- the other _a are wildcards
|