Module

Data.DotLang

Package
purescript-dotlang
Repository
csicar/purescript-dotlang

#Id Source

type Id = String

type alias for a Nodes Name

#Node Source

data Node

Dot-Node example :

Node "e" [Margin 3, Label "some label"]

is turned into: e [margin=3, label="some label"];

Constructors

Instances

#nodeId Source

nodeId :: Node -> Id

get a nodes id example:

nodeId (Node "e" [Label "foo"]) == "e"

#changeNodeId Source

changeNodeId :: (Id -> Id) -> Node -> Node

change Nodes id to a new one; keeing the old id as the label example: mapNodeId (\a -> a+"!") (Node "e" []) == Node "e!" [Label "e"]

#Edge Source

data Edge

egde from id to id toText $ Edge "a" "b" [] == a -> b [] option for different arrows is missing

Constructors

Instances

#Definition Source

data Definition

definition in a graph

Constructors

Instances

#forwardEdgeWithAttrs Source

#forwardEdge Source

#backwardEdgeWithAttrs Source

#backwardEdge Source

#normalEdgeWithAttrs Source

#normalEdge Source

#(==>) Source

Operator alias for Data.DotLang.forwardEdge (non-associative / precedence 5)

"a" ==> "b" -- :: Definition

#(=*>) Source

Operator alias for Data.DotLang.forwardEdgeWithAttrs (non-associative / precedence 5)

"a" =*> "b" $ [ Edge.FillColor red ]

Forward edge with attributes

#(<==) Source

Operator alias for Data.DotLang.backwardEdge (non-associative / precedence 5)

"a" <== "b" -- :: Definition

#(<*=) Source

Operator alias for Data.DotLang.backwardEdgeWithAttrs (non-associative / precedence 5)

"a" <*= "b" $ [ Edge.FillColor red ]

Backward edge with attributes

#(-==-) Source

Operator alias for Data.DotLang.normalEdge (non-associative / precedence 5)

"a" -==- "b"

#(=*=) Source

Operator alias for Data.DotLang.normalEdgeWithAttrs (non-associative / precedence 5)

"a" =*= "b" $ [ Edge.FillColor red ]

Normal edge with attibutes

#Graph Source

data Graph

graph can either be a graph or digraph

Constructors

Instances

#graphFromElements Source

graphFromElements :: Array (Node) -> Array (Edge) -> Graph

create graph from Nodes and Edges example: graphFromElements [Node "e" [], Node "d" []] [Edge "e" "f"]

#GraphRepr Source

class GraphRepr a  where

a is a type that can be represented by a Dot-Graph

Members