[Haskell-cafe] Prettier pretty-printing of data types?
chrisdone at googlemail.com
Wed Mar 14 00:39:00 CET 2012
Maybe an Emacs script to expand the nodes nicely:
http://www.youtube.com/watch?v=6ofEZQ7XoEA I don't find mere pretty
printing that useful compared to the “expanding” paradigm I'm used to in
Chrome and Firebug.
To try it just M-x eval-buffer on these two files,
then make some fresh empty buffer with some demo Show output code:
BinJab 1 (Biny 2 Leaf Leaf) (Binpo 3 Leaf Leaf) (Binamr 3 Leaf (Lalar 3
and try, maybe, M-: (hs-show-replace (point-min) (point-max))
you should get “BinJab”, and then clicking it will give you more until you
The parser is of course a PEG parser within elisp so it kind of sucks for
large data structures (limited by Elisp's stack, and is super slow). My
haskell-emacs package has it in the REPL but I want to replace this parser
with a haskell-src-exts→sexp utility to make it faster and more reliable.
If anyone wants to replace the parser (and indeed the "shower") as
described, I'd be very happy as this is a Super Nice feature and
indispensable in the REPL with “real” data.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe