[darcs-users] darcs patch: haddock documentation for Hopefully

David Roundy droundy at darcs.net
Fri Oct 10 14:56:53 UTC 2008


On Fri, Oct 10, 2008 at 03:21:11PM +0200, florent.becker at ens-lyon.org wrote:
> Resending my description of Hopefully, which seems to have
> been lost.
> 
> Wed Oct  1 10:13:15 CEST 2008  florent.becker at ens-lyon.org
>   * haddock documentation for Hopefully

Applied, thanks!

It'd be great, by the way, if you took the opportunity while making
these haddock docs to check whether some of these functions are ever
used, and propose cutting them if they aren't.  In this case, there
were a whole slew of unused monad-like functions, and the constructor
of Hopefully was also incorrectly exported.  Removing exports not only
makes our code more comprehensible, but also makes it more efficient,
since the compiler is free to make extra optimizations on non-exported
functions (e.g. inlining without creating a non-inlined version for
export).

On the other hand, this is a fair amount of work... but on the plus
side it can save you the trouble of documenting unused and useless
functions that might be a bit confusing.  Tracking down the uses of
functions also enables you to get some use as to what their purpose
is--it's one of the standard techniques I use when trying to figure
out what a function does that I am unfamiliar with, and since I've
written probably less than half of darcs' source code myself, it's not
uncommon that I do this.

David


More information about the darcs-users mailing list