Extensible records in Haskell

Nicolas Oury Nicolas.Oury@ens-lyon.fr
Wed, 6 Nov 2002 23:48:50 +0100


Le mercredi 6 novembre 2002, =E0 10:44 , Simon Peyton-Jones a =E9crit :

> 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=20
modules"  (cf your paper) . And I think that a true module system would=20=

be useful. But I may be wrong.

* As far as I am concerned, in fact, I need it to do something on the=20
typing of problems like database queries, where the naming is quite=20
concerning. I think for example, HaskellDB (don't know if it was this=20
actually the name) was doing something like this.

* It would be used : it is easy to understand, safe and avoid to rename=20=

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
>