This file is indexed.

/usr/share/doc/libghc-diagrams-lib-doc/html/Diagrams-Util.html is in libghc-diagrams-lib-doc 0.7.1.1-1build2.

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!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>Diagrams.Util</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Diagrams-Util.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Diagrams-Util.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">diagrams-lib-0.7.1.1: Embedded domain-specific language for declarative graphics</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Maintainer</th><td>diagrams-discuss@googlegroups.com</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Diagrams.Util</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Utilities for users
</a></li><li><a href="#g:2">Internal utilities
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Some miscellaneous utilities provided by the diagrams-lib package.
</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:with">with</a> :: <a href="/usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#t:Default">Default</a> d =&gt; d</li><li class="src short"><a href="#v:applyAll">applyAll</a> ::  [a -&gt; a] -&gt; a -&gt; a</li><li class="src short"><a href="#v:-35-">(#)</a> ::  a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:iterateN">iterateN</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; (a -&gt; a) -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:tau">tau</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Floating">Floating</a> a =&gt; a</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Proxy">Proxy</a> a = <a href="#v:Proxy">Proxy</a></li><li class="src short"><a href="#v:foldB">foldB</a> ::  (a -&gt; a -&gt; a) -&gt; a -&gt; [a] -&gt; a</li></ul></div><div id="interface"><h1 id="g:1">Utilities for users
</h1><div class="top"><p class="src"><a name="v:with" class="def">with</a> :: <a href="/usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#t:Default">Default</a> d =&gt; d<a href="src/Diagrams-Util.html#with" class="link">Source</a></p><div class="doc"><p>Several functions exported by the diagrams library take a number
   of arguments giving the user control to &quot;tweak&quot; various aspects
   of their behavior.  Rather than give such functions a long list
   of arguments, and to make it possible for the user to selectively
   override only certain arguments and use default values for
   others, such sets of arguments are collected into a record with
   named fields (see <code>PolygonOpts</code> in <a href="Diagrams-TwoD-Shapes.html">Diagrams.TwoD.Shapes</a> for an
   example).  Such record types are made instances of the <code><a href="/usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#t:Default">Default</a></code>
   class, which provides a single record structure (<code><a href="/usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#v:def">def</a></code>)
   collecting the &quot;default&quot; arguments to the function.  <code>with</code> is
   a synonym for <code><a href="/usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#v:def">def</a></code>, which provides nice-looking syntax for
   simulating optional, named arguments in Haskell.  For example,
</p><pre>
   polygon with {sides = 7, edgeSkip = 2}
</pre><p>calls the <code>polygon</code> function with a single argument (note that
   record update binds more tightly than function application!),
   namely, <code><a href="Diagrams-Util.html#v:with">with</a></code> (the record of default arguments) where the
   <code>sides</code> and <code>edgeSkip</code> fields have been updated.
</p></div></div><div class="top"><p class="src"><a name="v:applyAll" class="def">applyAll</a> ::  [a -&gt; a] -&gt; a -&gt; a<a href="src/Diagrams-Util.html#applyAll" class="link">Source</a></p><div class="doc"><p><code>applyAll</code> takes a list of functions and applies them all to a
   value, in sequence from the last function in the list to the first.
   For example, <code>applyAll [f1, f2, f3] a == f1 . f2 . f3 $ a</code>.
</p></div></div><div class="top"><p class="src"><a name="v:-35-" class="def">(#)</a> ::  a -&gt; (a -&gt; b) -&gt; b<a href="src/Diagrams-Util.html#%23" class="link">Source</a></p><div class="doc"><p>Postfix function application, for conveniently applying
   attributes.  Unlike <code>($)</code>, <code>(#)</code> has a high precedence (8), so <code>d
   # foo # bar</code> can be combined with other things using operators
   like <code>(|||)</code> or <code>(&lt;&gt;)</code> without needing parentheses.
</p></div></div><div class="top"><p class="src"><a name="v:iterateN" class="def">iterateN</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; (a -&gt; a) -&gt; a -&gt; [a]<a href="src/Diagrams-Util.html#iterateN" class="link">Source</a></p><div class="doc"><p><code>iterateN n f x</code> returns the list of the first <code>n</code> iterates of
   <code>f</code> starting at <code>x</code>, that is, the list <code>[x, f x, f (f x), ...]</code>
   of length <code>n</code>. (Note that the last element of the list will be
   <code>f</code> applied to <code>x</code> <code>(n-1)</code> times.)
</p></div></div><div class="top"><p class="src"><a name="v:tau" class="def">tau</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Floating">Floating</a> a =&gt; a<a href="src/Diagrams-Util.html#tau" class="link">Source</a></p><div class="doc"><p>The circle constant, the ratio of a circle's circumference to its
   <em>radius</em>.  Note that <code>pi = tau/2</code>.
</p><p>For more information and a well-reasoned argument why we should
   all be using tau instead of pi, see <em>The Tau Manifesto</em>,
   <a href="http://tauday.com/">http://tauday.com/</a>.
</p><p>To hear what it sounds like (and to easily memorize the first 30
   digits or so), try <a href="http://youtu.be/3174T-3-59Q">http://youtu.be/3174T-3-59Q</a>.
</p></div></div><h1 id="g:2">Internal utilities
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Proxy" class="def">Proxy</a> a <a href="src/Diagrams-Util.html#Proxy" class="link">Source</a></p><div class="doc"><p>A value of <code>Proxy a</code> carries no information; it's used only to
   fix the type <code>a</code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Proxy" class="def">Proxy</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:foldB" class="def">foldB</a> ::  (a -&gt; a -&gt; a) -&gt; a -&gt; [a] -&gt; a<a href="src/Diagrams-Util.html#foldB" class="link">Source</a></p><div class="doc"><p>Given an associative binary operation and a default value to use
   in the case of an empty list, perform a <em>balanced</em> fold over a
   list.  For example,
</p><pre>
   foldB (+) z [a,b,c,d,e,f] == ((a+b) + (c+d)) + (e+f)
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>