-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate Graphviz documents from a Haskell representation. -- @package dataflow @version 0.6.1.0 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 -- | The name of a Diagram or Object. type Name = String -- | Operation heading. type Operation = String -- | Operation description. type Description = String -- | The top level diagram. data Diagram Diagram :: (Maybe Name) -> [Object] -> Diagram -- | An object in a diagram. data Object -- | A Input or Output in DFD. InputOutput :: ID -> Name -> Object -- | Surrounds other objects, denoting a boundary. TrustBoundary :: ID -> Name -> [Object] -> Object -- | A "Function" in DFD. Function :: ID -> Name -> Object -- | A "Database" in DFD. Database :: ID -> Name -> Object -- | Describes the flow of data between two objects. Flow :: ID -> ID -> Operation -> Description -> Object instance Show Object instance Eq Object instance Eq Diagram instance Show Diagram module DataFlow.Reader readDiagram :: String -> String -> Either ParseError Diagram readDiagramFile :: FilePath -> IO (Either ParseError Diagram) module DataFlow.SequenceDiagram convertNewline :: String -> String bold :: String -> String italic :: String -> String convertObject :: Object -> Stmt defaultSkinParams :: [Stmt] asSequenceDiagram :: Diagram -> Diagram module DataFlow.DFD type Step = Int type DFD v = State Step 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 convertObject :: Object -> DFD StmtList convertObjects :: [Object] -> DFD StmtList defaultGraphStmts :: StmtList convertDiagram :: Diagram -> DFD Graph asDFD :: Diagram -> Graph