[Haskell] Pattern Matching with rank-2 types

Bruno Oliveira bruno.oliveira at comlab.ox.ac.uk
Sat Jan 21 13:43:56 EST 2006


Hello,

The following function is a valid function in ghc6.2.2:

> func :: (forall a . [a]) -> [b]
> func [] = []

However, in ghc6.4.1 it does not work anymore:

Iterators4.lhs:56:6:
    Couldn't match `forall a. [a]' against `[a]'
    When checking the pattern: []
    In the definition of `func': func [] = []

Is this supposed to happen? 

Cheers,

Bruno




More information about the Haskell mailing list