[GHC] #1491: Extension RecordWildCards is broken

Augustsson, Lennart lennart.augustsson at credit-suisse.com
Thu Jul 5 04:20:59 EDT 2007


So I thought my second version of the patch actually did the (mostly) right thing.
It didn't reuse the same Name.  When a C{..} pattern was found it was expanded (very early) in expandDotDot by looking up the children of the constructor and making a new RdrName for each field.  No C{..} ever reached rnPat.
But I guess there was something about this you didn't like.

It does affect me in a day-to-day way.  We rely on this extension, so we have to build our own compiler.
Given that it takes at least a day of fixing the build system every time I try to build ghc I don't do this very often.  And for the last few months I've never managed to build a ghc with a working (installed) ghci.  So people are currently running a quite old ghc (with bugs that have since been fixed) and I was hoping we could run the snapshot version instead.

But at the moment I can't even download the darcs repo for ghc.  That might be a problem at our end that is currupting one of the patches.  (We can't download the packed up version of the source tree because .bz2 files seem to be blocked in our firewall.)

  -- Lennart

-----Original Message-----
From: trac at galois.com [mailto:trac at galois.com] 
Sent: Thursday, July 05, 2007 8:58 AM
To: lennart.augustsson at credit-suisse.com
Subject: Re: [GHC] #1491: Extension RecordWildCards is broken

#1491: Extension RecordWildCards is broken
-------------------------+----------------------------------------------
-------------------------+----
    Reporter:  guest     |        Owner:         
        Type:  bug       |       Status:  new    
    Priority:  normal    |    Milestone:         
   Component:  Compiler  |      Version:  6.7    
    Severity:  normal    |   Resolution:         
    Keywords:            |   Difficulty:  Unknown
          Os:  Windows   |     Testcase:         
Architecture:  Unknown   |  
-------------------------+----------------------------------------------
-------------------------+----
Comment (by simonpj):

 Yes, I'm sorry Lennart.  As we both discovered, the current design of  rnPat is not well suited to this, and both our patches rely in a very  delicate way on shadowing the record selectors with local bindings for the  same Name.  As it turned out, this delicacy is just about ok when the  record is defined in the same module, but not when it's imported.  But  that's because we are doing the Wrong Thing.

 I have been ruminating about how to re-factor rnPat to do the Right Thing  but I've been too busy with OSCON tutorial to do it.  Is it day-to-day  urgent for you?

 Simon

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1491>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

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

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



More information about the Glasgow-haskell-bugs mailing list