Hi everyone,

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?

I was hoping to have some functions like:

  safeSucc :: (Enum a) => a -> Maybe a

Because the succ and pred functions throw exceptions I can only catch them in
the IO monad.  This makes it hard to deal with this situation in pure code.

Regards

Rouan.