@hackage dataflow0.4.2.0
Generate Graphviz documents from a Haskell representation.
Categories
License
MIT
Maintainer
oskar.wickstrom@gmail.com
Links
Versions
Installation
Dependencies (3)
- base >=4 && <4.8
- containers >=0.4
- mtl >=2.2 Show all…
Dependents (1)
@hackage/acme-everything
DataFlow
Generate Graphviz documents from a Haskell representation.
cabal configure
cabal build
Usage
The objects supported by DataFlow is:
TrustBoundaryInputOutputFunctionDatabaseFlow
These are composed in a Diagram to get something printable.
For more on Haskell data types, see the Hackage site.
Example
module Main where
import DataFlow.Core
import DataFlow.DFD
main :: IO ()
main = printDfd $
Diagram "My Diagram" [
TrustBoundary "browser" "Browser" [
Function "webapp" "Webapp"
],
TrustBoundary "aws" "Amazon AWS" [
Function "server" "Web Server",
Database "logs" "Logs"
],
InputOutput "analytics" "Google Analytics",
Flow "webapp" "server" "Request /" "",
Flow "server" "logs" "Log" "User IP",
Flow "server" "webapp" "Response" "User Profile",
Flow "webapp" "analytics" "Log" "Page Navigation"
]
Then generate your output with dot.
runhaskell example.hs | dot -Tsvg > example.svg
That should generate something like the following.
Building the Examples
cabal install
make -C example
Release
cabal clean && cabal build && cabal sdist && cabal upload dist/dataflow-*.tar.gz