HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulegraphviz-2999.20.2.0Haskell2010

Data.GraphViz.Commands.IO

Various utility functions to help with custom I/O of Dot code.

  • 10 values

Encoding

1 declaration

By default, Dot code should be in UTF-8. However, by usage of the charset attribute, users are able to specify that the ISO-8859-1 (aka Latin1) encoding should be used instead: http://www.graphviz.org/doc/info/attrs.html#d:charset

To simplify matters, graphviz does not work with ISO-8859-1. If you wish to deal with existing Dot code that uses this encoding, you will need to manually read that file in to a Text value.

If a non-UTF-8 encoding is used, then a GraphvizException will be thrown.

Operations on files

2 declarations

Operations on handles

4 declarations

Special cases for standard input and output

2 declarations

Running external commands

1 declaration
valuerunCommand
  1. :: PrintDotRepr dg n
  2. => String

    Command to run

  3. -> [String]

    Command-line arguments

  4. -> (Handle -> IO a)

    Obtaining the output; should be strict.

  5. -> dg n
  6. -> IO a
#

Run an external command on the specified DotRepr. Remember to use hSetBinaryMode on the Handle for the output function if necessary.

If the command was unsuccessful, then a GraphvizException is thrown.

For performance reasons, a temporary file is used to store the generated Dot code. As such, this is only suitable for local commands.