putlenses: Put-based lens library

[ bsd3, generics, lenses, library ] [ Propose Tags ]

Putlenses is a library of lenses where users specify backward put transformations (set in the Haskell lens package) and the library provides forward get transformations for free (view in the lens package). This contrasts with other traditional libraries for bidirectional programming, where forward transformations are specified instead and backward transformations are automatically derived, and offers more expressive power and control over the bidirectional synchronization strategies to users, while preserving a similarly maintainable specification style. An introduction to putback-based programming can be found at http://grace-center.jp/wp-content/uploads/2013/01/GRACE-TR-2012-08.pdf. A research paper on putlenses is available at http://dl.acm.org/citation.cfm?id=2543737.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.1.1, 0.1.2, 0.1.3
Dependencies base (>=4.3 && <5), containers (>=, ghc-prim (>=, lens (>=, mtl (>=2.1.2), QuickCheck (>=2.7 && <2.8), random (>=, safe (>=0.3.3), split (>=0.2.2), template-haskell (>= && <, transformers (>= [details]
License BSD-3-Clause
Author Hugo Pacheco <hpacheco@gmail.com>
Maintainer Hugo Pacheco <hpacheco@gmail.com>
Category Generics, Lenses
Uploaded by HugoPacheco at 2014-09-30T05:07:03Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5071 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for putlenses-0.1.3

[back to package description]

This cabal package can be installed with:

$ cabal install putlenses

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

import Test.QuickCheck.Test
import Generics.Pointless.Lenses
import Generics.Pointless.Lenses.Examples.Examples

and interpret it

$ ghci Test.hs

We can now run some examples:
> exMssPut2
> exMssPut3