The way I read Alan's earlier mail is precisely that; auto-generated Show does 
what he wants (show the entire AST), whereas Outputable hides too much 
information. I very much understand his frustration with having to manually 
figure out what constructors and datatypes go where in a compiled program. 
Alan's point was the *absence* of auto derived Show instances and, in the case 
of SrcSpan, too much verbosity (rather than wanting stuff to be incomplete).


Allowing some bespoke stuff to reduce the noise of something like record field 
names for SrcSpan makes even more sense in this context. Similarly, this is why 
Alan & I want everything to have Data instances, so you can (amongst many other 
nice things) selectively print parts of the AST.


Ph.




________________________________
From: Alan & Kim Zimmerman <alan.z...@gmail.com>
Sent: 06 October 2014 15:15
To: Mateusz Kowalczyk
Cc: ghc-devs@haskell.org
Subject: Re: Show instance for SrcSpan

True, but if you are using GHC generated stuff via the GHC API you sometimes do 
not want to have to implement Outputable for all your app types, when you can 
auto derive Show which mostly does what you need.

On Mon, Oct 6, 2014 at 3:11 PM, Mateusz Kowalczyk 
<fuuze...@fuuzetsu.co.uk<mailto:fuuze...@fuuzetsu.co.uk>> wrote:
On 10/06/2014 01:59 PM, Alan & Kim Zimmerman wrote:
> Is there any reason I can't put in a diff request to replace the derived
> Show instance for SrcSpan with a handcrafted one that does not exhausively
> list the constructors, making it more readable?
>
> Alan
>

Why? If you're looking for pretty output then you should be changing
Outputable.


--
Mateusz K.
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org<mailto:ghc-devs@haskell.org>
http://www.haskell.org/mailman/listinfo/ghc-devs

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to