Default implementation of bitSize

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

The usual next step after a method being deprecated is for it to be
removed. Can we remove it now? Or do we have to wait another cycle?
David
On Mon, Jan 9, 2017 at 8:29 AM, Andrew Martin
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
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
participants (2)
-
Andrew Martin
-
David Feuer