[Haskell-cafe] Poor libraries documentation

Neil Mitchell ndmitchell at gmail.com
Wed Jan 30 07:36:33 EST 2008


Hi,

I went looking for the the function in Haskell to calculate cos^{-1},
inverse cosine. Unfortunately, the poor documentation in the libraries
hampered my attempts. The documentation for the trig functions in
Haskell is completely non-existent:

http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3Acos

For a start, its probably a good idea to mention that cos is an
abbreviation of cosine (most people will know, but its handy to state
it). Secondly, and much more importantly, it should state whether
these measurements are in degrees or radians. It should also state
things like acos is the inverse of cos - its been a while since I last
used trig and I had to look it up!!!

We are also lacking documentation for things like odd/even, which are
obvious enough, but its nice to say that they meet the intuition.
Could haddock be extended to give a warning message (in -Wall mode
perhaps) when an exported function has no comment associated with it?

This would be a really nice project for someone to take on, and very
much appreciated :-)

Thanks

Neil


More information about the Haskell-Cafe mailing list