GHC: Ticket #3465: Documentation for init in Prelude requires finite list
http://ghc.haskell.org/trac/ghc/ticket/3465
<p>
The documentation for the init function at <a class="ext-link" href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:init"><span class="icon"></span>http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:init</a> says that the argument to init must be finite. However, any implementation which actually makes use of this assumption is needlessly strict, so I don't see any reason to document the restriction finite lists. Instead, for infinite xs, it should be the case that init xs == xs (and this is what the current implementation does).
</p>
en-usGHChttp://ghc.haskell.org/trac/ghc/chrome/site/ghc_logo.png
http://ghc.haskell.org/trac/ghc/ticket/3465
Trac 1.0.9iglooFri, 11 Sep 2009 21:56:54 GMTstatus changed; difficulty, resolution set
http://ghc.haskell.org/trac/ghc/ticket/3465#comment:1
http://ghc.haskell.org/trac/ghc/ticket/3465#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>difficulty</strong>
set to <em>Unknown</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
</ul>
<p>
Thanks for the report; I've fixed the docs in the HEAD.
</p>
Ticket