On 18-03-17 16:13:52, Ben Gamari wrote:
> 
> 
> On March 18, 2017 9:03:48 AM EDT, Tom Sydney Kerckhove 
> <[email protected]> wrote:
> 
> Snip.
> >
> >My questions for you:
> >
> >- Is there a reason that there are no derived 'Show' instances for most
> >  types?
> 
> As Richard mentioned, we don't derive Show due to code size and compilation 
> time concerns.

Okay.

> Show in particular is rather expensive to derive and seeing as we already 
> have Outputable I don't it would make sense to derive it by default.

Show and Outputable have very different goals though.

> I would really like to avoid introducing more CPP into the code base for this 
> particular problem.

Fair enough.

> One alternative which will work in many cases is to simply derive Show 
> yourself using StandaloneDeriving. Does this help?

That doesn't work if some type doesn't have the constructors exposed.
I tried this already, and it would be a good solution if all
constructors were exposed, ...

> Cheers,
> 
> - Ben 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Tom Sydney Kerckhove

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to