Extensible records in Haskell

Nicolas Oury Nicolas.Oury@ens-lyon.fr
Thu, 7 Nov 2002 15:49:50 +0100


I just read your proposal for "lightweight extensible records for=20
Haskell" and find it great.
But I just wonder : why not keeping both records systems (Haskell 98 and=20=

extensible) with their own syntax, introducing for example [{..}]  for=20=

extensible records for example. This would resolve performance issues=20
and other drawbacks that you tell about in Section 5. One who want=20
performance will use the old system, and whose who need power will use=20=

the new one.

You could give operators of type [{...}] to {...} and {=85} to [{=85}} =
to=20
convert between the two worlds.

Best regards,
Nicolas Oury




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.
>
> Simon