
Hi, Am Montag, den 20.03.2017, 12:51 +0000 schrieb Simon Peyton Jones via ghc-devs:
Show and Outputable have very different goals though.
Really? What's wrong with using Outputable, plus, as Joachim says,
showSDocUnsafe . ppr :: Outputable a => a -> String
Maybe you want to really really see the precise data constructors used. But for the most part the Outputable instance tells you that, but much more legibly.
and if using Outputable is a bit annoying sometimes (e.g. I found it hard to get the IdInfo of an Id that is not part of a binder, if I recall correctly, because the default instance does not include that info, and the pretty printer for “id with idinfo” is not exported), well, we can always improve that by adding a few more helpful functions to Outputable. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • https://www.joachim-breitner.de/ XMPP: nomeata@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org