Re: [Haskell-cafe] ANNOUNCE: graphtype — A simple tool to illustrate dependencies between Haskell types
florbitous at gmail.com
Tue Aug 25 01:20:51 EDT 2009
2009/8/24 Max Desyatov <explicitcall at googlemail.com>:
> graphtype was developed to visualise type declarations in you Haskell
> source files. It produces .dot-file for subsequent processing with
> Anyway, graphtype is fairly usable. Leave here your questions,
> suggestions and have fun looking at type dependencies in your code.
You could probably get some leverage from the GHC API for reading .hi
files to find out information about imported types.
It looks to me like you generate one image file for the whole graph.
It could get quite big. I think dot supports hyperlinks, and so do
some image formats (SVG I believe). Maybe you could split it up into
pieces with hyperlinks between them. Browser support for SVG appears
to be getting better these days.
I've sometimes mused about the idea of graphing the static function
call graph of programs and annotating arcs with type information. For
that the GHC API would be the way to go (might need to do a little
type reconstruction along the way to figure out the concrete types at
which polymorphic functions are used.)
More information about the Haskell-Cafe