On Thu, Aug 2, 2012 at 12:30 PM, Andrew Butterfield <[email protected]> wrote: > > On 2 Aug 2012, at 09:25, Erik Hesselink wrote: > >> Isn't this exactly the problem solved by all the lens packages? >> Current popular ones are fclabels [0] and data-lens [1]. >> >> [0] http://hackage.haskell.org/package/fclabels >> [1] http://hackage.haskell.org/package/data-lens > > Not sure what all of these do, but I have a simple solution I use > in my work:
They do exactly that. They create 'lenses' which are getters/setters/modifiers combined, and allow you to compose these to get/set/modify deep inside nested data types. Look at the examples in the fclabels documentation [2] for more details. [2] http://hackage.haskell.org/packages/archive/fclabels/1.1.4/doc/html/Data-Label.html _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
