I'm fond of the idea proposed by Marcin 'Qrczak' Kowalczyk:

|   May I propose an alternative way of specifying an alternative
Prelude?
|   Instead of having a command line switch, let's say that 3 always
means
|   Prelude.fromInteger 3 - for any *module Prelude* which is in scope!

That's a perfectly reasonable idea, but GHC can't make it the default
because
it's not H98.  It *would* be possible to make GHC's
-fno-implicit-prelude flag
mean that 
        3       means   Prelude.fromInteger 3
                rather than     fromInteger 3

I quite like the fact that you would then have to say 

       import MyPrelude as Prelude

thereby stressing that you are importing the Prelude stuff.  But it
would be
that *plus* -fno-implicit-prelude, I'm afraid.  If there were a
consensus in
favour of this I'll gladly do it (5 min job).


| anymore. What I would like is that the defualting rules refer 
| to the classes in my version of the Prelude, 
| not the Standard Prelude.

You can always get that (with the -fno-implicit-prelude thing) by adding

        default [Int, Double]

or whatever to your source module, just after the import that gets your
new standard Prelude.  Doesn't that do it?  

It would also not be hard to arrange that the "default default"
declaration
became scoped with -fno-implicit-prelude (like fromInteger), if 
that was useful.   It's a good point; I thought that *all* the numeric
stuff
was un-coupled from the Prelude with -fno-implicit-prelude, but it isn't
quite.

Simon
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to