Data.GraphViz.Printing

graphviz-2999.18.1.2: Bindings to Graphviz for graph visualisation.

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

Data.GraphViz.Printing

Contents

- Orphan instances

Description

This module defines simple helper functions for use with Text.PrettyPrint. It also re-exports all the pretty-printing combinators from that module.

Note that the `PrintDot` instances for `Bool`, etc. match those specified for use with Graphviz.

You should only be using this module if you are writing custom node types for use with Data.GraphViz.Types. For actual printing of code, use ``printDotGraph`` (which produces a `Text` value).

The Dot language specification specifies that any identifier is in one of four forms:

- Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
- a number [-]?(.[0-9]+ | [0-9]+(.[0-9]*)? );
- any double-quoted string ("...") possibly containing escaped quotes (\");
- an HTML string (<...>).

(Note that the first restriction is referring to a byte-by-byte comparison using octal values; when using UTF-8 this corresponds to all characters `c` where `ord c >= 128`.)

Due to these restrictions, you should only use `text` when you are sure that the `Text` in question is static and quotes are definitely needed/unneeded; it is better to use the `Text` instance for `PrintDot`. For more information, see the specification page: http://graphviz.org/doc/info/lang.html

Synopsis

- module Text.PrettyPrint.Leijen.Text.Monadic
- type DotCode = State GraphvizState Doc
- renderDot :: DotCode -> Text
- class PrintDot a where
- unqtText :: Text -> DotCode
- dotText :: Text -> DotCode
- printIt :: PrintDot a => a -> Text
- addQuotes :: Text -> DotCode -> DotCode
- unqtEscaped :: [Char] -> Text -> DotCode
- printEscaped :: [Char] -> Text -> DotCode
- wrap :: DotCode -> DotCode -> DotCode -> DotCode
- commaDel :: (PrintDot a, PrintDot b) => a -> b -> DotCode
- printField :: PrintDot a => Text -> a -> DotCode
- angled :: DotCode -> DotCode
- fslash :: DotCode
- printColorScheme :: Bool -> ColorScheme -> DotCode

# Documentation

module Text.PrettyPrint.Leijen.Text.Monadic

type DotCode = State GraphvizState Doc #

A type alias to indicate what is being produced.

renderDot :: DotCode -> Text #

Correctly render Graphviz output.

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 # |
Methods unqtDot :: Bool -> DotCode # toDot :: Bool -> DotCode # unqtListToDot :: [Bool] -> DotCode # listToDot :: [Bool] -> DotCode #
PrintDot Char # |
Methods unqtDot :: Char -> DotCode # toDot :: Char -> DotCode # unqtListToDot :: [Char] -> DotCode # listToDot :: [Char] -> DotCode #
PrintDot Double # |
Methods unqtDot :: Double -> DotCode # toDot :: Double -> DotCode # unqtListToDot :: [Double] -> DotCode # listToDot :: [Double] -> DotCode #
PrintDot Int # |
Methods unqtDot :: Int -> DotCode # toDot :: Int -> DotCode # unqtListToDot :: [Int] -> DotCode # listToDot :: [Int] -> DotCode #
PrintDot Integer # |
Methods unqtDot :: Integer -> DotCode # toDot :: Integer -> DotCode # unqtListToDot :: [Integer] -> DotCode # listToDot :: [Integer] -> DotCode #
PrintDot Word8 # |
Methods unqtDot :: Word8 -> DotCode # toDot :: Word8 -> DotCode # unqtListToDot :: [Word8] -> DotCode # listToDot :: [Word8] -> DotCode #
PrintDot Word16 # |
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').
Methods unqtDot :: Version -> DotCode # toDot :: Version -> DotCode # unqtListToDot :: [Version] -> DotCode # listToDot :: [Version] -> DotCode #
PrintDot Text # |
Methods unqtDot :: Text -> DotCode # toDot :: Text -> DotCode # unqtListToDot :: [Text] -> DotCode # listToDot :: [Text] -> DotCode #
PrintDot BrewerName # |
Methods unqtDot :: BrewerName -> DotCode # toDot :: BrewerName -> DotCode # unqtListToDot :: [BrewerName] -> DotCode # listToDot :: [BrewerName] -> DotCode #
PrintDot BrewerScheme # |
Methods unqtDot :: BrewerScheme -> DotCode # toDot :: BrewerScheme -> DotCode # unqtListToDot :: [BrewerScheme] -> DotCode # listToDot :: [BrewerScheme] -> DotCode #
PrintDot ColorScheme # |
Methods unqtDot :: ColorScheme -> DotCode # toDot :: ColorScheme -> DotCode # unqtListToDot :: [ColorScheme] -> DotCode # listToDot :: [ColorScheme] -> DotCode #
PrintDot GraphvizCommand # |
Methods unqtDot :: GraphvizCommand -> DotCode # toDot :: GraphvizCommand -> DotCode # unqtListToDot :: [GraphvizCommand] -> DotCode # listToDot :: [GraphvizCommand] -> DotCode #
PrintDot X11Color # |
Methods unqtDot :: X11Color -> DotCode # toDot :: X11Color -> DotCode # unqtListToDot :: [X11Color] -> DotCode # listToDot :: [X11Color] -> DotCode #
PrintDot CompassPoint # |
Methods unqtDot :: CompassPoint -> DotCode # toDot :: CompassPoint -> DotCode # unqtListToDot :: [CompassPoint] -> DotCode # listToDot :: [CompassPoint] -> DotCode #
PrintDot PortPos # |
Methods unqtDot :: PortPos -> DotCode # toDot :: PortPos -> DotCode # unqtListToDot :: [PortPos] -> DotCode # listToDot :: [PortPos] -> DotCode #
PrintDot PortName # |
Methods unqtDot :: PortName -> DotCode # toDot :: PortName -> DotCode # unqtListToDot :: [PortName] -> DotCode # listToDot :: [PortName] -> DotCode #
PrintDot SVGColor # |
Methods unqtDot :: SVGColor -> DotCode # toDot :: SVGColor -> DotCode # unqtListToDot :: [SVGColor] -> DotCode # listToDot :: [SVGColor] -> DotCode #
PrintDot ArrowSide # |
Methods unqtDot :: ArrowSide -> DotCode # toDot :: ArrowSide -> DotCode # unqtListToDot :: [ArrowSide] -> DotCode # listToDot :: [ArrowSide] -> DotCode #
PrintDot ArrowFill # |
Methods unqtDot :: ArrowFill -> DotCode # toDot :: ArrowFill -> DotCode # unqtListToDot :: [ArrowFill] -> DotCode # listToDot :: [ArrowFill] -> DotCode #
PrintDot ArrowModifier # |
Methods unqtDot :: ArrowModifier -> DotCode # toDot :: ArrowModifier -> DotCode # unqtListToDot :: [ArrowModifier] -> DotCode # listToDot :: [ArrowModifier] -> DotCode #
PrintDot ArrowShape # |
Methods unqtDot :: ArrowShape -> DotCode # toDot :: ArrowShape -> DotCode # unqtListToDot :: [ArrowShape] -> DotCode # listToDot :: [ArrowShape] -> DotCode #
PrintDot ArrowType # |
Methods unqtDot :: ArrowType -> DotCode # toDot :: ArrowType -> DotCode # unqtListToDot :: [ArrowType] -> DotCode # listToDot :: [ArrowType] -> DotCode #
PrintDot WeightedColor # |
Methods unqtDot :: WeightedColor -> DotCode # toDot :: WeightedColor -> DotCode # unqtListToDot :: [WeightedColor] -> DotCode # listToDot :: [WeightedColor] -> DotCode #
PrintDot Color # |
Methods unqtDot :: Color -> DotCode # toDot :: Color -> DotCode # unqtListToDot :: [Color] -> DotCode # listToDot :: [Color] -> DotCode #
PrintDot Scale # |
Methods unqtDot :: Scale -> DotCode # toDot :: Scale -> DotCode # unqtListToDot :: [Scale] -> DotCode # listToDot :: [Scale] -> DotCode #
PrintDot VAlign # |
Methods unqtDot :: VAlign -> DotCode # toDot :: VAlign -> DotCode # unqtListToDot :: [VAlign] -> DotCode # listToDot :: [VAlign] -> DotCode #
PrintDot Align # |
Methods unqtDot :: Align -> DotCode # toDot :: Align -> DotCode # unqtListToDot :: [Align] -> DotCode # listToDot :: [Align] -> DotCode #
PrintDot Attribute # |
Methods unqtDot :: Attribute -> DotCode # toDot :: Attribute -> DotCode # unqtListToDot :: [Attribute] -> DotCode # listToDot :: [Attribute] -> DotCode #
PrintDot Img # |
Methods unqtDot :: Img -> DotCode # toDot :: Img -> DotCode # unqtListToDot :: [Img] -> DotCode # listToDot :: [Img] -> DotCode #
PrintDot Cell # |
Methods unqtDot :: Cell -> DotCode # toDot :: Cell -> DotCode # unqtListToDot :: [Cell] -> DotCode # listToDot :: [Cell] -> DotCode #
PrintDot Row # |
Methods unqtDot :: Row -> DotCode # toDot :: Row -> DotCode # unqtListToDot :: [Row] -> DotCode # listToDot :: [Row] -> DotCode #
PrintDot Table # |
Methods unqtDot :: Table -> DotCode # toDot :: Table -> DotCode # unqtListToDot :: [Table] -> DotCode # listToDot :: [Table] -> DotCode #
PrintDot Format # |
Methods unqtDot :: Format -> DotCode # toDot :: Format -> DotCode # unqtListToDot :: [Format] -> DotCode # listToDot :: [Format] -> DotCode #
PrintDot TextItem # |
Methods unqtDot :: TextItem -> DotCode # toDot :: TextItem -> DotCode # unqtListToDot :: [TextItem] -> DotCode # listToDot :: [TextItem] -> DotCode #
PrintDot Label # |
Methods unqtDot :: Label -> DotCode # toDot :: Label -> DotCode # unqtListToDot :: [Label] -> DotCode # listToDot :: [Label] -> DotCode #
PrintDot NodeSize # |
Methods unqtDot :: NodeSize -> DotCode # toDot :: NodeSize -> DotCode # unqtListToDot :: [NodeSize] -> DotCode # listToDot :: [NodeSize] -> DotCode #
PrintDot Normalized # |
Methods unqtDot :: Normalized -> DotCode # toDot :: Normalized -> DotCode # unqtListToDot :: [Normalized] -> DotCode # listToDot :: [Normalized] -> DotCode #
PrintDot Number # |
Methods unqtDot :: Number -> DotCode # toDot :: Number -> DotCode # unqtListToDot :: [Number] -> DotCode # listToDot :: [Number] -> DotCode #
PrintDot Ratios # |
Methods unqtDot :: Ratios -> DotCode # toDot :: Ratios -> DotCode # unqtListToDot :: [Ratios] -> DotCode # listToDot :: [Ratios] -> DotCode #
PrintDot Justification # |
Methods unqtDot :: Justification -> DotCode # toDot :: Justification -> DotCode # unqtListToDot :: [Justification] -> DotCode # listToDot :: [Justification] -> DotCode #
PrintDot ScaleType # |
Methods unqtDot :: ScaleType -> DotCode # toDot :: ScaleType -> DotCode # unqtListToDot :: [ScaleType] -> DotCode # listToDot :: [ScaleType] -> DotCode #
PrintDot Paths # |
Methods unqtDot :: Paths -> DotCode # toDot :: Paths -> DotCode # unqtListToDot :: [Paths] -> DotCode # listToDot :: [Paths] -> DotCode #
PrintDot VerticalPlacement # |
Methods unqtDot :: VerticalPlacement -> DotCode # toDot :: VerticalPlacement -> DotCode # unqtListToDot :: [VerticalPlacement] -> DotCode # listToDot :: [VerticalPlacement] -> DotCode #
PrintDot FocusType # |
Methods unqtDot :: FocusType -> DotCode # toDot :: FocusType -> DotCode # unqtListToDot :: [FocusType] -> DotCode # listToDot :: [FocusType] -> DotCode #
PrintDot ViewPort # |
Methods unqtDot :: ViewPort -> DotCode # toDot :: ViewPort -> DotCode # unqtListToDot :: [ViewPort] -> DotCode # listToDot :: [ViewPort] -> DotCode #
PrintDot StyleName # |
Methods unqtDot :: StyleName -> DotCode # toDot :: StyleName -> DotCode # unqtListToDot :: [StyleName] -> DotCode # listToDot :: [StyleName] -> DotCode #
PrintDot StyleItem # |
Methods unqtDot :: StyleItem -> DotCode # toDot :: StyleItem -> DotCode # unqtListToDot :: [StyleItem] -> DotCode # listToDot :: [StyleItem] -> DotCode #
PrintDot STStyle # |
Methods unqtDot :: STStyle -> DotCode # toDot :: STStyle -> DotCode # unqtListToDot :: [STStyle] -> DotCode # listToDot :: [STStyle] -> DotCode #
PrintDot StartType # |
Methods unqtDot :: StartType -> DotCode # toDot :: StartType -> DotCode # unqtListToDot :: [StartType] -> DotCode # listToDot :: [StartType] -> DotCode #
PrintDot SmoothType # |
Methods unqtDot :: SmoothType -> DotCode # toDot :: SmoothType -> DotCode # unqtListToDot :: [SmoothType] -> DotCode # listToDot :: [SmoothType] -> DotCode #
PrintDot Shape # |
Methods unqtDot :: Shape -> DotCode # toDot :: Shape -> DotCode # unqtListToDot :: [Shape] -> DotCode # listToDot :: [Shape] -> DotCode #
PrintDot RankDir # |
Methods unqtDot :: RankDir -> DotCode # toDot :: RankDir -> DotCode # unqtListToDot :: [RankDir] -> DotCode # listToDot :: [RankDir] -> DotCode #
PrintDot RankType # |
Methods unqtDot :: RankType -> DotCode # toDot :: RankType -> DotCode # unqtListToDot :: [RankType] -> DotCode # listToDot :: [RankType] -> DotCode #
PrintDot Root # |
Methods unqtDot :: Root -> DotCode # toDot :: Root -> DotCode # unqtListToDot :: [Root] -> DotCode # listToDot :: [Root] -> DotCode #
PrintDot QuadType # |
Methods unqtDot :: QuadType -> DotCode # toDot :: QuadType -> DotCode # unqtListToDot :: [QuadType] -> DotCode # listToDot :: [QuadType] -> DotCode #
PrintDot Spline # |
Methods unqtDot :: Spline -> DotCode # toDot :: Spline -> DotCode # unqtListToDot :: [Spline] -> DotCode # listToDot :: [Spline] -> DotCode #
PrintDot PageDir # |
Methods unqtDot :: PageDir -> DotCode # toDot :: PageDir -> DotCode # unqtListToDot :: [PageDir] -> DotCode # listToDot :: [PageDir] -> DotCode #
PrintDot EdgeType # |
Methods unqtDot :: EdgeType -> DotCode # toDot :: EdgeType -> DotCode # unqtListToDot :: [EdgeType] -> DotCode # listToDot :: [EdgeType] -> DotCode #
PrintDot Pos # |
Methods unqtDot :: Pos -> DotCode # toDot :: Pos -> DotCode # unqtListToDot :: [Pos] -> DotCode # listToDot :: [Pos] -> DotCode #
PrintDot PackMode # |
Methods unqtDot :: PackMode -> DotCode # toDot :: PackMode -> DotCode # unqtListToDot :: [PackMode] -> DotCode # listToDot :: [PackMode] -> DotCode #
PrintDot Pack # |
Methods unqtDot :: Pack -> DotCode # toDot :: Pack -> DotCode # unqtListToDot :: [Pack] -> DotCode # listToDot :: [Pack] -> DotCode #
PrintDot OutputMode # |
Methods unqtDot :: OutputMode -> DotCode # toDot :: OutputMode -> DotCode # unqtListToDot :: [OutputMode] -> DotCode # listToDot :: [OutputMode] -> DotCode #
PrintDot Order # |
Methods unqtDot :: Order -> DotCode # toDot :: Order -> DotCode # unqtListToDot :: [Order] -> DotCode # listToDot :: [Order] -> DotCode #
PrintDot LayerList # |
Methods unqtDot :: LayerList -> DotCode # toDot :: LayerList -> DotCode # unqtListToDot :: [LayerList] -> DotCode # listToDot :: [LayerList] -> DotCode #
PrintDot LayerID # |
Methods unqtDot :: LayerID -> DotCode # toDot :: LayerID -> DotCode # unqtListToDot :: [LayerID] -> DotCode # listToDot :: [LayerID] -> DotCode #
PrintDot LayerRangeElem # |
Methods unqtDot :: LayerRangeElem -> DotCode # toDot :: LayerRangeElem -> DotCode # unqtListToDot :: [LayerRangeElem] -> DotCode # listToDot :: [LayerRangeElem] -> DotCode #
PrintDot LayerListSep # |
Methods unqtDot :: LayerListSep -> DotCode # toDot :: LayerListSep -> DotCode # unqtListToDot :: [LayerListSep] -> DotCode # listToDot :: [LayerListSep] -> DotCode #
PrintDot LayerSep # |
Methods unqtDot :: LayerSep -> DotCode # toDot :: LayerSep -> DotCode # unqtListToDot :: [LayerSep] -> DotCode # listToDot :: [LayerSep] -> DotCode #
PrintDot Overlap # |
Methods unqtDot :: Overlap -> DotCode # toDot :: Overlap -> DotCode # unqtListToDot :: [Overlap] -> DotCode # listToDot :: [Overlap] -> DotCode #
PrintDot Point # |
Methods unqtDot :: Point -> DotCode # toDot :: Point -> DotCode # unqtListToDot :: [Point] -> DotCode # listToDot :: [Point] -> DotCode #
PrintDot LabelScheme # |
Methods unqtDot :: LabelScheme -> DotCode # toDot :: LabelScheme -> DotCode # unqtListToDot :: [LabelScheme] -> DotCode # listToDot :: [LabelScheme] -> DotCode #
PrintDot RecordField # |
Methods unqtDot :: RecordField -> DotCode # toDot :: RecordField -> DotCode # unqtListToDot :: [RecordField] -> DotCode # listToDot :: [RecordField] -> DotCode #
PrintDot Label # |
Methods unqtDot :: Label -> DotCode # toDot :: Label -> DotCode # unqtListToDot :: [Label] -> DotCode # listToDot :: [Label] -> DotCode #
PrintDot Model # |
Methods unqtDot :: Model -> DotCode # toDot :: Model -> DotCode # unqtListToDot :: [Model] -> DotCode # listToDot :: [Model] -> DotCode #
PrintDot ModeType # |
Methods unqtDot :: ModeType -> DotCode # toDot :: ModeType -> DotCode # unqtListToDot :: [ModeType] -> DotCode # listToDot :: [ModeType] -> DotCode #
PrintDot GraphSize # |
Methods unqtDot :: GraphSize -> DotCode # toDot :: GraphSize -> DotCode # unqtListToDot :: [GraphSize] -> DotCode # listToDot :: [GraphSize] -> DotCode #
PrintDot SVGFontNames # |
Methods unqtDot :: SVGFontNames -> DotCode # toDot :: SVGFontNames -> DotCode # unqtListToDot :: [SVGFontNames] -> DotCode # listToDot :: [SVGFontNames] -> DotCode #
PrintDot DPoint # |
Methods unqtDot :: DPoint -> DotCode # toDot :: DPoint -> DotCode # unqtListToDot :: [DPoint] -> DotCode # listToDot :: [DPoint] -> DotCode #
PrintDot DEConstraints # |
Methods unqtDot :: DEConstraints -> DotCode # toDot :: DEConstraints -> DotCode # unqtListToDot :: [DEConstraints] -> DotCode # listToDot :: [DEConstraints] -> DotCode #
PrintDot DirType # |
Methods unqtDot :: DirType -> DotCode # toDot :: DirType -> DotCode # unqtListToDot :: [DirType] -> DotCode # listToDot :: [DirType] -> DotCode #
PrintDot ClusterMode # |
Methods unqtDot :: ClusterMode -> DotCode # toDot :: ClusterMode -> DotCode # unqtListToDot :: [ClusterMode] -> DotCode # listToDot :: [ClusterMode] -> DotCode #
PrintDot Rect # |
Methods unqtDot :: Rect -> DotCode # toDot :: Rect -> DotCode # unqtListToDot :: [Rect] -> DotCode # listToDot :: [Rect] -> DotCode #
PrintDot Attribute # |
Methods unqtDot :: Attribute -> DotCode # toDot :: Attribute -> DotCode # unqtListToDot :: [Attribute] -> DotCode # listToDot :: [Attribute] -> DotCode #
PrintDot GlobalAttributes # |
Methods unqtDot :: GlobalAttributes -> DotCode # toDot :: GlobalAttributes -> DotCode # unqtListToDot :: [GlobalAttributes] -> DotCode # listToDot :: [GlobalAttributes] -> DotCode #
PrintDot GraphID # |
Methods unqtDot :: GraphID -> DotCode # toDot :: GraphID -> DotCode # unqtListToDot :: [GraphID] -> DotCode # listToDot :: [GraphID] -> DotCode #
PrintDot a => PrintDot [a] # |
Methods unqtDot :: [a] -> DotCode # toDot :: [a] -> DotCode # unqtListToDot :: [[a]] -> DotCode # listToDot :: [[a]] -> DotCode #
PrintDot n => PrintDot (DotEdge n) # |
Methods unqtDot :: DotEdge n -> DotCode # toDot :: DotEdge n -> DotCode # unqtListToDot :: [DotEdge n] -> DotCode # listToDot :: [DotEdge n] -> DotCode #
PrintDot n => PrintDot (DotNode n) # |
Methods unqtDot :: DotNode n -> DotCode # toDot :: DotNode n -> DotCode # unqtListToDot :: [DotNode n] -> DotCode # listToDot :: [DotNode n] -> DotCode #
PrintDot n => PrintDot (DotSubGraph n) # |
Methods unqtDot :: DotSubGraph n -> DotCode # toDot :: DotSubGraph n -> DotCode # unqtListToDot :: [DotSubGraph n] -> DotCode # listToDot :: [DotSubGraph n] -> DotCode #
PrintDot n => PrintDot (DotStatements n) # |
Methods unqtDot :: DotStatements n -> DotCode # toDot :: DotStatements n -> DotCode # unqtListToDot :: [DotStatements n] -> DotCode # listToDot :: [DotStatements n] -> DotCode #
PrintDot n => PrintDot (DotGraph n) # |
Methods unqtDot :: DotGraph n -> DotCode # toDot :: DotGraph n -> DotCode # unqtListToDot :: [DotGraph n] -> DotCode # listToDot :: [DotGraph n] -> DotCode #
PrintDot n => PrintDot (DotSubGraph n) # |
Methods unqtDot :: DotSubGraph n -> DotCode # toDot :: DotSubGraph n -> DotCode # unqtListToDot :: [DotSubGraph n] -> DotCode # listToDot :: [DotSubGraph n] -> DotCode #
PrintDot n => PrintDot (DotStatement n) # |
Methods unqtDot :: DotStatement n -> DotCode # toDot :: DotStatement n -> DotCode # unqtListToDot :: [DotStatement n] -> DotCode # listToDot :: [DotStatement n] -> DotCode #
PrintDot n => PrintDot (DotGraph n) # |
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.
Methods unqtDot :: DotGraph n -> DotCode # toDot :: DotGraph n -> DotCode # unqtListToDot :: [DotGraph n] -> DotCode # listToDot :: [DotGraph n] -> DotCode #

unqtText :: Text -> DotCode #

For use with `OverloadedStrings` to avoid ambiguous type variable errors.

dotText :: Text -> DotCode #

For use with `OverloadedStrings` to avoid ambiguous type variable errors.

printIt :: PrintDot a => a -> Text #

Convert to DotCode; note that this has no indentation, as we can only have one of indentation and (possibly) infinite line lengths.

addQuotes :: Text -> DotCode -> DotCode #

unqtEscaped :: [Char] -> Text -> DotCode #

Escape the specified chars as well as `"`.

printEscaped :: [Char] -> Text -> DotCode #

Escape the specified chars as well as `"` and then wrap the result in quotes.

wrap :: DotCode -> DotCode -> DotCode -> DotCode #

commaDel :: (PrintDot a, PrintDot b) => a -> b -> DotCode #

printField :: PrintDot a => Text -> a -> DotCode #

angled :: DotCode -> DotCode #

fslash :: DotCode #

printColorScheme :: Bool -> ColorScheme -> DotCode #

# Orphan instances

Show DotCode # |
Methods showsPrec :: Int -> DotCode -> ShowS # show :: DotCode -> String # showList :: [DotCode] -> ShowS #