Hello,

I have written a small program, HDoc, which can generate
HTML documents from specially annoted Haskell sources;
currently it is possible to document functions, data types,
classes and instances. The resulting documents are cross
linked and - IMHO - they look pretty nice. So, HDoc
does pretty the same job as javadoc does for Java.

Currently, _all_ the information is taken from special
comments, i.e. the Haskell code is simply ignored (I
found that it is very difficult (compared to Java) to
extract the necessary information from Haskell code.

Here's an example of what the special comments
for a function can look like (I admit, it looks a bit like
javadoc...)

{---
 @fun square :: Integer -> Integer  !  Squares an integer.
 The number is multiplied by itself and the result is
  returned.

 @param x :: Integer    ! the number to be squared.
 @return res :: Integer ! the input number squared.
-}
square x = x * x

----------------------

HDoc is not complete or ready for daily use; I'm looking for
some feedback/ideas etc. HDoc runs on Hugs98 and GHC 4.08
(other compilers may work, but I haven't tried).

You can get HDoc from its homepage at
http://www.fmi.uni-passau.de/~groessli/hdoc/

An example of HDoc's output (for three very simple
modules) can be viewed at
http://www.fmi.uni-passau.de/~groessli/hdoc/examples/simple/docs/


Please note again: HDoc is in a very early stage (it'll
get a re-write soon to reflect some experiences from the
first version). The main reason for announcing HDoc at this
time is that I definitely need some feedback on how useful
HDoc is or can eventually be and what concepts it should
follow etc.

So if you're interested, please give HDoc a try and send me
your ideas/suggestions/etc.

I'm looking forward to receiving your comments!


Cheers,

     Armin

 



Reply via email to