On Thu, Jun 21, 2012 at 5:11 AM, Rouan van Dalen <rvdalen@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 a?

Enum and Bounded have a complicated and arguably incorrect[1] relationship.  The whole thing should be overhauled, but this would break quite a lot of code, so is not likely to happen.

[1] http://www.haskell.org/pipermail/haskell-cafe/2011-September/095431.html ff.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms