-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate Graphviz documents from a Haskell representation. -- @package dataflow @version 0.7.3.0 module DataFlow.JSONGraphFormat data Val Str :: String -> Val Arr :: [Val] -> Val type Metadata = Map String Val data Document SingleGraph :: Graph -> Document graph :: Document -> Graph MultiGraph :: [Graph] -> Document graphs :: Document -> [Graph] data Graph Graph :: [Node] -> [Edge] -> Maybe String -> Metadata -> Graph nodes :: Graph -> [Node] edges :: Graph -> [Edge] graphLabel :: Graph -> Maybe String graphMetadata :: Graph -> Metadata data Node Node :: String -> Maybe String -> Metadata -> Node id :: Node -> String nodeLabel :: Node -> Maybe String nodeMetadata :: Node -> Metadata data Edge Edge :: String -> String -> Maybe String -> Metadata -> Edge source :: Edge -> String target :: Edge -> String edgeLabel :: Edge -> Maybe String edgeMetadata :: Edge -> Metadata instance ToJSON Edge instance ToJSON Node instance ToJSON Graph instance ToJSON Document instance ToJSON Val module DataFlow.PlantUML type ID = String type Name = String data Stmt SkinParam :: String -> String -> Stmt Box :: Name -> StmtList -> Stmt Participant :: ID -> Name -> Stmt Database :: ID -> Name -> Stmt Entity :: ID -> Name -> Stmt Edge :: ID -> ID -> String -> Stmt type StmtList = [Stmt] data Diagram SequenceDiagram :: StmtList -> Diagram instance Show Stmt instance Eq Stmt instance Show Diagram instance Eq Diagram -- | DataFlow.Graphviz provides a model corresponding to the Graphviz -- language described at -- http://www.graphviz.org/content/dot-language. All features in -- the grammar are not supported. module DataFlow.Graphviz type ID = String data Attr Attr :: ID -> ID -> Attr type AttrList = [Attr] data Compass N :: Compass NE :: Compass E :: Compass SE :: Compass S :: Compass SW :: Compass W :: Compass NW :: Compass C :: Compass data Port Port :: (Maybe ID) -> Compass -> Port data NodeID NodeID :: ID -> (Maybe Port) -> NodeID data Subgraph Subgraph :: ID -> StmtList -> Subgraph data EdgeOperator Arrow :: EdgeOperator Line :: EdgeOperator data EdgeOperand IDOperand :: NodeID -> EdgeOperand SubgraphOperand :: Subgraph -> EdgeOperand data EdgeExpr EdgeExpr :: EdgeOperand -> EdgeOperator -> EdgeOperand -> EdgeExpr data AttrStmtType Graph :: AttrStmtType Node :: AttrStmtType Edge :: AttrStmtType data Stmt NodeStmt :: ID -> AttrList -> Stmt EdgeStmt :: EdgeExpr -> AttrList -> Stmt AttrStmt :: AttrStmtType -> AttrList -> Stmt EqualsStmt :: ID -> ID -> Stmt SubgraphStmt :: Subgraph -> Stmt type StmtList = [Stmt] data Graph Digraph :: ID -> StmtList -> Graph instance Show Attr instance Eq Attr instance Show Compass instance Eq Compass instance Ord Compass instance Show Port instance Eq Port instance Ord Port instance Show NodeID instance Eq NodeID instance Ord NodeID instance Show EdgeOperator instance Eq EdgeOperator instance Show AttrStmtType instance Eq AttrStmtType instance Show Stmt instance Eq Stmt instance Show EdgeExpr instance Eq EdgeExpr instance Show EdgeOperand instance Eq EdgeOperand instance Show Subgraph instance Eq Subgraph instance Show Graph instance Eq Graph module DataFlow.Graphviz.EdgeNormalization normalize :: Graph -> Graph module DataFlow.PrettyRenderer type Indent = Int type IndentNext = Bool data RendererState RendererState :: Indent -> IndentNext -> RendererState -- | The Renderer represents some output generator that runs on a -- Diagram. type Renderer t = WriterT [String] (State RendererState) t -- | Write a string to the output (no linefeed). write :: String -> Renderer () -- | Write a string to the output (with linefeed). writeln :: String -> Renderer () -- | Increase indent with 2 spaces. indent :: Renderer () -- | Decrease indent with 2 spaces. dedent :: Renderer () -- | Indent the output of gen with 2 spaces. withIndent :: Renderer () -> Renderer () renderWithIndent :: Renderer () -> String module DataFlow.Graphviz.Renderer renderGraphviz :: Graph -> String instance Renderable Graph instance Renderable StmtList instance Renderable Stmt instance Renderable AttrStmtType instance Renderable EdgeExpr instance Renderable EdgeOperand instance Renderable EdgeOperator instance Renderable Subgraph instance Renderable NodeID instance Renderable Port instance Renderable AttrList instance Renderable Attr module DataFlow.PlantUML.Renderer renderPlantUML :: Diagram -> String instance Renderable Diagram instance Renderable StmtList instance Renderable Stmt module DataFlow.Core -- | An identifier corresponding to those in Graphviz. type ID = String data Value String :: String -> Value Array :: [Value] -> Value -- | Attribute key-value pairs can be declared in diagrams, nodes, -- boundaries | and flows. type Attributes = Map String Value -- | The top level diagram. data Diagram Diagram :: Attributes -> [RootNode] -> [Flow] -> Diagram -- | An root node in a diagram. data RootNode -- | A top level Node. Node :: Node -> RootNode -- | Surrounds other non-root nodes, denoting a boundary. TrustBoundary :: ID -> Attributes -> [Node] -> RootNode -- | Describes the flow of data between two nodes. data Flow Flow :: ID -> ID -> Attributes -> Flow data Node -- | A Input or Output in DFD. InputOutput :: ID -> Attributes -> Node -- | A "Function" in DFD. Function :: ID -> Attributes -> Node -- | A "Database" in DFD. Database :: ID -> Attributes -> Node instance Eq Value instance Show Node instance Eq Node instance Eq RootNode instance Show RootNode instance Show Flow instance Eq Flow instance Eq Diagram instance Show Diagram instance Show Value module DataFlow.Attributes getTitleOrBlank :: Attributes -> String getTitle :: Attributes -> Maybe String module DataFlow.Validation data ValidationError UnknownID :: ID -> ValidationError DuplicateDeclaration :: ID -> ValidationError validate :: Diagram -> Either [ValidationError] Diagram instance Eq ValidationError instance Show ValidationError module DataFlow.Reader document :: Parser Diagram readDiagram :: String -> String -> Either ParseError Diagram readDiagramFile :: FilePath -> IO (Either ParseError Diagram) module DataFlow.SequenceDiagram convertNewline :: String -> String bold :: String -> String italic :: String -> String showValue :: Value -> String blank :: Value convertNode :: Node -> Stmt convertFlow :: Flow -> Stmt convertRootNode :: RootNode -> Stmt defaultSkinParams :: [Stmt] asSequenceDiagram :: Diagram -> Diagram module DataFlow.DFD type DFDState = Int type DFD v = State DFDState v incrStep :: DFD () -- | Get the next "step" number (the order of flow arrows in the diagram). nextStep :: DFD Int inQuotes :: String -> String inAngleBrackets :: String -> String label :: String -> Attr bold :: String -> String italic :: String -> String small :: String -> String color :: String -> String -> String convertNode :: Node -> DFD StmtList convertNodes :: [Node] -> DFD StmtList convertFlow :: Flow -> DFD StmtList convertFlows :: [Flow] -> DFD StmtList convertRootNode :: RootNode -> DFD StmtList convertRootNodes :: [RootNode] -> DFD StmtList defaultGraphStmts :: StmtList convertDiagram :: Diagram -> DFD Graph asDFD :: Diagram -> Graph module DataFlow.Hastache.Renderer renderTemplate :: String -> FilePath -> Diagram -> IO Text module DataFlow.JSONGraphFormat.Renderer convertDiagram :: Diagram -> Document renderJSONGraph :: Diagram -> ByteString