Record wildcard patch

Simon Peyton-Jones simonpj at microsoft.com
Mon Jun 18 09:03:16 EDT 2007


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



More information about the Cvs-ghc mailing list