Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines an interpreter for visualizing session types.
Using visualize
or visualizeP
you can create a diagram that displays a session type using a set of nodes and arrows that connect these nodes.
- visualize :: forall m ctx s r a. (MonadSession m, MkDiagram s) => m (Cap ctx s) r a -> IO ()
- visualizeP :: forall s. MkDiagram s => Proxy s -> IO ()
- class MkDiagram s
Documentation
visualize :: forall m ctx s r a. (MonadSession m, MkDiagram s) => m (Cap ctx s) r a -> IO () Source #
Visualizes the session type of a given STTerm
You may use this function in the following way
main = visualize st
Then the following command will generate a diagram named "sessiontype.png"
stack exec vis-sessiontype -- -o sessiontype.png -w 400
For more information on how to generate a diagram please visit the diagrams package