vacuum-opengl-0.0.3: Visualize live Haskell data structures using vacuum, graphviz and OpenGL.

System.Vacuum.OpenGL.Client

Description

Since GLUT+GHCi is problematic at best, after some very frustating experiments I decided on a client-server architecture.

Usage example:

 $ vacuum-opengl-server &
 vacuum-opengl server started - press ESC to exit. 
 listening on port 55961
 
 $ ghci
 Prelude> :m + System.Vacuum.OpenGL 
 Prelude System.Vacuum.OpenGL> view [1..5]
 Prelude System.Vacuum.OpenGL> view $ zip "foobar" [1..6]
 Prelude System.Vacuum.OpenGL> :m + Data.Set
 Prelude System.Vacuum.OpenGL Data.Set> view $ fromList [1..10]

Note:

  • we need the graphviz executable (called "dot") being in the path.
  • we need the server running
  • the image generated by graphviz may be bigger than the maximum texture size your video card supports (eg. 2048). In this case you will see a white rectangle. TODO: handle this better.

TODO:

  • zooming & panning with mouse
  • nicer graph labels

Documentation

view :: a -> IO ()Source