flow2dot-0.9.2: Library and binary to generate sequence/flow diagrams from plain text source

Safe HaskellSafe
LanguageHaskell2010

Text.FlowDiagram

Description

Converts flow diagrams to the Graphviz (Dot) files for subsequent rendering into nice pictures.

Synopsis

Documentation

flow2dot :: [Flow] -> String Source #

flow2dot take a list of flow diagram items (Flow) and converts them to Graphviz code

parseFlow :: String -> String -> [Flow] Source #

Parse given string and return Flow Diagram contained therein. All syntax errors are thrown via error

parseFlowFromFile :: FilePath -> IO [Flow] Source #

Parse specified file and return Flow Diagram contained therein. All syntax errors are thrown via error

showFlow :: Flow -> String Source #

Print element of the flow diagram as String

data Flow Source #

Flow could include messages and actions, one item per source line

Constructors

Msg Swimline Swimline String

Message (from, to, message text). Syntax in the source file: from -> to: message text

Action Swimline String

Action (actor, message text). Syntax in the source file: actor: message text

Order [Swimline]

Tries to put swimlines in the specified order. Syntax: order swimline1 swimline2 ...

Instances
Eq Flow Source # 
Instance details

Defined in Text.FlowDiagram

Methods

(==) :: Flow -> Flow -> Bool #

(/=) :: Flow -> Flow -> Bool #

Show Flow Source # 
Instance details

Defined in Text.FlowDiagram

Methods

showsPrec :: Int -> Flow -> ShowS #

show :: Flow -> String #

showList :: [Flow] -> ShowS #