dotparse-0.1.1.0: dot language parsing and printing.
Safe HaskellSafe-Inferred
LanguageGHC2021

DotParse

Contents

Description

Parser & Printer for the dot language of graphviz

See DotParse.Examples for usage.

Synopsis

Documentation

data DotConfig Source #

printing options, for separators.

Instances

Instances details
Generic DotConfig Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep DotConfig :: Type -> Type #

Show DotConfig Source # 
Instance details

Defined in DotParse.Types

Eq DotConfig Source # 
Instance details

Defined in DotParse.Types

type Rep DotConfig Source # 
Instance details

Defined in DotParse.Types

type Rep DotConfig = D1 ('MetaData "DotConfig" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "DotConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "topLevelSep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "statementSep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :*: (S1 ('MetaSel ('Just "attSep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "subGraphSep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))

defaultDotConfig :: DotConfig Source #

default separators

class DotParse a where Source #

A parser & printer class for a graphviz graph and components of its dot language

Instances

Instances details
DotParse AttributeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse AttributeType Source # 
Instance details

Defined in DotParse.Types

DotParse Compass Source # 
Instance details

Defined in DotParse.Types

DotParse Directed Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeID Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeOp Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse GlobalAttributeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse Graph Source # 
Instance details

Defined in DotParse.Types

DotParse ID Source # 
Instance details

Defined in DotParse.Types

DotParse NodeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse Port Source # 
Instance details

Defined in DotParse.Types

DotParse Statement Source # 
Instance details

Defined in DotParse.Types

DotParse Strict Source # 
Instance details

Defined in DotParse.Types

DotParse SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

DotParse (Point Double) Source # 
Instance details

Defined in DotParse.Types

DotParse (Rect Double) Source # 
Instance details

Defined in DotParse.Types

DotParse (Map ID ID) Source #

Attribute collections

A given entity can have multiple attribute lists. For simplicity, these are mconcat'ed on parsing.

Instance details

Defined in DotParse.Types

DotParse (ID, ID) Source #

Attribute key-value pair of identifiers

Instance details

Defined in DotParse.Types

testDotParser :: forall a. DotParse a => Proxy a -> DotConfig -> ByteString -> IO () Source #

dotParse and then dotPrint:

  • pretty printing error on failure.
  • This is not an exact parser/printer, so the test re-parses the dotPrint, which should be idempotent

runDotParser :: DotParse a => ByteString -> a Source #

run a dotParse erroring on leftovers, Fail or Err

data Graph Source #

Representation of a full graphviz graph, as per the dot language specification

Instances

Instances details
Monoid Graph Source # 
Instance details

Defined in DotParse.Types

Methods

mempty :: Graph #

mappend :: Graph -> Graph -> Graph #

mconcat :: [Graph] -> Graph #

Semigroup Graph Source # 
Instance details

Defined in DotParse.Types

Methods

(<>) :: Graph -> Graph -> Graph #

sconcat :: NonEmpty Graph -> Graph #

stimes :: Integral b => b -> Graph -> Graph #

Generic Graph Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Graph :: Type -> Type #

Methods

from :: Graph -> Rep Graph x #

to :: Rep Graph x -> Graph #

Show Graph Source # 
Instance details

Defined in DotParse.Types

Methods

showsPrec :: Int -> Graph -> ShowS #

show :: Graph -> String #

showList :: [Graph] -> ShowS #

DotParse Graph Source # 
Instance details

Defined in DotParse.Types

Eq Graph Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: Graph -> Graph -> Bool #

(/=) :: Graph -> Graph -> Bool #

type Rep Graph Source # 
Instance details

Defined in DotParse.Types

defaultGraph :: Graph Source #

Directed graph of size 1.

>>> BS.putStr $ dotPrint defaultDotConfig defaultGraph <> "\n"
digraph {
    node [height=0.5;shape=circle]
    graph [overlap=false;size="1!";splines=spline]
    edge [arrowsize=0.5]
    rankdir="TB"
    }

attL :: AttributeType -> ID -> Lens' Graph (Maybe ID) Source #

attributes lens

gattL :: ID -> Lens' Graph (Maybe ID) Source #

global attributes lens

processDot :: Directed -> ByteString -> IO ByteString Source #

run a dot string through graphviz, collecting the augmented dot string output

processDotWith :: Directed -> [String] -> ByteString -> IO ByteString Source #

run a dot string through graphviz, supplying arguments and collecting stdout

processGraph :: Graph -> IO Graph Source #

Augment a Graph via the graphviz process

processGraphWith :: DotConfig -> Graph -> IO Graph Source #

Augment a Graph via the graphviz process

data Strict Source #

MergeEdges (strict)

Constructors

MergeEdges 
NoMergeEdges 

Instances

Instances details
Generic Strict Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Strict :: Type -> Type #

Methods

from :: Strict -> Rep Strict x #

to :: Rep Strict x -> Strict #

Show Strict Source # 
Instance details

Defined in DotParse.Types

DotParse Strict Source # 
Instance details

Defined in DotParse.Types

Eq Strict Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: Strict -> Strict -> Bool #

(/=) :: Strict -> Strict -> Bool #

type Rep Strict Source # 
Instance details

Defined in DotParse.Types

type Rep Strict = D1 ('MetaData "Strict" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "MergeEdges" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoMergeEdges" 'PrefixI 'False) (U1 :: Type -> Type))

defStrict :: Last Strict -> Strict Source #

Default Strict is NoMergeEdges

data Directed Source #

Directed (digraph | graph)

Constructors

Directed 
UnDirected 

Instances

Instances details
Generic Directed Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Directed :: Type -> Type #

Methods

from :: Directed -> Rep Directed x #

to :: Rep Directed x -> Directed #

Show Directed Source # 
Instance details

Defined in DotParse.Types

DotParse Directed Source # 
Instance details

Defined in DotParse.Types

Eq Directed Source # 
Instance details

Defined in DotParse.Types

type Rep Directed Source # 
Instance details

Defined in DotParse.Types

type Rep Directed = D1 ('MetaData "Directed" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "Directed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnDirected" 'PrefixI 'False) (U1 :: Type -> Type))

defDirected :: Last Directed -> Directed Source #

Default Directed is Directed

data ID Source #

Identifier as per the dot language specifications.

>>> runDotParser "0" :: ID
IDInt 0
>>> runDotParser "-.123" :: ID
IDDouble (-0.123)
>>> runParser dotParse "apple_1'" :: Result Error ID
OK (ID "apple_1") "'"
>>> :set -XQuasiQuotes
>>> runParser dotParse "\"hello\"" :: Result Error ID
OK (IDQuoted "hello") ""
>>> runDotParser "<The <font color='red'><b>foo</b></font>,<br/> the <font point-size='20'>bar</font> and<br/> the <i>baz</i>>" :: ID
IDHtml "<The <font color='red'><b>foo</b></font>,<br/> the <font point-size='20'>bar</font> and<br/> the <i>baz</i>>"
>>> runDotParser "shape=diamond" :: (ID,ID)
(ID "shape",ID "diamond")
>>> runDotParser "fontname=\"Arial\"" :: (ID,ID)
(ID "fontname",IDQuoted "Arial")
>>> runDotParser "[shape=diamond; color=blue] [label=label]" :: Map.Map ID ID
fromList [(ID "color",ID "blue"),(ID "label",ID "label"),(ID "shape",ID "diamond")]

Instances

Instances details
Generic ID Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep ID :: Type -> Type #

Methods

from :: ID -> Rep ID x #

to :: Rep ID x -> ID #

Show ID Source # 
Instance details

Defined in DotParse.Types

Methods

showsPrec :: Int -> ID -> ShowS #

show :: ID -> String #

showList :: [ID] -> ShowS #

DotParse ID Source # 
Instance details

Defined in DotParse.Types

Eq ID Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: ID -> ID -> Bool #

(/=) :: ID -> ID -> Bool #

Ord ID Source # 
Instance details

Defined in DotParse.Types

Methods

compare :: ID -> ID -> Ordering #

(<) :: ID -> ID -> Bool #

(<=) :: ID -> ID -> Bool #

(>) :: ID -> ID -> Bool #

(>=) :: ID -> ID -> Bool #

max :: ID -> ID -> ID #

min :: ID -> ID -> ID #

DotParse (Map ID ID) Source #

Attribute collections

A given entity can have multiple attribute lists. For simplicity, these are mconcat'ed on parsing.

Instance details

Defined in DotParse.Types

DotParse (ID, ID) Source #

Attribute key-value pair of identifiers

Instance details

Defined in DotParse.Types

type Rep ID Source # 
Instance details

Defined in DotParse.Types

label :: ID -> String Source #

ID as the equivalent plain String

note that the dot language identifier equivalence law is:

x == y if label x == label y

data Compass Source #

Compass instructions which are optionally associated with an identifier

Instances

Instances details
Generic Compass Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Compass :: Type -> Type #

Methods

from :: Compass -> Rep Compass x #

to :: Rep Compass x -> Compass #

Show Compass Source # 
Instance details

Defined in DotParse.Types

DotParse Compass Source # 
Instance details

Defined in DotParse.Types

Eq Compass Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: Compass -> Compass -> Bool #

(/=) :: Compass -> Compass -> Bool #

type Rep Compass Source # 
Instance details

Defined in DotParse.Types

type Rep Compass = D1 ('MetaData "Compass" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (((C1 ('MetaCons "CompassN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompassNE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CompassE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CompassSE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompassS" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CompassSW" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompassW" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CompassNW" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CompassC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Compass_" 'PrefixI 'False) (U1 :: Type -> Type)))))

newtype Port Source #

Port instructions which are optionally associated with an identifier

Constructors

Port 

Fields

Instances

Instances details
Generic Port Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Port :: Type -> Type #

Methods

from :: Port -> Rep Port x #

to :: Rep Port x -> Port #

Show Port Source # 
Instance details

Defined in DotParse.Types

Methods

showsPrec :: Int -> Port -> ShowS #

show :: Port -> String #

showList :: [Port] -> ShowS #

DotParse Port Source # 
Instance details

Defined in DotParse.Types

Eq Port Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: Port -> Port -> Bool #

(/=) :: Port -> Port -> Bool #

type Rep Port Source # 
Instance details

Defined in DotParse.Types

type Rep Port = D1 ('MetaData "Port" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "portID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (These ID Compass))))

data AttributeType Source #

Category of attribute

Constructors

GraphType 
NodeType 
EdgeType 

Instances

Instances details
Generic AttributeType Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep AttributeType :: Type -> Type #

Show AttributeType Source # 
Instance details

Defined in DotParse.Types

DotParse AttributeType Source # 
Instance details

Defined in DotParse.Types

Eq AttributeType Source # 
Instance details

Defined in DotParse.Types

type Rep AttributeType Source # 
Instance details

Defined in DotParse.Types

type Rep AttributeType = D1 ('MetaData "AttributeType" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "GraphType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NodeType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EdgeType" 'PrefixI 'False) (U1 :: Type -> Type)))

data AttributeStatement Source #

Top-level attribute statement

>>> runDotParser "graph [overlap=false, splines=spline, size=\"1!\"];" :: Statement
StatementAttribute (AttributeStatement {attributeType = GraphType, attributes = fromList [(ID "overlap",ID "false"),(ID "size",IDQuoted "1!"),(ID "splines",ID "spline")]})

Instances

Instances details
Generic AttributeStatement Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep AttributeStatement :: Type -> Type #

Show AttributeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse AttributeStatement Source # 
Instance details

Defined in DotParse.Types

Eq AttributeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep AttributeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep AttributeStatement = D1 ('MetaData "AttributeStatement" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "AttributeStatement" 'PrefixI 'True) (S1 ('MetaSel ('Just "attributeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeType) :*: S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ID ID))))

data NodeStatement Source #

Node statement

>>> runDotParser "A [shape=diamond; color=blue]" :: Statement
StatementNode (NodeStatement {nodeID = ID "A", port = Nothing, nodeAttrs = fromList [(ID "color",ID "blue"),(ID "shape",ID "diamond")]})

Constructors

NodeStatement 

Fields

Instances

Instances details
Generic NodeStatement Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep NodeStatement :: Type -> Type #

Show NodeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse NodeStatement Source # 
Instance details

Defined in DotParse.Types

Eq NodeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep NodeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep NodeStatement = D1 ('MetaData "NodeStatement" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "NodeStatement" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodeID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ID) :*: (S1 ('MetaSel ('Just "port") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Port)) :*: S1 ('MetaSel ('Just "nodeAttrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ID ID)))))

data EdgeID Source #

An edge can be specified in as a NodeID or as a SubGraph

Instances

Instances details
Generic EdgeID Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep EdgeID :: Type -> Type #

Methods

from :: EdgeID -> Rep EdgeID x #

to :: Rep EdgeID x -> EdgeID #

Show EdgeID Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeID Source # 
Instance details

Defined in DotParse.Types

Eq EdgeID Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: EdgeID -> EdgeID -> Bool #

(/=) :: EdgeID -> EdgeID -> Bool #

type Rep EdgeID Source # 
Instance details

Defined in DotParse.Types

data EdgeOp Source #

An edgeop is -> in directed graphs and -- in undirected graphs.

Instances

Instances details
Generic EdgeOp Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep EdgeOp :: Type -> Type #

Methods

from :: EdgeOp -> Rep EdgeOp x #

to :: Rep EdgeOp x -> EdgeOp #

Show EdgeOp Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeOp Source # 
Instance details

Defined in DotParse.Types

Eq EdgeOp Source # 
Instance details

Defined in DotParse.Types

Methods

(==) :: EdgeOp -> EdgeOp -> Bool #

(/=) :: EdgeOp -> EdgeOp -> Bool #

type Rep EdgeOp Source # 
Instance details

Defined in DotParse.Types

type Rep EdgeOp = D1 ('MetaData "EdgeOp" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "EdgeDirected" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EdgeUndirected" 'PrefixI 'False) (U1 :: Type -> Type))

fromDirected :: Directed -> EdgeOp Source #

generate an EdgeOp given the type of graph.

data EdgeStatement Source #

Edge statement

>>> runDotParser "A -> B [style=dashed, color=grey]" :: Statement
StatementEdge (EdgeStatement {edgeOp = EdgeDirected, leftEdge = EdgeID (ID "A") Nothing, rightEdges = EdgeID (ID "B") Nothing :| [], edgeAttrs = fromList [(ID "color",ID "grey"),(ID "style",ID "dashed")]})

Instances

Instances details
Generic EdgeStatement Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep EdgeStatement :: Type -> Type #

Show EdgeStatement Source # 
Instance details

Defined in DotParse.Types

DotParse EdgeStatement Source # 
Instance details

Defined in DotParse.Types

Eq EdgeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep EdgeStatement Source # 
Instance details

Defined in DotParse.Types

type Rep EdgeStatement = D1 ('MetaData "EdgeStatement" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "EdgeStatement" 'PrefixI 'True) ((S1 ('MetaSel ('Just "edgeOp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EdgeOp) :*: S1 ('MetaSel ('Just "leftEdge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EdgeID)) :*: (S1 ('MetaSel ('Just "rightEdges") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty EdgeID)) :*: S1 ('MetaSel ('Just "edgeAttrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ID ID)))))

edgeID :: EdgeID -> Maybe ID Source #

The edge ID or subgraph ID (if any)

edgeIDs :: EdgeStatement -> [(Maybe ID, Maybe ID)] Source #

list of edges in a given EdgeStatement, including anonymous SugGraphs

edgeIDsNamed :: EdgeStatement -> [(ID, ID)] Source #

edge IDs

data Statement Source #

A dot statement as per the dot language specification.

Instances

Instances details
Generic Statement Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep Statement :: Type -> Type #

Show Statement Source # 
Instance details

Defined in DotParse.Types

DotParse Statement Source # 
Instance details

Defined in DotParse.Types

Eq Statement Source # 
Instance details

Defined in DotParse.Types

type Rep Statement Source # 
Instance details

Defined in DotParse.Types

addStatement :: Statement -> Graph -> Graph Source #

add a graphviz statement to a Graph

addStatements :: [Statement] -> Graph -> Graph Source #

add a list of graphviz statements to a Graph

data SubGraphStatement Source #

A subgraph statement.

Note: each subgraph must have a unique name

>>> runDotParser "subgraph A {A, B, C}" :: Statement
StatementSubGraph (SubGraphStatement {subgraphID = Just (ID "A"), subgraphStatements = [StatementNode (NodeStatement {nodeID = ID "A", port = Nothing, nodeAttrs = fromList []}),StatementNode (NodeStatement {nodeID = ID "B", port = Nothing, nodeAttrs = fromList []}),StatementNode (NodeStatement {nodeID = ID "C", port = Nothing, nodeAttrs = fromList []})]})

Instances

Instances details
Generic SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep SubGraphStatement :: Type -> Type #

Show SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

DotParse SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

Eq SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

type Rep SubGraphStatement Source # 
Instance details

Defined in DotParse.Types

type Rep SubGraphStatement = D1 ('MetaData "SubGraphStatement" "DotParse.Types" "dotparse-0.1.1.0-7ksB5EWrjOr2Em2eE9iYUk" 'False) (C1 ('MetaCons "SubGraphStatement" 'PrefixI 'True) (S1 ('MetaSel ('Just "subgraphID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ID)) :*: S1 ('MetaSel ('Just "subgraphStatements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Statement])))

Conversion

graphToChartWith :: ChartConfig -> (ID -> Text) -> Graph -> ChartOptions Source #

convert a Graph processed via the graphviz commands to a ChartOptions

graphToChart :: Graph -> ChartOptions Source #

convert a Graph processed via the graphviz commands to a ChartOptions using the default ChartConfig.

data ChartConfig Source #

Various configutaion parameters for the chart-svg Chart

Instances

Instances details
Generic ChartConfig Source # 
Instance details

Defined in DotParse.Types

Associated Types

type Rep ChartConfig :: Type -> Type #

Show ChartConfig Source # 
Instance details

Defined in DotParse.Types

Eq ChartConfig Source # 
Instance details

Defined in DotParse.Types

type Rep ChartConfig Source # 
Instance details

Defined in DotParse.Types

defaultChartConfig :: ChartConfig Source #

default parameters

toStatements :: Directed -> Graph ByteString -> [Statement] Source #

create Statements from a (no edge label) algebraic graph

toDotGraph :: Graph ByteString -> Graph Source #

Convert an algebraic graph to a dotparse graph, starting with the defaultGraph.

toDotGraphWith :: Directed -> Graph -> Graph ByteString -> Graph Source #

Convert an algebraic graph to a dotparse graph.