[Haskell-cafe] Poor libraries documentation

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


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:


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 :-)



More information about the Haskell-Cafe mailing list