Maintainer | Ivan.Miljenovic@gmail.com |
---|
This module defines functions to call the various GraphViz commands.
Most of these functions were from version 0.5 of Graphalyze:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Graphalyze-0.5
- data GraphvizCommand
- dirCommand :: GraphvizCommand
- undirCommand :: GraphvizCommand
- commandFor :: DotGraph a -> GraphvizCommand
- data GraphvizOutput
- runGraphviz :: PrintDot n => DotGraph n -> GraphvizOutput -> FilePath -> IO Bool
- runGraphvizCommand :: PrintDot n => GraphvizCommand -> DotGraph n -> GraphvizOutput -> FilePath -> IO Bool
- graphvizWithHandle :: (PrintDot n, Show a) => GraphvizCommand -> DotGraph n -> GraphvizOutput -> (Handle -> IO a) -> IO (Maybe a)
Documentation
data GraphvizCommand Source
The available Graphviz commands.
dirCommand :: GraphvizCommandSource
The default command for directed graphs.
undirCommand :: GraphvizCommandSource
The default command for undirected graphs.
commandFor :: DotGraph a -> GraphvizCommandSource
The appropriate (default) GraphViz command for the given graph.
data GraphvizOutput Source
The possible Graphviz outputs, obtained by running dot -Txxx. Note that it is not possible to choose between output variants, and that not all of these may be available on your system.
This will probably be improved in future. For now, more information is available from: http://graphviz.org/doc/info/output.html
runGraphviz :: PrintDot n => DotGraph n -> GraphvizOutput -> FilePath -> IO BoolSource
Run the recommended Graphviz command on this graph, saving the result
to the file provided (note: file extensions are not checked).
Returns True
if successful, False
otherwise.
runGraphvizCommand :: PrintDot n => GraphvizCommand -> DotGraph n -> GraphvizOutput -> FilePath -> IO BoolSource
Run the chosen Graphviz command on this graph, saving the result
to the file provided (note: file extensions are not checked).
Returns True
if successful, False
otherwise.
graphvizWithHandle :: (PrintDot n, Show a) => GraphvizCommand -> DotGraph n -> GraphvizOutput -> (Handle -> IO a) -> IO (Maybe a)Source