Skip to content
This repository
Newer
Older
100644 412 lines (340 sloc) 20.084 kb
1ca949a2 »
2012-08-09 oxford ,
1 Lens: Lenses, Folds, and Traversals
5e9c11bc »
2012-08-09 better title
2 ==================================
c5c8e5ff »
2012-07-25 repository initialized
3
4 [![Build Status](https://secure.travis-ci.org/ekmett/lens.png?branch=master)](http://travis-ci.org/ekmett/lens)
5
2f342e40 »
2012-08-09 ,
6 This package provides families of [lenses](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Type.hs), [isomorphisms](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Iso.hs), [folds](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Fold.hs), [traversals](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Traversal.hs), [getters](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Getter.hs) and [setters](https://github.com/ekmett/lens/blob/master/src/Control/Lens/Setter.hs).
9af3f66e »
2012-07-31 metadata
7
50fc25b0 »
2012-11-30 Added link to the FAQ to the README
8 The [FAQ](https://github.com/ekmett/lens/wiki/FAQ), which provides links to a large number of different resources for learning about lenses and an overview of the [derivation](https://github.com/ekmett/lens/wiki/Derivation) of these types can be found on the [Lens Wiki](https://github.com/ekmett/lens/wiki) along with a brief [overview](https://github.com/ekmett/lens/wiki/Overview) and some [examples](https://github.com/ekmett/lens/wiki/Examples).
b65890a3 »
2012-08-08 tutorial link
9
50fc25b0 »
2012-11-30 Added link to the FAQ to the README
10 Documentation is available through [github](http://ekmett.github.com/lens/frames.html) (for HEAD) or [hackage](http://hackage.haskell.org/package/lens) for the current and preceding releases.
0c4742e6 »
2012-08-09 added the big uml diagram to the readme
11
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
12 Field Guide
13 -----------
a23571cf »
2012-08-26 Refactored 'at' and 'contains' into 'Control.Lens.IndexedLens'
14
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
15 [![Lens Hierarchy](https://s3.amazonaws.com/creately-published/h5nyo9ne1)](https://creately.com/diagram/h5nyo9ne1/LBbRz63yg4yQsTXGLtub1bQU4%3D)
a23571cf »
2012-08-26 Refactored 'at' and 'contains' into 'Control.Lens.IndexedLens'
16
e409f0e8 »
2012-08-09 lots of examples
17 Examples
18 --------
9af3f66e »
2012-07-31 metadata
19
4899c604 »
2012-09-12 see wiki
20 (See [`wiki/Examples`](https://github.com/ekmett/lens/wiki/Examples))
21
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
22 First, import `Control.Lens`.
23
24 ```haskell
25 ghci> import Control.Lens
26 ```
27
28 Now, you can read from lenses
29
30 ```haskell
31 ghci> ("hello","world")^._2
32 "world"
33 ```
34
35 and you can write to lenses.
36
37 ```haskell
38 ghci> set _2 42 ("hello","world")
39 ("hello",42)
40 ```
41
42 Composing lenses for reading (or writing) goes in the order an imperative programmer would expect, and just uses `(.)` from the `Prelude`.
e409f0e8 »
2012-08-09 lots of examples
43
44 ```haskell
45 ghci> ("hello",("world","!!!"))^._2._1
46 "world"
47 ```
48
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
49 ```haskell
f9901b52 »
2012-09-26 fixed set example (copied from @emwap's edit to the wiki)
50 ghci> set (_2._1) 42 ("hello",("world","!!!"))
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
51 ("hello",(42,"!!!"))
52 ```
e409f0e8 »
2012-08-09 lots of examples
53
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
54 You can make a `Getter` out of a pure functions with `to`.
e409f0e8 »
2012-08-09 lots of examples
55
56 ```haskell
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
57 ghci> "hello"^.to length
e409f0e8 »
2012-08-09 lots of examples
58 5
59 ```
60
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
61 You can easily compose a `Getter` with a `Lens` just using `(.)`. No explicit coercion is necessary.
62
63 ```haskell
64 ghci> ("hello",("world","!!!"))^._2._2.to length
65 3
66 ```
67
68 As we saw above, you can write to lenses and these writes can change the type of the container. `(.~)` is an infix alias for `set`.
e409f0e8 »
2012-08-09 lots of examples
69
70 ```haskell
71 ghci> _1 .~ "hello" $ ((),"world")
72 ("hello","world)
73 ```
74
34036bce »
2012-09-26 prefix, not infix
75 Conversely `view`, can be used as a prefix alias for `(^.)`.
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
76
77 ```haskell
78 ghci> view _2 (10,20)
79 20
80 ```
81
82 There are a large number of other lens variants provided by the library, in particular a `Traversal` generalizes `traverse` from `Data.Traversable`.
83
819ec495 »
2012-09-11 :
84 We'll come back to those later, but continuing with just lenses:
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
85
42550937 »
2012-08-09 moar examples
86 You can let the library automatically derive lenses for fields of your data type
87
88 ```haskell
89 data Foo a = Foo { _bar :: Int, _baz :: Int, _quux :: a }
90 makeLenses ''Foo
91 ```
92
93 This will automatically generate the following lenses:
94
95 ```haskell
96 bar, baz :: Simple Lens (Foo a) Int
97 quux :: Lens (Foo a) (Foo b) a b
98 ```
99
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
100 A `Lens` takes 4 parameters because it can change the types of the whole when you change the type of the part.
101
102 Often you won't need this flexibility, a `Simple Lens` takes 2 parameters, and can be used directly as a `Lens`.
103
e409f0e8 »
2012-08-09 lots of examples
104 You can also write to setters that target multiple parts of a structure, or their composition with other
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
105 lenses or setters. The canonical example of a setter is 'mapped':
106
107 ```haskell
108 mapped :: Functor f => Setter (f a) (f b) a b
109 ```
110
111 `over` is then analogous to `fmap`, but parameterized on the Setter.
112
113 ```haskell
114 ghci> fmap succ [1,2,3]
115 [2,3,4]
116 ghci> over mapped succ [1,2,3]
117 [2,3,4]
118 ```
119
120 The benefit is that you can use any `Lens` as a `Setter`, and the composition of setters with other setters or lenses using `(.)` yields
121 a `Setter`.
122
123 ```haskell
124 ghci> over (mapped._2) succ [(1,2),(3,4)]
125 [(1,3),(3,5)]
126 ```
127
128 `(%~)` is an infix alias for 'over', and the precedence lets you avoid swimming in parentheses:
e409f0e8 »
2012-08-09 lots of examples
129
130 ```haskell
131 ghci> _1.mapped._2.mapped %~ succ $ ([(42, "hello")],"world")
132 ([(42, "ifmmp")],"world")
133 ```
134
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
135 There are a number of combinators that resemble the `+=`, `*=`, etc. operators from C/C++ for working with the monad transformers.
136
137 There are `+~`, `*~`, etc. analogues to those combinators that work functionally, returning the modified version of the structure.
138
e409f0e8 »
2012-08-09 lots of examples
139 ```haskell
140 ghci> both *~ 2 $ (1,2)
141 (2,4)
142 ```
143
144 There are combinators for manipulating the current state in a state monad as well
145
146 ```haskell
147 fresh :: MonadState Int m => m Int
148 fresh = id <+= 1
149 ```
150
151 Anything you know how to do with a `Foldable` container, you can do with a `Fold`
152
153 ```haskell
154 ghci> :m + Data.Char Data.Text.Lens
155 ghci> allOf (folded.text) isLower ["hello"^.packed, "goodbye"^.packed]
156 True
157 ```
158
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
159 You can also use this for generic programming. Combinators are included that are based on Neil Mitchell's `uniplate`, but which
160 have been generalized to work on or as lenses, folds, and traversals.
e409f0e8 »
2012-08-09 lots of examples
161
162 ```haskell
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
163 ghci> :m + Data.Data.Lens
164 ghci> anyOf biplate (=="world") ("hello",(),[(2::Int,"world")])
e409f0e8 »
2012-08-09 lots of examples
165 True
166 ```
167
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
168 As alluded to above, anything you know how to do with a `Traversable` you can do with a `Traversal`.
e409f0e8 »
2012-08-09 lots of examples
169
170 ```haskell
4ad5dda5 »
2012-08-09 ]
171 ghci> mapMOf (traverse._2) (\xs -> length xs <$ putStrLn xs) [(42,"hello"),(56,"world")]
e409f0e8 »
2012-08-09 lots of examples
172 "hello"
173 "world"
174 [(42,5),(56,5)]
175 ```
176
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
177 Moreover, many of the lenses supplied are actually isomorphisms, that means you can use them directly as a lens or getter:
e409f0e8 »
2012-08-09 lots of examples
178
179 ```haskell
180 ghci> let hello = "hello"^.packed
181 "hello"
182 ghci> :t hello
183 hello :: Text
184 ```
185
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
186 but you can also flip them around and use them as a lens the other way with `from`!
e409f0e8 »
2012-08-09 lots of examples
187
188 ```haskell
189 ghci> hello^.from packed.to length
190 5
191 ```
c5c8e5ff »
2012-07-25 repository initialized
192
42550937 »
2012-08-09 moar examples
193 You can automatically derive isomorphisms for your own newtypes with `makeIso`. e.g.
194
195 ```haskell
196 newtype Neither a b = Neither { _nor :: Either a b } deriving (Show)
197 makeIso ''Neither
198 ```
199
200 will automatically derive
201
202 ```haskell
203 neither :: Iso (Neither a b) (Neither c d) (Either a b) (Either c d)
204 nor :: Iso (Either a b) (Either c d) (Neither a b) (Neither c d)
205 ```
206
207 such that
208
209 ```haskell
210 from neither = nor
211 from nor = neither
212 neither.nor = id
213 nor.neither = id
214 ```
215
08d28010 »
2012-08-09 linking madness
216 There is also a fully operational, but simple game of [Pong](https://github.com/ekmett/lens/blob/master/examples/Pong.hs) in the [examples/](https://github.com/ekmett/lens/blob/master/examples/) folder.
217
f752511e »
2012-09-11 Gave the README examples a gentler learning curve.
218 There are also a couple of hundred examples distributed throughout the haddock documentation.
68b7e354 »
2012-08-09 shuffled docs
219
f149ab82 »
2012-09-12 Operators
220 Operators
221 =========
222
4899c604 »
2012-09-12 see wiki
223 (See [`wiki/Operators`](https://github.com/ekmett/lens/wiki/Operators))
f7858ae6 »
2012-09-12 maintenance notes
224
f149ab82 »
2012-09-12 Operators
225 <table>
226 <thead>
227 <tr>
228 <th>Combinator(s)</th>
229 <th>w/ Result</th>
230 <th>Stateful</th>
231 <th>w/ Result</th>
232 <th>Notes</th>
233 </tr>
234 </thead>
235 <tbody>
236 <tr><th colspan=5><a href="http://ekmett.github.com/lens/Control-Lens.html">Control.Lens</a></th></tr>
237 <tr>
238 <td><a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:view"><code>view</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:views"><code>views</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:-94-."><code>^.</code></a></td>
239 <td/>
240 <td><a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:use"><code>use</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:uses"><code>uses</code></a></td>
241 <td/>
242 <td>View target(s). <a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:query"><code>query</code></a> works like <a href="http://ekmett.github.com/lens/Control-Lens-Getter.html#v:use"><code>use</code></a> over a <code>MonadReader</code></td>
243 </tr>
244 <tr>
245 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:set"><code>set</code></a>, <a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:.-126-"><code>.~</code></a></td>
246 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-60-.-126-"><code>&lt;.~</code></a></td>
247 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:.-61-"><code>.=</code></a></td>
248 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:assign"><code>assign</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-60-.-61-"><code>&lt;.=</code></a></td>
249 <td>Replace target(s). <a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60-.-126-"><code>&lt;&lt;.~</code> and
250 <a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60-.-61-"><code>&lt;&lt;.=</code></a>
251 return the old value</td>
252 </tr>
253 <tr>
254 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:over"><code>over</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:mapOf"><code>mapOf</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-37--126-"><code>%~</code></a></td>
255 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--37--126-"><code>&lt;%~</code></td>
256 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-37--61-"><code>%=</code></a></td>
257 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--37--61-"><code>&lt;%=</code></td>
258 <td>Update target(s). <a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60--37--126-"><code>&lt;&lt;%~</code> and
259 <a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60--37--61-"><code>&lt;&lt;%=</code></a>
260 return the old value</td>
261 </tr>
262 <tr>
263 <td><code>id</code>,<a href="http://ekmett.github.com/lens/Control-Lens-Traversal.html#v:traverseOf"><code>traverseOf</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-37--37--126-"><code>%%~</code></a></td>
264 <td/>
265 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-37--37--61-"><code>%%=</code></a></td>
266 <td/>
53319abe » ion1
2012-12-09 Some further spellchecking
267 <td>Update target(s) with an <code>Applicative</code> or auxiliary result</td>
f149ab82 »
2012-09-12 Operators
268 </tr>
269 <tr>
270 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-43--126-"><code>+~</code></a></td>
271 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--43--126-"><code>&lt;+~</code></td>
272 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-43--61-"><code>+=</code></a></td>
273 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--43--61-"><code>&lt;+=</code></td>
274 <td>Add to target(s)</td>
275 </tr>
276 <tr>
277 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-45--126-"><code>-~</code></a></td>
278 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--45--126-"><code>&lt;-~</code></td>
279 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-45--61-"><code>-=</code></a></td>
280 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--45--61-"><code>&lt;-=</code></td>
281 <td>Subtract from target(s)</td>
282 </tr>
283 <tr>
284 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-42--126-"><code>*~</code></a></td>
285 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--42--126-"><code>&lt;*~</code></td>
286 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-42--61-"><code>*=</code></a></td>
287 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--42--61-"><code>&lt;*=</code></td>
288 <td>Multiply target(s)</td>
289 </tr>
290 <tr>
291 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-47--47--126-"><code>//~</code></a></td>
292 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--47--47--126-"><code>&lt;//~</code></td>
293 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-47--47--61-"><code>//=</code></a></td>
294 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--47--47--61-"><code>&lt;//=</code></td>
295 <td>Divide target(s)</td>
296 </tr>
297 <tr>
298 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-94--126-"><code>^~</code></a></td>
299 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--94--126-"><code>&lt;^~</code></td>
300 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-94--61-"><code>^=</code></a></td>
301 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--94--61-"><code>&lt;^=</code></td>
302 <td>Raise target(s) to a non-negative <code>Integral</code> power</td>
303 </tr>
304 <tr>
305 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-94--94--126-"><code>^^~</code></a></td>
306 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--94--94--126-"><code>&lt;^^~</code></td>
307 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-94--94--61-"><code>^^=</code></a></td>
308 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--94--94--61-"><code>&lt;^^=</code></td>
309 <td>Raise target(s) to an <code>Integral</code> power</td>
310 </tr>
311 <tr>
312 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-42--42--126-"><code>**~</code></a></td>
313 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--42--42--126-"><code>&lt;**~</code></td>
314 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-42--42--61-"><code>**=</code></a></td>
315 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--42--42--61-"><code>&lt;**=</code></td>
316 <td>Raise target(s) to an arbitrary power</td>
317 </tr>
318 <tr>
319 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-124--124--126-"><code>||~</code></a></td>
320 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--124--124--126-"><code>&lt;||~</code></td>
321 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-124--124--61-"><code>||=</code></a></td>
322 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--124--124--61-"><code>&lt;||=</code></td>
323 <td>Logically or target(s)</td>
324 </tr>
325 <tr>
326 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-38--38--126-"><code>&amp;&amp;~</code></a></td>
327 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--38--38--126-"><code>&lt;&amp;&amp;~</code></td>
328 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-38--38--61-"><code>&amp;&amp;=</code></a></td>
329 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--38--38--61-"><code>&lt;&amp;&amp;=</code></td>
330 <td>Logically and target(s)</td>
331 </tr>
332 <tr>
45625db3 » Taneb
2012-11-27 Updated Readme
333 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-60--62--126-"><code>&lt;&gt;~</code></a></td>
334 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60--62--126-"><code>&lt;&lt;&gt;~</code></td>
335 <td><a href="http://ekmett.github.com/lens/Control-Lens-Setter.html#v:-60--62--61-"><code>&lt;&gt;=</code></a></td>
336 <td><a href="http://ekmett.github.com/lens/Control-Lens-Type.html#v:-60--60--62--61-"><code>&lt;&lt;&gt;=</code></td>
337 <td><code>mappend</code> to the target monoidal value(s)</td>
338 </tr>
339 <tr>
f149ab82 »
2012-09-12 Operators
340 <td><a href="http://ekmett.github.com/lens/Control-Lens-Fold.html#v:headOf"><code>headOf</code>,<a href="http://ekmett.github.com/lens/Control-Lens-Fold.html#v:-94--63-"><code>^?</code></a></td>
341 <td/><td/><td/>
342 <td>Return <code>Just</code> the first target or <code>Nothing</code></td>
343 </tr>
344 <tr>
345 <td><a href="http://ekmett.github.com/lens/Control-Lens-Fold.html#v:toListOf"><code>toListOf</code>,<a href="http://ekmett.github.com/lens/Control-Lens-Fold.html#v:-94-.."><code>^..</code></a></td>
346 <td/><td/><td/>
347 <td>Return a list of the target(s)</td>
348 </tr>
349 <tr>
350 <td><a href="http://ekmett.github.com/lens/Control-Lens-Action.html#v:perform"><code>perform</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-Action.html#v:performs"><code>performs</code></a><a href="http://ekmett.github.com/lens/Control-Lens-Action.html#v:-94-!"><code>^!</code></a></td>
351 <td/>
352 <td/>
353 <td/>
354 <td>Perform monadic action(s)</td>
355 </tr>
356 <tr><th colspan=5><a href="http://ekmett.github.com/lens/Control-Lens.html">Control.Lens</a> (Indexed)</th></tr>
357 <tr>
358 <td><a href="http://ekmett.github.com/lens/Control-Lens-IndexedSetter.html#v:iover"><code>iover</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-IndexedSetter.html#v:imapOf"><code>imapOf</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-IndexedSetter.html#v:-37--64--126-"><code>%@~</code></a></td>
359 <td><a href="http://ekmett.github.com/lens/Control-Lens-IndexedLens.html#v:-60--37--64--126-"><code>&lt;%@~</code></td>
360 <td><a href=http://ekmett.github.com/lens/Control-Lens-IndexedSetter.html#v:-37--64--126-"><code>%@=</code></a></td>
361 <td><a href="http://ekmett.github.com/lens/Control-Lens-IndexedLens.html#v:-60--37--64--61-"><code>&lt;%@=</code></td>
362 <td>Update target(s) with access to the index.</td>
363 </tr>
364 <tr>
365 <td><a href="http://ekmett.github.com/lens/Control-Lens-Indexed.html#v:withIndex"><code>withIndex</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-IndexedTraversal.html#v:itraverseOf"><code>itraverseOf</code></a>,<a href="http://ekmett.github.com/lens/Control-Lens-IndexedLens.html#v:-37--37--64--126-"><code>%%@~</code></a></td>
366 <td/>
367 <td><a href="http://ekmett.github.com/lens/Control-Lens-IndexedLens.html#v:-37--37--64--61-"><code>%%@=</code></a></td>
368 <td/>
53319abe » ion1
2012-12-09 Some further spellchecking
369 <td>Update target(s) with an <code>Applicative</code> or auxiliary result with access to the index.</td>
f149ab82 »
2012-09-12 Operators
370 </tr>
371 <tr><th colspan=5><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html">Data.Bits.Lens</a></th></tr>
372 <tr>
c13cffdf »
2012-11-24 operator cleanup
373 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-124--126-"><code>.|.~</code></a></td>
374 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-60--124--126-"><code>&lt;.|.~</code></td>
375 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-124--61-"><code>.|.=</code></a></td>
376 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-60--124--61-"><code>&lt;.|.=</code></td>
f149ab82 »
2012-09-12 Operators
377 <td>Bitwise or target(s)</td>
378 </tr>
379 <tr>
c13cffdf »
2012-11-24 operator cleanup
380 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-38--126-"><code>.&amp;.~</code></a></td>
381 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-60--38--126-"><code>&lt;.&amp;.~</code></td>
382 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-38--61-"><code>.&amp;.=</code></a></td>
383 <td><a href="http://ekmett.github.com/lens/Data-Bits-Lens.html#v:-60--38--61-"><code>&lt;.&amp;.=</code></td>
f149ab82 »
2012-09-12 Operators
384 <td>Bitwise and target(s)</td>
385 </tr>
386 <tr><th colspan=5><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html">System.FilePath.Lens</a></th></tr>
387 <tr>
388 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--47--62--126-"><code>&lt;/&gt;~</code></a></td>
389 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--60--47--62--126-"><code>&lt;&lt;/&gt;~</code></td>
390 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--47--62--61-"><code>&lt;/&gt;=</code></a></td>
391 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--60--47--62--61-"><code>&lt;&lt;/&gt;=</code></td>
392 <td>Append a relative path to a <code>FilePath</code></td>
393 </tr>
394 <tr>
395 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60-.-62--126-"><code>&lt;.&gt;~</code></a></td>
396 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--60-.-62--126-"><code>&lt;&lt;.&gt;~</code></td>
397 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60-.-62--61-"><code>&lt;.&gt;=</code></a></td>
398 <td><a href="http://ekmett.github.com/lens/System-FilePath-Lens.html#v:-60--60-.-62--61-"><code>&lt;&lt;.&gt;=</code></td>
399 <td>Append a file extension to a <code>FilePath</code></td>
400 </tr>
401 </tbody>
402 </table>
403
45625db3 » Taneb
2012-11-27 Updated Readme
404
c5c8e5ff »
2012-07-25 repository initialized
405 Contact Information
406 -------------------
407
408 Contributions and bug reports are welcome!
409
410 Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
411
412 -Edward Kmett
Something went wrong with that request. Please try again.