Show-like output of GHC data types

Thomas Schilling nominolo at
Sat Mar 9 00:01:49 CET 2013

Last time I checked GHC's AST types had some fields which you weren't
supposed to look at.  Depending on what stage you're in those may be
different fields.  They are initialised to error thunks, hence
automatically derived Show instances wouldn't work out of the box as
they would force those error thunks.

As I said, it's been a while since I looked at that closely, so maybe
it was removed when the Typeable instances were moved into the GHC

/ Thomas

On 8 March 2013 23:26, Sean Leather <sean.leather at> wrote:
> On Fri, Mar 8, 2013 at 5:53 PM, Johan Tibell wrote:
>> I'm currently writing a ShowInstances module with orphan Show instances
>> for all GHC data types. I will just import that during development, but not
>> include it in the final code. It will hopefully satisfy my current need.
> This would have been useful to me in the past, and I'm guessing others would
> find it useful, too. It seems like a package of standalone derived Show
> instances would require little maintenance (since you don't need to modify
> the instances for changes to datatypes, only for adding/removing them) yet
> provide a great benefit for newcomers to GHC, while not bloating GHC itself.
> Regards,
> Sean
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

More information about the ghc-devs mailing list