<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>As ugly as it is, this function is still mentioned in the current Haskell 2010 Report, so users should have some reasonable expectation of finding it.</div><div><br></div><div>When there is a new Haskell Report that drops it I'd say that is when we should finish its removal.<br><br>-Edward</div><div><br><div><br><br>Sent from my iPhone</div>On Feb 4, 2018, at 4:38 PM, Andrew Martin <<a href="mailto:andrew.thaddeus@gmail.com">andrew.thaddeus@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I'm in favor of removing it entirely. Making it an alias may help people who want to keep code compatible with base < 4.7, but it could also introduce some confusion. Some thoughts:<div><br></div><div>- It doesn't help people who want to write a `Bits` instance for their data type. That will still require CPP.</div><div>- People writing bit-type-polymorphic code will have to upgrade to FiniteBits when using newer base, which will force CPP for compatibility anyway.</div><div>- People writing bit-type monomorphic code don't even need this function, since they can just write out the number of bits (except for with Int and Word, whose sizes vary by platform).</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 4, 2018 at 4:15 PM, David Feuer <span dir="ltr"><<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quite some time has passed since I first raised this question. There<br>
doesn't seem to have been much discussion, but we really need to do<br>
something! Just leaving bitSize as deprecated seems like the worst<br>
option. Does anyone else have anything to add?<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Jul 10, 2017 at 11:50 PM, David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br>
> The long-deprecated bitSize method of the Bits class is slated to be<br>
> removed in base-4.11 (GHC 8.4). There is one remaining question:<br>
> should we replace it with a *function* by that name with a FiniteBits<br>
> constraint? I don't feel very strongly either way, but Ryan Scott<br>
> seems in favor and Edward Kmett seems opposed. So it seems best to<br>
> bring it to the libraries list and let the CLC make the call. If the<br>
> function is added, it would look like this:<br>
><br>
> bitSize :: FiniteBits a => a -> Int<br>
> bitSize = finiteBitSize<br>
><br>
> The biggest downside I see is that we might one day want to reuse the<br>
> name for something with a better type, such as<br>
><br>
> bitSize :: forall proxy a. FiniteBits a => proxy a -> Int<br>
> bitSize _ = finiteBitSize (undefined :: a)<br>
><br>
> or<br>
><br>
> bitSize :: forall a. FiniteBits a => Tagged a Int<br>
> bitSize = Tagged (finiteBitSize (undefined :: a))<br>
><br>
> or (with type applications)<br>
><br>
> bitSize :: forall a. FiniteBits a => Int<br>
> bitSize = finiteBitSize (undefined :: a)<br>
><br>
> Thanks,<br>
> David Feuer<br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">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-<wbr>bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-Andrew Thaddeus Martin</div>
</div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "haskell-core-libraries" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:haskell-core-libraries+unsubscribe@googlegroups.com">haskell-core-libraries+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br>
</div></blockquote></body></html>