Records in Haskell

J. Garrett Morris jgmorris at cs.pdx.edu
Tue Feb 28 02:02:04 CET 2012


On Mon, Feb 27, 2012 at 4:52 PM, AntC <anthony_clayden at clear.net.nz> wrote:
> And can use it, for example:
>    getF lastName cust1
>    getF fullName person2
>
> I don't think you can do this is SORF (but please check with SPJ). In
> particular, I don't think you could call this function and pass an argument
> into it for the field name.

You only need some way to write a value of a type of kind String; the
section "should Get have a proxy argument" of the "SORF" wiki page
discusses approaches to this problem.  This example demonstrates the
flexibility of the Proxy-based approach, but does not distinguish
between DORF and SORF.

 /g

P.S. Perhaps we should find record proposals that don't sound like
noises my cat makes when coping with a hairball? ;)

--
"Would you be so kind as to remove the apricots from the mashed potatoes?"



More information about the Glasgow-haskell-users mailing list