/usr/share/doc/libghc-deriving-compat-doc/html/Data-Traversable-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 | <!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.Traversable.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-Traversable-Deriving.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Traversable-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.Traversable.Deriving</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1"><code>Traversable</code></a></li><li><a href="#g:2"><code>deriveTraversable</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-Traversable.html#t:Traversable">Traversable</a></code> instances in a way that mimics
how the <code>-XDeriveTraversable</code> extension works since GHC 8.0.</p><p>Derived <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</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/Control-Applicative.html#v:pure">pure</a></code> expressions in its implementation of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#v:traverse">traverse</a></code>. One can
verify this by compiling a module that uses <code><a href="Data-Traversable-Deriving.html#v:deriveTraversable">deriveTraversable</a></code> with the
<code>-ddump-splices</code> GHC flag.</p><p>These changes make it possible to derive <code>Traversable</code> instances for data types with
unlifted argument types, e.g.,</p><pre>data IntHash a = IntHash Int# a
deriving instance Traversable IntHash -- On GHC 8.0 on later
$(deriveTraversable ''IntHash) -- On GHC 7.10 and earlier
</pre><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:deriveTraversable">deriveTraversable</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> -> <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:makeTraverse">makeTraverse</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> -> <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:makeSequenceA">makeSequenceA</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> -> <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:makeMapM">makeMapM</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> -> <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:makeSequence">makeSequence</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> -> <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-Traversable.html#t:Traversable">Traversable</a></code></h1><div class="top"><p class="src"><a id="v:deriveTraversable" class="def">deriveTraversable</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> -> <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#deriveTraversable" class="link">Source</a> <a href="#v:deriveTraversable" 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-Traversable.html#t:Traversable">Traversable</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:makeTraverse" class="def">makeTraverse</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> -> <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#makeTraverse" class="link">Source</a> <a href="#v:makeTraverse" 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-Traversable.html#v:traverse">traverse</a></code> (without requiring a
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeSequenceA" class="def">makeSequenceA</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> -> <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#makeSequenceA" class="link">Source</a> <a href="#v:makeSequenceA" 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-Traversable.html#v:sequenceA">sequenceA</a></code> (without requiring a
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeMapM" class="def">makeMapM</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> -> <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#makeMapM" class="link">Source</a> <a href="#v:makeMapM" 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-Traversable.html#v:mapM">mapM</a></code> (without requiring a
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> instance).</p></div></div><div class="top"><p class="src"><a id="v:makeSequence" class="def">makeSequence</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> -> <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#makeSequence" class="link">Source</a> <a href="#v:makeSequence" 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-Traversable.html#v:sequence">sequence</a></code> (without requiring a
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> instance).</p></div></div><h1 id="g:2"><code><a href="Data-Traversable-Deriving.html#v:deriveTraversable">deriveTraversable</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 => Illegal a</code> cannot have a derived
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> instance.</li><li>Type variables of kind <code>* -> *</code> are assumed to have <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a></code> constraints.
If this is not desirable, use <code><a href="Data-Traversable-Deriving.html#v:makeTraverse">makeTraverse</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>
|