[Haskell-cafe] Record updates

Henning Thielemann lemming at henning-thielemann.de
Mon Mar 30 17:14:40 EDT 2009


On Sun, 29 Mar 2009, Andrew Coppin wrote:

> Ryan Ingram wrote:
>> Take a look at Data.Accessor on hackage:
>> 
>> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor
>> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor-template
>> 
>
> So, to summarise, it provides a datatype to encapsulate a pair of get/set 
> functions, some infix sugar for using it, and some TH for autogenerating said 
> data. Is that about right?

Exactly. 'modify' or (^:) is what you are looking for.


More information about the Haskell-Cafe mailing list