Remove eq and show from num class

Nathan van Doorn nvd1234 at gmail.com
Fri Sep 8 07:54:04 UTC 2017


Anthony, this proposal is to remove the Eq and Show constraints from the
Num class. Specific instances of Num, like Int and Float, will still have
those instances. This has been how it is in GHC for a long time now, so it
really is a matter for the Haskell' committee rather than one of the GHC
committees.

The motivation is that there are many types with sensible definitions for
addition and multiplication etc that can't be instances of Eq or Show, for
example functions to numbers (allowing us to write "sin + cos" instead of
"\x -> sin x + cos X") or arbitrary real numbers (where comparison isn't
necessarily computable).

I'm not sure why this is being discussed on the mailing list rather than
the Github proposals thing, but I do know that that has grown somewhat
inactive and this is as good as anything for getting the Haskell' committee
to make a final judgement.

Nathan

On 8 Sep 2017 8:35 am, "Anthony Clayden" <anthony_clayden at clear.net.nz>
wrote:

I'm baffled. Is this some sort of 'in' joke at ICFP?
Then remember the rest of the world can see this list.

> All yays from committee members please reply with yes to
this email :)

If this is to the committee, shouldn't it be on the
committee list?
(I mean ghc-steering-committee.)

Or is there some other committee? I thought the
Haskell-prime forum and process
 was dead/replaced by the github proposals process?

If there is a serious proposal, please explain what it is
and what is the motivation.
At risk of me sounding like a complete dork: I find it
rather useful
that I can compare numbers for equality and show them.
(That is, without having to write my own instances.)

AntC

_______________________________________________
Haskell-prime mailing list
Haskell-prime at haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-prime/attachments/20170908/5f2457e7/attachment.html>


More information about the Haskell-prime mailing list