[GHC] #3465: Documentation for init in Prelude requires finite list

GHC trac at galois.com
Thu Aug 27 05:07:14 EDT 2009


#3465: Documentation for init in Prelude requires finite list
-----------------------------+----------------------------------------------
Reporter:  MaxRabkin         |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Documentation   
 Version:  6.10.4            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 The documentation for the init function at
 http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:init
 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).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3465>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list