Data.DotLang
- Package
- purescript-dotlang
- Repository
- csicar/purescript-dotlang
#changeNodeId Source
changeNodeId :: (Id -> Id) -> Node -> Node
change Nodes id to a new one; keeing the old id as the label
> changeNodeId (_ <> "!") (Node "e" [])
(Node "e!" [(Label (TextLabel "e"))])
#Definition Source
#global Source
global :: Array Attr -> Definition
> import Data.DotLang.Attr.Global as Global
> :t global [Global.RankDir Global.FromLeft]
Definition
global as a part of a definition
#forwardEdgeWithAttrs Source
forwardEdgeWithAttrs :: Id -> Id -> Array Attr -> Definition
#forwardEdge Source
forwardEdge :: Id -> Id -> Definition
#backwardEdgeWithAttrs Source
backwardEdgeWithAttrs :: Id -> Id -> Array Attr -> Definition
#backwardEdge Source
backwardEdge :: Id -> Id -> Definition
#normalEdgeWithAttrs Source
normalEdgeWithAttrs :: Id -> Id -> Array Attr -> Definition
#normalEdge Source
normalEdge :: Id -> Id -> Definition
#(==>) Source
Operator alias for Data.DotLang.forwardEdge (non-associative / precedence 5)
> :t "a" ==> "b"
Definition
Forward edge as as a definition
#(=*>) Source
Operator alias for Data.DotLang.forwardEdgeWithAttrs (non-associative / precedence 5)
> import Data.DotLang.Attr.Edge as Edge
> import Color.Scheme.HTML (red)
> toText $ "a" =*> "b" $ [ Edge.FillColor red ]
"a -> b [fillcolor=\"#ff0000\"]; "
Forward edge with attributes as a definition
#(<==) Source
Operator alias for Data.DotLang.backwardEdge (non-associative / precedence 5)
> :t "a" <== "b"
Definition
Backward edge as a definition
#(<*=) Source
Operator alias for Data.DotLang.backwardEdgeWithAttrs (non-associative / precedence 5)
> :t "a" <*= "b" $ [ Edge.FillColor red ]
Definition
Backward edge with attributes as a definition
#(-==-) Source
Operator alias for Data.DotLang.normalEdge (non-associative / precedence 5)
> toText $ "a" -==- "b"
"a -- b; "
Normal edge as definition
#(=*=) Source
Operator alias for Data.DotLang.normalEdgeWithAttrs (non-associative / precedence 5)
> toText $ "a" =*= "b" $ [ Edge.FillColor red ]
"a -- b [fillcolor=\"#ff0000\"]; "
Normal edge with attibutes