/
Control-Lens-Plated.html
259 lines (259 loc) · 109 KB
/
Control-Lens-Plated.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Plated</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Plated.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Plated.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-2.6: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett <ekmett@gmail.com></td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Control.Lens.Plated</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Uniplate
</a></li><li><a href="#g:2">Uniplate Combinators
</a></li><li><a href="#g:3">Compos
</a></li><li><a href="#g:4">Parts
</a><ul><li><a href="#g:5">Unsafe Operations
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The name "plate" stems originally from "boilerplate", which was the term
used by the "Scrap Your Boilerplate" papers, and later inherited by Neil
Mitchell's "Uniplate".
</p><p><a href="http://community.haskell.org/~ndm/uniplate/">http://community.haskell.org/~ndm/uniplate/</a>
</p><p>The combinators in here are designed to be compatible with and subsume the
<code>uniplate</code> API with the notion of a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> replacing a uniplate or
biplate.
</p><p>By implementing these combinators in terms of <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> instead of <code>uniplate</code>
additional type safety is gained, as the user is no longer responsible for
maintaining invariants such as the number of children he received.
</p><p>Note: The <code>Biplate</code> is <em>deliberately</em> excluded from the API here, with the
intention that you replace them with either explicit traversals, or by using the
<code>On</code> variants of the combinators below with <code><a href="Data-Data-Lens.html#v:biplate">biplate</a></code> from
<code>Data.Data.Lens</code>. As a design, it forced the user into too many situations where
they had to choose between correctness and ease of use, and it was brittle in the
face of competing imports.
</p><p>The sensible use of these combinators makes some simple assumptions. Notably, any
of the <code>On</code> combinators are expecting a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> or <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>
to play the role of the <code><a href="Data-Data-Lens.html#v:biplate">biplate</a></code> combinator, and so when the
types of the contents and the container match, they should be the <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:id">id</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>,
<code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> or <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
</p><p>It is often beneficial to use the combinators in this module with the combinators
from <code>Data.Data.Lens</code> or <code>GHC.Generics.Lens</code> to make it easier to automatically
derive definitions for <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>, or to derive custom traversals.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:Plated">Plated</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:plate">plate</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a</li></ul></li><li class="src short"><a href="#v:children">children</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [a]</li><li class="src short"><a href="#v:childrenOn">childrenOn</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> a -> [b]</li><li class="src short"><a href="#v:rewrite">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> a -> a</li><li class="src short"><a href="#v:rewriteOf">rewriteOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -> (a -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> a -> a</li><li class="src short"><a href="#v:rewriteOn">rewriteOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c) -> a -> b</li><li class="src short"><a href="#v:rewriteOnOf">rewriteOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> c c -> (c -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c) -> a -> b</li><li class="src short"><a href="#v:rewriteM">rewriteM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) -> a -> m a</li><li class="src short"><a href="#v:rewriteMOf">rewriteMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a a -> (a -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) -> a -> m a</li><li class="src short"><a href="#v:rewriteMOn">rewriteMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) -> a -> m b</li><li class="src short"><a href="#v:rewriteMOnOf">rewriteMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) -> a -> m b</li><li class="src short"><a href="#v:universe">universe</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [a]</li><li class="src short"><a href="#v:universeOf">universeOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a a -> a -> [a]</li><li class="src short"><a href="#v:universeOn">universeOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> a -> [b]</li><li class="src short"><a href="#v:universeOnOf">universeOnOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] b b -> a -> [b]</li><li class="src short"><a href="#v:transform">transform</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> a) -> a -> a</li><li class="src short"><a href="#v:transformOf">transformOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -> (a -> a) -> a -> a</li><li class="src short"><a href="#v:transformOn">transformOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> c) -> a -> b</li><li class="src short"><a href="#v:transformOnOf">transformOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> c c -> (c -> c) -> a -> b</li><li class="src short"><a href="#v:transformM">transformM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m a) -> a -> m a</li><li class="src short"><a href="#v:transformMOf">transformMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a a -> (a -> m a) -> a -> m a</li><li class="src short"><a href="#v:transformMOn">transformMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m c) -> a -> m b</li><li class="src short"><a href="#v:transformMOnOf">transformMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m c) -> a -> m b</li><li class="src short"><a href="#v:descend">descend</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> a) -> a -> a</li><li class="src short"><a href="#v:descendOf">descendOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c d -> (c -> d) -> a -> b</li><li class="src short"><a href="#v:descendOn">descendOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> c) -> a -> b</li><li class="src short"><a href="#v:descendOnOf">descendOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c d -> <a href="Control-Lens-Setter.html#t:Setting">Setting</a> c d e f -> (e -> f) -> a -> b</li><li class="src short"><a href="#v:descendA">descendA</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> f a) -> a -> f a</li><li class="src short"><a href="#v:descendAOf">descendAOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -> (c -> f d) -> a -> f b</li><li class="src short"><a href="#v:descendAOn">descendAOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c -> (c -> f c) -> a -> f b</li><li class="src short"><a href="#v:descendAOnOf">descendAOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> g => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g a b c d -> <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g c d e f -> (e -> g f) -> a -> g b</li><li class="src short"><a href="#v:descendA_">descendA_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> f b) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendAOf_">descendAOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendAOn_">descendAOn_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b) => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendAOnOf_">descendAOnOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) b b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendM">descendM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m a) -> a -> m a</li><li class="src short"><a href="#v:descendMOf">descendMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -> (c -> m d) -> a -> m b</li><li class="src short"><a href="#v:descendMOn">descendMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m c) -> a -> m b</li><li class="src short"><a href="#v:descendMOnOf">descendMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m c) -> a -> m b</li><li class="src short"><a href="#v:descendM_">descendM_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m b) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendMOf_">descendMOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendMOn_">descendMOn_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b) => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:descendMOnOf_">descendMOnOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) b b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:contexts">contexts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOf">contextsOf</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:contextsOn">contextsOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]</li><li class="src short"><a href="#v:contextsOnOf">contextsOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]</li><li class="src short"><a href="#v:holes">holes</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]</li><li class="src short"><a href="#v:holesOf">holesOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]</li><li class="src short"><a href="#v:holesOn">holesOn</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]</li><li class="src short"><a href="#v:holesOnOf">holesOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> e e) a b c d -> <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> e e) c d e e -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> e e b]</li><li class="src short"><a href="#v:para">para</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> [r] -> r) -> a -> r</li><li class="src short"><a href="#v:paraOf">paraOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a a -> (a -> [r] -> r) -> a -> r</li><li class="src short"><a href="#v:composOpFold">composOpFold</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => b -> (b -> b -> b) -> (a -> b) -> a -> b</li><li class="src short"><a href="#v:parts">parts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a [a]</li><li class="src short"><a href="#v:partsOf">partsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b [c] [c]</li><li class="src short"><a href="#v:unsafePartsOf">unsafePartsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d) a b c d -> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b [c] [d]</li></ul></div><div id="interface"><h1 id="g:1">Uniplate
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Plated" class="def">Plated</a> a <span class="keyword">where</span><a href="src/Control-Lens-Plated.html#Plated" class="link">Source</a></p><div class="doc"><p>A <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> type is one where we know how to extract its immediate self-similar children.
</p><p><em>Example 1</em>:
</p><pre>
import Control.Applicative
import Control.Lens
import Control.Plated
import Data.Data
import Data.Data.Lens (<code><a href="Data-Data-Lens.html#v:uniplate">uniplate</a></code>)
</pre><pre>
data Expr
= Val <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></code>
| Neg Expr
| Add Expr Expr
deriving (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a></code>,<code>Data</code>,<code>Typeable</code>)
</pre><pre>
instance <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> Expr where
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> f (Neg e) = Neg <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Functor.html#v:-60--36--62-"><$></a></code> f e
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> f (Add a b) = Add <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Functor.html#v:-60--36--62-"><$></a></code> f a <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#v:-60--42--62-"><*></a></code> f b
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> _ a = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#v:pure">pure</a></code> a
</pre><p><em>or</em>
</p><pre>
instance <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> Expr where
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> = <code><a href="Data-Data-Lens.html#v:uniplate">uniplate</a></code>
</pre><p><em>Example 2</em>:
</p><pre>
import Control.Applicative
import Control.Lens
import Control.Plated
import Data.Data
import Data.Data.Lens (<code><a href="Data-Data-Lens.html#v:uniplate">uniplate</a></code>)
</pre><pre>
data Tree a
= Bin (Tree a) (Tree a)
| Tip a
deriving (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a></code>,<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a></code>,<code>Data</code>,<code>Typeable</code>)
</pre><pre>
instance <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> (Tree a) where
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> f (Bin l r) = Bin <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Functor.html#v:-60--36--62-"><$></a></code> f l <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#v:-60--42--62-"><*></a></code> f r
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> _ t = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#v:pure">pure</a></code> t
</pre><p><em>or</em>
</p><pre>
instance <code>Data</code> a => <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> (Tree a) where
<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> = <code>uniplate</code>
</pre><p>Note the big distinction between these two implementations.
</p><p>The former will only treat children directly in this tree as descendents,
the latter will treat trees contained in the values under the tips also
as descendants!
</p><p>When in doubt, pick a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> and just use the various <code>...Of</code> combinators
rather than pollute <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> with orphan instances!
</p><p>If you want to find something unplated and non-recursive with <code><a href="Data-Data-Lens.html#v:biplate">biplate</a></code>
use the <code>...OnOf</code> variant with <code><a href="Control-Lens-Traversal.html#v:ignored">ignored</a></code>, though those usecases are much better served
in most cases by using the existing lens combinators! e.g.
</p><p><code><code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code>biplate</code> = <code><a href="Control-Lens-Plated.html#v:universeOnOf">universeOnOf</a></code> <code>biplate</code> <code><a href="Control-Lens-Traversal.html#v:ignored">ignored</a></code></code>.
</p><p>This same ability to explicitly pass the <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> in question is why there is no
analogue to uniplate's <code>Biplate</code>.
</p><p>Moreover, since we can allow custom traversals, we implement reasonable defaults for
polymorphic data types, that only traverse into themselves, and <em>not</em> their
polymorphic arguments.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:plate" class="def">plate</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a> a a<a href="src/Control-Lens-Plated.html#plate" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> of the immediate children of this structure.
</p><p>The default definition finds no children.
</p></div></div><div class="subs instances"><p id="control.i:Plated" class="caption collapser" onclick="toggleSection('i:Plated')">Instances</p><div id="section.i:Plated" class="show"><table><tr><td class="src"><a href="Control-Lens-Plated.html#t:Plated">Plated</a> [a]</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Control-Lens-Plated.html#t:Plated">Plated</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/containers-0.4.2.1/Data-Tree.html#t:Tree">Tree</a> a)</td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:2">Uniplate Combinators
</h1><div class="top"><p class="src"><a name="v:children" class="def">children</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [a]<a href="src/Control-Lens-Plated.html#children" class="link">Source</a></p><div class="doc"><p>Extract the immediate descendants of a <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> container.
</p><pre><code><a href="Control-Lens-Plated.html#v:children">children</a></code> = <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:childrenOn" class="def">childrenOn</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> a -> [b]<a href="src/Control-Lens-Plated.html#childrenOn" class="link">Source</a></p><div class="doc"><p>Provided for compatibility with <code>uniplate</code>.
</p><pre><code><a href="Control-Lens-Plated.html#v:childrenOn">childrenOn</a></code> = <code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:childrenOn">childrenOn</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b -> a -> [b]</pre></div></div><div class="top"><p class="src"><a name="v:rewrite" class="def">rewrite</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> a -> a<a href="src/Control-Lens-Plated.html#rewrite" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a rule everywhere you can. Ensures that the rule cannot
be applied anywhere in the result:
</p><pre>propRewrite r x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="Data-Just.html#v:isNothing">isNothing</a></code> . r) (<code><a href="Control-Lens-Plated.html#v:universe">universe</a></code> (<code><a href="Control-Lens-Plated.html#v:rewrite">rewrite</a></code> r x))</pre><p>Usually <code><a href="Control-Lens-Plated.html#v:transform">transform</a></code> is more appropriate, but <code><a href="Control-Lens-Plated.html#v:rewrite">rewrite</a></code> can give better
compositionality. Given two single transformations <code>f</code> and <code>g</code>, you can
construct <code>a -> f a <code>mplus</code> g a</code> which performs both rewrites until a fixed point.
</p></div></div><div class="top"><p class="src"><a name="v:rewriteOf" class="def">rewriteOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -> (a -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> a -> a<a href="src/Control-Lens-Plated.html#rewriteOf" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a rule everywhere you can. Ensures that the rule cannot
be applied anywhere in the result:
</p><pre>propRewriteOf l r x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="Data-Just.html#v:isNothing">isNothing</a></code> . r) (<code><a href="Control-Lens-Plated.html#v:universeOf">universeOf</a></code> l (<code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> l r x))</pre><p>Usually <code><a href="Control-Lens-Plated.html#v:transformOf">transformOf</a></code> is more appropriate, but <code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> can give better
compositionality. Given two single transformations <code>f</code> and <code>g</code>, you can
construct <code>a -> f a <code>mplus</code> g a</code> which performs both rewrites until a fixed point.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a a -> (a -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> a) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a a -> (a -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> a) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a -> (a -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> a) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOf">rewriteOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a a -> (a -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> a) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:rewriteOn" class="def">rewriteOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c) -> a -> b<a href="src/Control-Lens-Plated.html#rewriteOn" class="link">Source</a></p><div class="doc"><p>Rewrite recursively over part of a larger structure.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:rewriteOn">rewriteOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOn">rewriteOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOn">rewriteOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOn">rewriteOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setting">Setting</a></code> a b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:rewriteOnOf" class="def">rewriteOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> c c -> (c -> <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c) -> a -> b<a href="src/Control-Lens-Plated.html#rewriteOnOf" class="link">Source</a></p><div class="doc"><p>Rewrite recursively over part of a larger structure using a specified setter.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:rewriteOnOf">rewriteOnOf</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> b b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOnOf">rewriteOnOf</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> b b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOnOf">rewriteOnOf</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:rewriteOnOf">rewriteOnOf</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> b b -> (b -> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:rewriteM" class="def">rewriteM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) -> a -> m a<a href="src/Control-Lens-Plated.html#rewriteM" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a monadic rule everywhere you can. Ensures that the rule cannot
be applied anywhere in the result.
</p></div></div><div class="top"><p class="src"><a name="v:rewriteMOf" class="def">rewriteMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a a -> (a -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) -> a -> m a<a href="src/Control-Lens-Plated.html#rewriteMOf" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a monadic rule everywhere you recursing with a user-specified <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
Ensures that the rule cannot be applied anywhere in the result.
</p></div></div><div class="top"><p class="src"><a name="v:rewriteMOn" class="def">rewriteMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) -> a -> m b<a href="src/Control-Lens-Plated.html#rewriteMOn" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a monadic rule everywhere inside of a structure located by a user-specified <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>.
Ensures that the rule cannot be applied anywhere in the result.
</p></div></div><div class="top"><p class="src"><a name="v:rewriteMOnOf" class="def">rewriteMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> c)) -> a -> m b<a href="src/Control-Lens-Plated.html#rewriteMOnOf" class="link">Source</a></p><div class="doc"><p>Rewrite by applying a monadic rule everywhere inside of a structure located by a user-specified <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>,
using a user-specified <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> for recursion. Ensures that the rule cannot be applied anywhere in the result.
</p></div></div><div class="top"><p class="src"><a name="v:universe" class="def">universe</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [a]<a href="src/Control-Lens-Plated.html#universe" class="link">Source</a></p><div class="doc"><p>Retrieve all of the transitive descendants of a <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> container, including itself.
</p></div></div><div class="top"><p class="src"><a name="v:universeOf" class="def">universeOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a a -> a -> [a]<a href="src/Control-Lens-Plated.html#universeOf" class="link">Source</a></p><div class="doc"><p>Given a fold that knows how to locate immediate children, retrieve all of the transitive descendants of a node, including itself.
</p><pre><code><a href="Control-Lens-Plated.html#v:universeOf">universeOf</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a a -> a -> [a]</pre></div></div><div class="top"><p class="src"><a name="v:universeOn" class="def">universeOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> a -> [b]<a href="src/Control-Lens-Plated.html#universeOn" class="link">Source</a></p><div class="doc"><p>Given a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> that knows how to find <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> parts of a container retrieve them and all of their descendants, recursively.
</p></div></div><div class="top"><p class="src"><a name="v:universeOnOf" class="def">universeOnOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [b] b b -> a -> [b]<a href="src/Control-Lens-Plated.html#universeOnOf" class="link">Source</a></p><div class="doc"><p>Given a <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> that knows how to locate immediate children, retrieve all of the transitive descendants of a node, including itself that lie
in a region indicated by another <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>.
</p><pre><code><a href="Control-Lens-Fold.html#v:toListOf">toListOf</a></code> l = <code><a href="Control-Lens-Plated.html#v:universeOnOf">universeOnOf</a></code> l <code><a href="Control-Lens-Traversal.html#v:ignored">ignored</a></code></pre></div></div><div class="top"><p class="src"><a name="v:transform" class="def">transform</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> a) -> a -> a<a href="src/Control-Lens-Plated.html#transform" class="link">Source</a></p><div class="doc"><p>Transform every element in the tree, in a bottom-up manner.
</p><p>For example, replacing negative literals with literals:
</p><pre>
negLits = <code><a href="Control-Lens-Plated.html#v:transform">transform</a></code> $ x -> case x of
Neg (Lit i) -> Lit (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:negate">negate</a></code> i)
_ -> x
</pre></div></div><div class="top"><p class="src"><a name="v:transformOf" class="def">transformOf</a> :: <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> a a -> (a -> a) -> a -> a<a href="src/Control-Lens-Plated.html#transformOf" class="link">Source</a></p><div class="doc"><p>Transform every element by recursively applying a given <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> in a bottom-up manner.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:transformOf">transformOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a -> (a -> a) -> a -> a
<code><a href="Control-Lens-Plated.html#v:transformOf">transformOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a a -> (a -> a) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:transformOn" class="def">transformOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> c) -> a -> b<a href="src/Control-Lens-Plated.html#transformOn" class="link">Source</a></p><div class="doc"><p>Transform every element in the tree in a bottom-up manner over a region indicated by a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:transformOn">transformOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:transformOn">transformOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> (b -> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:transformOnOf" class="def">transformOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> <a href="Control-Lens-Setter.html#t:SimpleSetting">SimpleSetting</a> c c -> (c -> c) -> a -> b<a href="src/Control-Lens-Plated.html#transformOnOf" class="link">Source</a></p><div class="doc"><p>Transform every element in a region indicated by a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> by recursively applying another <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>
in a bottom-up manner.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:transformOnOf">transformOnOf</a></code> :: <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:transformOnOf">transformOnOf</a></code> :: <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> b b -> (b -> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:transformM" class="def">transformM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m a) -> a -> m a<a href="src/Control-Lens-Plated.html#transformM" class="link">Source</a></p><div class="doc"><p>Transform every element in the tree, in a bottom-up manner, monadically.
</p></div></div><div class="top"><p class="src"><a name="v:transformMOf" class="def">transformMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a a -> (a -> m a) -> a -> m a<a href="src/Control-Lens-Plated.html#transformMOf" class="link">Source</a></p><div class="doc"><p>Transform every element in a tree using a user supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> in a bottom-up manner with a monadic effect.
</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOf">transformMOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => 'Simple <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a -> (a -> m a) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:transformMOn" class="def">transformMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m c) -> a -> m b<a href="src/Control-Lens-Plated.html#transformMOn" class="link">Source</a></p><div class="doc"><p>Transform every element in the tree in a region indicated by a supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, in a bottom-up manner, monadically.
</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOn">transformMOn</a></code> :: (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m, <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c) => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:transformMOnOf" class="def">transformMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m c) -> a -> m b<a href="src/Control-Lens-Plated.html#transformMOnOf" class="link">Source</a></p><div class="doc"><p>Transform every element in a tree that lies in a region indicated by a supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, walking with a user supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> in
a bottom-up manner with a monadic effect.
</p><pre><code><a href="Control-Lens-Plated.html#v:transformMOnOf">transformMOnOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:descend" class="def">descend</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> a) -> a -> a<a href="src/Control-Lens-Plated.html#descend" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure. (a.k.a <code>composOp</code> from Björn Bringert's <code>compos</code>)
</p><pre><code><a href="Control-Lens-Plated.html#v:descend">descend</a></code> = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:descendOf" class="def">descendOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c d -> (c -> d) -> a -> b<a href="src/Control-Lens-Plated.html#descendOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme. This is <code><a href="Control-Lens-Setter.html#v:over">over</a></code>, but it is supplied here
for consistency with the uniplate API.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> = <code><a href="Control-Lens-Setter.html#v:over">over</a></code></pre><pre>
<code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> (b -> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:descendOf">descendOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:descendOn" class="def">descendOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c c -> (c -> c) -> a -> b<a href="src/Control-Lens-Plated.html#descendOn" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendOn">descendOn</a></code> b = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendOn">descendOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c => <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> (b -> b) -> a -> a</pre></div></div><div class="top"><p class="src"><a name="v:descendOnOf" class="def">descendOnOf</a> :: <a href="Control-Lens-Setter.html#t:Setting">Setting</a> a b c d -> <a href="Control-Lens-Setter.html#t:Setting">Setting</a> c d e f -> (e -> f) -> a -> b<a href="src/Control-Lens-Plated.html#descendOnOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts delimited by one <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code>, using another.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendOnOf">descendOnOf</a></code> b l = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> l)</pre><pre>
<code><a href="Control-Lens-Plated.html#v:descendOnOf">descendOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Setter.html#t:Setter">Setter</a></code> b b -> (b -> b) -> a -> a
<code><a href="Control-Lens-Plated.html#v:descendOnOf">descendOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> b) -> a -> a
</pre></div></div><div class="top"><p class="src"><a name="v:descendA" class="def">descendA</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> f a) -> a -> f a<a href="src/Control-Lens-Plated.html#descendA" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure with an <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effect, this is <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>, but it is supplied
for consistency with the uniplate API.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendA">descendA</a></code> = <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:descendAOf" class="def">descendAOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c d -> (c -> f d) -> a -> f b<a href="src/Control-Lens-Plated.html#descendAOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme and <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effects. This is <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:id">id</a></code>, but it is supplied
for consistency with the uniplate API.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOf">descendAOf</a></code> = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:id">id</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOf">descendAOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b => (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:descendAOn" class="def">descendAOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f a b c c -> (c -> f c) -> a -> f b<a href="src/Control-Lens-Plated.html#descendAOn" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> with <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOn">descendAOn</a></code> b = b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOn">descendAOn</a></code> :: (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f, Plated' c) => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> f b) -> a -> f a</pre></div></div><div class="top"><p class="src"><a name="v:descendAOnOf" class="def">descendAOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> g => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g a b c d -> <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> g c d e f -> (e -> g f) -> a -> g b<a href="src/Control-Lens-Plated.html#descendAOnOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts delimited by one <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, using another with <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOnOf">descendAOnOf</a></code> = (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOnOf">descendAOnOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> f b) -> a -> f a</pre></div></div><div class="top"><p class="src"><a name="v:descendA_" class="def">descendA_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> f b) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendA_" class="link">Source</a></p><div class="doc"><pre><code><a href="Control-Lens-Plated.html#v:descendA_">descendA_</a></code> = traverseOf_' <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:descendAOf_" class="def">descendAOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendAOf_" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme and <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effects, without reconstructing the structure behind you.
</p><p>This is just <code><a href="Control-Lens-Fold.html#v:traverseOf_">traverseOf_</a></code>, but is provided for consistency.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOf_">descendAOf_</a></code> = <code><a href="Control-Lens-Fold.html#v:traverseOf_">traverseOf_</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOf_">descendAOf_</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f => <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b => (b -> f b) -> a -> f ()</pre></div></div><div class="top"><p class="src"><a name="v:descendAOn_" class="def">descendAOn_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b) => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendAOn_" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> with monadic effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOn_">descendAOn_</a></code> b = <code><a href="Control-Lens-Fold.html#v:traverseOf_">traverseOf_</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOn_">descendAOn_</a></code> :: (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f, <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b) => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> f c) -> a -> f ()</pre></div></div><div class="top"><p class="src"><a name="v:descendAOnOf_" class="def">descendAOnOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Traversed">Traversed</a> f) b b -> (b -> f c) -> a -> f <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendAOnOf_" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts delimited by one <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code>, using another with <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> effects, without reconstructing the structure behind you.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendAOnOf_">descendAOnOf_</a></code> b l = <code><a href="Control-Lens-Fold.html#v:traverseOf_">traverseOf_</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> l)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendAOnOf_">descendAOnOf_</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f => <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b -> <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> b b -> (b -> f c) -> a -> f ()</pre></div></div><div class="top"><p class="src"><a name="v:descendM" class="def">descendM</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m a) -> a -> m a<a href="src/Control-Lens-Plated.html#descendM" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure with a monadic effect. (a.k.a <code>composOpM</code> from Björn Bringert's <code>compos</code>)
</p><pre><code><a href="Control-Lens-Plated.html#v:descendM">descendM</a></code> = <code><a href="Control-Lens-Traversal.html#v:mapMOf">mapMOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:descendMOf" class="def">descendMOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c d -> (c -> m d) -> a -> m b<a href="src/Control-Lens-Plated.html#descendMOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme and monadic effects. This is <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:id">id</a></code>, but it is
supplied for consistency with the uniplate API.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOf">descendMOf</a></code> = <code><a href="Control-Lens-Traversal.html#v:mapMOf">mapMOf</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOf">descendMOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b => (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:descendMOn" class="def">descendMOn</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c) => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> (c -> m c) -> a -> m b<a href="src/Control-Lens-Plated.html#descendMOn" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> with monadic effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOn">descendMOn</a></code> b = <code><a href="Control-Lens-Traversal.html#v:mapMOf">mapMOf</a></code> (b . <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOn">descendMOn</a></code> :: (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m, <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> c) => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:descendMOnOf" class="def">descendMOnOf</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Applicative.html#t:WrappedMonad">WrappedMonad</a> m) c c -> (c -> m c) -> a -> m b<a href="src/Control-Lens-Plated.html#descendMOnOf" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts delimited by one <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, using another with monadic effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOnOf">descendMOnOf</a></code> b l = <code><a href="Control-Lens-Traversal.html#v:mapMOf">mapMOf</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> l)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOnOf">descendMOnOf</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> (b -> m b) -> a -> m a</pre></div></div><div class="top"><p class="src"><a name="v:descendM_" class="def">descendM_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a) => (a -> m b) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendM_" class="link">Source</a></p><div class="doc"><p>Descend one level into a structure with monadic effects (a.k.a <code>composOpM</code> from Björn Bringert's <code>compos</code>)
</p><pre><code><a href="Control-Lens-Plated.html#v:descendM_">descendM_</a></code> = mapMOf_' <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:descendMOf_" class="def">descendMOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendMOf_" class="link">Source</a></p><div class="doc"><p>Recurse one level into a structure using a user specified recursion scheme and monadic effects. This is just <code><a href="Control-Lens-Fold.html#v:mapMOf_">mapMOf_</a></code>, but is provided for consistency.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOf_">descendMOf_</a></code> = <code><a href="Control-Lens-Fold.html#v:mapMOf_">mapMOf_</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOf_">descendMOf_</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b => (b -> m b) -> a -> m ()</pre></div></div><div class="top"><p class="src"><a name="v:descendMOn_" class="def">descendMOn_</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Control-Lens-Plated.html#t:Plated">Plated</a> b) => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendMOn_" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts of the structure delimited by a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> with monadic effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOn_">descendMOn_</a></code> b = <code><a href="Control-Lens-Fold.html#v:mapMOf_">mapMOf_</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOn_">descendMOn_</a></code> :: (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m, <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b) => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> (b -> m c) -> a -> m ()</pre></div></div><div class="top"><p class="src"><a name="v:descendMOnOf_" class="def">descendMOnOf_</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) a b -> <a href="Control-Lens-Getter.html#t:Getting">Getting</a> (<a href="Control-Lens-Internal.html#t:Sequenced">Sequenced</a> m) b b -> (b -> m c) -> a -> m <a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Control-Lens-Plated.html#descendMOnOf_" class="link">Source</a></p><div class="doc"><p>Recurse one level into the parts delimited by one <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, using another with monadic effects.
</p><pre><code><a href="Control-Lens-Plated.html#v:descendMOnOf_">descendMOnOf_</a></code> b l = <code><a href="Control-Lens-Fold.html#v:mapMOf_">mapMOf_</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> l)</pre><pre><code><a href="Control-Lens-Plated.html#v:descendMOnOf_">descendMOnOf_</a></code> :: <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a></code> m => <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a b -> <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> b b -> (b -> m b) -> a -> m ()</pre></div></div><div class="top"><p class="src"><a name="v:contexts" class="def">contexts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]<a href="src/Control-Lens-Plated.html#contexts" class="link">Source</a></p><div class="doc"><p>Return a list of all of the editable contexts for every location in the structure, recursively.
</p><pre>
propUniverse x = <code><a href="Control-Lens-Plated.html#v:universe">universe</a></code> x == <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:map">map</a></code> <code>pos</code> (<code><a href="Control-Lens-Plated.html#v:contexts">contexts</a></code> x)
propId x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> x) [extract w | w <- <code><a href="Control-Lens-Plated.html#v:contexts">contexts</a></code> x]
</pre><pre><code><a href="Control-Lens-Plated.html#v:contexts">contexts</a></code> = <code><a href="Control-Lens-Plated.html#v:contextsOf">contextsOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:contextsOf" class="def">contextsOf</a> :: <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> a a) a a -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]<a href="src/Control-Lens-Plated.html#contextsOf" class="link">Source</a></p><div class="doc"><p>Return a list of all of the editable contexts for every location in the structure, recursively, using a user-specified <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> to walk each layer.
</p><pre>
propUniverse l x = <code><a href="Control-Lens-Plated.html#v:universeOf">universeOf</a></code> l x == <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:map">map</a></code> <code>pos</code> (<code><a href="Control-Lens-Plated.html#v:contextsOf">contextsOf</a></code> l x)
propId l x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> x) [extract w | w <- <code><a href="Control-Lens-Plated.html#v:contextsOf">contextsOf</a></code> l x]
</pre><pre><code><a href="Control-Lens-Plated.html#v:contextsOf">contextsOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a a -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> a a]</pre></div></div><div class="top"><p class="src"><a name="v:contextsOn" class="def">contextsOn</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> c => <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]<a href="src/Control-Lens-Plated.html#contextsOn" class="link">Source</a></p><div class="doc"><p>Return a list of all of the editable contexts for every location in the structure in an areas indicated by a user supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, recursively using <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>.
</p><pre><code><a href="Control-Lens-Plated.html#v:contextsOn">contextsOn</a></code> b = <code><a href="Control-Lens-Plated.html#v:contextsOnOf">contextsOnOf</a></code> b <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre><pre><code><a href="Control-Lens-Plated.html#v:contextsOn">contextsOn</a></code> :: <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> b => <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b b a]</pre></div></div><div class="top"><p class="src"><a name="v:contextsOnOf" class="def">contextsOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> <a href="Control-Lens-Type.html#t:SimpleLensLike">SimpleLensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]<a href="src/Control-Lens-Plated.html#contextsOnOf" class="link">Source</a></p><div class="doc"><p>Return a list of all of the editable contexts for every location in the structure in an areas indicated by a user supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, recursively using
another user-supplied <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> to walk each layer.
</p><pre><code><a href="Control-Lens-Plated.html#v:contextsOnOf">contextsOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b b a]</pre></div></div><div class="top"><p class="src"><a name="v:holes" class="def">holes</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> a a a]<a href="src/Control-Lens-Plated.html#holes" class="link">Source</a></p><div class="doc"><p>The one-level version of <code>context</code>. This extracts a list of the immediate children as editable contexts.
</p><p>Given a context you can use <code>pos</code> to see the values, <code>peek</code> at what the structure would be like with an edited result, or simply <code>extract</code> the original structure.
</p><pre>
propChildren x = <code><a href="Control-Lens-Plated.html#v:children">children</a></code> l x <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:map">map</a></code> <code>pos</code> (<code><a href="Control-Lens-Plated.html#v:holes">holes</a></code> l x)
propId x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> x) [extract w | w <- <code><a href="Control-Lens-Plated.html#v:holes">holes</a></code> l x]
</pre><pre><code><a href="Control-Lens-Plated.html#v:holes">holes</a></code> = <code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:holesOf" class="def">holesOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]<a href="src/Control-Lens-Plated.html#holesOf" class="link">Source</a></p><div class="doc"><p>The one-level version of <code><a href="Control-Lens-Plated.html#v:contextsOf">contextsOf</a></code>. This extracts a list of the immediate children according to a given <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> as editable contexts.
</p><p>Given a context you can use <code>pos</code> to see the values, <code>peek</code> at what the structure would be like with an edited result, or simply <code>extract</code> the original structure.
</p><pre>
propChildren l x = <code>childrenOf</code> l x <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:map">map</a></code> <code>pos</code> (<code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> l x)
propId l x = <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:all">all</a></code> (<code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#v:-61--61-">==</a></code> x) [extract w | w <- <code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> l x]
</pre><pre>
<code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
<code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
<code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
</pre></div></div><div class="top"><p class="src"><a name="v:holesOn" class="def">holesOn</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> c c b]<a href="src/Control-Lens-Plated.html#holesOn" class="link">Source</a></p><div class="doc"><p>An alias for <code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code>, provided for consistency with the other combinators.
</p><pre><code><a href="Control-Lens-Plated.html#v:holesOn">holesOn</a></code> = <code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code></pre><pre>
<code><a href="Control-Lens-Plated.html#v:holesOn">holesOn</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b b a]
<code><a href="Control-Lens-Plated.html#v:holesOn">holesOn</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b b a]
<code><a href="Control-Lens-Plated.html#v:holesOn">holesOn</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b b a]
</pre></div></div><div class="top"><p class="src"><a name="v:holesOnOf" class="def">holesOnOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> e e) a b c d -> <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> e e) c d e e -> a -> [<a href="Control-Lens-Internal.html#t:Context">Context</a> e e b]<a href="src/Control-Lens-Plated.html#holesOnOf" class="link">Source</a></p><div class="doc"><p>Extract one level of holes from a container in a region specified by one <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code>, using another.
</p><pre><code><a href="Control-Lens-Plated.html#v:holesOnOf">holesOnOf</a></code> b l = <code><a href="Control-Lens-Plated.html#v:holesOf">holesOf</a></code> (b <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> l)</pre><pre>
<code><a href="Control-Lens-Plated.html#v:holesOnOf">holesOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code>Iso</code> b b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
<code><a href="Control-Lens-Plated.html#v:holesOnOf">holesOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> b b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
<code><a href="Control-Lens-Plated.html#v:holesOnOf">holesOnOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> b b -> a -> [<code><a href="Control-Lens-Internal.html#t:Context">Context</a></code> b a]
</pre></div></div><div class="top"><p class="src"><a name="v:para" class="def">para</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => (a -> [r] -> r) -> a -> r<a href="src/Control-Lens-Plated.html#para" class="link">Source</a></p><div class="doc"><p>Perform a fold-like computation on each value, technically a paramorphism.
</p><pre><code><a href="Control-Lens-Plated.html#v:para">para</a></code> = <code><a href="Control-Lens-Plated.html#v:paraOf">paraOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre></div></div><div class="top"><p class="src"><a name="v:paraOf" class="def">paraOf</a> :: <a href="Control-Lens-Getter.html#t:Getting">Getting</a> [a] a a -> (a -> [r] -> r) -> a -> r<a href="src/Control-Lens-Plated.html#paraOf" class="link">Source</a></p><div class="doc"><p>Perform a fold-like computation on each value, technically a paramorphism.
</p><pre><code><a href="Control-Lens-Plated.html#v:paraOf">paraOf</a></code> :: <code><a href="Control-Lens-Fold.html#t:Fold">Fold</a></code> a a -> (a -> [r] -> r) -> a -> r</pre></div></div><h1 id="g:3">Compos
</h1><div class="doc"><p>Provided for compatibility with Björn Bringert's <code>compos</code> library.
</p><p>Note: Other operations from compos that were inherited by <code>uniplate</code> are <em>not</em> included
to avoid having even more redundant names for the same operators. For comparison:
</p><pre>
<code>composOpMonoid</code> = <code><a href="Control-Lens-Fold.html#v:foldMapOf">foldMapOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>
<code>composOpMPlus</code> f = <code><a href="Control-Lens-Fold.html#v:msumOf">msumOf</a></code> (<code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> <code><a href="Control-Lens-Getter.html#v:to">to</a></code> f)
<code>composOp</code> = <code><a href="Control-Lens-Plated.html#v:descend">descend</a></code> = <code><a href="Control-Lens-Setter.html#v:over">over</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>
<code>composOpM</code> = <code><a href="Control-Lens-Plated.html#v:descendM">descendM</a></code> = <code><a href="Control-Lens-Traversal.html#v:mapMOf">mapMOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>
<code>composOpM_</code> = <code><a href="Control-Lens-Plated.html#v:descendM_">descendM_</a></code> = <code><a href="Control-Lens-Fold.html#v:mapMOf_">mapMOf_</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code>
</pre></div><div class="top"><p class="src"><a name="v:composOpFold" class="def">composOpFold</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => b -> (b -> b -> b) -> (a -> b) -> a -> b<a href="src/Control-Lens-Plated.html#composOpFold" class="link">Source</a></p><div class="doc"><p>Fold the immediate children of a <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> container.
</p><pre><code><a href="Control-Lens-Plated.html#v:composOpFold">composOpFold</a></code> z c f = <code><a href="Control-Lens-Fold.html#v:foldrOf">foldrOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code> (c <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#v:.">.</a></code> f) z</pre></div></div><h1 id="g:4">Parts
</h1><div class="top"><p class="src"><a name="v:parts" class="def">parts</a> :: <a href="Control-Lens-Plated.html#t:Plated">Plated</a> a => <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a [a]<a href="src/Control-Lens-Plated.html#parts" class="link">Source</a></p><div class="doc"><p>The original <code>uniplate</code> combinator, implemented in terms of <code><a href="Control-Lens-Plated.html#t:Plated">Plated</a></code> as a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>.
</p><pre><code><a href="Control-Lens-Plated.html#v:parts">parts</a></code> = <code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code> <code><a href="Control-Lens-Plated.html#v:plate">plate</a></code></pre><p>The resulting lens is safer to use as it ignores 'over-application' and deals gracefully with under-application,
but it is only a proper lens if you don't change the list <code><a href="/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-List.html#v:length">length</a></code>!
</p></div></div><div class="top"><p class="src"><a name="v:partsOf" class="def">partsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c c) a b c c -> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b [c] [c]<a href="src/Control-Lens-Plated.html#partsOf" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code> turns a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> into a lens that resembles an early version of the <code>uniplate</code> (or <code>biplate</code>) type.
</p><p><em>Note:</em> You should really try to maintain the invariant of the number of children in the list.
</p><p>Any extras will be lost. If you do not supply enough, then the remainder will come from the original structure.
</p><p>So technically, this is only a lens if you do not change the number of results it returns.
</p><pre>
<code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Iso.html#t:Iso">Iso</a></code> a b -> a -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a [b]
<code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a b -> a -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> a [b]
<code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code> :: <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a b -> a -> <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> a [b]
</pre></div></div><h2 id="g:5">Unsafe Operations
</h2><div class="top"><p class="src"><a name="v:unsafePartsOf" class="def">unsafePartsOf</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a> c d) a b c d -> <a href="Control-Lens-Type.html#t:Lens">Lens</a> a b [c] [d]<a href="src/Control-Lens-Plated.html#unsafePartsOf" class="link">Source</a></p><div class="doc"><p><code><a href="Control-Lens-Plated.html#v:unsafePartsOf">unsafePartsOf</a></code> turns a <code><a href="Control-Lens-Traversal.html#t:Traversal">Traversal</a></code> into a <code>uniplate</code> (or <code>biplate</code>) family.
</p><p>If you do not need the types of <code>c</code> and <code>d</code> to be different, it is recommended that
you use <code><a href="Control-Lens-Plated.html#v:partsOf">partsOf</a></code>
</p><p>It is generally safer to traverse with the <code><a href="Control-Lens-Internal.html#t:Bazaar">Bazaar</a></code> rather than use this
combinator. However, it is sometimes convenient.
</p><p>This is unsafe because if you don't supply at least as many <code>d</code>'s as you were
given <code>c</code>'s, then the reconstruction of <code>b</code> <em>will</em> result in an error!
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>