graphviz-2999.20.2.1: 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.Printing

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

- text :: Applicative m => Text -> m Doc
- empty :: Applicative m => m Doc
- fill :: Functor m => Int -> m Doc -> m Doc
- char :: Applicative m => Char -> m Doc
- parens :: Functor m => m Doc -> m Doc
- list :: Functor m => m [Doc] -> m Doc
- group :: Functor m => m Doc -> m Doc
- (<+>) :: Applicative m => m Doc -> m Doc -> m Doc
- (</>) :: Applicative m => m Doc -> m Doc -> m Doc
- int :: Applicative m => Int -> m Doc
- integer :: Applicative m => Integer -> m Doc
- indent :: Functor m => Int -> m Doc -> m Doc
- data Doc
- semi :: Applicative m => m Doc
- comma :: Applicative m => m Doc
- colon :: Applicative m => m Doc
- space :: Applicative m => m Doc
- equals :: Applicative m => m Doc
- lparen :: Applicative m => m Doc
- rparen :: Applicative m => m Doc
- lbrace :: Applicative m => m Doc
- rbrace :: Applicative m => m Doc
- float :: Applicative m => Float -> m Doc
- double :: Applicative m => Double -> m Doc
- rational :: Applicative m => Rational -> m Doc
- brackets :: Functor m => m Doc -> m Doc
- braces :: Functor m => m Doc -> m Doc
- hcat :: Functor m => m [Doc] -> m Doc
- hsep :: Functor m => m [Doc] -> m Doc
- vcat :: Functor m => m [Doc] -> m Doc
- nest :: Functor m => Int -> m Doc -> m Doc
- hang :: Functor m => Int -> m Doc -> m Doc
- punctuate :: Applicative m => m Doc -> m [Doc] -> m [Doc]
- sep :: Functor m => m [Doc] -> m Doc
- cat :: Functor m => m [Doc] -> m Doc
- (<++>) :: Applicative m => m Doc -> m Doc -> m Doc
- tupled :: Functor m => m [Doc] -> m Doc
- semiBraces :: Functor m => m [Doc] -> m Doc
- encloseSep :: Applicative m => m Doc -> m Doc -> m Doc -> m [Doc] -> m Doc
- fillSep :: Functor m => m [Doc] -> m Doc
- vsep :: Functor m => m [Doc] -> m Doc
- fillCat :: Functor m => m [Doc] -> m Doc
- (<//>) :: Applicative m => m Doc -> m Doc -> m Doc
- (<$$>) :: Applicative m => m Doc -> m Doc -> m Doc
- softline :: Applicative m => m Doc
- softbreak :: Applicative m => m Doc
- spacebreak :: Applicative m => m Doc
- squotes :: Functor m => m Doc -> m Doc
- dquotes :: Functor m => m Doc -> m Doc
- angles :: Functor m => m Doc -> m Doc
- enclose :: Applicative m => m Doc -> m Doc -> m Doc -> m Doc
- langle :: Applicative m => m Doc
- rangle :: Applicative m => m Doc
- lbracket :: Applicative m => m Doc
- rbracket :: Applicative m => m Doc
- squote :: Applicative m => m Doc
- dquote :: Applicative m => m Doc
- dot :: Applicative m => m Doc
- backslash :: Applicative m => m Doc
- stringStrict :: Monad m => Text -> m Doc
- fillBreak :: Functor m => Int -> m Doc -> m Doc
- align :: Functor m => m Doc -> m Doc
- textStrict :: Monad m => Text -> m Doc
- line :: Applicative m => m Doc
- linebreak :: Applicative m => m Doc
- beside :: Applicative m => m Doc -> m Doc -> m Doc
- column :: Functor m => m (Int -> Doc) -> m Doc
- nesting :: Functor m => m (Int -> Doc) -> m Doc
- renderOneLine :: Doc -> SimpleDoc
- displayB :: SimpleDoc -> Builder
- displayTStrict :: SimpleDoc -> Text
- prettyM :: (Pretty a, Applicative m) => a -> m Doc
- type DotCode = DotCodeM Doc
- data DotCodeM a
- runDotCode :: DotCode -> Doc
- renderDot :: DotCode -> Text
- class PrintDot a where
  - unqtDot :: a -> DotCode
  - toDot :: a -> DotCode
  - unqtListToDot :: [a] -> DotCode
  - listToDot :: [a] -> DotCode
- 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

text :: Applicative m => Text -> m Doc Source #

The document `(text s)` contains the literal string `s`. The string shouldn't contain any newline (`'n'`) characters. If the string contains newline characters, the function `string` should be used.

empty :: Applicative m => m Doc Source #

The empty document is, indeed, empty. Although `empty` has no content, it does have a 'height' of 1 and behaves exactly like `(text "")` (and is therefore not a unit of `<$>`).

fill :: Functor m => Int -> m Doc -> m Doc Source #

The document `(fill i x)` renders document `x`. It then appends `space`s until the width is equal to `i`. If the width of `x` is already larger, nothing is appended. This combinator is quite useful in practice to output a list of bindings. The following example demonstrates this.

    types = [("empty","Doc")
             ,("nest","Int -> Doc -> Doc")
             ,("linebreak","Doc")]

    ptype (name,tp)
    = fill 6 (text name) <+> text "::" <+> text tp

    test = text "let" <+> align (vcat (map ptype types))

Which is laid out as:

      let empty  :: Doc
          nest   :: Int -> Doc -> Doc
          linebreak :: Doc

char :: Applicative m => Char -> m Doc Source #

The document `(char c)` contains the literal character `c`. The character shouldn't be a newline (`'n'`), the function `line` should be used for line breaks.

parens :: Functor m => m Doc -> m Doc Source #

Document `(parens x)` encloses document `x` in parenthesis, "(" and ")".

list :: Functor m => m [Doc] -> m Doc Source #

The document `(list xs)` comma separates the documents `xs` and encloses them in square brackets. The documents are rendered horizontally if that fits the page. Otherwise they are aligned vertically. All comma separators are put in front of the elements.

group :: Functor m => m Doc -> m Doc Source #

The `group` combinator is used to specify alternative layouts. The document `(group x)` undoes all line breaks in document `x`. The resulting line is added to the current line if that fits the page. Otherwise, the document `x` is rendered without any changes.

(<+>) :: Applicative m => m Doc -> m Doc -> m Doc infixr 6 Source #

The document `(x <+> y)` concatenates document `x` and `y` with a `space` in between. (infixr 6)

(</>) :: Applicative m => m Doc -> m Doc -> m Doc infixr 5 Source #

The document `(x </> y)` concatenates document `x` and `y` with a `softline` in between. This effectively puts `x` and `y` either next to each other (with a `space` in between) or underneath each other. (infixr 5)

int :: Applicative m => Int -> m Doc Source #

The document `(int i)` shows the literal integer `i` using `text`.

integer :: Applicative m => Integer -> m Doc Source #

The document `(integer i)` shows the literal integer `i` using `text`.

indent :: Functor m => Int -> m Doc -> m Doc Source #

The document `(indent i x)` indents document `x` with `i` spaces.

    test = indent 4 (fillSep (map text
            (words "the indent combinator indents these words !")))

Which lays out with a page width of 20 as:

          the indent
          combinator
          indents these
          words !

data Doc Source #

The abstract data type `Doc` represents pretty documents.

`Doc` is an instance of the `Show` class. `(show doc)` pretty prints document `doc` with a page width of 100 characters and a ribbon width of 40 characters.

    show (text "hello" <$> text "world")

Which would return the string "hello\nworld", i.e.

      hello
      world

#### Instances

Instances details

Monoid DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods mempty :: DotCode Source # mappend :: DotCode -> DotCode -> DotCode Source # mconcat :: [DotCode] -> DotCode Source #
Monoid Doc |
Instance details Defined in Text.PrettyPrint.Leijen.Text Methods mempty :: Doc Source # mappend :: Doc -> Doc -> Doc Source # mconcat :: [Doc] -> Doc Source #
Semigroup DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods (<>) :: DotCode -> DotCode -> DotCode Source # sconcat :: NonEmpty DotCode -> DotCode Source # stimes :: Integral b => b -> DotCode -> DotCode Source #
Semigroup Doc | In particular, note that the document `(x `<>` y)` concatenates document `x` and document `y`. It is an associative operation having `empty` as a left and right unit. (infixr 6)
Instance details Defined in Text.PrettyPrint.Leijen.Text Methods (<>) :: Doc -> Doc -> Doc Source # sconcat :: NonEmpty Doc -> Doc Source # stimes :: Integral b => b -> Doc -> Doc Source #
IsString DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods fromString :: String -> DotCode Source #
IsString Doc |
Instance details Defined in Text.PrettyPrint.Leijen.Text Methods fromString :: String -> Doc Source #
Show DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods showsPrec :: Int -> DotCode -> ShowS Source # show :: DotCode -> String Source # showList :: [DotCode] -> ShowS Source #
Show Doc |
Instance details Defined in Text.PrettyPrint.Leijen.Text Methods showsPrec :: Int -> Doc -> ShowS Source # show :: Doc -> String Source # showList :: [Doc] -> ShowS Source #
Pretty Doc |
Instance details Defined in Text.PrettyPrint.Leijen.Text Methods pretty :: Doc -> Doc Source # prettyList :: [Doc] -> Doc Source #

semi :: Applicative m => m Doc Source #

The document `semi` contains a semi colon, ";".

comma :: Applicative m => m Doc Source #

The document `comma` contains a comma, ",".

colon :: Applicative m => m Doc Source #

The document `colon` contains a colon, ":".

space :: Applicative m => m Doc Source #

The document `space` contains a single space, " ".

    x <+> y = x `beside` space `beside` y

equals :: Applicative m => m Doc Source #

The document `equals` contains an equal sign, "=".

lparen :: Applicative m => m Doc Source #

The document `lparen` contains a left parenthesis, "(".

rparen :: Applicative m => m Doc Source #

The document `rparen` contains a right parenthesis, ")".

lbrace :: Applicative m => m Doc Source #

The document `lbrace` contains a left brace, "{".

rbrace :: Applicative m => m Doc Source #

The document `rbrace` contains a right brace, "}".

float :: Applicative m => Float -> m Doc Source #

The document `(float f)` shows the literal float `f` using `text`.

double :: Applicative m => Double -> m Doc Source #

The document `(double d)` shows the literal double `d` using `text`.

rational :: Applicative m => Rational -> m Doc Source #

The document `(rational r)` shows the literal rational `r` using `text`.

brackets :: Functor m => m Doc -> m Doc Source #

Document `(brackets x)` encloses document `x` in square brackets, "[" and "]".

braces :: Functor m => m Doc -> m Doc Source #

Document `(braces x)` encloses document `x` in braces, "{" and "}".

hcat :: Functor m => m [Doc] -> m Doc Source #

The document `(hcat xs)` concatenates all documents `xs` horizontally with `(<>)`.

hsep :: Functor m => m [Doc] -> m Doc Source #

The document `(hsep xs)` concatenates all documents `xs` horizontally with `(<+>)`.

vcat :: Functor m => m [Doc] -> m Doc Source #

The document `(vcat xs)` concatenates all documents `xs` vertically with `(<$$>)`. If a `group` undoes the line breaks inserted by `vcat`, all documents are directly concatenated.

nest :: Functor m => Int -> m Doc -> m Doc Source #

The document `(nest i x)` renders document `x` with the current indentation level increased by `i` (See also `hang`, `align` and `indent`).

    nest 2 (text "hello" <$> text "world") <$> text "!"

outputs as:

      hello
        world
      !

hang :: Functor m => Int -> m Doc -> m Doc Source #

The hang combinator implements hanging indentation. The document `(hang i x)` renders document `x` with a nesting level set to the current column plus `i`. The following example uses hanging indentation for some text:

    test = hang 4 (fillSep (map text
            (words "the hang combinator indents these words !")))

Which lays out on a page with a width of 20 characters as:

      the hang combinator
          indents these
          words !

The `hang` combinator is implemented as:

    hang i x = align (nest i x)

punctuate :: Applicative m => m Doc -> m [Doc] -> m [Doc] Source #

`(punctuate p xs)` concatenates all documents in `xs` with document `p` except for the last document.

    someText = map text ["words","in","a","tuple"]
    test = parens (align (cat (punctuate comma someText)))

This is laid out on a page width of 20 as:

      (words,in,a,tuple)

But when the page width is 15, it is laid out as:

      (words,
       in,
       a,
       tuple)

(If you want put the commas in front of their elements instead of at the end, you should use `tupled` or, in general, `encloseSep`.)

sep :: Functor m => m [Doc] -> m Doc Source #

The document `(sep xs)` concatenates all documents `xs` either horizontally with `(<+>)`, if it fits the page, or vertically with `(<$>)`.

    sep xs = group (vsep xs)

cat :: Functor m => m [Doc] -> m Doc Source #

The document `(cat xs)` concatenates all documents `xs` either horizontally with `(<>)`, if it fits the page, or vertically with `(<$$>)`.

    cat xs = group (vcat xs)

(<++>) :: Applicative m => m Doc -> m Doc -> m Doc infixr 6 Source #

The document `(x <++> y)` concatenates document `x` and `y` with a `spacebreak` in between. (infixr 6)

tupled :: Functor m => m [Doc] -> m Doc Source #

The document `(tupled xs)` comma separates the documents `xs` and encloses them in parenthesis. The documents are rendered horizontally if that fits the page. Otherwise they are aligned vertically. All comma separators are put in front of the elements.

semiBraces :: Functor m => m [Doc] -> m Doc Source #

The document `(semiBraces xs)` separates the documents `xs` with semi colons and encloses them in braces. The documents are rendered horizontally if that fits the page. Otherwise they are aligned vertically. All semi colons are put in front of the elements.

encloseSep :: Applicative m => m Doc -> m Doc -> m Doc -> m [Doc] -> m Doc Source #

The document `(encloseSep l r sep xs)` concatenates the documents `xs` separated by `sep` and encloses the resulting document by `l` and `r`. The documents are rendered horizontally if that fits the page. Otherwise they are aligned vertically. All separators are put in front of the elements. For example, the combinator `list` can be defined with `encloseSep`:

    list xs = encloseSep lbracket rbracket comma xs
    test = text "list" <+> (list (map int [10,200,3000]))

Which is laid out with a page width of 20 as:

      list [10,200,3000]

But when the page width is 15, it is laid out as:

      list [10
           ,200
           ,3000]

fillSep :: Functor m => m [Doc] -> m Doc Source #

The document `(fillSep xs)` concatenates documents `xs` horizontally with `(<+>)` as long as its fits the page, then inserts a `line` and continues doing that for all documents in `xs`.

    fillSep xs = foldr (</>) empty xs

vsep :: Functor m => m [Doc] -> m Doc Source #

The document `(vsep xs)` concatenates all documents `xs` vertically with `(<$>)`. If a `group` undoes the line breaks inserted by `vsep`, all documents are separated with a space.

    someText = map text (words ("text to lay out"))

    test = text "some" <+> vsep someText

This is laid out as:

      some text
      to
      lay
      out

The `align` combinator can be used to align the documents under their first element

    test = text "some" <+> align (vsep someText)

Which is printed as:

      some text
           to
           lay
           out

fillCat :: Functor m => m [Doc] -> m Doc Source #

The document `(fillCat xs)` concatenates documents `xs` horizontally with `(<>)` as long as its fits the page, then inserts a `linebreak` and continues doing that for all documents in `xs`.

    fillCat xs = foldr (<//>) empty xs

(<//>) :: Applicative m => m Doc -> m Doc -> m Doc infixr 5 Source #

The document `(x <//> y)` concatenates document `x` and `y` with a `softbreak` in between. This effectively puts `x` and `y` either right next to each other or underneath each other. (infixr 5)

(<$$>) :: Applicative m => m Doc -> m Doc -> m Doc infixr 5 Source #

The document `(x <$$> y)` concatenates document `x` and `y` with a `linebreak` in between. (infixr 5)

softline :: Applicative m => m Doc Source #

The document `softline` behaves like `space` if the resulting output fits the page, otherwise it behaves like `line`.

softbreak :: Applicative m => m Doc Source #

The document `softbreak` behaves like `empty` if the resulting output fits the page, otherwise it behaves like `line`.

spacebreak :: Applicative m => m Doc Source #

The document `spacebreak` behaves like `space` when rendered normally but like `empty` when using `renderCompact` or `renderOneLine`.

squotes :: Functor m => m Doc -> m Doc Source #

Document `(squotes x)` encloses document `x` with single quotes "'".

dquotes :: Functor m => m Doc -> m Doc Source #

Document `(dquotes x)` encloses document `x` with double quotes '"'.

angles :: Functor m => m Doc -> m Doc Source #

Document `(angles x)` encloses document `x` in angles, "<" and ">".

enclose :: Applicative m => m Doc -> m Doc -> m Doc -> m Doc Source #

The document `(enclose l r x)` encloses document `x` between documents `l` and `r` using ``beside``.

    enclose l r x = l `beside` x `beside` r

langle :: Applicative m => m Doc Source #

The document `langle` contains a left angle, "<".

rangle :: Applicative m => m Doc Source #

The document `rangle` contains a right angle, ">".

lbracket :: Applicative m => m Doc Source #

The document `lbracket` contains a left square bracket, "[".

rbracket :: Applicative m => m Doc Source #

The document `rbracket` contains a right square bracket, "]".

squote :: Applicative m => m Doc Source #

The document `squote` contains a single quote, "'".

dquote :: Applicative m => m Doc Source #

The document `dquote` contains a double quote, '"'.

dot :: Applicative m => m Doc Source #

The document `dot` contains a single dot, ".".

backslash :: Applicative m => m Doc Source #

The document `backslash` contains a back slash, "\".

stringStrict :: Monad m => Text -> m Doc Source #

fillBreak :: Functor m => Int -> m Doc -> m Doc Source #

The document `(fillBreak i x)` first renders document `x`. It then appends `space`s until the width is equal to `i`. If the width of `x` is already larger than `i`, the nesting level is increased by `i` and a `line` is appended. When we redefine `ptype` in the previous example to use `fillBreak`, we get a useful variation of the previous output:

    ptype (name,tp)
    = fillBreak 6 (text name) <+> text "::" <+> text tp

The output will now be:

      let empty  :: Doc
          nest   :: Int -> Doc -> Doc
          linebreak
                 :: Doc

align :: Functor m => m Doc -> m Doc Source #

The document `(align x)` renders document `x` with the nesting level set to the current column. It is used for example to implement `hang`.

As an example, we will put a document right above another one, regardless of the current nesting level:

    x $$ y = align (x <$> y)

    test = text "hi" <+> (text "nice" $$ text "world")

which will be laid out as:

      hi nice
         world

textStrict :: Monad m => Text -> m Doc Source #

line :: Applicative m => m Doc Source #

The `line` document advances to the next line and indents to the current nesting level. Document `line` behaves like `(text " ")` if the line break is undone by `group` or if rendered with `renderOneLine`.

linebreak :: Applicative m => m Doc Source #

The `linebreak` document advances to the next line and indents to the current nesting level. Document `linebreak` behaves like `empty` if the line break is undone by `group`.

beside :: Applicative m => m Doc -> m Doc -> m Doc infixr 6 Source #

The document `(x `beside` y)` concatenates document `x` and document `y`. It is an associative operation having `empty` as a left and right unit. (infixr 6)

column :: Functor m => m (Int -> Doc) -> m Doc Source #

Specifies how to create the document based upon which column it is in.

nesting :: Functor m => m (Int -> Doc) -> m Doc Source #

Specifies how to nest the document based upon which column it is being nested in.

renderOneLine :: Doc -> SimpleDoc Source #

`(renderOneLine x)` renders document `x` without adding any indentation or newlines.

displayB :: SimpleDoc -> Builder Source #

`(displayB simpleDoc)` takes the output `simpleDoc` from a rendering function and transforms it to a `Builder` type (for further manipulation before converting to a lazy `Text`).

displayTStrict :: SimpleDoc -> Text Source #

prettyM :: (Pretty a, Applicative m) => a -> m Doc Source #

A monadic version of `pretty`; this is to allow you to use the `Pretty` class without having to create extra instances. Alternatively, you may wish to make a variant of `Pretty` using the actual `Monad` to be used.

type DotCode = DotCodeM Doc Source #

data DotCodeM a Source #

A type alias to indicate what is being produced.

#### Instances

Instances details

Applicative DotCodeM Source # |
Instance details Defined in Data.GraphViz.Printing Methods pure :: a -> DotCodeM a Source # (<*>) :: DotCodeM (a -> b) -> DotCodeM a -> DotCodeM b Source # liftA2 :: (a -> b -> c) -> DotCodeM a -> DotCodeM b -> DotCodeM c Source # (*>) :: DotCodeM a -> DotCodeM b -> DotCodeM b Source # (<*) :: DotCodeM a -> DotCodeM b -> DotCodeM a Source #
Functor DotCodeM Source # |
Instance details Defined in Data.GraphViz.Printing Methods fmap :: (a -> b) -> DotCodeM a -> DotCodeM b Source # (<$) :: a -> DotCodeM b -> DotCodeM a Source #
Monad DotCodeM Source # |
Instance details Defined in Data.GraphViz.Printing Methods (>>=) :: DotCodeM a -> (a -> DotCodeM b) -> DotCodeM b Source # (>>) :: DotCodeM a -> DotCodeM b -> DotCodeM b Source # return :: a -> DotCodeM a Source #
Monoid DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods mempty :: DotCode Source # mappend :: DotCode -> DotCode -> DotCode Source # mconcat :: [DotCode] -> DotCode Source #
Semigroup DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods (<>) :: DotCode -> DotCode -> DotCode Source # sconcat :: NonEmpty DotCode -> DotCode Source # stimes :: Integral b => b -> DotCode -> DotCode Source #
IsString DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods fromString :: String -> DotCode Source #
Show DotCode Source # |
Instance details Defined in Data.GraphViz.Printing Methods showsPrec :: Int -> DotCode -> ShowS Source # show :: DotCode -> String Source # showList :: [DotCode] -> ShowS Source #

runDotCode :: DotCode -> Doc Source #

renderDot :: DotCode -> Text Source #

Correctly render Graphviz output.

class PrintDot a where Source #

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

Minimal complete definition

unqtDot

Methods

unqtDot :: a -> DotCode Source #

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

toDot :: a -> DotCode Source #

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 Source #

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 Source #

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

Instances details

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

unqtText :: Text -> DotCode Source #

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

dotText :: Text -> DotCode Source #

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

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

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 Source #

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

Escape the specified chars as well as `"`.

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

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

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

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

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

angled :: DotCode -> DotCode Source #

fslash :: DotCode Source #

printColorScheme :: Bool -> ColorScheme -> DotCode Source #