simplified import of lens-family
Go to file
2015-05-05 20:28:09 -04:00
examples added lens-family-th, wibbles 2015-05-05 20:18:30 -04:00
Lens cpp for (&) 2015-05-05 20:28:09 -04:00
lens-simple.cabal added lens-family-th, wibbles 2015-05-05 20:18:30 -04:00
LICENSE first commit 2014-04-26 23:21:13 -04:00
README.md readme 2015-05-05 20:19:11 -04:00
Setup.hs first commit 2014-04-26 23:21:13 -04:00

lens-family-simple

This just re-exports the combinators and elementary 'van Laarhoven' lenses from Russell O'Connor's sublime lens-family-core package, including "Lens.Family.State.Strict", and the corresponding TH module from lens-family-th.

lens-family has a complex structure and distinctly unpleasant module names, so I made this for my own use, but maybe with experience it will prove to be a sensible idea -- or not. It is mostly just intended to simplify imports for use with pipes and associated pipes libraries. The special quasi-lenses that pervade these libraries frequently require, at a minimum, that some version of view/(^.) and zoom should be in scope. (The effect of import Lens.Simple is at the moment a bit like that of import Control.Lens; presumably much more should be hidden!)

The only non-ghc-boot library lens-family-core and lens-family-core require is mtl.

The naming in lens-family is more or less uniform with the more powerful and elaborate lens library, so it can be dropped in favor of lens should this become necessary.


The pong example from lens/examples is included here as an illustration of the strenth of lens-families + lens-families-th. Nothing is needed but the change of imports.