fno-implicit-prelude and literal numeric patterns

Simon Peyton-Jones simonpj@microsoft.com
Mon, 22 Jul 2002 12:44:38 +0100

| The user's guide is silent about which version of Eq is used=20
| for literal patterns, but I assume that it follows the (n+k)=20
| example and so Prelude Eq is used for the overloaded use of =3D=3D.

That's right.  I'll add a note to that effect in the users guide.

| What is the reason for using Prelude.Ord (and Prelude.Eq)?=20
| This seems very limiting since you can replace Num but you=20
| can't replace Eq, and moreover, your new versions of the=20
| Numeric classes must be subclasses of Prelude.Eq, rather than=20
| another Eq.=20
| Is there are strong reason for avoiding the alternative:=20
| "whatever =3D=3D and >=3D are in scope"? Perhaps it is the=20
| if-then-else that must refer to Prelude.Bool?

Well, I had to stop somewhere.  (As I have previously remarked on this
thread, it is hard to make *everything* rebindable.)  With more effort
one could make more things rebindable.

My goal was to make numerics completely rebindable; the current
omission is (only) the handling of defaults. =20

At the moment I simpy don't know what a good 'final' design might be,
and I'm pretty reluctant to develop this feature incrementally.  If a=20
consensus emerges,  then yes (unless it's a heart-and-lung job) I'll
implement it or help one of you to do so.