Lennart Augustsson <[EMAIL PROTECTED]> wrote,
> George Russell wrote:
>
> > Simon Peyton-Jones wrote:
> > > One solution is to add
> > > macros (presumably in a more hygienic form than cpp), but I'm reluctant
> > > to advocate that, because macros undoubtedly do overlap with functions.
> > You don't need macros. (For speed purposes inline functions are obviously
> > better.)
>
> I guess you have not been in contact with the Real World (tm). :-)
> If you have a program that needs to compile in say,
> Haskell 1.3 and Haskell 98, then you need some kind of
> preprocessor. Try changing the syntax of e.g. the export
> list with a boolean function. It's a nasty business, and
> I'm not advocating the use of preprocessors, but sometimes
> it's needed.
Sometimes a configuration tool like autoconf is sufficient
in such situations. But apart from this, what do you think
about the idea of having a lexical conditional that has
about the power of cpp's #if _without_ cpp's substitution
business? Such a conditional - if it where part of the
language definition - shouldn't be difficult to implement
and would provide a portable way of compiler-controlled
versioning (ie, having multiple versions of a module in one
source file). Wouldn't that in conjunction with lazy
functions and existing configuration tools not be sufficient
for the Real World?
Manuel