[Haskell-cafe] ANN: fclabels-0.4.0 - First class accessor labels.
Sebastiaan Visser
sfvisser at cs.uu.nl
Fri Sep 4 06:56:25 EDT 2009
Hello all,
IFCP is a really inspiring place to hang/hack around with your fellow
Haskell hackers. So, straight from Edinburgh, I proudly present a new
release of fclabels[1,2], your favourite record selector package. This
version is joint work with Chris Eidhof and Sjoerd Visscher.
This package has been around for a while but has been changed almost
entirely now. Naming is different and has a far more consistent usage.
This library might look cryptic at first sight, but give it a try it
is not that hard.
There are more package around that serve the same purpose (like the
Lenses package which was uploaded a few days ago), but I'm convinced
the simplicity and elegance of fclabels will strike you all. ;-)
The package description is included below. Documentation can be found
in the package itself or on Hackage.
Gr,
--
Sebastiaan Visser
[1] Hackage: http://hackage.haskell.org/package/fclabels
[2] Github: http://github.com/sebastiaanvisser/fclabels/tree/master
* package description *
First class labels that act as bidirectional records fields.
The labels are fully composable and can be used to get, set
and modify part of datatypes in a consistent way. The label
datatype, conveniently called `:->', is an instance of the
`Category' type class meaning it has a proper identity and
composition. The library has support for automatically
deriving labels from record selectors that start with an
underscore. Labels can be used in a pure functional setting or
be applied to mutable state in some state monad.
More information about the Haskell-Cafe
mailing list