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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Augustsson,
| Lennart
| Sent: 13 June 2007 17:15
| To: '[email protected]'
| Subject: Record wildcard patch
|
|
| Here's the record wildcard patch again.  Hopefully in a better shape this 
time. :)
|
|         -- Lennart

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to