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

#forwardEdge Source

#backwardEdge Source

#normalEdge Source

#(==>) Source

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

#(<==) Source

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

#(-==-) Source

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

#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

#DotLang Source

class DotLang a  where

a is a type that has a representation in the dot language

Members

Instances

Modules
Data.DotLang