Pointless Lenses library http://haskell.di.uminho.pt/wiki/Pointless+Lenses
|Latest on Hackage:||0.0.9|
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.
This cabal package can be installed with:
$ cabal install pointless-lenses
For a manual install, execute:
$ runhaskell Setup.lhs configure
$ runhaskell Setup.lhs build
$ runhaskell Setup.lhs install
You can now start playing with the example code that comes with the library, under Language.Pointless.Examples.Examples.
The easiest way is to create a new module that imports some library modules
module Test where
and interpret it
$ ghci Test.hs
We can now test the well-behavedness of some lens, for example:
> quickCheck (wb filter_left_lns)
+++ OK, passed 100 tests.
Or run some example and later check what it is actually doing:
> put filter_left_lns ([1,2,3],[Left 0,Right 'a',Left 4])
[Left 1,Right 'a',Left 2,Left 3]