On 6/21/12 1:15 PM, Brandon Allbery wrote:
On Thu, Jun 21, 2012 at 5:11 AM, Rouan van Dalenwrote:
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 co
I hit reply instead of reply all. Sorry Richard.
On Fri, Jun 22, 2012 at 4:35 PM, wrote:
>
> > An ordering does not typically induce a computable enumeration. For
> > example, there are infinitely many rationals between any pair of
> > rationals.
>
> I didn't say it was odd that Ords weren't E
> An ordering does not typically induce a computable enumeration. For
> example, there are infinitely many rationals between any pair of
> rationals.
I didn't say it was odd that Ords weren't Enums,
I said that it's odd that Enums aren't Ords.
It makes little or no sense to make treat rationals
On Thu, Jun 21, 2012 at 5:36 PM, Richard O'Keefe wrote:
It always struck me as odd that Enum doesn't extend Ord.
> There's a reason given for not having Bounded extend Ord,
> which doesn't really apply to a class having fromEnum :: a -> Int.
> Testing whether an enum bound is at a limit is thus a
On 21/06/2012, at 9:11 PM, Rouan van Dalen wrote:
> I was hoping to have some functions like:
>
> safeSucc :: (Enum a) => a -> Maybe a
>
Types that are instances of Enum don't necessarily have bounds.
It always struck me as odd that Enum doesn't extend Ord.
There's a reason given for not havi
On Thu, Jun 21, 2012 at 5:11 AM, Rouan van Dalen 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] r
At Thu, 21 Jun 2012 10:11:24 +0100 (BST),
Rouan van Dalen wrote:
> 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
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 functi