
I think it's line 705 in types/TypeRep.lhs
pprTcApp p pp tc tys
| isTupleTyCon tc && tyConArity tc == length tys
= pprPromotionQuote tc <>
tupleParens (tupleTyConSort tc) (sep (punctuate comma (map (pp TopPrec) tys)))
If you change 'sep' to 'fsep', you'll get behaviour more akin to paragraph-filling (hence the "f"). Give it a try. You'll get validation failure from the testsuite, but you can see whether you think the result is better or worse. In general, should multi-line tuples be printed with many elements per line, or just one?
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Andrew Gibiansky
Sent: 04 January 2014 17:30
To: Erik de Castro Lopo
Cc: ghc-devs@haskell.org
Subject: Re: Changing GHC Error Message Wrapping
Apologize for the broken image formatting.
With the code I posted above, I get the following output:
Couldn't match expected type `(GHC.Types.Inthttp://GHC.Types.Int,
GHC.Types.Inthttp://GHC.Types.Int,
GHC.Types.Inthttp://GHC.Types.Int,
t0,
t10,
t20,
t30,
t40,
t50,
t60,
t70,
t80,
t90)'
with actual type `(t1, t2, t3)'
I would like the types to be on the same line, or at least wrapped to a larger number of columns.
Does anyone know how to do this, or where in the GHC source this wrapping is done?
Thanks!
Andrew
On Sat, Jan 4, 2014 at 2:55 AM, Erik de Castro Lopo
hey andrew, your image link isn't working (i'm using gmail) I think the list software filters out image attachments.
Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ ghc-devs mailing list ghc-devs@haskell.orgmailto:ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs