Idea to allow people to comment on Haskell docs

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Sun Jan 29 08:28:50 EST 2006


Duncan Coutts <duncan.coutts at worc.ox.ac.uk> writes:

> On Mon, 2006-01-23 at 09:16 +0000, Simon Peyton-Jones wrote:
> > | > Adding source code links would complete the picture.
> > | 
> > | Done!
> > 
> > source code link doesn't move to the defn, presumably because there's no
> > anchor in the source file.
> > I guess that would require munging the source files to add the
> > anchors?
> 
> Right, you'd want to link to a html version with anchors. There are
> other tools that can do this. For example the Programatica project have
> an html source code browser:

I have also just added this anchoring feature to HsColour, a rather less
sophisticated (and consequently more lightweight) Haskell-to-HTML
syntax-colouriser.  It can now generate an anchor <a name=""> for every
relevant top-level definition in the source file.  This means functions,
datatypes, type synonyms, and classes (sorry, not class methods).   The
anchor is placed just before the first clause of a function definition
(rather than on its type signature), since the signature might appear at
an arbitrary distance from the definition itself.

    http://www.cs.york.ac.uk/fp/darcs/hscolour

Regards,
    Malcolm


More information about the Libraries mailing list