Hello,
On Fri, Mar 8, 2013 at 1:39 AM, Simon Peyton-Jones <[email protected]>wrote: > What I would like to see is something like:**** > > ** ** > > HsApp (HsApp (HsApp (HsVar "foldl'") (HsVar "+")) (HsLit 0)) (HsVar "xs")* > *** > > ** ** > > ** ** > > We could derive ‘Show’ on everything but that would generate a LOT of new > code, that would seldom be used. Also ‘Show’ doesn’t pretty-print so the > result would be illegible. **** > > ** > I have a package called "pretty-show", which can convert standard `Show` instances into human-readable form, and it can also produce HTML renditions of `Show`-ed data structures. It is very useful for debugging or learning a new code base. > ** > > I’m a bit dubious. Maybe a better thing might be to improve the existing > pretty-printer so it gave you the cues you are looking for? > > Agreed that this is probably a better solution, although having derived `Show` instances would allow one to see exactly what data-structure was produced at some point, which can be helpful when figuring out how some part of GHC works. -Iavor
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
