[Haskell-cafe] Sillyness in the standard libs.

Andrew Coppin andrewcoppin at btinternet.com
Mon Nov 19 16:10:29 EST 2007


Arthur van Leeuwen wrote:
> A closely related issue: fromIntegral is in Integral which also 
> requires quotRem. However,
>     the two are semantically quite disjoint. I can *easily* see the 
> semantics of fromIntegral
>     on EpochTime, but not the semantics of quotRem on EpochTime. 
> Having fromIntegral
>     would solve the above puzzle... :)

As I understand it, it's widely recognised that Haskell's current 
numeric class hierachy is broken (or at best, not very well chosen), but 
nobody came up with a better suggestion yet.

(By all means, somebody correct me if I'm wrong here...!)

Also, that hierachy is in the Haskell Report, so we'll have to wait for 
Haskell' to fix it for good. (Although you can roll you own right now - 
if you can think of a better design...)



More information about the Haskell-Cafe mailing list