haphviz-0.1.0.2: Graphviz code generation with Haskell

Safe HaskellSafe
LanguageHaskell2010

Text.Dot

Contents

Synopsis

Documentation

graph Source

Arguments

:: GraphType 
-> GraphName

Graph name

-> DotGen a

Content

-> DotGraph 

Generate graph

graph_ Source

Arguments

:: GraphType 
-> DotGen a

Content

-> DotGraph 

genDot :: DotGen a -> Dot Source

Generate Internal dot AST

Graph types

directed :: GraphType Source

Undirected graph

undirected :: GraphType Source

Directed graph

Nodes

genNode :: NodeId -> [Attribute] -> DotGen () Source

Most general node declaration

namedNode Source

Arguments

:: Text

Name

-> [Attribute] 
-> DotGen NodeId 

Node with given name and attributes

namelessNode :: [Attribute] -> DotGen NodeId Source

Nameless node with attributes

node Source

Arguments

:: Text

Label

-> DotGen NodeId 

Node with a label but no other attributes

node_ Source

Arguments

:: NodeId

given Node ID

-> Text

Label

-> DotGen () 

Node with given node Id and label

Edges

genEdge :: NodeId -> NodeId -> [Attribute] -> DotGen () Source

Most general edge declaration

(-->) :: NodeId -> NodeId -> DotGen () Source

Infix edge constructor. (No attributes)

Attributes

(=:) :: AttributeName -> AttributeValue -> Attribute Source

Infix operator for an attribute pair

Attribute Names

label :: AttributeName Source

compound :: AttributeName Source

shape :: AttributeName Source

color :: AttributeName Source

dir :: AttributeName Source

width :: AttributeName Source

height :: AttributeName Source

Attribute values

true :: AttributeValue Source

false :: AttributeValue Source

none :: AttributeValue Source

Declarations

genDec :: DecType -> [Attribute] -> DotGen () Source

General declaration of attributes

graphDec :: [Attribute] -> DotGen () Source

Graph declaration

>>> graphDec [compound =: true]
> graph [compound=true];

nodeDec :: [Attribute] -> DotGen () Source

Node declaration

>>> nodeDec [shape =: none]
> node [shape=none];

edgeDec :: [Attribute] -> DotGen () Source

Edge declaration

>>> edgeDec [color =: "red:blue"]
> edge [color="red:blue"];

Subgraphs

subgraph :: Text -> DotGen () -> DotGen GraphName Source

Subgraph

cluster :: Text -> DotGen () -> DotGen GraphName Source

Cluster

cluster_ :: Text -> DotGen () -> DotGen () Source

Cluster, discarding the graph name

Miscelaneous

Rankdir

Labels

labelDec :: Text -> DotGen () Source

Label declaration for graphs or subgraphs

Ports

(.:) Source

Arguments

:: NodeId 
-> Text

Port

-> NodeId 

Graph Types

Graph rendering