It seems a bit late to raise this, but I notice that the standard prelude
for Haskell 98 in the final draft still defines
        gcd 0 0 = error ...

I remember some inconclusive discussion on this some time ago, but there is
no reason not to let gcd 0 0 == 0, as would happen anyway without special
testing.
        Regarding the integers >=0 as a partial order with a<=b when a|b (a divides
b) then gcd a b is the lattice meet of a and b, and 0 is the top element.
Defining gcd 0 x = 0 is consistent with this, for any x.

Michael Abbott


Reply via email to