@hackage graphviz2999.8.0.0
Graphviz bindings for Haskell.
Categories
License
BSD-3-Clause
Maintainer
Ivan.Miljenovic@gmail.com
Links
Versions
- 2999.20.2.1 Sun, 16 Feb 2025
- 2999.20.2.0 Wed, 13 Dec 2023
- 2999.20.1.0 Fri, 4 Aug 2023
- 2999.20.0.4 Tue, 28 Jan 2020
- 2999.20.0.3 Tue, 1 Jan 2019
- 2999.20.0.2 Fri, 25 May 2018 Show all…
Deprecated
Dependencies (11)
- QuickCheck >=2.1 && <2.2
- base >=3 && <5
- bytestring <0.10
- colour >=2.3 && <2.4
- containers
- extensible-exceptions Show all…
Dependents (69)
@hackage/hopenpgp-tools, @hackage/dvda, @hackage/llvm-tools, @cardano/ouroboros-consensus-diffusion, @hackage/ethereum-analyzer, @hackage/caffegraph, Show all…
Package Flags
test
(off by default)
Build the test suite, including an executable to run it.
The graphviz library provides bindings for Haskell to the Dot language used by the Graphviz [1] suite of tools for graph visualisation. The latest version of this library is available from Hackage [2].
[1] http://graphviz.org/ [2] http://hackage.haskell.org/package/graphviz
Features of the graphviz library include:
-
Almost complete coverage of all Graphviz attributes, etc. for graphs, sub-graphs, clusters, nodes and edges: http://graphviz.org/doc/info/attrs.html
-
Thorough documentation on known problems with the library and how it differs from the actual Dot specification.
-
Support for specifying clusters.
-
The ability to use a custom node type.
-
Functions for running a Graphviz layout tool with all specified output types.
-
The ability to not only generate but also parse Dot code with two options: strict and liberal (in terms of ordering of statements).
-
Functions to convert FGL graphs to Dot code - including support to group them into clusters - with a high degree of customisation by specifying which attributes to use.
-
Round-trip support for passing an FGL graph through Graphviz to augment node and edge labels with positional information, etc.
Please note that currently the convenience functions are only available for FGL [3] graphs; this will be extended in future once a method for dealing with generic graph types is developed.
[3] http://web.engr.oregonstate.edu/~erwig/fgl/haskell/
Developing graphviz
Following are some notes on what to keep in mind if you want to contribute to the development of graphviz:
-
When printing and parsing values, there are two options: with or without quotes. Some values (e.g. numbers) may optionally be quoted in Dot code; others (namely strings with spaces, etc.) must be quoted.
-
Whenever you are parsing a type of value where the Dot representation of one is the prefix of the Dot representation of another, be sure to parse the longer value first.
-
Because there are so many attributes, the definition, instances for and functions using the overall Attribute type are all defined using the AttributeGenerator.hs script. This file is not an actual part of the library, but should be used if any top-level work is being done for Attributes.
-
Any changes should pass the testsuite, which is built by enabling the "test" flag. There are three ways of testing:
-
Run the graphviz-testsuite program; this takes approximately 90 minutes to run and covers various properties that should hold.
-
Import the "Data.GraphViz.Testing" module for manual testing.
-
If you did not build the library with the "test" flag enabled, you can extract Data.GraphViz.Testing and Data.GraphViz.Testing.* from the source tarball to be able to use them directly; they only use graphviz's public API.
-