Well spotted! Yes, I changed this some time ago. Handling polymorphic subsumption when matching patterns just turned to be a lot of hassle, with little obvious payoff. Types in patterns must now match exactly.
I could conceivably back-pedal on this, but you are the first person to even notice the change (or at least to comment on it). Simon | -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Oliveira | Sent: 21 January 2006 18:44 | To: Haskell Mailing List | Subject: [Haskell] Pattern Matching with rank-2 types | | 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 | | | _______________________________________________ | Haskell mailing list | [email protected] | http://www.haskell.org/mailman/listinfo/haskell _______________________________________________ Haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell
