Am Freitag, 13. März 2009 09:21 schrieb Roman Cheplyaka:
> * Alexander Dunlap <alexander.dun...@gmail.com> [2009-03-12 20:01:57-0700]
>
> > Also, a lot of functions just take
> > Integers so it would be more of a pain to use.
>
> AFAIK there are very few fuctions that take Integers. Many functions
> take instances of Integral, but it's not a problem to make your own type
> such an instance.

I’d say that it is a problem. Class instances should satisfy certain laws. 
(Although these laws are often not stated explicitely, they are assumed to 
hold by users of the class and they should hold to make the instance 
sensible.) In the case of Num, I would expect num + negate num to equal num. 
This wouldn’t hold for a Natural instance of Num.

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

Reply via email to