This file is indexed.

/usr/share/doc/libghc-lens-doc/html/Control-Lens-Prism.html is in libghc-lens-doc 4.14-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<!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.Prism</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Prism.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Prism.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-4.14: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(C) 2012-16 Edward Kmett</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Lens.Prism</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Prisms</a></li><li><a href="#g:2">Constructing Prisms</a></li><li><a href="#g:3">Consuming Prisms</a></li><li><a href="#g:4">Common Prisms</a></li><li><a href="#g:5">Prismatic profunctors</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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">type</span> <a href="#t:Prism">Prism</a> s t a b = <span class="keyword">forall</span> p f. (<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; p a (f b) -&gt; p s (f t)</li><li class="src short"><span class="keyword">type</span> <a href="#t:Prism-39-">Prism'</a> s a = <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:APrism">APrism</a> s t a b = <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b a (<a href="Control-Lens-Setter.html#t:Identity">Identity</a> b) -&gt; <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b s (<a href="Control-Lens-Setter.html#t:Identity">Identity</a> t)</li><li class="src short"><span class="keyword">type</span> <a href="#t:APrism-39-">APrism'</a> s a = <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s s a a</li><li class="src short"><a href="#v:prism">prism</a> :: (b -&gt; t) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a) -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s t a b</li><li class="src short"><a href="#v:prism-39-">prism'</a> :: (b -&gt; s) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a b</li><li class="src short"><a href="#v:withPrism">withPrism</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; ((b -&gt; t) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a) -&gt; r) -&gt; r</li><li class="src short"><a href="#v:clonePrism">clonePrism</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s t a b</li><li class="src short"><a href="#v:outside">outside</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a> p =&gt; <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> (p t r) (p s r) (p b r) (p a r)</li><li class="src short"><a href="#v:aside">aside</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (e, s) (e, t) (e, a) (e, b)</li><li class="src short"><a href="#v:without">without</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:APrism">APrism</a> u v c d -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> s u) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t v) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b d)</li><li class="src short"><a href="#v:below">below</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-Prism.html#t:APrism-39-">APrism'</a> s a -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> (f s) (f a)</li><li class="src short"><a href="#v:isn-39-t">isn't</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:matching">matching</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a</li><li class="src short"><a href="#v:_Left">_Left</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) a b</li><li class="src short"><a href="#v:_Right">_Right</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) a b</li><li class="src short"><a href="#v:_Just">_Just</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) a b</li><li class="src short"><a href="#v:_Nothing">_Nothing</a> :: <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) ()</li><li class="src short"><a href="#v:_Void">_Void</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Void.html#t:Void">Void</a></li><li class="src short"><a href="#v:_Show">_Show</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> a</li><li class="src short"><a href="#v:only">only</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> a ()</li><li class="src short"><a href="#v:nearly">nearly</a> :: a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> a ()</li><li class="src short"><span class="keyword">class</span> <a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p =&gt; <a href="#t:Choice">Choice</a> p <span class="keyword">where</span><ul class="subs"><li><a href="#v:left-39-">left'</a> :: p a b -&gt; p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c)</li><li><a href="#v:right-39-">right'</a> :: p a b -&gt; p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b)</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Prisms</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Prism" class="def">Prism</a> s t a b = <span class="keyword">forall</span> p f. (<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f) =&gt; p a (f b) -&gt; p s (f t) <a href="src/Control-Lens-Type.html#Prism" class="link">Source</a> <a href="#t:Prism" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> <code>l</code> is a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> that can also be turned
 around with <code><a href="Control-Lens-Review.html#v:re">re</a></code> to obtain a <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> in the
 opposite direction.</p><p>There are two laws that a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> should satisfy:</p><p>First, if I <code><a href="Control-Lens-Review.html#v:re">re</a></code> or <code><a href="Control-Lens-Review.html#v:review">review</a></code> a value with a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> and then <code><a href="Control-Lens-Fold.html#v:preview">preview</a></code> or use (<code><a href="Control-Lens-Fold.html#v:-94--63-">^?</a></code>), I will get it back:</p><pre><code><a href="Control-Lens-Fold.html#v:preview">preview</a></code> l (<code><a href="Control-Lens-Review.html#v:review">review</a></code> l b) &#8801; <code>Just</code> b
</pre><p>Second, if you can extract a value <code>a</code> using a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> <code>l</code> from a value <code>s</code>, then the value <code>s</code> is completely described by <code>l</code> and <code>a</code>:</p><p>If <code><code><a href="Control-Lens-Fold.html#v:preview">preview</a></code> l s &#8801; <code>Just</code> a</code> then <code><code><a href="Control-Lens-Review.html#v:review">review</a></code> l a &#8801; s</code></p><p>These two laws imply that the <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> laws hold for every <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> and that we <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#v:traverse">traverse</a></code> at most 1 element:</p><pre><code><a href="Control-Lens-Fold.html#v:lengthOf">lengthOf</a></code> l x <code>&lt;=</code> 1
</pre><p>It may help to think of this as a <code><a href="Control-Lens-Type.html#t:Iso">Iso</a></code> that can be partial in one direction.</p><p>Every <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> is a valid <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>.</p><p>Every <code><a href="Control-Lens-Type.html#t:Iso">Iso</a></code> is a valid <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>.</p><p>For example, you might have a <code><code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code>Integer</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code></code> allows you to always
 go from a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code> to an <code>Integer</code>, and provide you with tools to check if an <code>Integer</code> is
 a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code> and/or to edit one if it is.</p><pre><code>nat</code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> <code>Integer</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code>
<code>nat</code> = <code><a href="Control-Lens-Prism.html#v:prism">prism</a></code> <code>toInteger</code> <code>$</code> \ i -&gt;
   if i <code>&lt;</code> 0
   then <code>Left</code> i
   else <code>Right</code> (<code>fromInteger</code> i)
</pre><p>Now we can ask if an <code>Integer</code> is a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^?nat
</code></strong>Just 5
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(-5)^?nat
</code></strong>Nothing
</pre><p>We can update the ones that are:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(-3,4) &amp; both.nat *~ 2
</code></strong>(-3,8)
</pre><p>And we can then convert from a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Numeric-Natural.html#v:Natural">Natural</a></code> to an <code>Integer</code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5 ^. re nat -- :: Natural
</code></strong>5
</pre><p>Similarly we can use a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#v:traverse">traverse</a></code> the <code>Left</code> half of an <code>Either</code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Left &quot;hello&quot; &amp; _Left %~ length
</code></strong>Left 5
</pre><p>or to construct an <code>Either</code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.re _Left
</code></strong>Left 5
</pre><p>such that if you query it with the <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>, you will get your original input back.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.re _Left ^? _Left
</code></strong>Just 5
</pre><p>Another interesting way to think of a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> is as the categorical dual of a <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>
 -- a co-<code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, so to speak. This is what permits the construction of <code><a href="Control-Lens-Prism.html#v:outside">outside</a></code>.</p><p>Note: Composition with a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> is index-preserving.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Prism-39-" class="def">Prism'</a> s a = <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a a <a href="src/Control-Lens-Type.html#Prism%27" class="link">Source</a> <a href="#t:Prism-39-" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:APrism" class="def">APrism</a> s t a b = <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b a (<a href="Control-Lens-Setter.html#t:Identity">Identity</a> b) -&gt; <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b s (<a href="Control-Lens-Setter.html#t:Identity">Identity</a> t) <a href="src/Control-Lens-Prism.html#APrism" class="link">Source</a> <a href="#t:APrism" class="selflink">#</a></p><div class="doc"><p>If you see this in a signature for a function, the function is expecting a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:APrism-39-" class="def">APrism'</a> s a = <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s s a a <a href="src/Control-Lens-Prism.html#APrism%27" class="link">Source</a> <a href="#t:APrism-39-" class="selflink">#</a></p><div class="doc"><pre>type APrism' = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Prism.html#t:APrism">APrism</a></code>
</pre></div></div><h1 id="g:2">Constructing Prisms</h1><div class="top"><p class="src"><a id="v:prism" class="def">prism</a> :: (b -&gt; t) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a) -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s t a b <a href="src/Control-Lens-Prism.html#prism" class="link">Source</a> <a href="#v:prism" class="selflink">#</a></p><div class="doc"><p>Build a <code><a href="Control-Lens-Prism.html#v:Prism">Prism</a></code>.</p><p><code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code> t a</code> is used instead of <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> a</code> to permit the types of <code>s</code> and <code>t</code> to differ.</p></div></div><div class="top"><p class="src"><a id="v:prism-39-" class="def">prism'</a> :: (b -&gt; s) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a b <a href="src/Control-Lens-Prism.html#prism%27" class="link">Source</a> <a href="#v:prism-39-" class="selflink">#</a></p><div class="doc"><p>This is usually used to build a <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code>, when you have to use an operation like
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable.html#v:cast">cast</a></code> which already returns a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code>.</p></div></div><h1 id="g:3">Consuming Prisms</h1><div class="top"><p class="src"><a id="v:withPrism" class="def">withPrism</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; ((b -&gt; t) -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a) -&gt; r) -&gt; r <a href="src/Control-Lens-Prism.html#withPrism" class="link">Source</a> <a href="#v:withPrism" class="selflink">#</a></p><div class="doc"><p>Convert <code><a href="Control-Lens-Prism.html#t:APrism">APrism</a></code> to the pair of functions that characterize it.</p></div></div><div class="top"><p class="src"><a id="v:clonePrism" class="def">clonePrism</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s t a b <a href="src/Control-Lens-Prism.html#clonePrism" class="link">Source</a> <a href="#v:clonePrism" class="selflink">#</a></p><div class="doc"><p>Clone a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> so that you can reuse the same monomorphically typed <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> for different purposes.</p><p>See <code><a href="Control-Lens-Lens.html#v:cloneLens">cloneLens</a></code> and <code><a href="Control-Lens-Traversal.html#v:cloneTraversal">cloneTraversal</a></code> for examples of why you might want to do this.</p></div></div><div class="top"><p class="src"><a id="v:outside" class="def">outside</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Representable">Representable</a> p =&gt; <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Type.html#t:Lens">Lens</a> (p t r) (p s r) (p b r) (p a r) <a href="src/Control-Lens-Prism.html#outside" class="link">Source</a> <a href="#v:outside" class="selflink">#</a></p><div class="doc"><p>Use a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> as a kind of first-class pattern.</p><pre><code><a href="Control-Lens-Prism.html#v:outside">outside</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> s t a b -&gt; <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> (t -&gt; r) (s -&gt; r) (b -&gt; r) (a -&gt; r)</pre></div></div><div class="top"><p class="src"><a id="v:aside" class="def">aside</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (e, s) (e, t) (e, a) (e, b) <a href="src/Control-Lens-Prism.html#aside" class="link">Source</a> <a href="#v:aside" class="selflink">#</a></p><div class="doc"><p>Use a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> to work over part of a structure.</p></div></div><div class="top"><p class="src"><a id="v:without" class="def">without</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; <a href="Control-Lens-Prism.html#t:APrism">APrism</a> u v c d -&gt; <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> s u) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t v) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b d) <a href="src/Control-Lens-Prism.html#without" class="link">Source</a> <a href="#v:without" class="selflink">#</a></p><div class="doc"><p>Given a pair of prisms, project sums.</p><p>Viewing a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> as a co-<code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>, this combinator can be seen to be dual to <code><a href="Control-Lens-Lens.html#v:alongside">alongside</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:below" class="def">below</a> :: <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> f =&gt; <a href="Control-Lens-Prism.html#t:APrism-39-">APrism'</a> s a -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> (f s) (f a) <a href="src/Control-Lens-Prism.html#below" class="link">Source</a> <a href="#v:below" class="selflink">#</a></p><div class="doc"><p><code>lift</code> a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> through a <code><a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a></code> functor, giving a Prism that matches only if all the elements of the container match the <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[Left 1, Right &quot;foo&quot;, Left 4, Right &quot;woot&quot;]^..below _Right
</code></strong>[]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[Right &quot;hail hydra!&quot;, Right &quot;foo&quot;, Right &quot;blah&quot;, Right &quot;woot&quot;]^..below _Right
</code></strong>[[&quot;hail hydra!&quot;,&quot;foo&quot;,&quot;blah&quot;,&quot;woot&quot;]]
</pre></div></div><div class="top"><p class="src"><a id="v:isn-39-t" class="def">isn't</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Lens-Prism.html#isn%27t" class="link">Source</a> <a href="#v:isn-39-t" class="selflink">#</a></p><div class="doc"><p>Check to see if this <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> doesn't match.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isn't _Left (Right 12)
</code></strong>True
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isn't _Left (Left 12)
</code></strong>False
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>isn't _Empty []
</code></strong>False
</pre></div></div><div class="top"><p class="src"><a id="v:matching" class="def">matching</a> :: <a href="Control-Lens-Prism.html#t:APrism">APrism</a> s t a b -&gt; s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> t a <a href="src/Control-Lens-Prism.html#matching" class="link">Source</a> <a href="#v:matching" class="selflink">#</a></p><div class="doc"><p>Retrieve the value targeted by a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> or return the
 original value while allowing the type to change if it does
 not match.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>matching _Just (Just 12)
</code></strong>Right 12
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>matching _Just (Nothing :: Maybe Int) :: Either (Maybe Bool) Int
</code></strong>Left Nothing
</pre></div></div><h1 id="g:4">Common Prisms</h1><div class="top"><p class="src"><a id="v:_Left" class="def">_Left</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) a b <a href="src/Control-Lens-Prism.html#_Left" class="link">Source</a> <a href="#v:_Left" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> provides a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> for tweaking the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> half of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _Left (+1) (Left 2)
</code></strong>Left 3
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _Left (+1) (Right 2)
</code></strong>Right 2
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Right 42 ^._Left :: String
</code></strong>&quot;&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Left &quot;hello&quot; ^._Left
</code></strong>&quot;hello&quot;
</pre><p>It also can be turned around to obtain the embedding into the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Left">Left</a></code> half of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Left # 5
</code></strong>Left 5
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.re _Left
</code></strong>Left 5
</pre></div></div><div class="top"><p class="src"><a id="v:_Right" class="def">_Right</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) a b <a href="src/Control-Lens-Prism.html#_Right" class="link">Source</a> <a href="#v:_Right" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> provides a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> for tweaking the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code> half of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _Right (+1) (Left 2)
</code></strong>Left 2
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _Right (+1) (Right 2)
</code></strong>Right 3
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Right &quot;hello&quot; ^._Right
</code></strong>&quot;hello&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Left &quot;hello&quot; ^._Right :: [Double]
</code></strong>[]
</pre><p>It also can be turned around to obtain the embedding into the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#v:Right">Right</a></code> half of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Right # 5
</code></strong>Right 5
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.re _Right
</code></strong>Right 5
</pre></div></div><div class="top"><p class="src"><a id="v:_Just" class="def">_Just</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> b) a b <a href="src/Control-Lens-Prism.html#_Just" class="link">Source</a> <a href="#v:_Just" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> provides a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> for tweaking the target of the value of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code> in a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _Just (+1) (Just 2)
</code></strong>Just 3
</pre><p>Unlike <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code> this is a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>, and so you can use it to inject as well:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Just # 5
</code></strong>Just 5
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5^.re _Just
</code></strong>Just 5
</pre><p>Interestingly,</p><pre>m <code>^?</code> <code><a href="Control-Lens-Prism.html#v:_Just">_Just</a></code> &#8801; m
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Just x ^? _Just
</code></strong>Just x
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Nothing ^? _Just
</code></strong>Nothing
</pre></div></div><div class="top"><p class="src"><a id="v:_Nothing" class="def">_Nothing</a> :: <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) () <a href="src/Control-Lens-Prism.html#_Nothing" class="link">Source</a> <a href="#v:_Nothing" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> provides the <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> in a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Nothing ^? _Nothing
</code></strong>Just ()
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Just () ^? _Nothing
</code></strong>Nothing
</pre><p>But you can turn it around and use it to construct <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> as well:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Nothing # ()
</code></strong>Nothing
</pre></div></div><div class="top"><p class="src"><a id="v:_Void" class="def">_Void</a> :: <a href="Control-Lens-Prism.html#t:Prism">Prism</a> s s a <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Void.html#t:Void">Void</a> <a href="src/Control-Lens-Prism.html#_Void" class="link">Source</a> <a href="#v:_Void" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Void.html#t:Void">Void</a></code> is a logically uninhabited data type.</p><p>This is a <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> that will always fail to match.</p></div></div><div class="top"><p class="src"><a id="v:_Show" class="def">_Show</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> a <a href="src/Control-Lens-Prism.html#_Show" class="link">Source</a> <a href="#v:_Show" class="selflink">#</a></p><div class="doc"><p>This is an improper prism for text formatting based on <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a></code>.</p><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> is &quot;improper&quot; in the sense that it normalizes the text formatting, but round tripping
 is idempotent given sane 'Read'/'Show' instances.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_Show # 2
</code></strong>&quot;2&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;EQ&quot; ^? _Show :: Maybe Ordering
</code></strong>Just EQ
</pre><pre><code><a href="Control-Lens-Prism.html#v:_Show">_Show</a></code> &#8801; <code><a href="Control-Lens-Prism.html#v:prism-39-">prism'</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#v:show">show</a></code> <code>readMaybe</code>
</pre></div></div><div class="top"><p class="src"><a id="v:only" class="def">only</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> a () <a href="src/Control-Lens-Prism.html#only" class="link">Source</a> <a href="#v:only" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> compares for exact equality with a given value.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>only 4 # ()
</code></strong>4
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>5 ^? only 4
</code></strong>Nothing
</pre></div></div><div class="top"><p class="src"><a id="v:nearly" class="def">nearly</a> :: a -&gt; (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a> a () <a href="src/Control-Lens-Prism.html#nearly" class="link">Source</a> <a href="#v:nearly" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> compares for approximate equality with a given value and a predicate for testing, 
 an example where the value is the empty list and the predicate checks that a list is empty (same
 as <code><a href="Control-Lens-Empty.html#v:_Empty">_Empty</a></code> with the <code><a href="Control-Lens-Empty.html#v:AsEmpty">AsEmpty</a></code> list instance):</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>nearly [] null # ()
</code></strong>[]
<code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[1,2,3,4] ^? nearly [] null
</code></strong>Nothing
</pre><pre><code><a href="Control-Lens-Prism.html#v:nearly">nearly</a></code> [] <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:null">null</a></code> :: <code><a href="Control-Lens-Prism.html#t:Prism-39-">Prism'</a></code> [a] ()</pre><p>To comply with the <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code> laws the arguments you supply to <code>nearly a p</code> are somewhat constrained.</p><p>We assume <code>p x</code> holds iff <code>x &#8801; a</code>. Under that assumption then this is a valid <code><a href="Control-Lens-Prism.html#t:Prism">Prism</a></code>.</p><p>This is useful when working with a type where you can test equality for only a subset of its
 values, and the prism selects such a value. </p></div></div><h1 id="g:5">Prismatic profunctors</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p =&gt; <a id="t:Choice" class="def">Choice</a> p <span class="keyword">where</span> <a href="#t:Choice" class="selflink">#</a></p><div class="doc"><p>The generalization of <code><a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a></code> of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a></code> that is strong with respect
 to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>.</p><p>Note: This is also a notion of strength, except with regards to another monoidal
 structure that we can choose to equip Hask with: the cocartesian coproduct.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Control-Lens-Prism.html#v:left-39-">left'</a> | <a href="Control-Lens-Prism.html#v:right-39-">right'</a></p></div><div class="subs instances"><p id="control.i:Choice" class="caption collapser" onclick="toggleSection('i:Choice')">Instances</p><div id="section.i:Choice" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:1" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:1')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (-&gt;)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: (a -&gt; b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: (a -&gt; b) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:2" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:2')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> <a href="Control-Lens-Reified.html#t:ReifiedFold">ReifiedFold</a></span> <a href="#t:Choice" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="Control-Lens-Reified.html#t:ReifiedFold">ReifiedFold</a> a b -&gt; <a href="Control-Lens-Reified.html#t:ReifiedFold">ReifiedFold</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="Control-Lens-Reified.html#t:ReifiedFold">ReifiedFold</a> a b -&gt; <a href="Control-Lens-Reified.html#t:ReifiedFold">ReifiedFold</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:3" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:3')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a></span> <a href="#t:Choice" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a> a b -&gt; <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a> a b -&gt; <a href="Control-Lens-Reified.html#t:ReifiedGetter">ReifiedGetter</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:4" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:Kleisli">Kleisli</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:Kleisli">Kleisli</a> m a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:Kleisli">Kleisli</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:Kleisli">Kleisli</a> m a b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:Kleisli">Kleisli</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:5" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:5')"></span> <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Comonad">Comonad</a> w =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Cokleisli">Cokleisli</a> w)</span></td><td class="doc"><p><code><a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#v:extract">extract</a></code> approximates <code>costrength</code></p></td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Cokleisli">Cokleisli</a> w a b -&gt; <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Cokleisli">Cokleisli</a> w (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Cokleisli">Cokleisli</a> w a b -&gt; <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Cokleisli">Cokleisli</a> w (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:6" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:6')"></span> <a href="Control-Lens-Iso.html#t:Profunctor">Profunctor</a> p =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:TambaraSum">TambaraSum</a> p)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:TambaraSum">TambaraSum</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:TambaraSum">TambaraSum</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:TambaraSum">TambaraSum</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:TambaraSum">TambaraSum</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:7" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:7')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:PastroSum">PastroSum</a> p)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:PastroSum">PastroSum</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:PastroSum">PastroSum</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:PastroSum">PastroSum</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Choice.html#t:PastroSum">PastroSum</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:8" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:8')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Tambara">Tambara</a> p)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Tambara">Tambara</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Tambara">Tambara</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Tambara">Tambara</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Tambara">Tambara</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:9" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:9')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Star">Star</a> f)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Star">Star</a> f a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Star">Star</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Star">Star</a> f a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Star">Star</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:10" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:10')"></span> <a href="Control-Lens-Traversal.html#t:Traversable">Traversable</a> w =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a> w)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a> w a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a> w (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a> w a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Costar">Costar</a> w (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:11" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:11')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Arrow.html#t:ArrowChoice">ArrowChoice</a> p =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:WrappedArrow">WrappedArrow</a> p)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:WrappedArrow">WrappedArrow</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:WrappedArrow">WrappedArrow</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:WrappedArrow">WrappedArrow</a> p a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:WrappedArrow">WrappedArrow</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:12" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:12')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> r =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Forget">Forget</a> r)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Forget">Forget</a> r a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Forget">Forget</a> r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Forget">Forget</a> r a b -&gt; <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Types.html#t:Forget">Forget</a> r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:13" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:13')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-tagged-doc/html/Data-Tagged.html#t:Tagged">Tagged</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-tagged-doc/html/Data-Tagged.html#t:Tagged">Tagged</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a b -&gt; <a href="file:///usr/share/doc/libghc-tagged-doc/html/Data-Tagged.html#t:Tagged">Tagged</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-tagged-doc/html/Data-Tagged.html#t:Tagged">Tagged</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a b -&gt; <a href="file:///usr/share/doc/libghc-tagged-doc/html/Data-Tagged.html#t:Tagged">Tagged</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:14" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:14')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i)</span> <a href="#t:Choice" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a b -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i a b -&gt; <a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:15" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:15')"></span> <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b)</span> <a href="#t:Choice" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b a b -&gt; <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b a b -&gt; <a href="Control-Lens-Internal-Prism.html#t:Market">Market</a> a b (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:16" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:16')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Joker.html#t:Joker">Joker</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:16" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Joker.html#t:Joker">Joker</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Joker.html#t:Joker">Joker</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Joker.html#t:Joker">Joker</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Joker.html#t:Joker">Joker</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:17" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:17')"></span> (<a href="Control-Lens-Prism.html#t:Choice">Choice</a> p, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> q) =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Product.html#t:Product">Product</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> p q)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Product.html#t:Product">Product</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> p q a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Product.html#t:Product">Product</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> p q (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Product.html#t:Product">Product</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> p q a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Product.html#t:Product">Product</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> p q (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Choice:Choice:18" class="instance expander" onclick="toggleSection('i:ic:Choice:Choice:18')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Lens-Prism.html#t:Choice">Choice</a> p) =&gt; <a href="Control-Lens-Prism.html#t:Choice">Choice</a> (<a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Tannen.html#t:Tannen">Tannen</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f p)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Choice:Choice:18" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:left-39-">left'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Tannen.html#t:Tannen">Tannen</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f p a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Tannen.html#t:Tannen">Tannen</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a c) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> b c) <a href="#v:left-39-" class="selflink">#</a></p><p class="src"><a href="#v:right-39-">right'</a> :: <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Tannen.html#t:Tannen">Tannen</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f p a b -&gt; <a href="file:///usr/share/doc/libghc-bifunctors-doc/html/Data-Bifunctor-Tannen.html#t:Tannen">Tannen</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> f p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> c b) <a href="#v:right-39-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>