/usr/share/doc/libghc-lens-doc/html/Control-Lens-Equality.html is in libghc-lens-doc 4.15.4-1.
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 | <!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.Equality</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-Equality.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Equality.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.15.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">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 <ekmett@gmail.com></td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Lens.Equality</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Type Equality</a></li><li><a href="#g:2">The Trivial Equality</a></li><li><a href="#g:3">Implementation Details</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </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:Equality">Equality</a> s t a b = <span class="keyword">forall</span> k3 p f. p a (f b) -> p s (f t)</li><li class="src short"><span class="keyword">type</span> <a href="#t:Equality-39-">Equality'</a> s a = <a href="Control-Lens-Equality.html#t:Equality">Equality</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:AnEquality">AnEquality</a> s t a b = <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) -> <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) s (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> t)</li><li class="src short"><span class="keyword">type</span> <a href="#t:AnEquality-39-">AnEquality'</a> s a = <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s s a a</li><li class="src short"><a href="#v:runEq">runEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> <a href="Control-Lens-Equality.html#t:Identical">Identical</a> s t a b</li><li class="src short"><a href="#v:substEq">substEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> ((s ~ a, t ~ b) => r) -> r</li><li class="src short"><a href="#v:mapEq">mapEq</a> :: <span class="keyword">forall</span> s t a b f. <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> f s -> f a</li><li class="src short"><a href="#v:fromEq">fromEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> <a href="Control-Lens-Equality.html#t:Equality">Equality</a> b a t s</li><li class="src short"><a href="#v:simply">simply</a> :: (<a href="Control-Lens-Type.html#t:Optic-39-">Optic'</a> p f s a -> r) -> <a href="Control-Lens-Type.html#t:Optic-39-">Optic'</a> p f s a -> r</li><li class="src short"><a href="#v:simple">simple</a> :: <a href="Control-Lens-Equality.html#t:Equality-39-">Equality'</a> a a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Identical">Identical</a> a b s t <span class="keyword">where</span><ul class="subs"><li><a href="#v:Identical">Identical</a> :: <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a b a b</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Type Equality</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Equality" class="def">Equality</a> s t a b = <span class="keyword">forall</span> k3 p f. p a (f b) -> p s (f t) <a href="src/Control-Lens-Type.html#Equality" class="link">Source</a> <a href="#t:Equality" class="selflink">#</a></p><div class="doc"><p>A witness that <code>(a ~ s, b ~ t)</code>.</p><p>Note: Composition with an <code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code> is index-preserving.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Equality-39-" class="def">Equality'</a> s a = <a href="Control-Lens-Equality.html#t:Equality">Equality</a> s s a a <a href="src/Control-Lens-Type.html#Equality%27" class="link">Source</a> <a href="#t:Equality-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-Equality.html#t:Equality">Equality</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AnEquality" class="def">AnEquality</a> s t a b = <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) -> <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> b) s (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Proxy.html#t:Proxy">Proxy</a> t) <a href="src/Control-Lens-Equality.html#AnEquality" class="link">Source</a> <a href="#t:AnEquality" class="selflink">#</a></p><div class="doc"><p>When you see this as an argument to a function, it expects an <code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AnEquality-39-" class="def">AnEquality'</a> s a = <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s s a a <a href="src/Control-Lens-Equality.html#AnEquality%27" class="link">Source</a> <a href="#t:AnEquality-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-Equality.html#t:AnEquality">AnEquality</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:runEq" class="def">runEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> <a href="Control-Lens-Equality.html#t:Identical">Identical</a> s t a b <a href="src/Control-Lens-Equality.html#runEq" class="link">Source</a> <a href="#v:runEq" class="selflink">#</a></p><div class="doc"><p>Extract a witness of type <code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:substEq" class="def">substEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> ((s ~ a, t ~ b) => r) -> r <a href="src/Control-Lens-Equality.html#substEq" class="link">Source</a> <a href="#v:substEq" class="selflink">#</a></p><div class="doc"><p>Substituting types with <code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:mapEq" class="def">mapEq</a> :: <span class="keyword">forall</span> s t a b f. <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> f s -> f a <a href="src/Control-Lens-Equality.html#mapEq" class="link">Source</a> <a href="#v:mapEq" class="selflink">#</a></p><div class="doc"><p>We can use <code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code> to do substitution into anything.</p></div></div><div class="top"><p class="src"><a id="v:fromEq" class="def">fromEq</a> :: <a href="Control-Lens-Equality.html#t:AnEquality">AnEquality</a> s t a b -> <a href="Control-Lens-Equality.html#t:Equality">Equality</a> b a t s <a href="src/Control-Lens-Equality.html#fromEq" class="link">Source</a> <a href="#v:fromEq" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Lens-Equality.html#t:Equality">Equality</a></code> is symmetric.</p></div></div><div class="top"><p class="src"><a id="v:simply" class="def">simply</a> :: (<a href="Control-Lens-Type.html#t:Optic-39-">Optic'</a> p f s a -> r) -> <a href="Control-Lens-Type.html#t:Optic-39-">Optic'</a> p f s a -> r <a href="src/Control-Lens-Equality.html#simply" class="link">Source</a> <a href="#v:simply" class="selflink">#</a></p><div class="doc"><p>This is an adverb that can be used to modify many other <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code> combinators to make them require
simple lenses, simple traversals, simple prisms or simple isos as input.</p></div></div><h1 id="g:2">The Trivial Equality</h1><div class="top"><p class="src"><a id="v:simple" class="def">simple</a> :: <a href="Control-Lens-Equality.html#t:Equality-39-">Equality'</a> a a <a href="src/Control-Lens-Equality.html#simple" class="link">Source</a> <a href="#v:simple" class="selflink">#</a></p><div class="doc"><p>Composition with this isomorphism is occasionally useful when your <code><a href="Control-Lens-Type.html#t:Lens">Lens</a></code>,
<code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> or <code><a href="Control-Lens-Type.html#t:Iso">Iso</a></code> has a constraint on an unused
argument to force that argument to agree with the
type of a used argument and avoid <code>ScopedTypeVariables</code> or other ugliness.</p></div></div><h1 id="g:3">Implementation Details</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Identical" class="def">Identical</a> a b s t <span class="keyword">where</span> <a href="src/Control-Lens-Equality.html#Identical" class="link">Source</a> <a href="#t:Identical" class="selflink">#</a></p><div class="doc"><p>Provides witness that <code>(s ~ a, b ~ t)</code> holds.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Identical" class="def">Identical</a> :: <a href="Control-Lens-Equality.html#t:Identical">Identical</a> a b a b</td><td class="doc empty"> </td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|