
Neil Mitchell wrote:
Hi
| I think what is really needed is for Haddock to have some kind of | "show source" link that shows the source for a function inline in the | documentation without opening a new page. Often the best documentation | for a function is its definition.
I believe that Simon M has already implemented exactly that. I'm not sure whether it takes extra flags or what.
He has implemented something similar, see http://www-users.cs.york.ac.uk/~ndm/projects/filepath/System-FilePath-Versio...
for an example - click on the source link and it hops to the right place (using HsColour to colourise and tag the source file).
Much as I'd like to take the credit, it was Duncan Coutts who implemented that feature :)
I was more thinking of an "AJAX style" thing where the documentation appears in the same page, rather than linking to a separate page which contains it.
That would certainly be neat. Maybe it could be implemented in Haskell using YHC's JavaScript backend? (half-joking...) AJAX requires a server, and the nice thing about Haddock documentation is you can view it with file:// URLs. Maybe there's a way around this though, I'm not an AJAX expert. Cheers, Simon