Default implementation of bitSize
Andrew Martin
andrew.thaddeus at gmail.com
Mon Jan 9 13:29:14 UTC 2017
The bitSize typeclass method has been deprecated since 4.7. However,
library author still have to implement it to avoid a warning. I propose
that a default implementation using bitSizeMaybe be added. It would look
like this:
bitSize x = case bitSizeMaybe x of
Nothing -> error "bitSize is deprecated and the type in question does
not have a finite bit size"
Just a -> a
--
-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170109/94c35f74/attachment.html>
More information about the Libraries
mailing list