<div dir="ltr"><div>Absolutely agree on this. I've needed to render a number in binary a couple of times, and each time I had to stop and think about how to use showIntAtBase. It's not hard per se, but it is really fiddly. The expression I end up using is hard to understand at a glance and uses a scary-looking (but safe-ish) partial function:</div><div><br></div><div> showIntAtBase 2 ("01" !!) x ""</div><div><br></div><div>A dedicated function is a clear improvement, although the ShowS bit is still unnecessarily fiddly for use outside implementing Show instances:</div><div><br></div><div> showBinary x ""</div><div><br></div><div>To be honest, I really don't like the Numeric module at all. I use hex a bit more often than binary, but I just do it with printf. I was going to suggest adding %b to printf alongside this change, but it looks like Text.Printf already supports it! So while I think adding showBinary absolutely makes sense, I'll probably just use printf myself going forwards.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020 at 11:06 AM Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On Sun, 6 Dec 2020, Emily Pillmore wrote:<br>
<br>
> +1<br>
> <br>
> On Sun, Dec 06, 2020 at 1:10 PM, chessai <<a href="mailto:chessai1996@gmail.com" target="_blank">chessai1996@gmail.com</a>> wrote:<br>
> +1<br>
> <br>
> On Sun, Dec 6, 2020, 12:07 Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>> wrote:<br>
><br>
> +1<br>
<br>
<br>
Base 2 +1 +1 +1 = Base 5 - Is this, what we want?<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>