How to get a heap visualization

Joachim Breitner mail at
Fri Sep 1 11:47:03 UTC 2017


author of ghc-heap-view here.

Am Mittwoch, den 30.08.2017, 18:34 +0300 schrieb Yitzchak Gale:
> Getting ghc-vis to compile looks hopeless, for a number of reasons.
> The dependencies on gtk and cairo are huge.

Is that really a problem?

>  It hasn't been updated
> on Hackage for a year and a half. It requires base < 4.9.

GitHub is already ahead. I guess this just needs to be uploaded?

> I need to run
> the visualizer either on a headless Ubuntu 16.04 server, or locally on
> Windows.

Ok, that is more tricky.

> The heap scraper backend for ghc-vis, ghc-heap-view, looks usable,
> and better supported than vacuum. But is there a quick and simple
> visualizer for its output, without ghc-vis?

Well, the :printHeap command that comes with it does “visualize” things
as something resembling Haskell syntax:

    let x1 = "A Value"
        x16 = True : False : x16
    in (x1,x1,x16)

I don’t know of anything more graphical besides ghc-vis, but you could
roll your own, if you want to; you can use ghc-heap-view to get a graph
and then visualize that as you like.


Joachim “nomeata” Breitner
  mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Glasgow-haskell-users mailing list