tuple-lenses

Stock FieldN combos and generators

http://github.com/jfischoff/tuple-lenses

Latest on Hackage:0.1.0.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Jonathan Fischoff
Maintained by [email protected]

This package provides some stock lenses for swizzling tuple elements. For instance:

> (1,2,3)^._13
 (1, 3)

The package provide all lenses that are in increasing order, for FieldN classes 1-9. If you want to swap the order or permute the elements, you need to make your own.

Custom combos are provided by a Template Haskell function.

> ('a','b','c','d') ^. $(tl [4,1,2,3])
 ('d','a','b','c')