-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Generate Graphviz documents from a Haskell representation.
--
@package dataflow
@version 0.4.1.0
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 :: 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
-- | The Gen represents some output generator that runs on a
-- Diagram..
type Gen t = WriterT [String] (State GenState) t
-- | Run the Gen and get the output as a String.
evalDiagram :: Gen () -> String
-- | Write a string to the output (no linefeed).
write :: String -> Gen ()
-- | Write a string to the output (with linefeed).
writeln :: String -> Gen ()
-- | Get the next "step" number (the order of flow arrows in the diagram).
nextStep :: Gen Int
-- | Increase indent with 2 spaces.
indent :: Gen ()
-- | Decrease indent with 2 spaces.
dedent :: Gen ()
-- | Indent the output of gen with 2 spaces.
withIndent :: Gen () -> Gen ()
-- | Write a blank line.
blank :: Gen ()
-- | Write a label with the output of gen as its contents.
label :: Gen () -> Gen ()
-- | Write an HTML tag t with the output of gen as its contents.
tag :: String -> String -> Gen () -> Gen ()
-- | Write a <b> tag surrounding the output of another Gen.
bold :: Gen () -> Gen ()
-- | Write a <table> tag, with attributes, surrounding the output of
-- another Gen.
table :: String -> Gen () -> Gen ()
-- | Write a <tr> tag surrounding the output of another Gen.
tr :: Gen () -> Gen ()
-- | Write a <td> tag surrounding the output of another Gen.
td :: Gen () -> Gen ()
-- | The enclosing characters in a block.
data Enclosing
Brackets :: Enclosing
CurlyBrackets :: Enclosing
-- | Write an object with the given Enclosing characters, ID
-- and Gen as its contents.
objectWith :: Enclosing -> ID -> Gen () -> Gen ()
-- | Write an attributes declaration for the given ID.
attrs :: ID -> String -> Gen ()
instance Show Object
instance Eq Object
module DataFlow.DFD
-- | Type class for types that can be rendered as DFD.
class DFD t
dfd :: DFD t => t -> Gen ()
-- | Generates the DFD output as a String.
evalDfd :: Diagram -> String
-- | Prints the DFD output to stdout.
printDfd :: Diagram -> IO ()
instance DFD Diagram
instance DFD Object