
Hello,
sorry about the link mix-up, the second one was supposed to be a link to
the GitHub:
https://github.com/yav/dump-core/
The README.md, which is rendered on GitHub, has instructions on how to use
the plugin, and I just updated it with some more information on how to use
the rendered HTML. You can have a look at a sample rendered module here:
http://yav.github.io/dump-core/example-output/Galua.OpcodeInterpreter.html
The most striking thing everyone seems to notice first is that there are
many variables that have the same name---this is because I am only
rendering the string part of the names, without the uniques. The hovering
behavior does use the uniques though, so that's what I usually use to
disambiguate the variables. It would be easy enough to show the numbers
if people would like that. I am sure that there are many other things that
can be improved---if you have ideas / suggestions, please file an issue on
github.
Cheers,
-Iavor
On Thu, Jan 12, 2017 at 1:23 PM, Simon Peyton Jones
Iavor
Sounds good…but there are no instructions on what it does, screen shots, why one might want it, how to install, how to use… Both URLs below are the same
Simon
*From:* ghc-devs [mailto:ghc-devs-bounces@haskell.org] *On Behalf Of *Iavor Diatchki *Sent:* 12 January 2017 18:36 *To:* Haskell Cafe
; ghc-devs@haskell.org *Subject:* ANN: `dump-core` a prettier GHC core viewer Hello,
Over the holidays I wrote a small GHC plugin to help me do some low-level optimizations of Haskell code. I thought it might be of use to other people too, so please try it out!
When enabled, the plugin will save the Core generated by GHC in JSON format, and also render it in HTML for human inspection.
The plugin is available on Hackage:
http://hackage.haskell.org/package/dump-core https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhackage.haskell.org%2Fpackage%2Fdump-core&data=02%7C01%7Csimonpj%40microsoft.com%7C6924b842575e4f63218308d43b19f45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636198430040472262&sdata=u5N0HOqiy38bvX%2FOC%2BKaEdtdJTYtbQAyxL%2Fvkk2wZ4M%3D&reserved=0
The instructions on how to use it are in the README file.
You may also read about it at the github page:
http://hackage.haskell.org/package/dump-core https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhackage.haskell.org%2Fpackage%2Fdump-core&data=02%7C01%7Csimonpj%40microsoft.com%7C6924b842575e4f63218308d43b19f45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636198430040472262&sdata=u5N0HOqiy38bvX%2FOC%2BKaEdtdJTYtbQAyxL%2Fvkk2wZ4M%3D&reserved=0
There are many things that could probably be improved, just let me know. Also, if you are good at design, I could use some help making things look prettier :)
Happy hacking,
-Iavor