Primitive types and Prelude shenanigans

Koen Claessen koen@cs.chalmers.se
Thu, 15 Feb 2001 10:07:41 +0100 (MET)


Simon Peyton-Jones wrote:

 | I'm very sympathetic to the idea of making it possible
 | to do entirely without the standard Prelude, and to
 | substitute a Prelude of one's own.

I think this is a very good idea.

 | Some while ago I modified GHC to have an extra runtime
 | flag to let you change this behaviour.  The effect was
 | that 3 turns into simply (fromInt 3), and the
 | "fromInt" means "whatever fromInt is in scope".

Hmmm... so how about:

  foo fromInt = 3

Would this translate to:

  foo f = f 3

? How about alpha renaming?

 | [...] guarantee that (if otherwise e1 e2) = e1.

I do not understand this. "otherwise" is simply a function
name, that can be used, redefined or hidden, by anyone. It
is not used in any desugaring. Why change that behaviour?

 | It's always hard to know how to deploy finite
 | design-and-implementation resources. Is this stuff
 | important to a lot of people?

I think it is important to define a minimalistic Prelude, so
that people at least know what is standard and what is not.
Try to put everything else in modules.

/Koen.

--
Koen Claessen         http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424      mailto:koen@cs.chalmers.se
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden