<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yiv8780269927"><div id="yui_3_16_0_ym19_1_1530935309394_21097"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;" id="yui_3_16_0_ym19_1_1530935309394_21096"><div id="yiv8780269927"><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_14597"><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_14596" style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_4808"><div id="yui_3_16_0_ym19_1_1530935309394_36685"><span>Hello,</span></div></div><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6494"><div id="yui_3_16_0_ym19_1_1530935309394_36681"><span><br clear="none"></span></div></div><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6495"><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_22769"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337">This effort mostly just brought the core of this [1] library into GHC. The main function you will want to try is `getClosureData`,</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_22770"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337">which takes any value and returns the heap representation. There are some tricky aspects about evaluation, but I will refer you to the comments about `Box`s in [1].<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_27992"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_27993"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337">As a shameless self-plug, I also wrote a bit about it. The first page is a brief intro to the heap, and the second is an example demonstrating how to track down a leaky accumulator. I also link to a few posts that sent me down this path.<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_36653"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_31521"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8337">This doesn't implement all of the functionality of [1], but it pulls in enough that hopefully it should be a little more stable between GHC versions. Also, you should be able to recreate many of the functions by looking at the source of [1] on hackage.<br clear="none"></span></div></div><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6565"><span><br clear="none"></span></div><div dir="ltr" id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6566"><div id="yui_3_16_0_ym19_1_1530935309394_27996"><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6571">[1] <a rel="nofollow" shape="rect" id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_10053" target="_blank" href="http://hackage.haskell.org/package/ghc-heap-view-0.5.10/docs/GHC-HeapView.html">http://hackage.haskell.org/package/ghc-heap-view-0.5.10/docs/GHC-HeapView.html</a><br></span></div><div id="yui_3_16_0_ym19_1_1530935309394_29610" dir="ltr">[2] <a href="https://patrickdoc.github.io/heap-view.html" class="" id="yui_3_16_0_ym19_1_1530935309394_29621">https://patrickdoc.github.io/heap-view.html</a><br><span id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_6571"></span></div></div><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8221"><br clear="none"></div><div id="yiv8780269927yui_3_16_0_ym19_1_1530935309394_8311"><div id="yui_3_16_0_ym19_1_1530935309394_21113">Best,</div><div id="yui_3_16_0_ym19_1_1530935309394_22813">Patrick<br></div></div> </div></div></div><div id="yui_3_16_0_ym19_1_1530935309394_21101"> <div style="font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;" id="yui_3_16_0_ym19_1_1530935309394_21100"><div id="yui_3_16_0_ym19_1_1530935309394_40087"><br></div><div id="yui_3_16_0_ym19_1_1530935309394_40086">P.S. Sorry about using [1] so many times. Both libraries are called heap-view which makes it a little difficult to distinguish.<br></div><div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_ym19_1_1530935309394_21099"><div class="yiv8780269927qtdSeparateBR" id="yui_3_16_0_ym19_1_1530935309394_21098"><br clear="none"></div><div class="yiv8780269927yqt0788219770" id="yiv8780269927yqt27374"><div class="yiv8780269927yqt8787864694" id="yiv8780269927yqt48721"><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_29611"><font id="yui_3_16_0_ym19_1_1530935309394_38437" size="2" face="Arial"> On Friday, July 6, 2018 10:10 PM, Takenobu Tani <takenobu.hs@gmail.com> wrote:<br clear="none"></font></div> <br clear="none"><br clear="none"> <div class="yiv8780269927y_msg_container" id="yui_3_16_0_ym19_1_1530935309394_38400"><div id="yiv8780269927"><div dir="ltr" id="yui_3_16_0_ym19_1_1530935309394_38399">Dear devs,<br clear="none"><br clear="none">I'm interested in ghc-heap-view of ghc-8.6. [1]<br clear="none">Is there a document on how to use the ghc-heap-view of ghc-8.6?<br clear="none"><br clear="none">[1]: <a rel="nofollow" shape="rect" target="_blank" href="https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-8.6.1#Landedinmasterbranch" id="yui_3_16_0_ym19_1_1530935309394_40142">https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-8.6.1#Landedinmasterbranch</a><br clear="none"><br clear="none">Regards,<br clear="none">Takenobu<br clear="none"><br clear="none"><br clear="none"></div></div>_______________________________________________<br clear="none">ghc-devs mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:ghc-devs@haskell.org" target="_blank" href="mailto:ghc-devs@haskell.org" id="yui_3_16_0_ym19_1_1530935309394_40143">ghc-devs@haskell.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br clear="none"><br clear="none"><br clear="none"></div></div></div> </div> </div> </div></div></div></div></div></body></html>