Hi,

I've just released hs2dot on hackagedb.

It's a small tool that lets you automatically generate graphviz/dot
code that visualize the relations between data types, types and type
classes.

Example usage:

> hs2dot Hack.hs | dot -T pdf -o Hack.pdf

Multiple files can be analyzed together as in

> hs2dot Foo.hs Bar.hs | dot -T png -o FooBar.png

so their data types can point to each other.

Example diagrams generated using h2dot can be found at
http://github.com/finnsson/hs2graphviz/tree/master/Examples/

Examples of real code analyzed:
http://github.com/finnsson/hs2graphviz/raw/master/Examples/Control.pdf
(from hpage)
http://github.com/finnsson/hs2graphviz/raw/master/Examples/Hack.png (from Hack)

Example of mock code analyzed:
http://github.com/finnsson/hs2graphviz/raw/master/Examples/TestCode.pdf
(three files analyzed together)

The tool is still far from complete. Better handling of algebraic data
types and instance declarations are a must. GADTs, data families and
type synonym families are not yet implemented so they wont turn up.

-- Oscar
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to