graphviz-2999.20.0.2: Bindings to Graphviz for graph visualisation.

Copyright | (c) Ivan Lazar Miljenovic
License | 3-Clause BSD-style
Maintainer | Ivan.Miljenovic@gmail.com
Safe Haskell | None
Language | Haskell2010

Data.GraphViz.Types

Contents

- Common sub-types
- Helper types for looking up information within a `DotRepr`.
- Obtaining the `DotNode`s and `DotEdges`.
- Printing and parsing a `DotRepr`.
- Limitations and documentation

Description

Four different representations of Dot graphs are available, all of which are based loosely upon the specifications at: http://graphviz.org/doc/info/lang.html. The `DotRepr` class provides a common interface for them (the `PrintDotRepr`, `ParseDotRepr` and `PPDotRepr` classes are used until class aliases are implemented).

Every representation takes in a type parameter: this indicates the node type (e.g. `DotGraph Int` is a Dot graph with integer nodes). Sum types are allowed, though care must be taken when specifying their `ParseDot` instances if there is the possibility of overlapping definitions. The `GraphID` type is an existing sum type that allows textual and numeric values.

If you require using more than one Dot representation, you will most likely need to import at least one of them qualified, as they typically all use the same names.

As a comparison, all four representations provide how you would define the following Dot graph (or at least one isomorphic to it) (the original of which can be found at http://graphviz.org/content/cluster). Note that in all the examples, they are not necessarily done the best way (variables rather than repeated constants, etc.); they are just there to provide a comparison on the structure of each representation.

    digraph G {

      subgraph cluster_0 {
        style=filled;
        color=lightgrey;
        node [style=filled,color=white];
        a0 -> a1 -> a2 -> a3;
        label = "process #1";
      }

      subgraph cluster_1 {
        node [style=filled];
        b0 -> b1 -> b2 -> b3;
        label = "process #2";
        color=blue
      }
      start -> a0;
      start -> b0;
      a1 -> b3;
      b2 -> a3;
      a3 -> a0;
      a3 -> end;
      b3 -> end;

      start [shape=Mdiamond];
      end [shape=Msquare];
    }

Each representation is suited for different things:

Data.GraphViz.Types.Canonical
  is ideal for converting other graph-like data structures into Dot graphs (the Data.GraphViz module provides some functions for this). It is a structured representation of Dot code.
Data.GraphViz.Types.Generalised
  matches the actual structure of Dot code. As such, it is suited for parsing in existing Dot code.
Data.GraphViz.Types.Graph
  provides graph operations for manipulating Dot graphs; this is suited when you want to edit existing Dot code. It uses generalised Dot graphs for parsing and canonical Dot graphs for printing.
Data.GraphViz.Types.Monadic
  is a much easier representation to use when defining relatively static Dot graphs in Haskell code, and looks vaguely like actual Dot code if you squint a bit.

Please also read the limitations section at the end for advice on how to properly use these Dot representations.

Synopsis

- class Ord n => DotRepr dg n where
- class PrintDot a where
- class ParseDot a where
- class (DotRepr dg n, PrintDot (dg n)) => PrintDotRepr dg n
- class (DotRepr dg n, ParseDot (dg n)) => ParseDotRepr dg n
- class (PrintDotRepr dg n, ParseDotRepr dg n) => PPDotRepr dg n
- data GraphID
  - = Str Text
  - | Num Number
- data Number
  - = Int Int
  - | Dbl Double
- class ToGraphID a where
- textGraphID :: Text -> GraphID
- data GlobalAttributes
  - = GraphAttrs {
    - attrs :: Attributes
    }
  - | NodeAttrs {
    - attrs :: Attributes
    }
  - | EdgeAttrs {
    - attrs :: Attributes
    }
- data DotNode n = DotNode {
  - nodeID :: n
  - nodeAttributes :: Attributes
  }
- data DotEdge n = DotEdge {
  - fromNode :: n
  - toNode :: n
  - edgeAttributes :: Attributes
  }
- type ClusterLookup = Map (Maybe GraphID) ([Path], GlobalAttributes)
- type NodeLookup n = Map n (Path, Attributes)
- type Path = Seq (Maybe GraphID)
- graphStructureInformationClean :: DotRepr dg n => dg n -> (GlobalAttributes, ClusterLookup)
- nodeInformationClean :: DotRepr dg n => Bool -> dg n -> NodeLookup n
- edgeInformationClean :: DotRepr dg n => Bool -> dg n -> [DotEdge n]
- graphNodes :: DotRepr dg n => dg n -> [DotNode n]
- graphEdges :: DotRepr dg n => dg n -> [DotEdge n]
- printDotGraph :: PrintDotRepr dg n => dg n -> Text
- parseDotGraph :: ParseDotRepr dg n => Text -> dg n
- parseDotGraphLiberally :: ParseDotRepr dg n => Text -> dg n

# Documentation

class Ord n => DotRepr dg n where #

This class is used to provide a common interface to different ways of representing a graph in Dot form.

You will most probably not need to create your own instances of this class.

The type variable represents the current node type of the Dot graph, and the `Ord` restriction is there because in practice most implementations of some of these methods require it.

Minimal complete definition

fromCanonical, getID, setID, graphIsDirected, setIsDirected, graphIsStrict, setStrictness, mapDotGraph, graphStructureInformation, nodeInformation, edgeInformation, unAnonymise

Methods

fromCanonical :: DotGraph n -> dg n #

Convert from a graph in canonical form. This is especially useful when using the functions from Data.GraphViz.Algorithms.

See `FromGeneralisedDot` in Data.GraphViz.Types.Generalised for a semi-inverse of this function.

getID :: dg n -> Maybe GraphID #

Return the ID of the graph.

setID :: GraphID -> dg n -> dg n #

Set the ID of the graph.

graphIsDirected :: dg n -> Bool #

Is this graph directed?

setIsDirected :: Bool -> dg n -> dg n #

Set whether a graph is directed or not.

graphIsStrict :: dg n -> Bool #

Is this graph strict? Strict graphs disallow multiple edges.

setStrictness :: Bool -> dg n -> dg n #

A strict graph disallows multiple edges.

mapDotGraph :: DotRepr dg n' => (n -> n') -> dg n -> dg n' #

Change the node values. This function is assumed to be injective, otherwise the resulting graph will not be identical to the original (modulo labels).

graphStructureInformation :: dg n -> (GlobalAttributes, ClusterLookup) #

Return information on all the clusters contained within this `DotRepr`, as well as the top-level `GraphAttrs` for the overall graph.

nodeInformation :: Bool -> dg n -> NodeLookup n #

Return information on the `DotNode`s contained within this `DotRepr`. The `Bool` parameter indicates if applicable `NodeAttrs` should be included.

edgeInformation :: Bool -> dg n -> [DotEdge n] #

Return information on the `DotEdge`s contained within this `DotRepr`. The `Bool` parameter indicates if applicable `EdgeAttrs` should be included.

unAnonymise :: dg n -> dg n #

Give any anonymous sub-graphs or clusters a unique identifier (i.e. there will be no `Nothing` key in the `ClusterLookup` from `graphStructureInformation`).

Instances

Ord n => DotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types Methods fromCanonical :: DotGraph n -> DotGraph n # getID :: DotGraph n -> Maybe GraphID # setID :: GraphID -> DotGraph n -> DotGraph n # graphIsDirected :: DotGraph n -> Bool # setIsDirected :: Bool -> DotGraph n -> DotGraph n # graphIsStrict :: DotGraph n -> Bool # setStrictness :: Bool -> DotGraph n -> DotGraph n # mapDotGraph :: DotRepr DotGraph n' => (n -> n') -> DotGraph n -> DotGraph n' # graphStructureInformation :: DotGraph n -> (GlobalAttributes, ClusterLookup) # nodeInformation :: Bool -> DotGraph n -> NodeLookup n # edgeInformation :: Bool -> DotGraph n -> [DotEdge n] # unAnonymise :: DotGraph n -> DotGraph n #
Ord n => DotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods fromCanonical :: DotGraph0 n -> DotGraph n # getID :: DotGraph n -> Maybe GraphID # setID :: GraphID -> DotGraph n -> DotGraph n # graphIsDirected :: DotGraph n -> Bool # setIsDirected :: Bool -> DotGraph n -> DotGraph n # graphIsStrict :: DotGraph n -> Bool # setStrictness :: Bool -> DotGraph n -> DotGraph n # mapDotGraph :: DotRepr DotGraph n' => (n -> n') -> DotGraph n -> DotGraph n' # graphStructureInformation :: DotGraph n -> (GlobalAttributes, ClusterLookup) # nodeInformation :: Bool -> DotGraph n -> NodeLookup n # edgeInformation :: Bool -> DotGraph n -> [DotEdge n] # unAnonymise :: DotGraph n -> DotGraph n #
Ord n => DotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Graph Methods fromCanonical :: DotGraph0 n -> DotGraph n # getID :: DotGraph n -> Maybe GraphID # setID :: GraphID -> DotGraph n -> DotGraph n # graphIsDirected :: DotGraph n -> Bool # setIsDirected :: Bool -> DotGraph n -> DotGraph n # graphIsStrict :: DotGraph n -> Bool # setStrictness :: Bool -> DotGraph n -> DotGraph n # mapDotGraph :: DotRepr DotGraph n' => (n -> n') -> DotGraph n -> DotGraph n' # graphStructureInformation :: DotGraph n -> (GlobalAttributes, ClusterLookup) # nodeInformation :: Bool -> DotGraph n -> NodeLookup n # edgeInformation :: Bool -> DotGraph n -> [DotEdge n] # unAnonymise :: DotGraph n -> DotGraph n #

class PrintDot a where #

A class used to correctly print parts of the Graphviz Dot language. Minimal implementation is `unqtDot`.

Minimal complete definition

unqtDot

Methods

unqtDot :: a -> DotCode #

The unquoted representation, for use when composing values to produce a larger printing value.

toDot :: a -> DotCode #

The actual quoted representation; this should be quoted if it contains characters not permitted a plain ID String, a number or it is not an HTML string. Defaults to `unqtDot`.

unqtListToDot :: [a] -> DotCode #

The correct way of representing a list of this value when printed; not all Dot values require this to be implemented. Defaults to Haskell-like list representation.

listToDot :: [a] -> DotCode #

The quoted form of `unqtListToDot`; defaults to wrapping double quotes around the result of `unqtListToDot` (since the default implementation has characters that must be quoted).

Instances

PrintDot Bool # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Bool -> DotCode # toDot :: Bool -> DotCode # unqtListToDot :: [Bool] -> DotCode # listToDot :: [Bool] -> DotCode #
PrintDot Char # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Char -> DotCode # toDot :: Char -> DotCode # unqtListToDot :: [Char] -> DotCode # listToDot :: [Char] -> DotCode #
PrintDot Double # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Double -> DotCode # toDot :: Double -> DotCode # unqtListToDot :: [Double] -> DotCode # listToDot :: [Double] -> DotCode #
PrintDot Int # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Int -> DotCode # toDot :: Int -> DotCode # unqtListToDot :: [Int] -> DotCode # listToDot :: [Int] -> DotCode #
PrintDot Integer # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Integer -> DotCode # toDot :: Integer -> DotCode # unqtListToDot :: [Integer] -> DotCode # listToDot :: [Integer] -> DotCode #
PrintDot Word8 # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Word8 -> DotCode # toDot :: Word8 -> DotCode # unqtListToDot :: [Word8] -> DotCode # listToDot :: [Word8] -> DotCode #
PrintDot Word16 # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Word16 -> DotCode # toDot :: Word16 -> DotCode # unqtListToDot :: [Word16] -> DotCode # listToDot :: [Word16] -> DotCode #
PrintDot Version # | Ignores `versionTags` and assumes 'not . null . versionBranch' (usually you want 'length . versionBranch == 2').
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Version -> DotCode # toDot :: Version -> DotCode # unqtListToDot :: [Version] -> DotCode # listToDot :: [Version] -> DotCode #
PrintDot Text # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Text -> DotCode # toDot :: Text -> DotCode # unqtListToDot :: [Text] -> DotCode # listToDot :: [Text] -> DotCode #
PrintDot Text # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: Text -> DotCode # toDot :: Text -> DotCode # unqtListToDot :: [Text] -> DotCode # listToDot :: [Text] -> DotCode #
PrintDot BrewerName # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: BrewerName -> DotCode # toDot :: BrewerName -> DotCode # unqtListToDot :: [BrewerName] -> DotCode # listToDot :: [BrewerName] -> DotCode #
PrintDot BrewerScheme # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: BrewerScheme -> DotCode # toDot :: BrewerScheme -> DotCode # unqtListToDot :: [BrewerScheme] -> DotCode # listToDot :: [BrewerScheme] -> DotCode #
PrintDot ColorScheme # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: ColorScheme -> DotCode # toDot :: ColorScheme -> DotCode # unqtListToDot :: [ColorScheme] -> DotCode # listToDot :: [ColorScheme] -> DotCode #
PrintDot GraphvizCommand # |
Instance details Defined in Data.GraphViz.Commands.Available Methods unqtDot :: GraphvizCommand -> DotCode # toDot :: GraphvizCommand -> DotCode # unqtListToDot :: [GraphvizCommand] -> DotCode # listToDot :: [GraphvizCommand] -> DotCode #
PrintDot CompassPoint # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods unqtDot :: CompassPoint -> DotCode # toDot :: CompassPoint -> DotCode # unqtListToDot :: [CompassPoint] -> DotCode # listToDot :: [CompassPoint] -> DotCode #
PrintDot PortPos # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods unqtDot :: PortPos -> DotCode # toDot :: PortPos -> DotCode # unqtListToDot :: [PortPos] -> DotCode # listToDot :: [PortPos] -> DotCode #
PrintDot PortName # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods unqtDot :: PortName -> DotCode # toDot :: PortName -> DotCode # unqtListToDot :: [PortName] -> DotCode # listToDot :: [PortName] -> DotCode #
PrintDot X11Color # |
Instance details Defined in Data.GraphViz.Attributes.Colors.X11 Methods unqtDot :: X11Color -> DotCode # toDot :: X11Color -> DotCode # unqtListToDot :: [X11Color] -> DotCode # listToDot :: [X11Color] -> DotCode #
PrintDot SVGColor # |
Instance details Defined in Data.GraphViz.Attributes.Colors.SVG Methods unqtDot :: SVGColor -> DotCode # toDot :: SVGColor -> DotCode # unqtListToDot :: [SVGColor] -> DotCode # listToDot :: [SVGColor] -> DotCode #
PrintDot WeightedColor # |
Instance details Defined in Data.GraphViz.Attributes.Colors Methods unqtDot :: WeightedColor -> DotCode # toDot :: WeightedColor -> DotCode # unqtListToDot :: [WeightedColor] -> DotCode # listToDot :: [WeightedColor] -> DotCode #
PrintDot Color # |
Instance details Defined in Data.GraphViz.Attributes.Colors Methods unqtDot :: Color -> DotCode # toDot :: Color -> DotCode # unqtListToDot :: [Color] -> DotCode # listToDot :: [Color] -> DotCode #
PrintDot Style # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Style -> DotCode # toDot :: Style -> DotCode # unqtListToDot :: [Style] -> DotCode # listToDot :: [Style] -> DotCode #
PrintDot Side # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Side -> DotCode # toDot :: Side -> DotCode # unqtListToDot :: [Side] -> DotCode # listToDot :: [Side] -> DotCode #
PrintDot Scale # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Scale -> DotCode # toDot :: Scale -> DotCode # unqtListToDot :: [Scale] -> DotCode # listToDot :: [Scale] -> DotCode #
PrintDot CellFormat # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: CellFormat -> DotCode # toDot :: CellFormat -> DotCode # unqtListToDot :: [CellFormat] -> DotCode # listToDot :: [CellFormat] -> DotCode #
PrintDot VAlign # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: VAlign -> DotCode # toDot :: VAlign -> DotCode # unqtListToDot :: [VAlign] -> DotCode # listToDot :: [VAlign] -> DotCode #
PrintDot Align # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Align -> DotCode # toDot :: Align -> DotCode # unqtListToDot :: [Align] -> DotCode # listToDot :: [Align] -> DotCode #
PrintDot Attribute # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Attribute -> DotCode # toDot :: Attribute -> DotCode # unqtListToDot :: [Attribute] -> DotCode # listToDot :: [Attribute] -> DotCode #
PrintDot Img # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Img -> DotCode # toDot :: Img -> DotCode # unqtListToDot :: [Img] -> DotCode # listToDot :: [Img] -> DotCode #
PrintDot Cell # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Cell -> DotCode # toDot :: Cell -> DotCode # unqtListToDot :: [Cell] -> DotCode # listToDot :: [Cell] -> DotCode #
PrintDot Row # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Row -> DotCode # toDot :: Row -> DotCode # unqtListToDot :: [Row] -> DotCode # listToDot :: [Row] -> DotCode #
PrintDot Table # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Table -> DotCode # toDot :: Table -> DotCode # unqtListToDot :: [Table] -> DotCode # listToDot :: [Table] -> DotCode #
PrintDot Format # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Format -> DotCode # toDot :: Format -> DotCode # unqtListToDot :: [Format] -> DotCode # listToDot :: [Format] -> DotCode #
PrintDot TextItem # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: TextItem -> DotCode # toDot :: TextItem -> DotCode # unqtListToDot :: [TextItem] -> DotCode # listToDot :: [TextItem] -> DotCode #
PrintDot Label # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods unqtDot :: Label -> DotCode # toDot :: Label -> DotCode # unqtListToDot :: [Label] -> DotCode # listToDot :: [Label] -> DotCode #
PrintDot NodeSize # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: NodeSize -> DotCode # toDot :: NodeSize -> DotCode # unqtListToDot :: [NodeSize] -> DotCode # listToDot :: [NodeSize] -> DotCode #
PrintDot Normalized # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Normalized -> DotCode # toDot :: Normalized -> DotCode # unqtListToDot :: [Normalized] -> DotCode # listToDot :: [Normalized] -> DotCode #
PrintDot Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Number -> DotCode # toDot :: Number -> DotCode # unqtListToDot :: [Number] -> DotCode # listToDot :: [Number] -> DotCode #
PrintDot Ratios # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Ratios -> DotCode # toDot :: Ratios -> DotCode # unqtListToDot :: [Ratios] -> DotCode # listToDot :: [Ratios] -> DotCode #
PrintDot Justification # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Justification -> DotCode # toDot :: Justification -> DotCode # unqtListToDot :: [Justification] -> DotCode # listToDot :: [Justification] -> DotCode #
PrintDot ScaleType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: ScaleType -> DotCode # toDot :: ScaleType -> DotCode # unqtListToDot :: [ScaleType] -> DotCode # listToDot :: [ScaleType] -> DotCode #
PrintDot Paths # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Paths -> DotCode # toDot :: Paths -> DotCode # unqtListToDot :: [Paths] -> DotCode # listToDot :: [Paths] -> DotCode #
PrintDot VerticalPlacement # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: VerticalPlacement -> DotCode # toDot :: VerticalPlacement -> DotCode # unqtListToDot :: [VerticalPlacement] -> DotCode # listToDot :: [VerticalPlacement] -> DotCode #
PrintDot FocusType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: FocusType -> DotCode # toDot :: FocusType -> DotCode # unqtListToDot :: [FocusType] -> DotCode # listToDot :: [FocusType] -> DotCode #
PrintDot ViewPort # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: ViewPort -> DotCode # toDot :: ViewPort -> DotCode # unqtListToDot :: [ViewPort] -> DotCode # listToDot :: [ViewPort] -> DotCode #
PrintDot StyleName # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: StyleName -> DotCode # toDot :: StyleName -> DotCode # unqtListToDot :: [StyleName] -> DotCode # listToDot :: [StyleName] -> DotCode #
PrintDot StyleItem # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: StyleItem -> DotCode # toDot :: StyleItem -> DotCode # unqtListToDot :: [StyleItem] -> DotCode # listToDot :: [StyleItem] -> DotCode #
PrintDot STStyle # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: STStyle -> DotCode # toDot :: STStyle -> DotCode # unqtListToDot :: [STStyle] -> DotCode # listToDot :: [STStyle] -> DotCode #
PrintDot StartType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: StartType -> DotCode # toDot :: StartType -> DotCode # unqtListToDot :: [StartType] -> DotCode # listToDot :: [StartType] -> DotCode #
PrintDot SmoothType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: SmoothType -> DotCode # toDot :: SmoothType -> DotCode # unqtListToDot :: [SmoothType] -> DotCode # listToDot :: [SmoothType] -> DotCode #
PrintDot Shape # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Shape -> DotCode # toDot :: Shape -> DotCode # unqtListToDot :: [Shape] -> DotCode # listToDot :: [Shape] -> DotCode #
PrintDot RankDir # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: RankDir -> DotCode # toDot :: RankDir -> DotCode # unqtListToDot :: [RankDir] -> DotCode # listToDot :: [RankDir] -> DotCode #
PrintDot RankType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: RankType -> DotCode # toDot :: RankType -> DotCode # unqtListToDot :: [RankType] -> DotCode # listToDot :: [RankType] -> DotCode #
PrintDot Root # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Root -> DotCode # toDot :: Root -> DotCode # unqtListToDot :: [Root] -> DotCode # listToDot :: [Root] -> DotCode #
PrintDot QuadType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: QuadType -> DotCode # toDot :: QuadType -> DotCode # unqtListToDot :: [QuadType] -> DotCode # listToDot :: [QuadType] -> DotCode #
PrintDot Spline # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Spline -> DotCode # toDot :: Spline -> DotCode # unqtListToDot :: [Spline] -> DotCode # listToDot :: [Spline] -> DotCode #
PrintDot PageDir # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: PageDir -> DotCode # toDot :: PageDir -> DotCode # unqtListToDot :: [PageDir] -> DotCode # listToDot :: [PageDir] -> DotCode #
PrintDot EdgeType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: EdgeType -> DotCode # toDot :: EdgeType -> DotCode # unqtListToDot :: [EdgeType] -> DotCode # listToDot :: [EdgeType] -> DotCode #
PrintDot Pos # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Pos -> DotCode # toDot :: Pos -> DotCode # unqtListToDot :: [Pos] -> DotCode # listToDot :: [Pos] -> DotCode #
PrintDot PackMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: PackMode -> DotCode # toDot :: PackMode -> DotCode # unqtListToDot :: [PackMode] -> DotCode # listToDot :: [PackMode] -> DotCode #
PrintDot Pack # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Pack -> DotCode # toDot :: Pack -> DotCode # unqtListToDot :: [Pack] -> DotCode # listToDot :: [Pack] -> DotCode #
PrintDot OutputMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: OutputMode -> DotCode # toDot :: OutputMode -> DotCode # unqtListToDot :: [OutputMode] -> DotCode # listToDot :: [OutputMode] -> DotCode #
PrintDot Order # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Order -> DotCode # toDot :: Order -> DotCode # unqtListToDot :: [Order] -> DotCode # listToDot :: [Order] -> DotCode #
PrintDot LayerList # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LayerList -> DotCode # toDot :: LayerList -> DotCode # unqtListToDot :: [LayerList] -> DotCode # listToDot :: [LayerList] -> DotCode #
PrintDot LayerID # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LayerID -> DotCode # toDot :: LayerID -> DotCode # unqtListToDot :: [LayerID] -> DotCode # listToDot :: [LayerID] -> DotCode #
PrintDot LayerRangeElem # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LayerRangeElem -> DotCode # toDot :: LayerRangeElem -> DotCode # unqtListToDot :: [LayerRangeElem] -> DotCode # listToDot :: [LayerRangeElem] -> DotCode #
PrintDot LayerListSep # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LayerListSep -> DotCode # toDot :: LayerListSep -> DotCode # unqtListToDot :: [LayerListSep] -> DotCode # listToDot :: [LayerListSep] -> DotCode #
PrintDot LayerSep # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LayerSep -> DotCode # toDot :: LayerSep -> DotCode # unqtListToDot :: [LayerSep] -> DotCode # listToDot :: [LayerSep] -> DotCode #
PrintDot Overlap # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Overlap -> DotCode # toDot :: Overlap -> DotCode # unqtListToDot :: [Overlap] -> DotCode # listToDot :: [Overlap] -> DotCode #
PrintDot Point # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Point -> DotCode # toDot :: Point -> DotCode # unqtListToDot :: [Point] -> DotCode # listToDot :: [Point] -> DotCode #
PrintDot LabelScheme # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: LabelScheme -> DotCode # toDot :: LabelScheme -> DotCode # unqtListToDot :: [LabelScheme] -> DotCode # listToDot :: [LabelScheme] -> DotCode #
PrintDot RecordField # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: RecordField -> DotCode # toDot :: RecordField -> DotCode # unqtListToDot :: [RecordField] -> DotCode # listToDot :: [RecordField] -> DotCode #
PrintDot Label # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Label -> DotCode # toDot :: Label -> DotCode # unqtListToDot :: [Label] -> DotCode # listToDot :: [Label] -> DotCode #
PrintDot Model # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Model -> DotCode # toDot :: Model -> DotCode # unqtListToDot :: [Model] -> DotCode # listToDot :: [Model] -> DotCode #
PrintDot ModeType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: ModeType -> DotCode # toDot :: ModeType -> DotCode # unqtListToDot :: [ModeType] -> DotCode # listToDot :: [ModeType] -> DotCode #
PrintDot GraphSize # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: GraphSize -> DotCode # toDot :: GraphSize -> DotCode # unqtListToDot :: [GraphSize] -> DotCode # listToDot :: [GraphSize] -> DotCode #
PrintDot SVGFontNames # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: SVGFontNames -> DotCode # toDot :: SVGFontNames -> DotCode # unqtListToDot :: [SVGFontNames] -> DotCode # listToDot :: [SVGFontNames] -> DotCode #
PrintDot DPoint # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: DPoint -> DotCode # toDot :: DPoint -> DotCode # unqtListToDot :: [DPoint] -> DotCode # listToDot :: [DPoint] -> DotCode #
PrintDot DEConstraints # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: DEConstraints -> DotCode # toDot :: DEConstraints -> DotCode # unqtListToDot :: [DEConstraints] -> DotCode # listToDot :: [DEConstraints] -> DotCode #
PrintDot DirType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: DirType -> DotCode # toDot :: DirType -> DotCode # unqtListToDot :: [DirType] -> DotCode # listToDot :: [DirType] -> DotCode #
PrintDot ClusterMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: ClusterMode -> DotCode # toDot :: ClusterMode -> DotCode # unqtListToDot :: [ClusterMode] -> DotCode # listToDot :: [ClusterMode] -> DotCode #
PrintDot Rect # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Rect -> DotCode # toDot :: Rect -> DotCode # unqtListToDot :: [Rect] -> DotCode # listToDot :: [Rect] -> DotCode #
PrintDot ArrowSide # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods unqtDot :: ArrowSide -> DotCode # toDot :: ArrowSide -> DotCode # unqtListToDot :: [ArrowSide] -> DotCode # listToDot :: [ArrowSide] -> DotCode #
PrintDot ArrowFill # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods unqtDot :: ArrowFill -> DotCode # toDot :: ArrowFill -> DotCode # unqtListToDot :: [ArrowFill] -> DotCode # listToDot :: [ArrowFill] -> DotCode #
PrintDot ArrowModifier # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods unqtDot :: ArrowModifier -> DotCode # toDot :: ArrowModifier -> DotCode # unqtListToDot :: [ArrowModifier] -> DotCode # listToDot :: [ArrowModifier] -> DotCode #
PrintDot ArrowShape # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods unqtDot :: ArrowShape -> DotCode # toDot :: ArrowShape -> DotCode # unqtListToDot :: [ArrowShape] -> DotCode # listToDot :: [ArrowShape] -> DotCode #
PrintDot ArrowType # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods unqtDot :: ArrowType -> DotCode # toDot :: ArrowType -> DotCode # unqtListToDot :: [ArrowType] -> DotCode # listToDot :: [ArrowType] -> DotCode #
PrintDot Attribute # |
Instance details Defined in Data.GraphViz.Attributes.Complete Methods unqtDot :: Attribute -> DotCode # toDot :: Attribute -> DotCode # unqtListToDot :: [Attribute] -> DotCode # listToDot :: [Attribute] -> DotCode #
PrintDot GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: GlobalAttributes -> DotCode # toDot :: GlobalAttributes -> DotCode # unqtListToDot :: [GlobalAttributes] -> DotCode # listToDot :: [GlobalAttributes] -> DotCode #
PrintDot GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: GraphID -> DotCode # toDot :: GraphID -> DotCode # unqtListToDot :: [GraphID] -> DotCode # listToDot :: [GraphID] -> DotCode #
PrintDot a => PrintDot [a] # |
Instance details Defined in Data.GraphViz.Printing Methods unqtDot :: [a] -> DotCode # toDot :: [a] -> DotCode # unqtListToDot :: [[a]] -> DotCode # listToDot :: [[a]] -> DotCode #
PrintDot n => PrintDot (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: DotEdge n -> DotCode # toDot :: DotEdge n -> DotCode # unqtListToDot :: [DotEdge n] -> DotCode # listToDot :: [DotEdge n] -> DotCode #
PrintDot n => PrintDot (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: DotNode n -> DotCode # toDot :: DotNode n -> DotCode # unqtListToDot :: [DotNode n] -> DotCode # listToDot :: [DotNode n] -> DotCode #
PrintDot n => PrintDot (DotSubGraph n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods unqtDot :: DotSubGraph n -> DotCode # toDot :: DotSubGraph n -> DotCode # unqtListToDot :: [DotSubGraph n] -> DotCode # listToDot :: [DotSubGraph n] -> DotCode #
PrintDot n => PrintDot (DotStatements n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods unqtDot :: DotStatements n -> DotCode # toDot :: DotStatements n -> DotCode # unqtListToDot :: [DotStatements n] -> DotCode # listToDot :: [DotStatements n] -> DotCode #
PrintDot n => PrintDot (DotGraph n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods unqtDot :: DotGraph n -> DotCode # toDot :: DotGraph n -> DotCode # unqtListToDot :: [DotGraph n] -> DotCode # listToDot :: [DotGraph n] -> DotCode #
PrintDot n => PrintDot (DotSubGraph n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods unqtDot :: DotSubGraph n -> DotCode # toDot :: DotSubGraph n -> DotCode # unqtListToDot :: [DotSubGraph n] -> DotCode # listToDot :: [DotSubGraph n] -> DotCode #
PrintDot n => PrintDot (DotStatement n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods unqtDot :: DotStatement n -> DotCode # toDot :: DotStatement n -> DotCode # unqtListToDot :: [DotStatement n] -> DotCode # listToDot :: [DotStatement n] -> DotCode #
PrintDot n => PrintDot (DotGraph n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods unqtDot :: DotGraph n -> DotCode # toDot :: DotGraph n -> DotCode # unqtListToDot :: [DotGraph n] -> DotCode # listToDot :: [DotGraph n] -> DotCode #
PrintDot n => PrintDot (DotGraph n) # | Uses the PrintDot instance for canonical `DotGraph`s.
Instance details Defined in Data.GraphViz.Types.Graph Methods unqtDot :: DotGraph n -> DotCode # toDot :: DotGraph n -> DotCode # unqtListToDot :: [DotGraph n] -> DotCode # listToDot :: [DotGraph n] -> DotCode #

class ParseDot a where #

Minimal complete definition

parseUnqt

Methods

parseUnqt :: Parse a #

parse :: Parse a #

parseUnqtList :: Parse [a] #

parseList :: Parse [a] #

Instances

ParseDot Bool # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Bool # parse :: Parse Bool # parseUnqtList :: Parse [Bool] # parseList :: Parse [Bool] #
ParseDot Char # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Char # parse :: Parse Char # parseUnqtList :: Parse [Char] # parseList :: Parse [Char] #
ParseDot Double # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Double # parse :: Parse Double # parseUnqtList :: Parse [Double] # parseList :: Parse [Double] #
ParseDot Int # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Int # parse :: Parse Int # parseUnqtList :: Parse [Int] # parseList :: Parse [Int] #
ParseDot Integer # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Integer # parse :: Parse Integer # parseUnqtList :: Parse [Integer] # parseList :: Parse [Integer] #
ParseDot Word8 # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Word8 # parse :: Parse Word8 # parseUnqtList :: Parse [Word8] # parseList :: Parse [Word8] #
ParseDot Word16 # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Word16 # parse :: Parse Word16 # parseUnqtList :: Parse [Word16] # parseList :: Parse [Word16] #
ParseDot Version # | Ignores `versionTags` and assumes 'not . null . versionBranch' (usually you want 'length . versionBranch == 2') and that all such values are non-negative.
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Version # parse :: Parse Version # parseUnqtList :: Parse [Version] # parseList :: Parse [Version] #
ParseDot Text # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Text # parse :: Parse Text # parseUnqtList :: Parse [Text] # parseList :: Parse [Text] #
ParseDot Text # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse Text # parse :: Parse Text # parseUnqtList :: Parse [Text] # parseList :: Parse [Text] #
ParseDot BrewerName # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse BrewerName # parse :: Parse BrewerName # parseUnqtList :: Parse [BrewerName] # parseList :: Parse [BrewerName] #
ParseDot BrewerScheme # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse BrewerScheme # parse :: Parse BrewerScheme # parseUnqtList :: Parse [BrewerScheme] # parseList :: Parse [BrewerScheme] #
ParseDot ColorScheme # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse ColorScheme # parse :: Parse ColorScheme # parseUnqtList :: Parse [ColorScheme] # parseList :: Parse [ColorScheme] #
ParseDot GraphvizCommand # |
Instance details Defined in Data.GraphViz.Commands.Available Methods parseUnqt :: Parse GraphvizCommand # parse :: Parse GraphvizCommand # parseUnqtList :: Parse [GraphvizCommand] # parseList :: Parse [GraphvizCommand] #
ParseDot CompassPoint # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods parseUnqt :: Parse CompassPoint # parse :: Parse CompassPoint # parseUnqtList :: Parse [CompassPoint] # parseList :: Parse [CompassPoint] #
ParseDot PortPos # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods parseUnqt :: Parse PortPos # parse :: Parse PortPos # parseUnqtList :: Parse [PortPos] # parseList :: Parse [PortPos] #
ParseDot PortName # |
Instance details Defined in Data.GraphViz.Attributes.Internal Methods parseUnqt :: Parse PortName # parse :: Parse PortName # parseUnqtList :: Parse [PortName] # parseList :: Parse [PortName] #
ParseDot X11Color # |
Instance details Defined in Data.GraphViz.Attributes.Colors.X11 Methods parseUnqt :: Parse X11Color # parse :: Parse X11Color # parseUnqtList :: Parse [X11Color] # parseList :: Parse [X11Color] #
ParseDot SVGColor # |
Instance details Defined in Data.GraphViz.Attributes.Colors.SVG Methods parseUnqt :: Parse SVGColor # parse :: Parse SVGColor # parseUnqtList :: Parse [SVGColor] # parseList :: Parse [SVGColor] #
ParseDot WeightedColor # |
Instance details Defined in Data.GraphViz.Attributes.Colors Methods parseUnqt :: Parse WeightedColor # parse :: Parse WeightedColor # parseUnqtList :: Parse [WeightedColor] # parseList :: Parse [WeightedColor] #
ParseDot Color # |
Instance details Defined in Data.GraphViz.Attributes.Colors Methods parseUnqt :: Parse Color # parse :: Parse Color # parseUnqtList :: Parse [Color] # parseList :: Parse [Color] #
ParseDot Style # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Style # parse :: Parse Style # parseUnqtList :: Parse [Style] # parseList :: Parse [Style] #
ParseDot Side # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Side # parse :: Parse Side # parseUnqtList :: Parse [Side] # parseList :: Parse [Side] #
ParseDot Scale # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Scale # parse :: Parse Scale # parseUnqtList :: Parse [Scale] # parseList :: Parse [Scale] #
ParseDot CellFormat # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse CellFormat # parse :: Parse CellFormat # parseUnqtList :: Parse [CellFormat] # parseList :: Parse [CellFormat] #
ParseDot VAlign # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse VAlign # parse :: Parse VAlign # parseUnqtList :: Parse [VAlign] # parseList :: Parse [VAlign] #
ParseDot Align # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Align # parse :: Parse Align # parseUnqtList :: Parse [Align] # parseList :: Parse [Align] #
ParseDot Attribute # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Attribute # parse :: Parse Attribute # parseUnqtList :: Parse [Attribute] # parseList :: Parse [Attribute] #
ParseDot Img # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Img # parse :: Parse Img # parseUnqtList :: Parse [Img] # parseList :: Parse [Img] #
ParseDot Cell # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Cell # parse :: Parse Cell # parseUnqtList :: Parse [Cell] # parseList :: Parse [Cell] #
ParseDot Row # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Row # parse :: Parse Row # parseUnqtList :: Parse [Row] # parseList :: Parse [Row] #
ParseDot Table # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Table # parse :: Parse Table # parseUnqtList :: Parse [Table] # parseList :: Parse [Table] #
ParseDot Format # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Format # parse :: Parse Format # parseUnqtList :: Parse [Format] # parseList :: Parse [Format] #
ParseDot TextItem # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse TextItem # parse :: Parse TextItem # parseUnqtList :: Parse [TextItem] # parseList :: Parse [TextItem] #
ParseDot Label # |
Instance details Defined in Data.GraphViz.Attributes.HTML Methods parseUnqt :: Parse Label # parse :: Parse Label # parseUnqtList :: Parse [Label] # parseList :: Parse [Label] #
ParseDot NodeSize # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse NodeSize # parse :: Parse NodeSize # parseUnqtList :: Parse [NodeSize] # parseList :: Parse [NodeSize] #
ParseDot Normalized # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Normalized # parse :: Parse Normalized # parseUnqtList :: Parse [Normalized] # parseList :: Parse [Normalized] #
ParseDot Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Number # parse :: Parse Number # parseUnqtList :: Parse [Number] # parseList :: Parse [Number] #
ParseDot Ratios # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Ratios # parse :: Parse Ratios # parseUnqtList :: Parse [Ratios] # parseList :: Parse [Ratios] #
ParseDot Justification # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Justification # parse :: Parse Justification # parseUnqtList :: Parse [Justification] # parseList :: Parse [Justification] #
ParseDot ScaleType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse ScaleType # parse :: Parse ScaleType # parseUnqtList :: Parse [ScaleType] # parseList :: Parse [ScaleType] #
ParseDot Paths # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Paths # parse :: Parse Paths # parseUnqtList :: Parse [Paths] # parseList :: Parse [Paths] #
ParseDot VerticalPlacement # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse VerticalPlacement # parse :: Parse VerticalPlacement # parseUnqtList :: Parse [VerticalPlacement] # parseList :: Parse [VerticalPlacement] #
ParseDot FocusType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse FocusType # parse :: Parse FocusType # parseUnqtList :: Parse [FocusType] # parseList :: Parse [FocusType] #
ParseDot ViewPort # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse ViewPort # parse :: Parse ViewPort # parseUnqtList :: Parse [ViewPort] # parseList :: Parse [ViewPort] #
ParseDot StyleName # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse StyleName # parse :: Parse StyleName # parseUnqtList :: Parse [StyleName] # parseList :: Parse [StyleName] #
ParseDot StyleItem # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse StyleItem # parse :: Parse StyleItem # parseUnqtList :: Parse [StyleItem] # parseList :: Parse [StyleItem] #
ParseDot STStyle # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse STStyle # parse :: Parse STStyle # parseUnqtList :: Parse [STStyle] # parseList :: Parse [STStyle] #
ParseDot StartType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse StartType # parse :: Parse StartType # parseUnqtList :: Parse [StartType] # parseList :: Parse [StartType] #
ParseDot SmoothType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse SmoothType # parse :: Parse SmoothType # parseUnqtList :: Parse [SmoothType] # parseList :: Parse [SmoothType] #
ParseDot Shape # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Shape # parse :: Parse Shape # parseUnqtList :: Parse [Shape] # parseList :: Parse [Shape] #
ParseDot RankDir # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse RankDir # parse :: Parse RankDir # parseUnqtList :: Parse [RankDir] # parseList :: Parse [RankDir] #
ParseDot RankType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse RankType # parse :: Parse RankType # parseUnqtList :: Parse [RankType] # parseList :: Parse [RankType] #
ParseDot Root # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Root # parse :: Parse Root # parseUnqtList :: Parse [Root] # parseList :: Parse [Root] #
ParseDot QuadType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse QuadType # parse :: Parse QuadType # parseUnqtList :: Parse [QuadType] # parseList :: Parse [QuadType] #
ParseDot Spline # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Spline # parse :: Parse Spline # parseUnqtList :: Parse [Spline] # parseList :: Parse [Spline] #
ParseDot PageDir # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse PageDir # parse :: Parse PageDir # parseUnqtList :: Parse [PageDir] # parseList :: Parse [PageDir] #
ParseDot EdgeType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse EdgeType # parse :: Parse EdgeType # parseUnqtList :: Parse [EdgeType] # parseList :: Parse [EdgeType] #
ParseDot Pos # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Pos # parse :: Parse Pos # parseUnqtList :: Parse [Pos] # parseList :: Parse [Pos] #
ParseDot PackMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse PackMode # parse :: Parse PackMode # parseUnqtList :: Parse [PackMode] # parseList :: Parse [PackMode] #
ParseDot Pack # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Pack # parse :: Parse Pack # parseUnqtList :: Parse [Pack] # parseList :: Parse [Pack] #
ParseDot OutputMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse OutputMode # parse :: Parse OutputMode # parseUnqtList :: Parse [OutputMode] # parseList :: Parse [OutputMode] #
ParseDot Order # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Order # parse :: Parse Order # parseUnqtList :: Parse [Order] # parseList :: Parse [Order] #
ParseDot LayerList # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LayerList # parse :: Parse LayerList # parseUnqtList :: Parse [LayerList] # parseList :: Parse [LayerList] #
ParseDot LayerID # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LayerID # parse :: Parse LayerID # parseUnqtList :: Parse [LayerID] # parseList :: Parse [LayerID] #
ParseDot LayerRangeElem # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LayerRangeElem # parse :: Parse LayerRangeElem # parseUnqtList :: Parse [LayerRangeElem] # parseList :: Parse [LayerRangeElem] #
ParseDot LayerListSep # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LayerListSep # parse :: Parse LayerListSep # parseUnqtList :: Parse [LayerListSep] # parseList :: Parse [LayerListSep] #
ParseDot LayerSep # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LayerSep # parse :: Parse LayerSep # parseUnqtList :: Parse [LayerSep] # parseList :: Parse [LayerSep] #
ParseDot Overlap # | Note that `overlap=false` defaults to ``PrismOverlap` Nothing`, but if the Prism library isn't available then it is equivalent to `VoronoiOverlap`.
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Overlap # parse :: Parse Overlap # parseUnqtList :: Parse [Overlap] # parseList :: Parse [Overlap] #
ParseDot Point # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Point # parse :: Parse Point # parseUnqtList :: Parse [Point] # parseList :: Parse [Point] #
ParseDot LabelScheme # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse LabelScheme # parse :: Parse LabelScheme # parseUnqtList :: Parse [LabelScheme] # parseList :: Parse [LabelScheme] #
ParseDot RecordField # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse RecordField # parse :: Parse RecordField # parseUnqtList :: Parse [RecordField] # parseList :: Parse [RecordField] #
ParseDot Label # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Label # parse :: Parse Label # parseUnqtList :: Parse [Label] # parseList :: Parse [Label] #
ParseDot Model # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Model # parse :: Parse Model # parseUnqtList :: Parse [Model] # parseList :: Parse [Model] #
ParseDot ModeType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse ModeType # parse :: Parse ModeType # parseUnqtList :: Parse [ModeType] # parseList :: Parse [ModeType] #
ParseDot GraphSize # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse GraphSize # parse :: Parse GraphSize # parseUnqtList :: Parse [GraphSize] # parseList :: Parse [GraphSize] #
ParseDot SVGFontNames # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse SVGFontNames # parse :: Parse SVGFontNames # parseUnqtList :: Parse [SVGFontNames] # parseList :: Parse [SVGFontNames] #
ParseDot DPoint # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse DPoint # parse :: Parse DPoint # parseUnqtList :: Parse [DPoint] # parseList :: Parse [DPoint] #
ParseDot DEConstraints # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse DEConstraints # parse :: Parse DEConstraints # parseUnqtList :: Parse [DEConstraints] # parseList :: Parse [DEConstraints] #
ParseDot DirType # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse DirType # parse :: Parse DirType # parseUnqtList :: Parse [DirType] # parseList :: Parse [DirType] #
ParseDot ClusterMode # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse ClusterMode # parse :: Parse ClusterMode # parseUnqtList :: Parse [ClusterMode] # parseList :: Parse [ClusterMode] #
ParseDot Rect # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Rect # parse :: Parse Rect # parseUnqtList :: Parse [Rect] # parseList :: Parse [Rect] #
ParseDot ArrowSide # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods parseUnqt :: Parse ArrowSide # parse :: Parse ArrowSide # parseUnqtList :: Parse [ArrowSide] # parseList :: Parse [ArrowSide] #
ParseDot ArrowFill # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods parseUnqt :: Parse ArrowFill # parse :: Parse ArrowFill # parseUnqtList :: Parse [ArrowFill] # parseList :: Parse [ArrowFill] #
ParseDot ArrowModifier # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods parseUnqt :: Parse ArrowModifier # parse :: Parse ArrowModifier # parseUnqtList :: Parse [ArrowModifier] # parseList :: Parse [ArrowModifier] #
ParseDot ArrowShape # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods parseUnqt :: Parse ArrowShape # parse :: Parse ArrowShape # parseUnqtList :: Parse [ArrowShape] # parseList :: Parse [ArrowShape] #
ParseDot ArrowType # |
Instance details Defined in Data.GraphViz.Attributes.Arrows Methods parseUnqt :: Parse ArrowType # parse :: Parse ArrowType # parseUnqtList :: Parse [ArrowType] # parseList :: Parse [ArrowType] #
ParseDot Attribute # |
Instance details Defined in Data.GraphViz.Attributes.Complete Methods parseUnqt :: Parse Attribute # parse :: Parse Attribute # parseUnqtList :: Parse [Attribute] # parseList :: Parse [Attribute] #
ParseDot GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse GlobalAttributes # parse :: Parse GlobalAttributes # parseUnqtList :: Parse [GlobalAttributes] # parseList :: Parse [GlobalAttributes] #
ParseDot GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse GraphID # parse :: Parse GraphID # parseUnqtList :: Parse [GraphID] # parseList :: Parse [GraphID] #
ParseDot a => ParseDot [a] # |
Instance details Defined in Data.GraphViz.Parsing Methods parseUnqt :: Parse [a] # parse :: Parse [a] # parseUnqtList :: Parse [[a]] # parseList :: Parse [[a]] #
ParseDot n => ParseDot (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse (DotEdge n) # parse :: Parse (DotEdge n) # parseUnqtList :: Parse [DotEdge n] # parseList :: Parse [DotEdge n] #
ParseDot n => ParseDot (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse (DotNode n) # parse :: Parse (DotNode n) # parseUnqtList :: Parse [DotNode n] # parseList :: Parse [DotNode n] #
ParseDot n => ParseDot (DotSubGraph n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods parseUnqt :: Parse (DotSubGraph n) # parse :: Parse (DotSubGraph n) # parseUnqtList :: Parse [DotSubGraph n] # parseList :: Parse [DotSubGraph n] #
ParseDot n => ParseDot (DotStatements n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods parseUnqt :: Parse (DotStatements n) # parse :: Parse (DotStatements n) # parseUnqtList :: Parse [DotStatements n] # parseList :: Parse [DotStatements n] #
ParseDot n => ParseDot (DotGraph n) # |
Instance details Defined in Data.GraphViz.Types.Canonical Methods parseUnqt :: Parse (DotGraph n) # parse :: Parse (DotGraph n) # parseUnqtList :: Parse [DotGraph n] # parseList :: Parse [DotGraph n] #
ParseDot n => ParseDot (DotSubGraph n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods parseUnqt :: Parse (DotSubGraph n) # parse :: Parse (DotSubGraph n) # parseUnqtList :: Parse [DotSubGraph n] # parseList :: Parse [DotSubGraph n] #
ParseDot n => ParseDot (DotStatement n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods parseUnqt :: Parse (DotStatement n) # parse :: Parse (DotStatement n) # parseUnqtList :: Parse [DotStatement n] # parseList :: Parse [DotStatement n] #
ParseDot n => ParseDot (DotGraph n) # |
Instance details Defined in Data.GraphViz.Types.Generalised Methods parseUnqt :: Parse (DotGraph n) # parse :: Parse (DotGraph n) # parseUnqtList :: Parse [DotGraph n] # parseList :: Parse [DotGraph n] #
(Ord n, ParseDot n) => ParseDot (DotGraph n) # | Uses the ParseDot instance for generalised `DotGraph`s.
Instance details Defined in Data.GraphViz.Types.Graph Methods parseUnqt :: Parse (DotGraph n) # parse :: Parse (DotGraph n) # parseUnqtList :: Parse [DotGraph n] # parseList :: Parse [DotGraph n] #

class (DotRepr dg n, PrintDot (dg n)) => PrintDotRepr dg n #

This class exists just to make type signatures nicer; all instances of `DotRepr` should also be an instance of `PrintDotRepr`.

Instances

(Ord n, PrintDot n) => PrintDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types
(Ord n, PrintDot n) => PrintDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Generalised
(Ord n, PrintDot n) => PrintDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Graph

class (DotRepr dg n, ParseDot (dg n)) => ParseDotRepr dg n #

This class exists just to make type signatures nicer; all instances of `DotRepr` should also be an instance of `ParseDotRepr`.

Instances

(Ord n, ParseDot n) => ParseDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types
(Ord n, ParseDot n) => ParseDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Generalised
(Ord n, ParseDot n) => ParseDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Graph

class (PrintDotRepr dg n, ParseDotRepr dg n) => PPDotRepr dg n #

This class exists just to make type signatures nicer; all instances of `DotRepr` should also be an instance of `PPDotRepr`.

Instances

(Ord n, PrintDot n, ParseDot n) => PPDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types
(Ord n, PrintDot n, ParseDot n) => PPDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Generalised
(Ord n, PrintDot n, ParseDot n) => PPDotRepr DotGraph n # |
Instance details Defined in Data.GraphViz.Types.Graph

# Common sub-types

data GraphID #

A polymorphic type that covers all possible ID values allowed by Dot syntax. Note that whilst the `ParseDot` and `PrintDot` instances for `String` will properly take care of the special cases for numbers, they are treated differently here.

Constructors

Str Text |
Num Number |

Instances

Eq GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods (==) :: GraphID -> GraphID -> Bool # (/=) :: GraphID -> GraphID -> Bool #
Ord GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods compare :: GraphID -> GraphID -> Ordering # (<) :: GraphID -> GraphID -> Bool # (<=) :: GraphID -> GraphID -> Bool # (>) :: GraphID -> GraphID -> Bool # (>=) :: GraphID -> GraphID -> Bool # max :: GraphID -> GraphID -> GraphID # min :: GraphID -> GraphID -> GraphID #
Read GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods readsPrec :: Int -> ReadS GraphID # readList :: ReadS [GraphID] # readPrec :: ReadPrec GraphID # readListPrec :: ReadPrec [GraphID] #
Show GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods showsPrec :: Int -> GraphID -> ShowS # show :: GraphID -> String # showList :: [GraphID] -> ShowS #
ParseDot GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse GraphID # parse :: Parse GraphID # parseUnqtList :: Parse [GraphID] # parseList :: Parse [GraphID] #
PrintDot GraphID # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: GraphID -> DotCode # toDot :: GraphID -> DotCode # unqtListToDot :: [GraphID] -> DotCode # listToDot :: [GraphID] -> DotCode #

data Number #

A numeric type with an explicit separation between integers and floating-point values.

Constructors

Int Int |
Dbl Double |

Instances

Eq Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods (==) :: Number -> Number -> Bool # (/=) :: Number -> Number -> Bool #
Ord Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods compare :: Number -> Number -> Ordering # (<) :: Number -> Number -> Bool # (<=) :: Number -> Number -> Bool # (>) :: Number -> Number -> Bool # (>=) :: Number -> Number -> Bool # max :: Number -> Number -> Number # min :: Number -> Number -> Number #
Read Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods readsPrec :: Int -> ReadS Number # readList :: ReadS [Number] # readPrec :: ReadPrec Number # readListPrec :: ReadPrec [Number] #
Show Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods showsPrec :: Int -> Number -> ShowS # show :: Number -> String # showList :: [Number] -> ShowS #
ParseDot Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods parseUnqt :: Parse Number # parse :: Parse Number # parseUnqtList :: Parse [Number] # parseList :: Parse [Number] #
PrintDot Number # |
Instance details Defined in Data.GraphViz.Attributes.Values Methods unqtDot :: Number -> DotCode # toDot :: Number -> DotCode # unqtListToDot :: [Number] -> DotCode # listToDot :: [Number] -> DotCode #

class ToGraphID a where #

A convenience class to make it easier to convert data types to `GraphID` values, e.g. for cluster identifiers.

In most cases, conversion would be via the `Text` or `String` instances (e.g. using `show`).

Minimal complete definition

toGraphID

Methods

toGraphID :: a -> GraphID #

Instances

ToGraphID Char # |
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: Char -> GraphID #
ToGraphID Double # |
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: Double -> GraphID #
ToGraphID Int # |
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: Int -> GraphID #
ToGraphID Integer # | This instance loses precision by going via `Int`.
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: Integer -> GraphID #
ToGraphID String # |
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: String -> GraphID #
ToGraphID Text # |
Instance details Defined in Data.GraphViz.Types Methods toGraphID :: Text -> GraphID #

textGraphID :: Text -> GraphID #

An alias for `toGraphID` for use with the `OverloadedStrings` extension.

data GlobalAttributes #

Represents a list of top-level list of `Attribute`s for the entire graph/sub-graph. Note that `GraphAttrs` also applies to `DotSubGraph`s.

Note that Dot allows a single `Attribute` to be listed on a line; if this is the case then when parsing, the type of `Attribute` it is determined and that type of `GlobalAttribute` is created.

Constructors

GraphAttrs |
Fields attrs :: Attributes
NodeAttrs |
Fields attrs :: Attributes
EdgeAttrs |
Fields attrs :: Attributes

Instances

Eq GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods (==) :: GlobalAttributes -> GlobalAttributes -> Bool # (/=) :: GlobalAttributes -> GlobalAttributes -> Bool #
Ord GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods compare :: GlobalAttributes -> GlobalAttributes -> Ordering # (<) :: GlobalAttributes -> GlobalAttributes -> Bool # (<=) :: GlobalAttributes -> GlobalAttributes -> Bool # (>) :: GlobalAttributes -> GlobalAttributes -> Bool # (>=) :: GlobalAttributes -> GlobalAttributes -> Bool # max :: GlobalAttributes -> GlobalAttributes -> GlobalAttributes # min :: GlobalAttributes -> GlobalAttributes -> GlobalAttributes #
Read GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods readsPrec :: Int -> ReadS GlobalAttributes # readList :: ReadS [GlobalAttributes] # readPrec :: ReadPrec GlobalAttributes # readListPrec :: ReadPrec [GlobalAttributes] #
Show GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods showsPrec :: Int -> GlobalAttributes -> ShowS # show :: GlobalAttributes -> String # showList :: [GlobalAttributes] -> ShowS #
ParseDot GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse GlobalAttributes # parse :: Parse GlobalAttributes # parseUnqtList :: Parse [GlobalAttributes] # parseList :: Parse [GlobalAttributes] #
PrintDot GlobalAttributes # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: GlobalAttributes -> DotCode # toDot :: GlobalAttributes -> DotCode # unqtListToDot :: [GlobalAttributes] -> DotCode # listToDot :: [GlobalAttributes] -> DotCode #

data DotNode n #

A node in `DotGraph`.

Constructors

DotNode |
Fields nodeID :: n nodeAttributes :: Attributes

Instances

Functor DotNode # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods fmap :: (a -> b) -> DotNode a -> DotNode b # (<$) :: a -> DotNode b -> DotNode a #
Eq n => Eq (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods (==) :: DotNode n -> DotNode n -> Bool # (/=) :: DotNode n -> DotNode n -> Bool #
Ord n => Ord (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods compare :: DotNode n -> DotNode n -> Ordering # (<) :: DotNode n -> DotNode n -> Bool # (<=) :: DotNode n -> DotNode n -> Bool # (>) :: DotNode n -> DotNode n -> Bool # (>=) :: DotNode n -> DotNode n -> Bool # max :: DotNode n -> DotNode n -> DotNode n # min :: DotNode n -> DotNode n -> DotNode n #
Read n => Read (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods readsPrec :: Int -> ReadS (DotNode n) # readList :: ReadS [DotNode n] # readPrec :: ReadPrec (DotNode n) # readListPrec :: ReadPrec [DotNode n] #
Show n => Show (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods showsPrec :: Int -> DotNode n -> ShowS # show :: DotNode n -> String # showList :: [DotNode n] -> ShowS #
ParseDot n => ParseDot (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse (DotNode n) # parse :: Parse (DotNode n) # parseUnqtList :: Parse [DotNode n] # parseList :: Parse [DotNode n] #
PrintDot n => PrintDot (DotNode n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: DotNode n -> DotCode # toDot :: DotNode n -> DotCode # unqtListToDot :: [DotNode n] -> DotCode # listToDot :: [DotNode n] -> DotCode #

data DotEdge n #

An edge in `DotGraph`.

Constructors

DotEdge |
Fields fromNode :: n toNode :: n edgeAttributes :: Attributes

Instances

Functor DotEdge # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods fmap :: (a -> b) -> DotEdge a -> DotEdge b # (<$) :: a -> DotEdge b -> DotEdge a #
Eq n => Eq (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods (==) :: DotEdge n -> DotEdge n -> Bool # (/=) :: DotEdge n -> DotEdge n -> Bool #
Ord n => Ord (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods compare :: DotEdge n -> DotEdge n -> Ordering # (<) :: DotEdge n -> DotEdge n -> Bool # (<=) :: DotEdge n -> DotEdge n -> Bool # (>) :: DotEdge n -> DotEdge n -> Bool # (>=) :: DotEdge n -> DotEdge n -> Bool # max :: DotEdge n -> DotEdge n -> DotEdge n # min :: DotEdge n -> DotEdge n -> DotEdge n #
Read n => Read (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods readsPrec :: Int -> ReadS (DotEdge n) # readList :: ReadS [DotEdge n] # readPrec :: ReadPrec (DotEdge n) # readListPrec :: ReadPrec [DotEdge n] #
Show n => Show (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods showsPrec :: Int -> DotEdge n -> ShowS # show :: DotEdge n -> String # showList :: [DotEdge n] -> ShowS #
ParseDot n => ParseDot (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods parseUnqt :: Parse (DotEdge n) # parse :: Parse (DotEdge n) # parseUnqtList :: Parse [DotEdge n] # parseList :: Parse [DotEdge n] #
PrintDot n => PrintDot (DotEdge n) # |
Instance details Defined in Data.GraphViz.Types.Internal.Common Methods unqtDot :: DotEdge n -> DotCode # toDot :: DotEdge n -> DotCode # unqtListToDot :: [DotEdge n] -> DotCode # listToDot :: [DotEdge n] -> DotCode #

# Helper types for looking up information within a `DotRepr`.

type ClusterLookup = Map (Maybe GraphID) ([Path], GlobalAttributes) #

The available information for each cluster; the `[`Path`]` denotes all locations where that particular cluster is located (more than one location can indicate possible problems).

type NodeLookup n = Map n (Path, Attributes) #

The available information on each `DotNode` (both explicit and implicit).

type Path = Seq (Maybe GraphID) #

The path of clusters that must be traversed to reach this spot.

graphStructureInformationClean :: DotRepr dg n => dg n -> (GlobalAttributes, ClusterLookup) #

A variant of `graphStructureInformation` with default attributes removed and only attributes usable by graph/cluster kept (where applicable).

nodeInformationClean :: DotRepr dg n => Bool -> dg n -> NodeLookup n #

A variant of `nodeInformation` with default attributes removed and only attributes used by nodes kept.

edgeInformationClean :: DotRepr dg n => Bool -> dg n -> [DotEdge n] #

A variant of `edgeInformation` with default attributes removed and only attributes used by edges kept.

# Obtaining the `DotNode`s and `DotEdges`.

graphNodes :: DotRepr dg n => dg n -> [DotNode n] #

Returns all resultant `DotNode`s in the `DotRepr` (not including `NodeAttr`s).

graphEdges :: DotRepr dg n => dg n -> [DotEdge n] #

Returns all resultant `DotEdge`s in the `DotRepr` (not including `EdgeAttr`s).

# Printing and parsing a `DotRepr`.

printDotGraph :: PrintDotRepr dg n => dg n -> Text #

The actual Dot code for an instance of `DotRepr`. Note that it is expected that ``parseDotGraph` . `printDotGraph` == `id`` (this might not be true the other way around due to un-parseable components).

parseDotGraph :: ParseDotRepr dg n => Text -> dg n #

Parse a limited subset of the Dot language to form an instance of `DotRepr`. Each instance may have its own limitations on what may or may not be parseable Dot code.

Also removes any comments, etc. before parsing.

parseDotGraphLiberally :: ParseDotRepr dg n => Text -> dg n #

As with `parseDotGraph`, but if an `Attribute` cannot be parsed strictly according to the known rules, let it fall back to being parsed as an `UnknownAttribute`. This is especially useful for when using a version of Graphviz that is either newer (especially for the XDot attributes) or older (when some attributes have changed) but you'd still prefer it to parse rather than throwing an error.

# Limitations and documentation

Printing of Dot code is done as strictly as possible, whilst parsing is as permissive as possible. For example, if the types allow it then `"2"` will be parsed as an `Int` value. Note that quoting and escaping of textual values is done automagically.

A summary of known limitations/differences:

- When creating `GraphID` values for graphs and sub-graphs, you should ensure that none of them have the same printed value as one of the node identifiers values to avoid any possible problems.
- If you want any `GlobalAttributes` in a sub-graph and want them to only apply to that sub-graph, then you must ensure it does indeed have a valid `GraphID`.
- All sub-graphs which represent clusters should have unique identifiers (well, only if you want them to be generated sensibly).
- If eventually outputting to a format such as SVG, then you should make sure to specify an identifier for the overall graph, as that is used as the title of the resulting image.
- Whilst the graphs, etc. are polymorphic in their node type, you should ensure that you use a relatively simple node type (that is, it only covers a single line, etc.).
- Also, whilst Graphviz allows you to mix the types used for nodes, this library requires/assumes that they are all the same type (but you can use a sum-type).
- `DotEdge` defines an edge `(a, b)` (with an edge going from `a` to `b`); in Dot parlance the edge has a head at `a` and a tail at `b`. Care must be taken when using the related `Head*` and `Tail*` `Attribute`s. See the differences section in Data.GraphViz.Attributes for more information.
- It is common to see multiple edges defined on the one line in Dot (e.g. `n1 -> n2 -> n3` means to create a directed edge from `n1` to `n2` and from `n2` to `n3`). These types of edge definitions are parseable; however, they are converted to singleton edges.
- It is not yet possible to create or parse edges with subgraphs/clusters as one of the end points.
- The parser will strip out comments and pre-processor lines, join together multiline statements and concatenate split strings together. However, pre-processing within HTML-like labels is currently not supported.
- Graphviz allows a node to be "defined" twice (e.g. the actual node definition, and then in a subgraph with extra global attributes applied to it). This actually represents the same node, but when parsing they will be considered as separate `DotNode`s (such that `graphNodes` will return both "definitions"). `canonicalise` from Data.GraphViz.Algorithms can be used to fix this.

See Data.GraphViz.Attributes.Complete for more limitations.