Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Text.Prettyprint.Doc.Render.GraphViz
Description
Pretty-print GraphViz labels
Synopsis
Rendering functions
render :: Doc Attribute -> Label Source #
Render a document as a GraphViz label, using defaultLayoutOptions
.
render' :: SimpleDocStream Attribute -> Text Source #
Render a document stream as HTML text for GraphViz. This provides more fine-grained control than render
.
Error handling
render
and render'
can throw errors, given a malformed document stream.
The average user is very unlikely to run into this,
but error handling functionality is provided for completeness.
data GraphVizRenderError Source #
Errors which indicate a malformed SimpleDocStream
.
Constructors
GVDocStreamFail | The stream ended with |
GVEmptyStack |
Instances
renderSafe :: Doc Attribute -> Either GraphVizRenderError Label Source #
A total version of render
.
renderSafe' :: SimpleDocStream Attribute -> Either GraphVizRenderError Text Source #
A total version of render'
.
This can be seen as a generalisation of any of the other functions exported by this module.