1 |
commit: 9438a19776ea136ba0f91e09b909933ebeb0ba42 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 16 08:37:49 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 16 10:21:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9438a197 |
7 |
|
8 |
dev-haskell/lens-simple: new package, a depend of dev-haskell/persistent-2.6 |
9 |
|
10 |
simplified import of elementary lens-family combinators |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
dev-haskell/lens-simple/Manifest | 1 + |
15 |
dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild | 30 +++++++++ |
16 |
dev-haskell/lens-simple/metadata.xml | 73 ++++++++++++++++++++++ |
17 |
3 files changed, 104 insertions(+) |
18 |
|
19 |
diff --git a/dev-haskell/lens-simple/Manifest b/dev-haskell/lens-simple/Manifest |
20 |
new file mode 100644 |
21 |
index 0000000000..134046fb83 |
22 |
--- /dev/null |
23 |
+++ b/dev-haskell/lens-simple/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST lens-simple-0.1.0.9.tar.gz 4541 SHA256 613d99b8074197f8a026a641a9940dd188e0d81e808169f420981a9ca15b832a SHA512 3bf1079f4525b534bca70f83073ebb8abbc84cd9320ef97a1fb137914fcb614f8d7c8ea7065a4484539dc6240ab1aa393ee22ed3b9e20bc421d25ce7adadbd0c WHIRLPOOL ceb39146bd4b6ce79c86c2f4b919c8f5245fb276fb1e0131c6b19ec5e1777334d7b44527fc3e26524eaf76d7d9b91f507c3050aec31253e5db2eef6109c00314 |
26 |
|
27 |
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 |
28 |
new file mode 100644 |
29 |
index 0000000000..29b349f37d |
30 |
--- /dev/null |
31 |
+++ b/dev-haskell/lens-simple/lens-simple-0.1.0.9.ebuild |
32 |
@@ -0,0 +1,30 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=6 |
38 |
+ |
39 |
+# ebuild generated by hackport 0.5.9999 |
40 |
+ |
41 |
+CABAL_FEATURES="lib profile haddock hoogle hscolour" |
42 |
+inherit haskell-cabal |
43 |
+ |
44 |
+DESCRIPTION="simplified import of elementary lens-family combinators" |
45 |
+HOMEPAGE="https://github.com/michaelt/lens-simple" |
46 |
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" |
47 |
+ |
48 |
+LICENSE="BSD" |
49 |
+SLOT="0/${PV}" |
50 |
+KEYWORDS="~amd64 ~x86" |
51 |
+IUSE="" |
52 |
+ |
53 |
+RDEPEND=">=dev-haskell/lens-family-1.2:=[profile?] <dev-haskell/lens-family-1.3:=[profile?] |
54 |
+ >=dev-haskell/lens-family-core-1.2:=[profile?] <dev-haskell/lens-family-core-1.3:=[profile?] |
55 |
+ <dev-haskell/lens-family-th-0.6:=[profile?] |
56 |
+ >=dev-haskell/mtl-2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] |
57 |
+ >=dev-haskell/transformers-0.2.0:=[profile?] <dev-haskell/transformers-6:=[profile?] |
58 |
+ >=dev-lang/ghc-7.4.1:= |
59 |
+" |
60 |
+DEPEND="${RDEPEND} |
61 |
+ >=dev-haskell/cabal-1.10 |
62 |
+" |
63 |
|
64 |
diff --git a/dev-haskell/lens-simple/metadata.xml b/dev-haskell/lens-simple/metadata.xml |
65 |
new file mode 100644 |
66 |
index 0000000000..17f85a4e3a |
67 |
--- /dev/null |
68 |
+++ b/dev-haskell/lens-simple/metadata.xml |
69 |
@@ -0,0 +1,73 @@ |
70 |
+<?xml version="1.0" encoding="UTF-8"?> |
71 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
72 |
+<pkgmetadata> |
73 |
+ <maintainer type="project"> |
74 |
+ <email>haskell@g.o</email> |
75 |
+ <name>Gentoo Haskell</name> |
76 |
+ </maintainer> |
77 |
+ <longdescription> |
78 |
+ This module, <http://hackage.haskell.org/package/lens-simple/docs/Lens-Simple.html Lens.Simple>, |
79 |
+ just re-exports the main modules from Russell O\'Connor's |
80 |
+ <http://hackage.haskell.org/package/lens-family lens-family> package, the |
81 |
+ original van Laarhoven-O'Connor lens library. |
82 |
+ @lens-family@ is particularly remarkable for its minute number of dependencies: |
83 |
+ (apart from <http://hackage.haskell.org/package/mtl mtl> |
84 |
+ they are all ghc \'boot\' libraries); but more importantly for its |
85 |
+ extreme conceptual simplicity and theoretical soundness. Much of |
86 |
+ the material it contains is well-explained, from a tutorial point of view, by |
87 |
+ <http://hackage.haskell.org/package/lens-tutorial lens-tutorial> It is independent, |
88 |
+ self-standing and readily intelligible apart from any darker |
89 |
+ more general system of combinators that might attempt to extend it. Much |
90 |
+ of it ought to be in the Prelude. |
91 |
+ |
92 |
+ Convenient import of the elementary combinators from @lens-family@, |
93 |
+ however, a little complicated. The idea of this trivial module, then, is just to make a sort of |
94 |
+ low-powered, minimal-dependency, @lens-family@ equivalent of |
95 |
+ the 800 lb gorilla of lens library imports: |
96 |
+ |
97 |
+ > import Control.Lens |
98 |
+ |
99 |
+ namely, the light-weight and elegant: |
100 |
+ |
101 |
+ > import Lens.Simple |
102 |
+ |
103 |
+ Check it out, it's even one character shorter! |
104 |
+ |
105 |
+ The material in <http://hackage.haskell.org/package/lens-tutorial lens-tutorial> |
106 |
+ will work fine if you make this substitution in the underlying |
107 |
+ <http://hackage.haskell.org/package/lens-tutorial-1.0.0/docs/src/Control-Lens-Tutorial.html source> |
108 |
+ and follow along as prompted. |
109 |
+ |
110 |
+ As another illustration of the simplicity of the |
111 |
+ fundamental van Laarhoven-O'Connor lens combinators - and their homogeneity with |
112 |
+ @Control.Lens@ - note that the gloss |
113 |
+ <https://github.com/michaelt/lens-family-simple/blob/master/examples/Pong.hs pong example> |
114 |
+ from the @lens@ library examples directory - which continues to be |
115 |
+ among the best introductory lens tutorials precisely by saying nothing - |
116 |
+ requires only this abbreviating change of imports. |
117 |
+ |
118 |
+ If you make that program more complicated, |
119 |
+ you might of course end up needing |
120 |
+ the more sophisticated material in @Control.Lens@ and |
121 |
+ its immense mass of dependencies. On the other hand, |
122 |
+ you might just need some of the additional material |
123 |
+ present in the similarly demystifying |
124 |
+ <http://hackage.haskell.org/package/microlens microlens> |
125 |
+ or <http://hackage.haskell.org/package/microlens-th microlens-th> and |
126 |
+ the associated modules. |
127 |
+ |
128 |
+ This module was originally intended to simplify the use of packages that |
129 |
+ follow the original promise of the van Laarhoven-O'Connor lenses. |
130 |
+ /Correct practice is to export lenses without depending on a lens-library, where possible./ |
131 |
+ In basic cases these just use familiar @Prelude@ types, after all. |
132 |
+ Examples of best practices in this respect are e.g. <http://hackage.haskell.org/package/lens-family-th lens-family-th> which |
133 |
+ doesn't depend on @lens-family@ despite its name and pipes-related packages like |
134 |
+ <http://hackage.haskell.org/package/pipes-bytestring pipes-bytestring> |
135 |
+ and <http://hackage.haskell.org/package/pipes-group pipes-group>. |
136 |
+ |
137 |
+ @Lens.Simple@ also re-exports @makeLenses@ and |
138 |
+ other convenient TH incantations from Dan Burton's associated |
139 |
+ <http://hackage.haskell.org/package/lens-family-th lens-family-th>. |
140 |
+ |
141 |
+ </longdescription> |
142 |
+</pkgmetadata> |