Fλux
Flux is an ongoing project to visualize Haskell programs as data-flow diagrams. Its main goal is to improve program understanding and support functional programmers in various development activities. By visualizing values as data-flows between functions, the developer can see how these functions interact, and how expressions depend from each other.
Being a strongly and statically typed language, types are very important for writing and understanding Haskell code. By enriching all data-flows with type information, the diagrams produced by Flux can display all intermediary types, which are not directly visible to the programmer.
The resulting diagrams can be used as documentation or as a means of communication. Other use-cases include the help in manipulating existing programs or to identify data-dependencies, which are, e.g., important for parallelization.
Fλux uses λ-calculus, category theory, and graphs as a formal foundation for its transformations from Haskell code to data-flow diagrams. Using the compiler GHC, Haskell modules are compiled to GHC Core, a polymorphically typed λ-calculus. These Core expressions are converted to another, statically typed representation of λ-expressions, before translating them to "arrows" in a Cartesian closed category. Those arrows build the basis for the systematic generation of data-flow diagrams, which undergo a generation, unification and reduction phase.
Flux is still in development and an active research topic, meant as a prototype, not a production-ready piece of software.
Here is a small example of a function visualized with Flux.
Contact
Tobias Weck