[Haskell] Improvements to GHC

John Meacham john at repetae.net
Thu Nov 17 19:33:45 EST 2005

On Thu, Nov 17, 2005 at 08:46:50AM -0500, David Roundy wrote:
> On Thu, Nov 17, 2005 at 10:03:00AM +0100, Ketil Malde wrote:
> > >2)  Improving Haskell support for records.
> > 
> > Right - the problem is that nobody seems to agree exactly how to do 
> > this.  I like the fact that record access looks like (is?) a simple 
> > function application, and conversely, dislike that the record update 
> > syntax is different.
> Whereas I take the opposite approach.  The simple function application is
> often a bad function--one that may return bottom--and I'd rather be able to
> place hedges around dangerous functions like that.  In contrast, pattern
> matching is safe.  Record update (on the third hand) is unsafe, but uses
> similar syntax to pattern matching.  It's a mess.  The whole namespace
> issue only exists for record access functions, which is a feature that I'd
> prefer to have dropped from the language anyways.
> Which just goes to show that nobody agrees...

personally, I'd like to see a standard library version of HList
included, and then come up with some syntatic sugar for working with and
pattern matching on HLists. the same way 'do' notation is a simple
rewriting of the monad operators. This would also give us sane error
messages when working with them. perhaps some syntax for automatically
creating label names would be in order to.

though, there are many ways to improve the current record system more
conservativly. (like, why is update partial? it should not be partial.


John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Haskell mailing list