blob: 77f3ef89e27c1532832842cf08ed0e3d39307fc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
module ScopedNamedWildcardsGood where
-- The named wildcards aren't scoped as the ScopedTypeVariables extension
-- isn't enabled, of which the behaviour is copied. Thus, the _a annotation of
-- x, which must be Bool, isn't the same as the _a in g, which is now
-- generalised over.
foo :: _a -> _
foo x = let v = not x
g :: _a -> _a
g x = x
in (g 'x')
|