Revised numerical prelude, version 0.02

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Thu, 15 Feb 2001 10:50:01 +0000


Dylan Thurston writes:

> I'd like to start using something like this in my programs.  What are
> the chances that the usability issues will be addressed?  (The main
> one is all the fromInteger's, I think.)

Have you tried using your alternative Prelude with nhc98?  Offhand,
I couldn't be certain it would work, but I think nhc98 probably makes
fewer assumptions about the Prelude than ghc.

You will need something like

    import qualified Prelude as NotUsed
    import Dylan'sPrelude as Prelude

in any module that wants to use your prelude.  IIRC, nhc98 treats
'fromInteger' exactly as the qualified name 'Prelude.fromInteger',
so in theory it should simply pick up your replacement definitions.
(In practice, it might actually do the resolution of module 'as'
renamings a little too early or late, but the easiest way to find
out for certain is to try it.)

Regards,
    Malcolm