ghc-heap-view: Extract the heap representation of Haskell values and thunks
This library provides functions to introspect the Haskell heap, for example to investigate sharing and lazy evaluation.
It has been inspired by (and taken code from) the vacuum package and the GHCi debugger, but also allows to investiage thunks and other closures.
This package also provides a new GHCi-command,
:printHeap, which allows you
to inspect the current heap representation of a value, including sharing and
cyclic references. To enable the command, you need to load the included ghci
script or add it to
~/.ghci, as explained by
cabal install. Once it is
set up, you can do this:
> let value = "A Value" > let x = (value, if head value == 'A' then value else "", cycle [True, False]) > :printHeap x let x1 = _bco x21 =  in (x1,_bco,_bco) > length (take 100 (show x)) `seq` return () -- evaluate everything > :printHeap x let x1 = "A Value" x16 = True : False : x16 in (x1,x1,x16)
You can change the maximum recursion depth using
> :setPrintHeapDepth 3 > :printHeap x let x1 = C# 'A' : ... : ... in (x1,x1,True : ... : ...)
If the view is impaired by blackholes (written
System.Mem.performGC usually helps.
The work on this package has been supported by the Deutsche Telekom Stiftung (http://telekom-stiftung.de).
|Versions [faq]||0.1, 0.2, 0.3, 0.3.0.1, 0.3.0.2, 0.3.0.3, 0.3.0.4, 0.4.0.0, 0.4.1.0, 0.4.2.0, 0.5, 0.5.0.1, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.5.11, 0.6.0, 0.6.1|
|Dependencies||base (>=4.5 && <4.7), binary, bytestring (>=0.10), containers, ghc, template-haskell, transformers [details]|
|Copyright||2012-2013 Joachim Breitner|
|Author||Joachim Breitner, Dennis Felsing|
|Maintainer||Joachim Breitner <firstname.lastname@example.org>|
|Revised||Revision 1 made by HerbertValerioRiedel at Thu Mar 30 20:32:27 UTC 2017|
|Source repo||head: darcs get http://darcs.nomeata.de/ghc-heap-view/|
|Uploaded||by JoachimBreitner at Tue Apr 23 08:49:13 UTC 2013|
|Downloads||14110 total (780 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
Docs uploaded by user
Build status unknown [no reports yet]
The used GHC supports Any as an argument to foreign prim functions (GHC ticket #5931)
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
- ghc-heap-view-0.5.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees