[Haskell-cafe] functional update

Luke Palmer lrpalmer at gmail.com
Thu Apr 24 05:08:52 EDT 2008


On Tue, Apr 22, 2008 at 6:26 AM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>  On Mon, 21 Apr 2008, Ryan Ingram wrote:
> > I recommend this blog entry:
> >
> http://twan.home.fmf.nl/blog/haskell/overloading-functional-references.details
> >
> > 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.1

Which has template haskell routines for generating accessors for
record types also.

Luke


More information about the Haskell-Cafe mailing list