-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate Graphviz documents from a Haskell representation. -- @package dataflow @version 0.7.1.0 module DataFlow.JSONGraphFormat type Metadata = Map String String 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 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 type Attributes = Map String String -- | 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 :: 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 Show Node instance Eq Node instance Eq RootNode instance Show RootNode instance Show Flow instance Eq Flow instance Eq Diagram instance Show Diagram module DataFlow.Attributes getTitleOrBlank :: Attributes -> String getTitle :: Attributes -> Maybe String module DataFlow.Reader identifier :: Parser ID str :: Parser String textBlock :: Parser String inBraces :: Parser t -> Parser t attr :: Parser (String, String) attrs :: Parser Attributes -- | Construct a parser for an node with an ID: -- --
-- <keyword> <id> {
-- ...
-- }
--
idAndAttrsNode :: String -> (ID -> Attributes -> t) -> Parser t
function :: Parser Node
database :: Parser Node
io :: Parser Node
data FlowType
Back :: FlowType
Forward :: FlowType
arrow :: Parser FlowType
flow :: Parser Flow
node :: Parser Node
boundary :: Parser RootNode
rootNode :: Parser RootNode
diagram :: 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
convertNode :: Node -> Stmt
convertFlow :: Flow -> Stmt
convertRootNode :: RootNode -> Stmt
defaultSkinParams :: [Stmt]
asSequenceDiagram :: Diagram -> Diagram
module DataFlow.DFD
data DFDState
DFDState :: Int -> Int -> DFDState
step :: DFDState -> Int
clusterID :: DFDState -> Int
type DFD v = State DFDState v
incrStep :: DFD ()
incrClusterID :: DFD ()
-- | Get the next "step" number (the order of flow arrows in the diagram).
nextStep :: DFD Int
nextClusterID :: 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