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

Luke Palmer lrpalmer at gmail.com
Mon Jun 14 19:35:16 EDT 2010

On Mon, Jun 14, 2010 at 2:02 AM, Jean-Marie Gaillourdet
<jmg at gaillourdet.net> wrote:
> Hello,
> 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.

If you go this route, I will shamelessly promote hothasktags instead
of ghci.  It generates proper tags for qualified imports.

> * SourceGraph, it generates an HTML report of a cabal projekt or of any source tree. IMHO, great to get the overall picture.
> Regards,
> Jean-Marie
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list