This file is indexed.

/usr/share/doc/libghc-deriving-compat-doc/html/Data-Foldable-Deriving.html is in libghc-deriving-compat-doc 0.3.4-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
<!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>Data.Foldable.Deriving</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_Data-Foldable-Deriving.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Foldable-Deriving.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">deriving-compat-0.3.4: Backports of GHC deriving extensions</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(C) 2015-2016 Ryan Scott</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Ryan Scott</td></tr><tr><th>Portability</th><td>Template Haskell</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Data.Foldable.Deriving</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1"><code>Foldable</code></a></li><li><a href="#g:2"><code>deriveFoldable</code> limitations</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Exports functions to mechanically derive <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instances in a way that mimics
how the <code>-XDeriveFoldable</code> extension works since GHC 8.0.</p><p>These changes make it possible to derive <code>Foldable</code> instances for data types with
existential constraints, e.g.,</p><pre>data WrappedSet a where
    WrapSet :: Ord a =&gt; a -&gt; WrappedSet a

deriving instance Foldable WrappedSet -- On GHC 8.0  on later
$(deriveFoldable ''WrappedSet)        -- On GHC 7.10 and earlier
</pre><p>In addition, derived <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instances from this module do not generate
superfluous <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#v:mempty">mempty</a></code> expressions in its implementation of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:foldMap">foldMap</a></code>. One can
verify this by compiling a module that uses <code><a href="Data-Foldable-Deriving.html#v:deriveFoldable">deriveFoldable</a></code> with the
<code>-ddump-splices</code> GHC flag.</p><p>For more info on these changes, see
<a href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DeriveFunctor">this GHC wiki page</a>.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:deriveFoldable">deriveFoldable</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>]</li><li class="src short"><a href="#v:makeFoldMap">makeFoldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a></li><li class="src short"><a href="#v:makeFoldr">makeFoldr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a></li><li class="src short"><a href="#v:makeFold">makeFold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a></li><li class="src short"><a href="#v:makeFoldl">makeFoldl</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a></li></ul></div><div id="interface"><h1 id="g:1"><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code></h1><div class="top"><p class="src"><a id="v:deriveFoldable" class="def">deriveFoldable</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Dec">Dec</a>] <a href="src/Data-Functor-Deriving-Internal.html#deriveFoldable" class="link">Source</a> <a href="#v:deriveFoldable" class="selflink">#</a></p><div class="doc"><p>Generates a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instance declaration for the given data type or data
 family instance.</p></div></div><div class="top"><p class="src"><a id="v:makeFoldMap" class="def">makeFoldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a> <a href="src/Data-Functor-Deriving-Internal.html#makeFoldMap" class="link">Source</a> <a href="#v:makeFoldMap" class="selflink">#</a></p><div class="doc"><p>Generates a lambda expression which behaves like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:foldMap">foldMap</a></code> (without requiring a
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeFoldr" class="def">makeFoldr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a> <a href="src/Data-Functor-Deriving-Internal.html#makeFoldr" class="link">Source</a> <a href="#v:makeFoldr" class="selflink">#</a></p><div class="doc"><p>Generates a lambda expression which behaves like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:foldr">foldr</a></code> (without requiring a
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeFold" class="def">makeFold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a> <a href="src/Data-Functor-Deriving-Internal.html#makeFold" class="link">Source</a> <a href="#v:makeFold" class="selflink">#</a></p><div class="doc"><p>Generates a lambda expression which behaves like <code>fold</code> (without requiring a
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeFoldl" class="def">makeFoldl</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Name">Name</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Q">Q</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/template-haskell-2.11.0.0/Language-Haskell-TH-Syntax.html#t:Exp">Exp</a> <a href="src/Data-Functor-Deriving-Internal.html#makeFoldl" class="link">Source</a> <a href="#v:makeFoldl" class="selflink">#</a></p><div class="doc"><p>Generates a lambda expression which behaves like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#v:foldl">foldl</a></code> (without requiring a
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> instance).</p></div></div><h1 id="g:2"><code><a href="Data-Foldable-Deriving.html#v:deriveFoldable">deriveFoldable</a></code> limitations</h1><div class="doc"><p>Be aware of the following potential gotchas:</p><ul><li>If you are using the <code>-XGADTs</code> or <code>-XExistentialQuantification</code> extensions, an
  existential constraint cannot mention the last type variable. For example,
  <code>data Illegal a = forall a. Show a =&gt; Illegal a</code> cannot have a derived
  <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a></code> instance.</li><li>Type variables of kind <code>* -&gt; *</code> are assumed to have <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a></code> constraints.
  If this is not desirable, use <code><a href="Data-Foldable-Deriving.html#v:makeFoldr">makeFoldr</a></code> or <code><a href="Data-Foldable-Deriving.html#v:makeFoldMap">makeFoldMap</a></code>.</li></ul></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>