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 draft report on putlenses is available at http://www.di.uminho.pt/~hpacheco/publications/putlenses.pdf.

[Skip to Readme]
Versions [faq] 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 (>=, template-haskell (== [details]
License BSD-3-Clause
Author Hugo Pacheco <hpacheco@nii.ac.jp>
Maintainer Hugo Pacheco <hpacheco@nii.ac.jp>
Category Generics, Lenses
Uploaded by HugoPacheco at Wed Apr 3 23:50:53 UTC 2013
Distributions NixOS:0.1.3
Downloads 4009 total (240 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-21 [all 7 reports]


  • GHC
    • GHC.InOut
  • Generics
    • Putlenses
      • Examples
        • Generics.Putlenses.Examples.Examples
        • Generics.Putlenses.Examples.People
      • Generics.Putlenses.Language
      • Generics.Putlenses.Putlens
      • Generics.Putlenses.QuickCheck
      • Generics.Putlenses.TH


Maintainer's Corner

For package maintainers and hackage trustees

Readme for putlenses-0.0.1

[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