dataflow-0.4.2.0: Generate Graphviz documents from a Haskell representation.

Safe HaskellSafe-Inferred
LanguageHaskell2010

DataFlow.Core

Synopsis

Documentation

type ID = String Source

An identifier corresponding to those in Graphviz.

type Name = String Source

The name of a Diagram or Object.

type Operation = String Source

Operation heading.

type Description = String Source

Operation description.

data Diagram Source

The top level diagram.

Constructors

Diagram Name [Object] 

Instances

data Object Source

An object in a diagram.

Constructors

InputOutput ID Name

A Input or Output in DFD.

TrustBoundary ID Name [Object]

Surrounds other objects, denoting a boundary.

Function ID Name

A "Function" in DFD.

Database ID Name

A "Database" in DFD.

Flow ID ID Operation Description

Describes the flow of data between two objects.

type Renderer t = WriterT [String] (State RendererState) t Source

The Renderer represents some output generator that runs on a Diagram.

evalDiagram :: Renderer () -> String Source

Run the Renderer and get the output as a String.

write :: String -> Renderer () Source

Write a string to the output (no linefeed).

writeln :: String -> Renderer () Source

Write a string to the output (with linefeed).

nextStep :: Renderer Int Source

Get the next "step" number (the order of flow arrows in the diagram).

indent :: Renderer () Source

Increase indent with 2 spaces.

dedent :: Renderer () Source

Decrease indent with 2 spaces.

withIndent :: Renderer () -> Renderer () Source

Indent the output of gen with 2 spaces.

blank :: Renderer () Source

Write a blank line.

label :: Renderer () -> Renderer () Source

Write a label with the output of gen as its contents.

tag :: String -> String -> Renderer () -> Renderer () Source

Write an HTML tag t with the output of gen as its contents.

bold :: Renderer () -> Renderer () Source

Write a <b> tag surrounding the output of another Renderer.

table :: String -> Renderer () -> Renderer () Source

Write a <table> tag, with attributes, surrounding the output of another Renderer.

tr :: Renderer () -> Renderer () Source

Write a <tr> tag surrounding the output of another Renderer.

td :: Renderer () -> Renderer () Source

Write a <td> tag surrounding the output of another Renderer.

data Enclosing Source

The enclosing characters in a block.

Constructors

Brackets 
CurlyBrackets 

objectWith :: Enclosing -> ID -> Renderer () -> Renderer () Source

Write an object with the given Enclosing characters, ID and Renderer as its contents.

attrs :: ID -> String -> Renderer () Source

Write an attributes declaration for the given ID.