#ifdef considered harmful (was: DData)
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
> 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
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.
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
More information about the Libraries