ghc-vis: Live visualization of data structures in GHCi

[ bsd3, debug, development, ghc, library ] [ Propose Tags ]

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 your .ghci like this:

echo ":script $HOME/.cabal/share/ghc-vis-0.3.1.1/ghci" >> ~/.ghci

Now you can run ghci and experiment with ghc-vis. Start the visualization:

$ 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"

http://felsin9.de/nnis/ghc-vis/1.png

Functions are red, named objects are green and links to an already shown object are blue.

Notice how a is referenced by b.

Evaluate an object that is shown in the visualization. You can also click on the object to evaluate it.

> :eval t1

http://felsin9.de/nnis/ghc-vis/2.png

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:

> :switch

http://felsin9.de/nnis/ghc-vis/3.png

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

http://felsin9.de/nnis/ghc-vis/4.png

Clear the visualization window, this also happens when you :load or :reload a source file:

> :clear

Modules

[Last Documentation]

  • GHC
    • GHC.Vis

Flags

Automatic Flags
NameDescriptionDefault
graph

"Enable graph view using Graphviz"

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.3.1
Dependencies base (>=4 && <5), cairo (>=0.12 && <0.13), deepseq, fgl, ghc-heap-view (>=0.3), graphviz (>=2999.14.1.0), gtk (>=0.12 && <0.13), mtl (>=2.0), text, transformers, xdot (>=0.2) [details]
License BSD-3-Clause
Copyright Dennis Felsing 2012
Author Dennis Felsing <dennis@felsin9.de>
Maintainer Dennis Felsing <dennis@felsin9.de>
Category GHC, Debug, Development
Home page http://felsin9.de/nnis/ghc-vis
Uploaded by DennisFelsing at 2012-09-13T04:42:55Z
Distributions NixOS:0.9.3.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 23174 total (89 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-24 [all 8 reports]