diff options
author | Alexander Vershilov <qnikst@gentoo.org> | 2013-08-26 10:52:15 +0000 |
---|---|---|
committer | Alexander Vershilov <qnikst@gentoo.org> | 2013-08-26 10:52:15 +0000 |
commit | 44c55205ea89fd29d593b039360c299bbb8b1ca8 (patch) | |
tree | 9807ddca3070df10bc3d853b0ad946d70c3b854f /dev-haskell/lens | |
parent | dev-haskell/simple-reflect: initial layout (diff) | |
download | gentoo-2-44c55205ea89fd29d593b039360c299bbb8b1ca8.tar.gz gentoo-2-44c55205ea89fd29d593b039360c299bbb8b1ca8.tar.bz2 gentoo-2-44c55205ea89fd29d593b039360c299bbb8b1ca8.zip |
dev-haskell/lens: initial layout
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0xEAD50D64D8D3571A!)
Diffstat (limited to 'dev-haskell/lens')
-rw-r--r-- | dev-haskell/lens/ChangeLog | 9 | ||||
-rw-r--r-- | dev-haskell/lens/lens-3.9.0.2-r1.ebuild | 146 | ||||
-rw-r--r-- | dev-haskell/lens/metadata.xml | 98 |
3 files changed, 253 insertions, 0 deletions
diff --git a/dev-haskell/lens/ChangeLog b/dev-haskell/lens/ChangeLog new file mode 100644 index 000000000000..20117c3c3ffa --- /dev/null +++ b/dev-haskell/lens/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-haskell/lens +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/lens/ChangeLog,v 1.1 2013/08/26 10:52:15 qnikst Exp $ + +*lens-3.9.0.2-r1 (26 Aug 2013) + + 26 Aug 2013; Alexander Vershilov <qnikst@gentoo.org> +lens-3.9.0.2-r1.ebuild, + +metadata.xml: + dev-haskell/lens: initial layout diff --git a/dev-haskell/lens/lens-3.9.0.2-r1.ebuild b/dev-haskell/lens/lens-3.9.0.2-r1.ebuild new file mode 100644 index 000000000000..e0981c217a50 --- /dev/null +++ b/dev-haskell/lens/lens-3.9.0.2-r1.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/lens/lens-3.9.0.2-r1.ebuild,v 1.1 2013/08/26 10:52:15 qnikst Exp $ + +EAPI=5 + +# ebuild generated by hackport 0.3.2.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="Lenses, Folds and Traversals" +HOMEPAGE="http://github.com/ekmett/lens/" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="benchmark-uniplate dump-splices +inlining lib-werror old-inline-pragmas safe +test-doctests +test-hunit +test-properties +trustworthy" + +RDEPEND="=dev-haskell/bifunctors-3*:=[profile?] + =dev-haskell/comonad-3*:=[profile?] + =dev-haskell/comonad-transformers-3*:=[profile?] + =dev-haskell/comonads-fd-3*:=[profile?] + >=dev-haskell/contravariant-0.3:=[profile?] + <dev-haskell/contravariant-1:=[profile?] + >=dev-haskell/distributive-0.3:=[profile?] + <dev-haskell/distributive-1:=[profile?] + >=dev-haskell/generic-deriving-1.4:=[profile?] + <dev-haskell/generic-deriving-1.7:=[profile?] + >=dev-haskell/hashable-1.1.2.3:=[profile?] + <dev-haskell/hashable-1.3:=[profile?] + =dev-haskell/monadcatchio-transformers-0.3*:=[profile?] + >=dev-haskell/mtl-2.0.1:=[profile?] + <dev-haskell/mtl-2.2:=[profile?] + >=dev-haskell/parallel-3.1.0.1:=[profile?] + <dev-haskell/parallel-3.3:=[profile?] + >=dev-haskell/profunctor-extras-3.3:=[profile?] + <dev-haskell/profunctor-extras-4:=[profile?] + >=dev-haskell/profunctors-3.2:=[profile?] + <dev-haskell/profunctors-4:=[profile?] + >=dev-haskell/reflection-1.1.6:=[profile?] + <dev-haskell/reflection-2:=[profile?] + >=dev-haskell/semigroupoids-3.0.2:=[profile?] + <dev-haskell/semigroupoids-4:=[profile?] + >=dev-haskell/semigroups-0.8.4:=[profile?] + <dev-haskell/semigroups-1:=[profile?] + =dev-haskell/split-0.2*:=[profile?] + >=dev-haskell/tagged-0.4.4:=[profile?] + <dev-haskell/tagged-1:=[profile?] + =dev-haskell/text-0.11*:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + <dev-haskell/transformers-0.4:=[profile?] + >=dev-haskell/transformers-compat-0.1:=[profile?] + <dev-haskell/transformers-compat-1:=[profile?] + =dev-haskell/unordered-containers-0.2*:=[profile?] + >=dev-haskell/vector-0.9:=[profile?] + <dev-haskell/vector-0.11:=[profile?] + >=dev-haskell/void-0.5:=[profile?] + <dev-haskell/void-1:=[profile?] + >=dev-lang/ghc-7.0.1:=" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test-doctests? ( test-hunit? ( test-properties? ( test? ( dev-haskell/deepseq + >=dev-haskell/doctest-0.9.1 + >=dev-haskell/hunit-1.2 + dev-haskell/nats + >=dev-haskell/quickcheck-2.4 + >=dev-haskell/simple-reflect-0.3.1 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-hunit-0.2 + >=dev-haskell/test-framework-quickcheck2-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + !test-properties? ( test? ( dev-haskell/deepseq + >=dev-haskell/doctest-0.9.1 + >=dev-haskell/hunit-1.2 + dev-haskell/nats + >=dev-haskell/simple-reflect-0.3.1 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-hunit-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + ) + !test-hunit? ( test-properties? ( test? ( dev-haskell/deepseq + >=dev-haskell/doctest-0.9.1 + dev-haskell/nats + >=dev-haskell/quickcheck-2.4 + >=dev-haskell/simple-reflect-0.3.1 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-quickcheck2-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + !test-properties? ( test? ( dev-haskell/deepseq + >=dev-haskell/doctest-0.9.1 + dev-haskell/nats + >=dev-haskell/simple-reflect-0.3.1 + ) + ) + ) + ) + !test-doctests? ( test-hunit? ( test-properties? ( test? ( >=dev-haskell/hunit-1.2 + >=dev-haskell/quickcheck-2.4 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-hunit-0.2 + >=dev-haskell/test-framework-quickcheck2-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + !test-properties? ( test? ( >=dev-haskell/hunit-1.2 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-hunit-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + ) + !test-hunit? ( test-properties? ( test? ( >=dev-haskell/quickcheck-2.4 + >=dev-haskell/test-framework-0.6 + >=dev-haskell/test-framework-quickcheck2-0.2 + >=dev-haskell/test-framework-th-0.2 + ) + ) + ) + )" + +src_prepare() { + cabal_chdeps \ + 'generic-deriving >= 1.4 && < 1.6' 'generic-deriving >= 1.4 && < 1.7' +} + +src_configure() { + haskell-cabal_src_configure \ + $(cabal_flag benchmark-uniplate benchmark-uniplate) \ + $(cabal_flag dump-splices dump-splices) \ + $(cabal_flag inlining inlining) \ + $(cabal_flag lib-werror lib-werror) \ + $(cabal_flag old-inline-pragmas old-inline-pragmas) \ + $(cabal_flag safe safe) \ + $(cabal_flag test-doctests test-doctests) \ + $(cabal_flag test-hunit test-hunit) \ + $(cabal_flag test-properties test-properties) \ + $(cabal_flag trustworthy trustworthy) +} diff --git a/dev-haskell/lens/metadata.xml b/dev-haskell/lens/metadata.xml new file mode 100644 index 000000000000..30bd28670f38 --- /dev/null +++ b/dev-haskell/lens/metadata.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>haskell</herd> + <maintainer> + <email>haskell@gentoo.org</email> + </maintainer> + <longdescription> + 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). + </longdescription> +<use> + <flag name='benchmark-uniplate'>Enable benchmarking against Neil Mitchell's + uniplate library for comparative performance analysis. Defaults to being + turned off to avoid the extra dependency.</flag> + <flag name='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.</flag> + <flag name='old-inline-pragmas'>Some 7.6.1-rc1 users report their TH still + uses old style inline pragmas. This lets them turn on inlining.</flag> + <flag name='safe'>Disallow unsafeCoerce</flag> + <flag name='dump-splices'>Build and run the doctests test-suite.</flag> + <flag name='test-doctests'>Build and run the doctests test-suite.</flag> + <flag name='test-hunit'>You can disable the hunit test suite with -f-test-hunit</flag> + <flag name='test-properties'>Build the properties test if we're building tests</flag> + <flag name='trustworthy'>Assert that we are trustworthy when we can</flag> + <flag name='lib-werror'>Turn on ghc-options: -Werror</flag> +</use> +</pkgmetadata> |