commit:     9438a19776ea136ba0f91e09b909933ebeb0ba42
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 08:37:49 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 10:21:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9438a197

dev-haskell/lens-simple: new package, a depend of dev-haskell/persistent-2.6

simplified import of elementary lens-family combinators

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-haskell/lens-simple/Manifest                   |  1 +
 dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild | 30 +++++++++
 dev-haskell/lens-simple/metadata.xml               | 73 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)

diff --git a/dev-haskell/lens-simple/Manifest b/dev-haskell/lens-simple/Manifest
new file mode 100644
index 0000000000..134046fb83
--- /dev/null
+++ b/dev-haskell/lens-simple/Manifest
@@ -0,0 +1 @@
+DIST lens-simple-0.1.0.9.tar.gz 4541 SHA256 
613d99b8074197f8a026a641a9940dd188e0d81e808169f420981a9ca15b832a SHA512 
3bf1079f4525b534bca70f83073ebb8abbc84cd9320ef97a1fb137914fcb614f8d7c8ea7065a4484539dc6240ab1aa393ee22ed3b9e20bc421d25ce7adadbd0c
 WHIRLPOOL 
ceb39146bd4b6ce79c86c2f4b919c8f5245fb276fb1e0131c6b19ec5e1777334d7b44527fc3e26524eaf76d7d9b91f507c3050aec31253e5db2eef6109c00314

diff --git a/dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild 
b/dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild
new file mode 100644
index 0000000000..29b349f37d
--- /dev/null
+++ b/dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# ebuild generated by hackport 0.5.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="simplified import of elementary lens-family combinators"
+HOMEPAGE="https://github.com/michaelt/lens-simple";
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/lens-family-1.2:=[profile?] 
<dev-haskell/lens-family-1.3:=[profile?]
+       >=dev-haskell/lens-family-core-1.2:=[profile?] 
<dev-haskell/lens-family-core-1.3:=[profile?]
+       <dev-haskell/lens-family-th-0.6:=[profile?]
+       >=dev-haskell/mtl-2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
+       >=dev-haskell/transformers-0.2.0:=[profile?] 
<dev-haskell/transformers-6:=[profile?]
+       >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+       >=dev-haskell/cabal-1.10
+"

diff --git a/dev-haskell/lens-simple/metadata.xml 
b/dev-haskell/lens-simple/metadata.xml
new file mode 100644
index 0000000000..17f85a4e3a
--- /dev/null
+++ b/dev-haskell/lens-simple/metadata.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>hask...@gentoo.org</email>
+               <name>Gentoo Haskell</name>
+       </maintainer>
+       <longdescription>
+               This module, 
&lt;http://hackage.haskell.org/package/lens-simple/docs/Lens-Simple.html 
Lens.Simple&gt;,
+               just re-exports the main modules from Russell 
O\&#39;Connor&#39;s
+               &lt;http://hackage.haskell.org/package/lens-family 
lens-family&gt; package, the
+               original van Laarhoven-O&#39;Connor lens library.
+               @lens-family@ is particularly remarkable for its minute number 
of dependencies:
+               (apart from &lt;http://hackage.haskell.org/package/mtl mtl&gt;
+               they are all ghc \&#39;boot\&#39; libraries); but more 
importantly for its
+               extreme conceptual simplicity and theoretical soundness. Much of
+               the material it contains is well-explained, from a tutorial 
point of view, by
+               &lt;http://hackage.haskell.org/package/lens-tutorial 
lens-tutorial&gt; It is independent,
+               self-standing and readily intelligible apart from any darker
+               more general system of combinators that might attempt to extend 
it. Much
+               of it ought to be in the Prelude.
+               
+               Convenient import of the elementary combinators from 
@lens-family@,
+               however, a little complicated. The idea of this trivial module, 
then, is just to make a sort of
+               low-powered, minimal-dependency, @lens-family@ equivalent of
+               the 800 lb gorilla of lens library imports:
+               
+               &gt; import Control.Lens
+               
+               namely, the light-weight and elegant:
+               
+               &gt; import Lens.Simple
+               
+               Check it out, it&#39;s even one character shorter!
+               
+               The material in 
&lt;http://hackage.haskell.org/package/lens-tutorial lens-tutorial&gt;
+               will work fine if you make this substitution in the underlying
+               
&lt;http://hackage.haskell.org/package/lens-tutorial-1.0.0/docs/src/Control-Lens-Tutorial.html
 source&gt;
+               and follow along as prompted.
+               
+               As another illustration of the simplicity of the
+               fundamental van Laarhoven-O&#39;Connor lens combinators - and 
their homogeneity with
+               @Control.Lens@ - note that the gloss
+               
&lt;https://github.com/michaelt/lens-family-simple/blob/master/examples/Pong.hs 
pong example&gt;
+               from the @lens@ library examples directory - which continues to 
be
+               among the best introductory lens tutorials precisely by saying 
nothing -
+               requires only this abbreviating change of imports.
+               
+               If you make that program more complicated,
+               you might of course end up needing
+               the more sophisticated material in @Control.Lens@ and
+               its immense mass of dependencies. On the other hand,
+               you might just need some of the additional material
+               present in the similarly demystifying
+               &lt;http://hackage.haskell.org/package/microlens microlens&gt;
+               or &lt;http://hackage.haskell.org/package/microlens-th 
microlens-th&gt; and
+               the associated modules.
+               
+               This module was originally intended to simplify the use of 
packages that
+               follow the original promise of the van Laarhoven-O&#39;Connor 
lenses.
+               /Correct practice is to export lenses without depending on a 
lens-library, where possible./
+               In basic cases these just use familiar @Prelude@ types, after 
all.
+               Examples of best practices in this respect are e.g. 
&lt;http://hackage.haskell.org/package/lens-family-th lens-family-th&gt; which
+               doesn&#39;t depend on @lens-family@ despite its name and 
pipes-related packages like
+               &lt;http://hackage.haskell.org/package/pipes-bytestring 
pipes-bytestring&gt;
+               and &lt;http://hackage.haskell.org/package/pipes-group 
pipes-group&gt;.
+               
+               @Lens.Simple@ also re-exports @makeLenses@ and
+               other convenient TH incantations from Dan Burton&#39;s 
associated
+               &lt;http://hackage.haskell.org/package/lens-family-th 
lens-family-th&gt;.
+               
+       </longdescription>
+</pkgmetadata>

Reply via email to