dev-haskell / lens

Lenses, Folds and Traversals

Official package sites : https://github.com/ekmett/lens/ ·

This package comes \"Batteries Included\" with many useful lenses for the types commonly used from the Haskell Platform, and with tools for automatically generating lenses and isomorphisms for user-supplied data types. The combinators in @Control.Lens@ provide a highly generic toolbox for composing families of getters, folds, isomorphisms, traversals, setters and lenses and their indexed variants. An overview, with a large number of examples can be found in the @README@: <https://github.com/ekmett/lens#lens-lenses-folds-and-traversals> A video on how to use lenses and how they are constructed is available from youtube: <http://youtu.be/cefnmjtAolY?hd=1> Slides can be obtained here: <http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf> More information on the care and feeding of lenses, including a brief tutorial and motivation for their types can be found on the lens wiki: <https://github.com/ekmett/lens/wiki> A small game of @pong@ and other more complex examples that manage their state using lenses can be found in the example folder: <https://github.com/ekmett/lens/blob/master/examples/> /Lenses, Folds and Traversals/ The core of the hierarchy of lens-like constructions looks like: <<http://i.imgur.com/4fHw3Fd.png>> Local copy (<Hierarchy.png>) You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can use any element of the hierarchy as any type it linked to above it. The result is their lowest upper bound in the hierarchy (or an error if that bound doesn't exist). For instance: * You can use any 'Traversal' as a 'Fold' or as a 'Setter'. * The composition of a 'Traversal' and a 'Getter' yields a 'Fold'. /Minimizing Dependencies/ If you want to provide lenses and traversals for your own types in your own libraries, then you can do so without incurring a dependency on this (or any other) lens package at all. /e.g./ for a data type: > data Foo a = Foo Int Int a You can define lenses such as > -- bar :: Lens' (Foo a) Int > bar :: Functor f => (Int -> f Int) -> Foo a -> f (Foo a) > bar f (Foo a b c) = fmap (\a' -> Foo a' b c) (f a) > -- baz :: Lens (Foo a) (Foo b) a b > quux :: Functor f => (a -> f b) -> Foo a -> f (Foo b) > quux f (Foo a b c) = fmap (Foo a b) (f c) without the need to use any type that isn't already defined in the @Prelude@. And you can define a traversal of multiple fields with 'Control.Applicative.Applicative': > -- traverseBarAndBaz :: Traversal' (Foo a) Int > traverseBarAndBaz :: Applicative f => (Int -> f Int) -> Foo a -> f (Foo a) > traverseBarAndBaz f (Foo a b c) = Foo <$> f a <*> f b <*> pure c What is provided in this library is a number of stock lenses and traversals for common haskell types, a wide array of combinators for working them, and more exotic functionality, (/e.g./ getters, setters, indexed folds, isomorphisms).

v4.14 :: 0/4.14 :: gentoo

Modified
License
BSD
Keywords
amd64 x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining j old-inline-pragmas profile safe test test-doctests test-templates trustworthy

v4.11 :: 0/4.11 :: gentoo

Modified
License
BSD
Keywords
amd64 x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining j old-inline-pragmas profile safe test test-doctests test-hlint test-hunit test-properties trustworthy

v4.9.1 :: 0/4.9.1 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining j old-inline-pragmas profile safe test test-doctests test-hlint test-hunit test-properties trustworthy

v4.6.0.1 :: 0/4.6.0.1 :: gentoo

Modified
License
BSD
Keywords
amd64 x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining j old-inline-pragmas profile safe test test-doctests test-hlint test-hunit test-properties trustworthy

v4.2 :: 0/4.2 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining j lib-werror old-inline-pragmas profile safe test test-doctests test-hlint test-hunit test-properties trustworthy

v3.10.0.1 :: 0/3.10.0.1 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining lib-werror old-inline-pragmas profile safe test test-doctests test-hunit test-properties trustworthy

v3.9.2 :: 0/3.9.2 :: gentoo

Modified
License
BSD
Keywords
~amd64 ~x86
USE flags
benchmark-uniplate doc dump-splices hscolour inlining lib-werror old-inline-pragmas profile safe test test-doctests test-hunit test-properties trustworthy

General

benchmark-uniplate
Enable benchmarking against Neil Mitchell's uniplate library for comparative performance analysis. Defaults to being turned off to avoid the extra dependency.
doc
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
dump-splices
Build and run the doctests test-suite.
hscolour
Include coloured haskell sources to generated documentation (dev-haskell/hscolour)
inlining
Generate inline pragmas when using template-haskell. This defaults to enabled, but you can to shut it off to benchmark the relative performance impact, or as last ditch effort to address compile errors resulting from the myriad versions of template-haskell that all purport to be 2.8.
j
Attempt a parallel build with GHC 7.8.
lib-werror
Turn on ghc-options: -Werror
old-inline-pragmas
Some 7.6.1-rc1 users report their TH still uses old style inline pragmas. This lets them turn on inlining.
profile
Add support for software performance analysis (will likely vary from ebuild to ebuild)
safe
Disallow unsafeCoerce
test
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
test-doctests
Build and run the doctests test-suite.
test-hlint
You can disable the hlint test suite with -f-test-hlint
test-hunit
You can disable the hunit test suite with -f-test-hunit
test-properties
Build the properties test if we're building tests
test-templates
Build the test templates if we're building tests
trustworthy
Assert that we are trustworthy when we can

dev-haskell / aeson : Fast JSON parsing and encoding

dev-haskell / attoparsec : Fast combinator parsing for bytestrings and text

dev-haskell / base-orphans : Backwards-compatible orphan instances for base

dev-haskell / bifunctors : Haskell 98 bifunctors, bifoldables and bitraversables

dev-haskell / cabal : A framework for packaging Haskell software

dev-haskell / comonad : Haskell 98 compatible comonads

dev-haskell / comonad-transformers : This package has been merged into comonad 4.0

dev-haskell / comonads-fd : This package has been merged into comonad 4.0

dev-haskell / contravariant : Contravariant functors

dev-haskell / distributive : Distributive functors -- Dual to Traversable

dev-haskell / doctest : Test interactive Haskell examples

dev-haskell / exceptions : Extensible optionally-pure exceptions

dev-haskell / free : Monads for free

dev-haskell / generic-deriving : Generic programming library for generalised deriving

dev-haskell / haddock : A documentation-generation tool for Haskell libraries

dev-haskell / hashable : A class for types that can be converted to a hash value

dev-haskell / hlint : Source code suggestions

dev-haskell / hscolour : Colourise Haskell code

dev-haskell / hunit : A unit testing framework for Haskell

dev-haskell / kan-extensions : Kan extensions, lifts, forms of the Yoneda lemma, and (co)density (co)monads

dev-haskell / monadcatchio-transformers : Monad-transformer compatible version of the Control.Exception module

dev-haskell / mtl : Monad classes, using functional dependencies

dev-haskell / nats : Natural numbers

dev-haskell / parallel : Parallel programming library

dev-haskell / primitive : Primitive memory-related operations

dev-haskell / profunctor-extras : This package has been absorbed into profunctors 4.0

dev-haskell / profunctors : Haskell 98 Profunctors

dev-haskell / quickcheck : Automatic testing of Haskell programs

dev-haskell / reflection : Reifies arbitrary terms into types that can be reflected back into terms

dev-haskell / scientific : Numbers represented using scientific notation

dev-haskell / semigroupoids : Semigroupoids: Category sans id

dev-haskell / semigroups : Anything that associates

dev-haskell / simple-reflect : Simple reflection of expressions containing variables

dev-haskell / split : Combinator library for splitting lists

dev-haskell / tagged : Haskell 98 phantom types to avoid unsafely passing dummy arguments

dev-haskell / test-framework : Framework for running and organising tests, with HUnit and QuickCheck support

dev-haskell / test-framework-hunit : HUnit support for the test-framework package

dev-haskell / test-framework-quickcheck2 : QuickCheck2 support for the test-framework package

dev-haskell / test-framework-th : Automagically generate the HUnit and Quickcheck code using Template Haskell

dev-haskell / text : An efficient packed Unicode text type

dev-haskell / transformers : Concrete functor and monad transformers

dev-haskell / transformers-compat : A small compatibility shim for dev-haskell/transformers

dev-haskell / unordered-containers : Efficient hashing-based container types

dev-haskell / vector : Efficient Arrays

dev-haskell / void : A Haskell 98 logically uninhabited data type

dev-haskell / zlib : Compression and decompression in the gzip and zlib formats

dev-lang / ghc : The Glasgow Haskell Compiler

dev-haskell / aeson : Fast JSON parsing and encoding

dev-haskell / attoparsec : Fast combinator parsing for bytestrings and text

dev-haskell / base-orphans : Backwards-compatible orphan instances for base

dev-haskell / bifunctors : Haskell 98 bifunctors, bifoldables and bitraversables

dev-haskell / comonad : Haskell 98 compatible comonads

dev-haskell / comonad-transformers : This package has been merged into comonad 4.0

dev-haskell / comonads-fd : This package has been merged into comonad 4.0

dev-haskell / contravariant : Contravariant functors

dev-haskell / distributive : Distributive functors -- Dual to Traversable

dev-haskell / exceptions : Extensible optionally-pure exceptions

dev-haskell / free : Monads for free

dev-haskell / generic-deriving : Generic programming library for generalised deriving

dev-haskell / hashable : A class for types that can be converted to a hash value

dev-haskell / kan-extensions : Kan extensions, lifts, forms of the Yoneda lemma, and (co)density (co)monads

dev-haskell / monadcatchio-transformers : Monad-transformer compatible version of the Control.Exception module

dev-haskell / mtl : Monad classes, using functional dependencies

dev-haskell / parallel : Parallel programming library

dev-haskell / primitive : Primitive memory-related operations

dev-haskell / profunctor-extras : This package has been absorbed into profunctors 4.0

dev-haskell / profunctors : Haskell 98 Profunctors

dev-haskell / reflection : Reifies arbitrary terms into types that can be reflected back into terms

dev-haskell / scientific : Numbers represented using scientific notation

dev-haskell / semigroupoids : Semigroupoids: Category sans id

dev-haskell / semigroups : Anything that associates

dev-haskell / split : Combinator library for splitting lists

dev-haskell / tagged : Haskell 98 phantom types to avoid unsafely passing dummy arguments

dev-haskell / text : An efficient packed Unicode text type

dev-haskell / transformers : Concrete functor and monad transformers

dev-haskell / transformers-compat : A small compatibility shim for dev-haskell/transformers

dev-haskell / unordered-containers : Efficient hashing-based container types

dev-haskell / vector : Efficient Arrays

dev-haskell / void : A Haskell 98 logically uninhabited data type

dev-haskell / zlib : Compression and decompression in the gzip and zlib formats

dev-lang / ghc : The Glasgow Haskell Compiler

app-emulation / ganeti : Ganeti is a virtual server management software tool

app-forensics / quickfuzz : An experimental grammar fuzzer in Haskell using QuickCheck

dev-haskell / dav : RFC 4918 WebDAV support

dev-haskell / linear : Linear Algebra

dev-haskell / thyme : A faster time library

657408
dev-haskell/lens-4.14 : src/.../FieldTH.hs:619:28: error:
Repository mirror & CI · gentoo
Merge updates from master
Michał Górny · gentoo
*/*: [QA] Fix trivial cases of MissingTestRestrict
The result was achieved via the following pipeline: pkgcheck scan -c RestrictTestCheck -R FormatReporter \ --format '{category}/{package}/{package}-{version}.ebuild' | xargs -n32 grep -L RESTRICT | xargs -n32 sed -i -e '/^IUSE=.*test/aRESTRICT="!test? ( test )"' The resulting metadata was compared before and after the change. Few Go ebuilds had to be fixed manually due to implicit RESTRICT=strip added by the eclass. Two ebuilds have to be fixed because of multiline IUSE. Suggested-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/13942 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Repository mirror & CI · gentoo
Merge updates from master
Michał Górny · gentoo
*/*: Inline mirror://hackage and update URIs
This change inlines mirror://hackage in all ebuilds, and updates URIs to the modern form (old URIs redirect to that). The change has been made using the following command: find -name '*.ebuild' -exec sed -r -i \ -e 's@mirror://hackage/@https://hackage.haskell.org/@g' \ -e 's@https://hackage.haskell.org/packages/archive/([^/]*)/([^/]*)/@https://hackage.haskell.org/package/\1-\2/@g' \ -e '/hackage\.haskell\.org/s@\$\{PN}-\$\{PV}@${P}@g' \ -e '/hackage\.haskell\.org/s@\$\{MY_PN}-\$\{PV}@${MY_P}@g' \ -e '/hackage\.haskell\.org/s@\$\{PN}-\$\{MY_PV}@${MY_P}@g' \ {} + Signed-off-by: Michał Górny <mgorny@gentoo.org>
Sergei Trofimovich · gentoo
dev-haskell/lens: stable 4.14 for x86/amd64, bug #631138
Package-Manager: Portage-2.3.10, Repoman-2.3.3 RepoMan-Options: --include-arches="amd64 x86"
Robin H. Johnson · gentoo
Drop $Id$ per council decision in bug #611234.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Sergei Trofimovich · gentoo
dev-haskell/lens: bump up to 4.14
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Sergei Trofimovich · gentoo
dev-haskell/lens: amd64/x86 stable, bug #563090
Package-Manager: portage-2.2.28
Sergei Trofimovich · gentoo
dev-haskell/lens: stable for x86, amd64
Package-Manager: portage-2.2.27
Justin Lecher · gentoo
Use https by default
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Robin H. Johnson · gentoo
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed