#ifdef considered harmful (was: DData)
JP Bernardy
jyp_7 at yahoo.com
Thu Apr 15 06:14:18 EDT 2004
--- Daan Leijen <daanleijen at xs4all.nl> wrote:
> I agree with you that in general we should avoid a
> preprocessor.
> However, in the DData case it is hard to see a
> different solution.
> Using a "mini module" to do the bit-fiddling won't
> work that well since
>
> 1) It is imperative for performance that the ghc
> "shiftRL#" gets inlined,
> which doesn't happen if it is in a separate
> module.
Is this true? I thought GHC exports some intermediate
code in .hi files.
> 2) As part of the standard libraries, you can't have
> three extra modules for
> each system
>
Yet, in this case, maybe the various haskell
implementations could be unfied in a manner that
#ifdefs become unnecessary.
Also, I think that support for older implementations
(ie. GHC < 503) can be dropped, but I need an
"official" opinion here.
Cheers,
JP.
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
More information about the Libraries
mailing list