[Haskell-cafe] Why does Enum succ and pred functions throw exception
allbery.b at gmail.com
Thu Jun 21 19:15:50 CEST 2012
On Thu, Jun 21, 2012 at 5:11 AM, Rouan van Dalen <rvdalen at yahoo.co.uk>wrote:
> Can anyone shed some light on why the succ and pred functions of the Enum
> typeclass throw
> exceptions if we go over the upper or lower boundary, and not return Maybe
Enum and Bounded have a complicated and arguably incorrect relationship.
The whole thing should be overhauled, but this would break quite a lot of
code, so is not likely to happen.
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe