/usr/share/doc/libghc-utility-ht-doc/html/Data-Tuple-HT.html is in libghc-utility-ht-doc 0.0.14-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 | <!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.Tuple.HT</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-Tuple-HT.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Tuple-HT.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">utility-ht-0.0.14: Various small helper functions for Lists, Maybes, Tuples, Functions</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Tuple.HT</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Pair</a></li><li><a href="#g:2">Triple</a></li></ul></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:mapPair">mapPair</a> :: (a -> c, b -> d) -> (a, b) -> (c, d)</li><li class="src short"><a href="#v:mapFst">mapFst</a> :: (a -> c) -> (a, b) -> (c, b)</li><li class="src short"><a href="#v:mapSnd">mapSnd</a> :: (b -> c) -> (a, b) -> (a, c)</li><li class="src short"><a href="#v:swap">swap</a> :: (a, b) -> (b, a)</li><li class="src short"><a href="#v:sortPair">sortPair</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => (a, a) -> (a, a)</li><li class="src short"><a href="#v:forcePair">forcePair</a> :: (a, b) -> (a, b)</li><li class="src short"><a href="#v:double">double</a> :: a -> (a, a)</li><li class="src short"><a href="#v:fst3">fst3</a> :: (a, b, c) -> a</li><li class="src short"><a href="#v:snd3">snd3</a> :: (a, b, c) -> b</li><li class="src short"><a href="#v:thd3">thd3</a> :: (a, b, c) -> c</li><li class="src short"><a href="#v:mapTriple">mapTriple</a> :: (a -> d, b -> e, c -> f) -> (a, b, c) -> (d, e, f)</li><li class="src short"><a href="#v:mapFst3">mapFst3</a> :: (a -> d) -> (a, b, c) -> (d, b, c)</li><li class="src short"><a href="#v:mapSnd3">mapSnd3</a> :: (b -> d) -> (a, b, c) -> (a, d, c)</li><li class="src short"><a href="#v:mapThd3">mapThd3</a> :: (c -> d) -> (a, b, c) -> (a, b, d)</li><li class="src short"><a href="#v:curry3">curry3</a> :: ((a, b, c) -> d) -> a -> b -> c -> d</li><li class="src short"><a href="#v:uncurry3">uncurry3</a> :: (a -> b -> c -> d) -> (a, b, c) -> d</li><li class="src short"><a href="#v:triple">triple</a> :: a -> (a, a, a)</li></ul></div><div id="interface"><h1 id="g:1">Pair</h1><div class="top"><p class="src"><a id="v:mapPair" class="def">mapPair</a> :: (a -> c, b -> d) -> (a, b) -> (c, d) <a href="src/Data-Tuple-Lazy.html#mapPair" class="link">Source</a> <a href="#v:mapPair" class="selflink">#</a></p><div class="doc"><p>Cf. '(Control.Arrow.***)'.</p><p>Apply two functions on corresponding values in a pair,
where the pattern match on the pair constructor is lazy.
This is crucial in recursions such as the one of <code>partition</code>.
One the other hand there are applications
where strict application is crucial,
e.g. <code>mapSnd f ab</code> where the left pair member is a large lazy list.
With the lazy <code>mapSnd</code> we make the application of <code>f</code> depend on the whole pair <code>ab</code>.
See <a href="Data-Tuple-Example.html">Data.Tuple.Example</a> for two examples
where one variant is definitely better than the other one.</p></div></div><div class="top"><p class="src"><a id="v:mapFst" class="def">mapFst</a> :: (a -> c) -> (a, b) -> (c, b) <a href="src/Data-Tuple-Lazy.html#mapFst" class="link">Source</a> <a href="#v:mapFst" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Arrow.html#v:first">first</a></code></p></div></div><div class="top"><p class="src"><a id="v:mapSnd" class="def">mapSnd</a> :: (b -> c) -> (a, b) -> (a, c) <a href="src/Data-Tuple-Lazy.html#mapSnd" class="link">Source</a> <a href="#v:mapSnd" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Arrow.html#v:second">second</a></code></p></div></div><div class="top"><p class="src"><a id="v:swap" class="def">swap</a> :: (a, b) -> (b, a) <a href="src/Data-Tuple-Lazy.html#swap" class="link">Source</a> <a href="#v:swap" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:sortPair" class="def">sortPair</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => (a, a) -> (a, a) <a href="src/Data-Tuple-HT.html#sortPair" class="link">Source</a> <a href="#v:sortPair" class="selflink">#</a></p><div class="doc"><p>This is convenient for quick hacks
but I suggest that you better define a type for an ordered pair
for your application at hand.
This way, you can clearly see from the type that a pair is ordered.</p></div></div><div class="top"><p class="src"><a id="v:forcePair" class="def">forcePair</a> :: (a, b) -> (a, b) <a href="src/Data-Tuple-Lazy.html#forcePair" class="link">Source</a> <a href="#v:forcePair" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:double" class="def">double</a> :: a -> (a, a) <a href="src/Data-Tuple-HT.html#double" class="link">Source</a> <a href="#v:double" class="selflink">#</a></p></div><h1 id="g:2">Triple</h1><div class="top"><p class="src"><a id="v:fst3" class="def">fst3</a> :: (a, b, c) -> a <a href="src/Data-Tuple-HT.html#fst3" class="link">Source</a> <a href="#v:fst3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:snd3" class="def">snd3</a> :: (a, b, c) -> b <a href="src/Data-Tuple-HT.html#snd3" class="link">Source</a> <a href="#v:snd3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:thd3" class="def">thd3</a> :: (a, b, c) -> c <a href="src/Data-Tuple-HT.html#thd3" class="link">Source</a> <a href="#v:thd3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mapTriple" class="def">mapTriple</a> :: (a -> d, b -> e, c -> f) -> (a, b, c) -> (d, e, f) <a href="src/Data-Tuple-Lazy.html#mapTriple" class="link">Source</a> <a href="#v:mapTriple" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mapFst3" class="def">mapFst3</a> :: (a -> d) -> (a, b, c) -> (d, b, c) <a href="src/Data-Tuple-Lazy.html#mapFst3" class="link">Source</a> <a href="#v:mapFst3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mapSnd3" class="def">mapSnd3</a> :: (b -> d) -> (a, b, c) -> (a, d, c) <a href="src/Data-Tuple-Lazy.html#mapSnd3" class="link">Source</a> <a href="#v:mapSnd3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:mapThd3" class="def">mapThd3</a> :: (c -> d) -> (a, b, c) -> (a, b, d) <a href="src/Data-Tuple-Lazy.html#mapThd3" class="link">Source</a> <a href="#v:mapThd3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:curry3" class="def">curry3</a> :: ((a, b, c) -> d) -> a -> b -> c -> d <a href="src/Data-Tuple-HT.html#curry3" class="link">Source</a> <a href="#v:curry3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:uncurry3" class="def">uncurry3</a> :: (a -> b -> c -> d) -> (a, b, c) -> d <a href="src/Data-Tuple-Lazy.html#uncurry3" class="link">Source</a> <a href="#v:uncurry3" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:triple" class="def">triple</a> :: a -> (a, a, a) <a href="src/Data-Tuple-HT.html#triple" class="link">Source</a> <a href="#v:triple" class="selflink">#</a></p></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>
|