Proposal: Make gcd total

Judah Jacobson judah.jacobson at
Tue May 10 08:02:50 CEST 2011

On Mon, May 9, 2011 at 3:49 PM, Daniel Fischer
< at> wrote:
> I would like to propose the elimination of the special error case
> gcd 0 0 = error "Prelude.gcd: gcd 0 0 is undefined"
> to replace it with
> gcd 0 0 = 0
> (which would be an automatic consequence of removing the above line).

In my email archives, I found two previous threads on the subject.
Both ended up in favor of the proposal:

As a result of the latter discussion, a ticket was opened on GHC's trac:
But it was eventually closed for lack of attention.

So if someone actually follows through with this as an official
libraries submission (with a patch, deadline, etc.), the odds seem in
favor of it.


More information about the Haskell-prime mailing list