RE: Re : Extensible records in Haskell

The TRex record system is probably the main type-system extension that GHC does not currently implement. The trouble is that it's quite a bit of work. If it were just the type inference part it would be ok, but it requires new primitive operations to insert fields in records, and I think that interacts with GHC's current data structure representations. So it's feasible but it's Real Work. So far, to my surprise, no one has asked for it. You are nearly the first! Another reason for holding back is that Mark and I worked out a design, in the light of TRex (see our paper at the Haskell workshop '99), but it'd be a pity to have Hugs and GHC differing.... and I'm not sure that anyone would have enough energy to change Hugs. So for a variety of reasons, I'm inclined to leave it as a Good Reason To Use Hugs, but I could probably be persuaded otherwise. Simon | -----Original Message----- | From: Nicolas Oury [mailto:Nicolas.Oury@ens-lyon.fr] | Sent: 06 November 2002 08:38 | To: glasgow-haskell-users@haskell.org | Subject: Re : Extensible records in Haskell | | > > Hello, is there something like extensible records in ghc? | | >Are you wanting something like Hugs' T-Rex or did you have something | >else in mind? | | | Hello, | For what I understand of T-Rex it is what I wait. | | I need something that can allow to use records without declaring their | type first and that can be extended by creating a new records with the | same contents plus one or less one. | | Best regards, | Nicolas | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Le mercredi 6 novembre 2002, à 10:44 , Simon Peyton-Jones a écrit :
The TRex record system is probably the main type-system extension that GHC does not currently implement. The trouble is that it's quite a bit of work. If it were just the type inference part it would be ok, but it requires new primitive operations to insert fields in records, and I think that interacts with GHC's current data structure representations.
So it's feasible but it's Real Work. So far, to my surprise, no one has asked for it. You are nearly the first! Another reason for holding back is that Mark and I worked out a design, in the light of TRex (see our paper at the Haskell workshop '99), but it'd be a pity to have Hugs and GHC differing.... and I'm not sure that anyone would have enough energy to change Hugs.
So for a variety of reasons, I'm inclined to leave it as a Good Reason To Use Hugs, but I could probably be persuaded otherwise.
I am going to try to persuade you: * first of all, it seems to be needed in order to make "first class modules" (cf your paper) . And I think that a true module system would be useful. But I may be wrong. * As far as I am concerned, in fact, I need it to do something on the typing of problems like database queries, where the naming is quite concerning. I think for example, HaskellDB (don't know if it was this actually the name) was doing something like this. * It would be used : it is easy to understand, safe and avoid to rename with different names some fields that should have the same name. * ... I could try find other reasons tomorrow.
Simon
| -----Original Message----- | From: Nicolas Oury [mailto:Nicolas.Oury@ens-lyon.fr] | Sent: 06 November 2002 08:38 | To: glasgow-haskell-users@haskell.org | Subject: Re : Extensible records in Haskell | | > > Hello, is there something like extensible records in ghc? | | >Are you wanting something like Hugs' T-Rex or did you have something | >else in mind? | | | Hello, | For what I understand of T-Rex it is what I wait. | | I need something that can allow to use records without declaring their | type first and that can be extended by creating a new records with the | same contents plus one or less one. | | Best regards, | Nicolas | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On Wednesday 06 November 2002 10:48 pm, Nicolas Oury wrote:
I am going to try to persuade you:
* first of all, it seems to be needed in order to make "first class modules" (cf your paper) . And I think that a true module system would be useful. But I may be wrong.
* As far as I am concerned, in fact, I need it to do something on the typing of problems like database queries, where the naming is quite concerning. I think for example, HaskellDB (don't know if it was this actually the name) was doing something like this.
* It would be used : it is easy to understand, safe and avoid to rename with different names some fields that should have the same name.
* ...
I could try find other reasons tomorrow.
I'll second this request. I would also like a better records and/or first class modules system with extensibility and sub-typing or row polymorphism (not sure which is best or most feasible). I would also like to be able to use field names properly with extistentials. (Hmm, I suspect having existentials and extentsibility is difficult?) Also, is there some good technical reason why we can't allow punning? My wish list anyway. Thanks -- Adrian Hey

I just read your proposal for "lightweight extensible records for Haskell" and find it great. But I just wonder : why not keeping both records systems (Haskell 98 and extensible) with their own syntax, introducing for example [{..}] for extensible records for example. This would resolve performance issues and other drawbacks that you tell about in Section 5. One who want performance will use the old system, and whose who need power will use the new one. You could give operators of type [{...}] to {...} and {…} to [{…}} to convert between the two worlds. Best regards, Nicolas Oury Le mercredi 6 novembre 2002, à 10:44 , Simon Peyton-Jones a écrit :
The TRex record system is probably the main type-system extension that GHC does not currently implement. The trouble is that it's quite a bit of work. If it were just the type inference part it would be ok, but it requires new primitive operations to insert fields in records, and I think that interacts with GHC's current data structure representations.
So it's feasible but it's Real Work. So far, to my surprise, no one has asked for it. You are nearly the first! Another reason for holding back is that Mark and I worked out a design, in the light of TRex (see our paper at the Haskell workshop '99), but it'd be a pity to have Hugs and GHC differing.... and I'm not sure that anyone would have enough energy to change Hugs.
So for a variety of reasons, I'm inclined to leave it as a Good Reason To Use Hugs, but I could probably be persuaded otherwise.
Simon
participants (3)
-
Adrian Hey
-
Nicolas Oury
-
Simon Peyton-Jones