Records in Haskell
AntC
anthony_clayden at clear.net.nz
Sat Mar 3 06:39:35 CET 2012
AntC <anthony_clayden <at> clear.net.nz> writes:
>
> Gábor Lehel <illissius <at> gmail.com> writes:
>
> > ...
> >
> > ... My main complaint against DORF is
> > that having to write fieldLabel declarations for every field you want
> > to use is onerous. If that could be solved, I don't think there are
> > any others. (But even if it can't be, I still prefer DORF.)
> >
>
> Thank you Gábor, I understand that 'complaint'.
>
> I have been trying to keep the design 'clean': either the module is totally
> DORF, or it's totally H98.
>
> ...
> There have been several suggestions amongst the threads to mix H98-style
> fields with DORF-style records (or perhaps I mean vice-versa!):
> * We'd need to change the record decl syntax to 'flag' DORF fields (somehow).
> ...
> There's one difficulty I can see:
> ...
>
> Suggestions please!
>
Wow! well thank you for all that hard thought going into my question.
I've put up a tweak to the proposal as Option Three: "Mixed In-situ and
Declared ORF".
This does _not_ re-introduce H98 style fields, but does simulate them in a way
that fits better with DORF.
Do I dub this MIDORF? How will the cat with the hariballs pronounce it ;-)?
[Oh, and sorry Isaac: the word count on the wiki has gone up some more.]
AntC
More information about the Glasgow-haskell-users
mailing list