
On Tue, Apr 22, 2008 at 6:26 AM, Henning Thielemann
On Mon, 21 Apr 2008, Ryan Ingram wrote:
I recommend this blog entry:
http://twan.home.fmf.nl/blog/haskell/overloading-functional-references.detai...
along with a few additional combinators for imperative update:
data FRef s a = FRef { frGet :: s -> a , frSet :: a -> s -> s }
http://darcs.haskell.org/record-access/src/Data/Accessor.hs http://darcs.haskell.org/record-access/src/Data/Accessor/Example.hs
I should upload this to Hackage, I know ...
Not to toot my own horn, but there's already something like this on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor-0.0... Which has template haskell routines for generating accessors for record types also. Luke