George Russell <[EMAIL PROTECTED]> wrote,
> Frank Atanassow wrote:
> > What do you all think?
> Well I suppose that includes me, but I'm a bit confused.
> I've looked at some of the .lhs files containing the
> source of GHC, but the so-called literate nature of the
> code doesn't seem to me to make it any better.
> Specifically, it doesn't do anything that comment
> characters can't do. So could someone explain what
> exactly literate programming for Haskell is intended to
> achieve? The only thing I really miss in .hs files which
> is done by Knuth's Web (in "TeX the program") are indices
> for each module indicating where the values and types it
> uses come from, and where the values and types it defines
> are used.
I think, I am agreeing with you.
* It doesn't seem that the use of literate Haskell does
motivate the programmers of these modules to put a
significant amount of comments into the code.
* Sizeable programs like ghc tend not to get printed very
often, I guess.
* So, most of the time people look at the source in their
editors. And all the literate conventions do there is
messing up the colour schemes used by various editors to
make programs more readable.
Overall, I have yet to see a serious Haskell program (I mean
a real application, not teaching material and such) that
uses any of the literate schemes to a positive effect.
IMHO it would be much more important to think about a
mechanism for automatically extracting all the interface
information (including the interface comments) from a
Haskell module. Something like an automatically generated
Modula-2 definition module that defines and explains the
interface without forcing the reader to wade through the
implementation.
Cheers,
Manuel