/usr/share/doc/libghc-lens-doc/html/Control-Lens-Internal-PrismTH.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 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 | <!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.Internal.PrismTH</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-Internal-PrismTH.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Internal-PrismTH.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) 2014-2016 Edward Kmett and Eric Mertens</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>experimental</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.Internal.PrismTH</p></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"><a href="#v:makePrisms">makePrisms</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></li><li class="src short"><a href="#v:makeClassyPrisms">makeClassyPrisms</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></li><li class="src short"><a href="#v:makeDecPrisms">makeDecPrisms</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:makePrisms" class="def">makePrisms</a> <a href="src/Control-Lens-Internal-PrismTH.html#makePrisms" class="link">Source</a> <a href="#v:makePrisms" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a></td><td class="doc"><p>Type constructor name </p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generate a <code>Prism</code> for each constructor of a data type.
Isos generated when possible.
Reviews are created for constructors with existentially
quantified constructors and GADTs.</p><p><em>e.g.</em></p><pre>data FooBarBaz a
= Foo Int
| Bar a
| Baz Int Char
makePrisms ''FooBarBaz
</pre><p>will create</p><pre>_Foo :: Prism' (FooBarBaz a) Int
_Bar :: Prism (FooBarBaz a) (FooBarBaz b) a b
_Baz :: Prism' (FooBarBaz a) (Int, Char)
</pre></div></div><div class="top"><p class="src"><a id="v:makeClassyPrisms" class="def">makeClassyPrisms</a> <a href="src/Control-Lens-Internal-PrismTH.html#makeClassyPrisms" class="link">Source</a> <a href="#v:makeClassyPrisms" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a></td><td class="doc"><p>Type constructor name </p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generate a <code>Prism</code> for each constructor of a data type
and combine them into a single class. No Isos are created.
Reviews are created for constructors with existentially
quantified constructors and GADTs.</p><p><em>e.g.</em></p><pre>data FooBarBaz a
= Foo Int
| Bar a
| Baz Int Char
makeClassyPrisms ''FooBarBaz
</pre><p>will create</p><pre>class AsFooBarBaz s a | s -> a where
_FooBarBaz :: Prism' s (FooBarBaz a)
_Foo :: Prism' s Int
_Bar :: Prism' s a
_Baz :: Prism' s (Int,Char)
_Foo = _FooBarBaz . _Foo
_Bar = _FooBarBaz . _Bar
_Baz = _FooBarBaz . _Baz
instance AsFooBarBaz (FooBarBaz a) a
</pre><p>Generate an <a href="As.html">As</a> class of prisms. Names are selected by prefixing the constructor
name with an underscore. Constructors with multiple fields will
construct Prisms to tuples of those fields.</p></div></div><div class="top"><p class="src"><a id="v:makeDecPrisms" class="def">makeDecPrisms</a> <a href="src/Control-Lens-Internal-PrismTH.html#makeDecPrisms" class="link">Source</a> <a href="#v:makeDecPrisms" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>generate top-level definitions </p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Lib.html#t:DecsQ">DecsQ</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generate prisms for the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.1.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a></code></p></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>
|