Portability | non-portable (GHC only) |
---|---|
Stability | experimental |
Maintainer | mad.one@gmail.com |
Safe Haskell | None |
This module exports a simple, high level interface for exporting
vacuum
graphs to GraphViz dot
output, and rendering them to
PNG/SVG files. It also contains various helpers if you wish to
customize the output yourself in some manner.
For this module to work, you will need to have graphviz installed,
and the dot
utility should be available somewhere in your
$PATH
.
The simplest possible usage of this module is like so:
vacuumToPng "list" [1..10]
This will output a 'list.png' file, which contains a pretty graph
visualization of the expression [1..10]
. You may alternatively
use vacuumToSvg
in the same manner, to export a graph to an SVG
file. This is more than sufficient for many use cases.
- vacuumToPng :: FilePath -> a -> IO FilePath
- vacuumToSvg :: FilePath -> a -> IO FilePath
- graphToDotFile :: (Ord a, PrintDot a) => FilePath -> GraphvizOutput -> [(a, [a])] -> IO FilePath
- graphToDot :: Ord a => [(a, [a])] -> DotGraph a
- graphToDotParams :: (Ord a, Ord cl) => GraphvizParams a () () cl l -> [(a, [a])] -> DotGraph a
- vacuumParams :: GraphvizParams a () () () ()
Simple API
vacuumToPng :: FilePath -> a -> IO FilePathSource
vacuumToPng foo e
renders a graph representation of the
expression e
(which can be any expression what-so-ever) to
the file "foo.png" for later viewing.
vacuumToSvg :: FilePath -> a -> IO FilePathSource
vacuumToSvg foo e
renders a graph representation of the
expression e
(which can be any expression what-so-ever) to
the file "foo.svg" for later viewing.
Lower level API allowing more output control
graphToDotFile :: (Ord a, PrintDot a) => FilePath -> GraphvizOutput -> [(a, [a])] -> IO FilePathSource
graphToDot :: Ord a => [(a, [a])] -> DotGraph aSource
graphToDotParams :: (Ord a, Ord cl) => GraphvizParams a () () cl l -> [(a, [a])] -> DotGraph aSource
GraphViz attributes
vacuumParams :: GraphvizParams a () () () ()Source