[Haskell-cafe] Re: Call Graph Tool?

Claus Reinke claus.reinke at talk21.com
Fri Jun 27 06:39:45 EDT 2008

>> Assuming I get it included, is there any features in particular you'd want to
>> see in there?  Note that if I do have it produce visualisations, they'll be
>> static images as part of an analysis report rather than being interactive.
> I'd like the ability to show individual module dependencies, and then
> to collapse modules in one package to just the package, so I could
> "zoom out" and see how the packages relate to each other.  By
> "package" here I mean the "A" in "A.B, A.C, etc."
> It seems like it would be fairly simple to use Language.Haskell.Parse
> to turn a set of modules into a graph, and then something to massage
> that and give it to dot.

If you wanted to go down that route, try using 'ghc --make -v2'
and translate that dependency graph to dot.

It isn't difficult to produce visualizations (though gathering the
data might be - proper dependency analysis in Haskell projects 
has rated a GSoC project this year, for Cabal). It is difficult 
to produce *useful* visualizations that *scale* to realistic 
projects. To begin with, it helps to see the visualization
as *input* for software development decisions, not as
pretty output for some data traversal.

However, the problem is far from new, and it is perhaps 
not unreasonable to assume that most papers in the area
are going to reference this one (so you could start with a 
reverse reference search, then try to separate the gimmicks
from the potentially useful approaches..):

    Thomas A. Ball and Stephen G. Eick. 
    Software visualization in the large. 
    IEEE Computer, 29(4):33--43, April 1996.

As far as I can tell, a variety of visualizations is needed in
practice, integrated in a single tool suite, with good 
interactivity/navigation/view switching, so that one can 
choose the most suitable view and focus/slice for each 
question one might have about a software project (and
change track as new questions arise interactively).

It would be great to have such a visualization suite
for Haskell projects..

There was Chris Ryder's Medina project (unreleased,
web site seems to have disappeared?), which focussed 
on a metrics library, with some example metrics and 



More information about the Haskell-Cafe mailing list