Super Haddock (was Re: Literate Programming)

Andy Moran
Wed, 23 Apr 2003 11:26:09 -0700

On Wednesday 23 April 2003 10:41 am, Steffen Mazanek wrote:

> Hello.
> Simon Marlow wrote:
> >I don't think that's entirely fair.  Most of the libraries that come
> >with GHC (and Hugs, and soon Nhc) are documented.  See for example
> >
> >
> As far as I know (please correct me, if I err) one shortcoming of
> Haddock is its restriction to .hs-files.

This seems like a good way of transitioning from .lhs to haddock'd .hs.  In 
the long run, I think we (meaning Simon :-) should to extend haddock to 
take the place of the .lhs style of documenting code.

I use haddock to document interfaces for modules and it works wonderfully 
for that (and it would be even better if I could use haddock comments 
inside records and in between constructor arguments, hint, hint).

But I find myself using it in comments within code (especially within local 
functions) too.  Perhaps a haddock that had two modes (one for interfaces, 
one for implementation) would work.  The interface mode would work as it 
does now.  The implementation mode would produce a .html version of the 
entire module, using haddock comments to mark it up.

Simon: how much work would this be?


Andy Moran                                              Ph.  (503) 526 3472
Galois Connections Inc.                                 Fax. (503) 350 0833
3875 SW Hall Blvd.                          
Beaverton, OR 97005