Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Example of Dot graph construction for the chart-svg class heirarchy.
Synopsis
- data SubComponents = SubComponents {}
- data ComponentEdge = ComponentEdge {}
- graphVs :: Monoid a => [SubComponents] -> Graph a (ByteString, ByteString)
- subs :: SubComponents -> [(ByteString, ByteString)]
- graphEs :: [ComponentEdge] -> Graph (Maybe ByteString) (ByteString, ByteString)
- graphAST :: [SubComponents] -> [ComponentEdge] -> Graph (Maybe ByteString) (ByteString, ByteString)
- fromCEs :: [ComponentEdge] -> [SubComponents]
- recordNodes :: Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement]
- recordEdges :: Directed -> Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement]
- toStatementsRecord :: Directed -> Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement]
- toURL :: ByteString -> Maybe ByteString
- dotAST :: [SubComponents] -> [ComponentEdge] -> Graph
- data ItemModule = ItemModule {}
- itemModules :: [ItemModule]
- componentEdges :: [ComponentEdge]
- allSC :: [SubComponents]
Documentation
>>>
import DotParse
>>>
:set -XOverloadedStrings
data SubComponents Source #
A Haskell class and (informal) list of sub-components.
Instances
data ComponentEdge Source #
Relationship between a class, a sub-component and the class of the sub-component.
Instances
graphVs :: Monoid a => [SubComponents] -> Graph a (ByteString, ByteString) Source #
algebraic graph vertices
subs :: SubComponents -> [(ByteString, ByteString)] Source #
Convert sub-components to a list of class, subcomponent bytestring tuples.
graphEs :: [ComponentEdge] -> Graph (Maybe ByteString) (ByteString, ByteString) Source #
algebraic graph edges
graphAST :: [SubComponents] -> [ComponentEdge] -> Graph (Maybe ByteString) (ByteString, ByteString) Source #
algebraic graph
fromCEs :: [ComponentEdge] -> [SubComponents] Source #
Create a list of SubComponents
from a list of ComponentEdge
s
recordNodes :: Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement] Source #
Convert an algebraic Graph into dot record nodes
recordEdges :: Directed -> Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement] Source #
Convert an algebraic Graph into dot edges
toStatementsRecord :: Directed -> Graph (Maybe ByteString) (ByteString, ByteString) -> [Statement] Source #
create Statements from a (edge labelled) algebraic graph
toURL :: ByteString -> Maybe ByteString Source #
Convert a node ID to a label for chart-svg charts Doing this directly in dot doesn't quite work because the engines get the width of the link wrong.
dotAST :: [SubComponents] -> [ComponentEdge] -> Graph Source #
AST Graph
gAST = dotAST allSC componentEdges C.writeFile "other/ast.dot" $ dotPrint defaultDotConfig gAST bsSvg <- processDotWith Directed ["-Tsvg"] (dotPrint defaultDotConfig gAST) C.writeFile "other/ast.svg" bsSvg
data ItemModule Source #
Link values
Instances
itemModules :: [ItemModule] Source #
List of link values
componentEdges :: [ComponentEdge] Source #
list of chart-svg component edges
allSC :: [SubComponents] Source #
list of chart-svg subcomponents