<div dir="ltr">Can be useful in debugging, such as when dealing with visually identical characters with different byte values. Having principally western characters be rendered is a bit chauvinistic. This use case could be addressed with a function that takes a list of byte ranges to be rendered literally, others being the byte version. That would at least dispose if one reason for opposing changing this.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 3, 2016 at 10:39 PM, Gershom B <span dir="ltr"><<a href="mailto:gershomb@gmail.com" target="_blank">gershomb@gmail.com</a>></span> wrote:<br><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>
<span class="HOEnZb"><font color="#888888"><br>
—Gershom<br>
</font></span><span class="im HOEnZb"><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>
</span><div class="HOEnZb"><div class="h5">> 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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Chris Allen<br><div><span style="font-size:12.8000001907349px">Currently working on </span><a href="http://haskellbook.com" target="_blank">http://haskellbook.com</a></div></div></div></div></div></div>
</div>