for review: big ints

Bert Thompson aet at
Mon Apr 6 23:26:00 AEST 1998

Peter Schachte <pets at> writes:

|It might also be a good idea to supply functions for operations on mixed ints
|and big ints.  Otherwise you won't be able to do obvious things like Integer+1
|and Integer/2 in the obvious way.

Simple overloading in Mercury won't do this.

The new typeclasses may allow us to do it. However I've tried to
do similar things in Gofer (which doesn't have Haskell's "default"
mechanism), and it turned out not to work well at all. From what I
understand Mercury's typeclass system works pretty much the same way.
(Which I think is good. Haskell's "default" is a real hack, IMHO.)


More information about the developers mailing list