>  it's the entire Enum class which doesn't have a consistent or sensible 
 > semantics

Yes, for a language with generally sound mathematical roots, Enum is
an embarrassment. My pet peeve is that Rationals are enumerable, but
not with Enum. And the differing lengths of [1,4..6] and [1.0,4.0..6.0]
will shock even the non-mathematically inclined.

Much of the craziness can be hidden if in place of [a..b] for
nonintegral numeric types, one uses (map fromInteger [a..b]).
Perhaps that should happen automatically.

As for the horror mentioned at the end of the first paragraph,
the language definition's oafish attempt to "get right" things
like [0.0,0.1..1.0] needs major revision.

Doug McIlroy

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

Reply via email to