Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Simon Peyton-Jones <simonpj <at> microsoft.com>
Subject: RE: Pattern Matching with rank-2 types
Newsgroups: gmane.comp.lang.haskell.general
Date: Monday 23rd January 2006 11:43:20 UTC (over 11 years ago)
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
 
CD: 3ms