The ghc-vis package
Visualize live data structures in GHCi. Evaluation is not forced and you can interact with the visualized data structures. This allows seeing Haskell's lazy evaluation and sharing in action.
To use this package add the accompanying
ghci file to
.ghci like this:
echo ":script $HOME/.cabal/share/ghc-vis-0.1/ghci" >> ~/.ghci
Now you can run ghci and experiment with
$ ghci GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help > :vis
A blank window should appear now. This is the visualization window. Add an expression to the visualization:
> let a = [1..3] > :view a > let b = cycle a > :view b > :view "foo" ++ "bar"
Functions are red, named objects are green and links to an already shown object are blue.
a is referenced by
Evaluate an object that is shown in the visualization. You can also click on the object to evaluate it.
> :eval t1
The first element of
b has been evaluated. We see that
it's a reference to the value that's also referenced in a,
as they share the same name "t0".
Switch between the list view and the graph view:
When an object is updated by accessing it, you have to call
:update to refresh the visualization window. You can also
click on an object to force an update:
> a !! 2 3 > :update
Clear the visualization window, this also happens when you
:reload a source file:
|Versions||0.1, 0.2, 0.2.1, 0.3, 0.3.1, 0.3.1.1, 0.3.2, 0.4, 0.5, 0.6, 0.6.1, 0.6.1.1, 0.7, 0.7.0.1, 0.7.1, 0.7.2, 0.7.2.1, 0.7.2.2, 0.7.2.3, 0.7.2.4, 0.7.2.5, 0.7.2.6, 0.7.2.7, 0.7.2.8, 0.7.2.9, 0.8|
|Dependencies||base (==4.5.*), cairo, deepseq, fgl, ghc-heap-view (>=0.3), graphviz, gtk, mtl, text, xdot [details]|
|Copyright||Dennis Felsing 2012|
|Author||Dennis Felsing <firstname.lastname@example.org>|
|Maintainer||Dennis Felsing <email@example.com>|
|Category||GHC, Debug, Development|
|Uploaded||Thu Aug 30 13:08:21 UTC 2012 by DennisFelsing|
|Downloads||6270 total (611 in the last 30 days)|
|Rating||2.0 (votes: 1) [estimated by rule of succession]|
|Status||Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI
For package maintainers and hackage trustees