[GHC] #3680: Improve docs for 'length'
GHC
trac at galois.com
Sun Nov 22 15:07:27 EST 2009
#3680: Improve docs for 'length'
----------------------------------+-----------------------------------------
Reporter: daniel.is.fischer | Owner:
Type: feature request | Status: new
Priority: normal | Component: libraries/base
Version: 6.10.4 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: Documentation bug
----------------------------------+-----------------------------------------
The haddock docs for 'length' and 'genericLength' give no indication of
their complexity. This leads to many inadvertent uses of 'length', causing
poor performance.
To reduce the number of those cases, I suggest inserting the complexity
(/O(n)/) into the haddock docs, perhaps even a warning to the effect of
"use only if you really want to know the length".
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3680>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list