Record wildcard patch

Augustsson, Lennart lennart.augustsson at credit-suisse.com
Wed Jul 4 08:26:03 EDT 2007


Thanks for applying and improving the patch, Simon.  Unfortunately it doesn't work anymore.  I've sent in a bug report.
Perhaps I forgot to submit the tests to the test suite?

  -- Lennart 

-----Original Message-----
From: Simon Peyton-Jones [mailto:simonpj at microsoft.com] 
Sent: Monday, June 18, 2007 2:03 PM
To: Augustsson, Lennart; 'cvs-ghc at haskell.org'
Subject: RE: Record wildcard patch

Thanks!  After some thought I concluded that it was better not to mix up the parent/child thing (which is used for import/export) with this field stuff.  It gets a bit complicated: Consutructor C is a child of data type T, and field 'x' is a child of C.  But 'x' might be a child of 'D' too (another constructor of T).  And 'x' is also a child of T when it comes to export (you can export T( C, D, x )).

So I made a separate env just for the constructor fields.

As your commit message said, there's a delicate interaction with the collectPatBinders stuff. In particular,

        C {..} = foo

ought to work at top level, and is even useful (it's a bit like a module import, if you think of foo as a module), but it won't work yet.  I'm thinking about a better refactoring.

Meanwhile, I think it'll do what you want.

Simon


| -----Original Message-----
| From: cvs-ghc-bounces at haskell.org [mailto:cvs-ghc-bounces at haskell.org] 
| On Behalf Of Augustsson, Lennart
| Sent: 13 June 2007 17:15
| To: 'cvs-ghc at haskell.org'
| Subject: Record wildcard patch
|
|
| Here's the record wildcard patch again.  Hopefully in a better shape 
| this time. :)
|
|         -- Lennart

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the Cvs-ghc mailing list