<p dir="ltr">I figured out a way to default arithmetic vs. logical shifts without introducing a Num dependency: the value of (complement 0) `shiftR` 1 will reveal the behavior of shiftR, and therefore what shiftRA and shiftRL need to do.</p>

<div class="gmail_quote">On Jul 13, 2014 5:35 PM, "John Meacham" <<a href="mailto:john@repetae.net">john@repetae.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Jul 13, 2014 at 2:23 PM, David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br>
> Well, bitSize is deprecated in favor of two safe alternatives, including<br>
> finiteBitSize. It is unfortunate that the signed stuff in my default creates<br>
> a Num dependency--that may be enough to kill it. The case of Integer is<br>
> pretty peculiar. What do people use that instance for?<br>
<br>
Infinite bit sets I guess, I don't think it is that unreasonable to<br>
exist, were it not for that pesky bitSize.<br>
<br>
FiniteBits and that deprecation are GHC specific. Though, it would<br>
make sense to port to jhc, it's fairly annoying for portable code to<br>
rely on ad-hoc changes like this.<br>
<br>
Looks like some work went into removing the Num superclass in ghc's<br>
base. Hmm... I think type class aliases are needed to actually make it<br>
backwards compatible though. Since bit is a primitive, you can get<br>
zero from the somewhat awkward 'clearBit 0 (bit 0)' and one from 'bit<br>
1' and -1 from complement zero so the defaults that were dropped can<br>
be added back in using those.<br>
<br>
    John<br>
--<br>
John Meacham - <a href="http://notanumber.net/" target="_blank">http://notanumber.net/</a><br>
</blockquote></div>