dataflow: Generate Graphviz documents from a Haskell representation.

[ bsd3, code-generation, compiler, graphs, library, program ] [ Propose Tags ]

Outputs .dot files that can be processed by the dot command. Currently it only supports the DFD output format (http:/en.wikipedia.orgwiki/Data_flow_diagram). Support for a Graphviz-like input format (instead of using the data structures in Haskell) is planned.


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.2.0, 0.4.0.0, 0.4.1.0, 0.4.2.0, 0.5.0.0, 0.5.1.0, 0.5.2.0, 0.5.3.0, 0.5.4.0, 0.6.0.0, 0.6.1.0, 0.7.1.0, 0.7.3.0
Dependencies base (>=4 && <4.8), containers (>=0.4), mtl (>=2.2) [details]
License MIT
Copyright oskar.wickstrom@gmail.com
Author Oskar Wickström
Maintainer oskar.wickstrom@gmail.com
Category Code Generation, Compiler, Graphs
Home page https://github.com/owickstrom/dataflow
Source repo head: git clone git@github.com:owickstrom/dataflow.git
Uploaded by owickstrom at Fri Apr 10 14:25:38 UTC 2015
Distributions NixOS:0.7.3.0
Downloads 5744 total (48 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2015-04-10 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for dataflow-0.4.2.0

[back to package description]

DataFlow

Generate Graphviz documents from a Haskell representation.

cabal configure
cabal build

Usage

Legend

The objects supported by DataFlow is:

  • TrustBoundary
  • InputOutput
  • Function
  • Database
  • Flow

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.

Example Output

Building the Examples

cabal install
make -C example

Release

cabal clean && cabal build && cabal sdist && cabal upload dist/dataflow-*.tar.gz