pointless-lenses: Pointless Lenses library

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

Pointless Lenses is library of bidirectional lenses (http://www.cis.upenn.edu/~bcpierce/papers/newlenses-popl.pdf) defined in the point-free style of programming. Generic bidirectional lenses can be defined over inductive types by relying in a set of lifted lens combinators from the standard point-free combinators. Recursive lenses can be defined by combining the lenses for the recursion patterns of catamorphisms and anamorphism. More refined lens behavior can be achieved a more operation-based variant of delta-lenses (<>). The library also provides QuickCheck procedures to test the well-behavedness of user-defined lens transformations. More details can be found in the accompanying papers http://alfa.di.uminho.pt/~hpacheco/publications/mpc10.pdf and http://alfa.di.uminho.pt/~hpacheco/publications/hdlenses.pdf


[Skip to Readme]

Modules

[Last Documentation]

  • Data
    • Data.Diff
    • Data.Relation
    • Data.Shape
  • Generics
    • Pointless
      • Generics.Pointless.DLenses
        • Generics.Pointless.DLenses.Combinators
        • Examples
          • Generics.Pointless.DLenses.Examples.Examples
        • Generics.Pointless.DLenses.RecursionPatterns
        • Generics.Pointless.DLenses.ShapeCombinators
      • Generics.Pointless.Lenses
        • Generics.Pointless.Lenses.Combinators
        • Examples
          • Generics.Pointless.Lenses.Examples.Examples
          • Generics.Pointless.Lenses.Examples.Imdb
          • Generics.Pointless.Lenses.Examples.MapExamples
          • Generics.Pointless.Lenses.Examples.Recs
        • Generics.Pointless.Lenses.PartialCombinators
        • Generics.Pointless.Lenses.RecursionPatterns

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.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9
Dependencies base (>=3 && <5), containers (>=0.4.0.0), derive (>=2.5.4), pointless-haskell (>=0.0.7), process, QuickCheck (>=2.4.0.1) [details]
License BSD-3-Clause
Author Alcino Cunha <alcino@di.uminho.pt>, Hugo Pacheco <hpacheco@di.uminho.pt>
Maintainer Hugo Pacheco <hpacheco@di.uminho.pt>
Category Generics
Home page http://haskell.di.uminho.pt/wiki/Pointless+Lenses
Uploaded by HugoPacheco at 2012-01-26T13:44:00Z
Distributions
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 6517 total (26 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-25 [all 8 reports]

Readme for pointless-lenses-0.0.9

[back to package description]
Pointless Lenses

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

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

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]