
Also, just to make that clear, the purpose here is not to to remove a function that does something useful without providing a replacement. It is to make sure that functions have appropriate names for what they do, so that you don't use a function accidentally that has different behaviour from what you expect. For example, in the use of `ready` in GHC's Handle code https://github.com/ghc/ghc/blob/ghc-8.2.1-release/libraries/base/GHC/IO/FD.h... the author certainly did not intend to have any wrapping behaviour, but nothing in that code looks wrong unless you think really, really hard. Because it looks correct. (And has looked correct for 17 years: https://github.com/ghc/ghc/blame/b83cfb91b4d36d148ebe171d31e2676c8f10f371/li...) If you wanted wrapping behaviour, a `wrapIntegral` would be your friend. If a `wrapIntegral` is used in a place that shouldn't have it, that gets noticed immediately in review. On 21/09/17 14:53, Niklas Hambüchen wrote:
On 21/09/17 14:35, amindfv@gmail.com wrote:
I'm -1 on this (there are lots of places where you need to know the bounds of the numeric type you're using)
I don't quite understand what you mean with "you need to know the bounds", or what role `fromIntegral` has in that, can you elaborate?