<p dir="ltr">Gershom speaks my mind. I do not doubt that changing the Show instance for String will create bugs in some code, but how many bugs will it also fix? What is the ratio?</p>
<div class="gmail_quote">On Feb 3, 2016 8:40 PM, "Gershom B" <<a href="mailto:gershomb@gmail.com">gershomb@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Backwards compatibility is important, but not an absolute. I’d be curious if anyone can point to instances where software might _rely_ on the show instance for strings not displaying unicode characters?<br>
<br>
—Gershom<br>
<br>
<br>
On February 3, 2016 at 5:03:58 PM, David Feuer (<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>) wrote:<br>
> There's one open now. thomie commented (<br>
> <a href="https://ghc.haskell.org/trac/ghc/ticket/11529#comment:4" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/11529#comment:4</a> ) that it's<br>
> possible to hook up your choice of showing function as the one GHCi should<br>
> use to display values. This strikes me as the best available approach<br>
> preserving backwards compatibility. Adding a GHCi flag for this might be<br>
> reasonable.<br>
><br>
> On Wed, Feb 3, 2016 at 4:11 PM, Atze van der Ploeg wrote:<br>
><br>
> > I think we can all agree these characters should be shown. Maybe a GHC bug<br>
> > report is a good idea?<br>
> > On 02/03/2016 10:37 AM, Takayuki Muranushi wrote:<br>
> > > I think one of the solution is to import and call u_iswprint from<br>
> > > GHC.Show, too,<br>
> > > but I don't know it's against any design choices.<br>
> ><br>
> > +1 for only escaping non-printable characters.<br>
> ><br>
> > > Yesterday, I had a chance to teach Haskell (in Japanese,) and I had to<br>
> > > use English in some of the most exciting examples, like the<br>
> > > Applicative List example above. I would heartedly like to see GHC<br>
> > > improve in these directions, so that we can make more happy learning<br>
> > > materials on Haskell.<br>
> ><br>
> > As a workaround, perhaps you can avoid using print/show with core data<br>
> > structures. Using your applicative example:<br>
> ><br>
> > > mapM_ putStrLn $ [(++"の父"), (++"の母")] <*> ["田中", "山田"]<br>
> > 田中の父<br>
> > 山田の父<br>
> > 田中の母<br>
> > 山田の母<br>
> ><br>
> > For other data structures, you can write your own Show instance:<br>
> ><br>
> > data Name = Name String String<br>
> ><br>
> > instance Show Name where<br>
> > show (Name family given) = family ++ given<br>
> ><br>
> > > print $ Person "山田" "太郎"<br>
> > 山田太郎<br>
> ><br>
> > Travis<br>
> > _______________________________________________<br>
> > Haskell-Cafe mailing list<br>
> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
> ><br>
> > _______________________________________________<br>
> > Haskell-Cafe mailing list<br>
> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
> ><br>
> ><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>