"Johan Holmquist" <[EMAIL PROTECTED]> wrote:

> If Day (and Month) where NOT instances of Bounded, the following would
> be possible:
> 
> [Saturday .. Tuesday]
> => should return [Saturday, Sunday, Monday, Tuesday]
> => but returns []

This does seem like a reasonable argument to me.  Some enumerations are
semantically cyclic, rather than linear.

But how do you feel about the way it breaks some algebraic laws?
    fromEnum x < fromEnum (succ x)
    fromEnum x > fromEnum (pred x)
Of course, such laws are not explicitly stated anywhere in the
definition of the classes, so one would be foolish to rely on them in
any case.

Regards,
    Malcolm
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to