putlenses: Put-based lens library

[ bsd3, generics, lenses, library ] [ Propose Tags ] [ Report a vulnerability ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • 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 (>=0.4.2.1), ghc-prim (>=0.2.0.0), lens (>=4.4.0.2), mtl (>=2.1.2), QuickCheck (>=2.7 && <2.8), random (>=1.0.1.1), safe (>=0.3.3), split (>=0.2.2), template-haskell (>=2.9.0.0 && <2.10.0.0), transformers (>=0.3.0.0) [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
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5123 total (16 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]
Putlenses

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