[Haskell-cafe] ANNOUNCE: graphtype — A simple tool to illustrate dependencies between Haskell types

Max Desyatov explicitcall at googlemail.com
Mon Aug 24 08:49:20 EDT 2009


While developing applications which deal with complex data it is crucial
to know how exactly you manipulate this data.  Haskell provides excellent
tools for expressing a data scheme you work with: ADTs, `type` and `newtype`
declarations, type classes and much more is hidden in rich Haskell's
type system.  Obviously, when types of data in your domain you work with
grow — all declarations grow, and it becomes hard to grasp all
dependencies, to change them and to remove them deliberately.

graphtype was developed to visualise type declarations in you Haskell
source files.  It produces .dot-file for subsequent processing with
graphviz.

Results for example file bundled with graphtype:
http://i.piccy.info/i4/00/90/bfa07290012c2d3b455696bdaa86.png

To play with it, you can use hackage: http://hackage.haskell.org/package/graphtype
or hack some code: http://github.com/explicitcall/graphtype

Visualisation of dependencies in complex type class hierarchies is still
on the way.  It isn't obvious how do to this nicely, as in most cases
type class declarations are imported from other libraries, and you don't
always have source files for them.

Anyway, graphtype is fairly usable.  Leave here your questions,
suggestions and have fun looking at type dependencies in your code.

WBR, Max


More information about the Haskell-Cafe mailing list