[Haskell-cafe] How to browse code written by others

Jean-Marie Gaillourdet jmg at gaillourdet.net
Mon Jun 14 04:02:23 EDT 2010


On 13.06.2010, at 22:32, Martin Drautzburg wrote:

> I need your advice about how to browse code which was written by someone else 
> (Paul Hudak's Euterpea, to be precise, apx. 10000 LOC). I had set some hopes 
> on leksah, and it indeed shows me the interfaces, but I have not yet 
> convinced it to show me more than that.
> I ran haddock over the sources, and again I could not see more that just 
> signatures.
> I would be very happy with something like a Smalltalk browser. Something that 
> would let me zoom down to the source code, but with "search" and hyperlink 
> capabilities ("senders" and "implementers" in Smalltalk).
> Anyways, how do you guys do it, i.e. how to you dive into non-trivial foreign 
> code?

I use the following tools:

* haddock generated docs with hyperlinked sources
* MacVim (or just vim) with Claus Reinke's haskellmode-vim, see: http://projects.haskell.org/haskellmode-vim/index.html
  Have a look at the screencasts to see documentation lookup, and code navigation: http://projects.haskell.org/haskellmode-vim/screencasts.html
  Make sure you know how to use tags inside of vim. ghci is able to generate the tagsfiles for you. This allows you to jump to definitions of   identifiers.
* SourceGraph, it generates an HTML report of a cabal projekt or of any source tree. IMHO, great to get the overall picture.


More information about the Haskell-Cafe mailing list