Proposal: Make gcd total
daniel.is.fischer at googlemail.com
Wed May 18 03:57:06 CEST 2011
On Tuesday 10 May 2011 08:02:50, Judah Jacobson wrote:
> On Mon, May 9, 2011 at 3:49 PM, Daniel Fischer
> <daniel.is.fischer at googlemail.com> 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.
I'll try to see it through, although the process seems rather daunting.
It has annoyed me for too long.
Patches for GHC are at http://hackage.haskell.org/trac/ghc/ticket/3304
(plural, because the error needs to be in the haskell98 and haskell2010
packages, since the report demands it).
Although this time there has not been much discussion yet, I refer to the
previous discussions linked by Judah, to conclude that after some
discussion (albeit spread over many years), the proposal seems plausible.
I hereby volunteer to become the proposal owner.
More information about the Haskell-prime