Proposal: Remove Show and Eq superclasses of Num

Yitzchak Gale gale at sefer.org
Sun Sep 18 11:19:06 CEST 2011


+1 on removing the Show constraint.
I abstain on the Eq constraint - either way is fine with me.

Jon Fairbairn wrote:
> But pattern matching for Double or Float is a Bad Thing, so
> wouldn’t the solution to this be to put the EQ constraint
> somewhere else, such as Integral where it would be less
> improper?

The Badness comes from the Eq instance itself. Once that
instance exists, using it for pattern matching isn't any worse
than equating with a Num literal in an expression. If we are
going to have an Eq constraint at all, it might as well be on
Num.

Thanks,
Yitz



More information about the Libraries mailing list