[Haskell-cafe] Re: different code in different platforms
simonmarhaskell at gmail.com
Wed Mar 15 11:13:19 EST 2006
Neil Mitchell wrote:
> Does it really have to change statically?
>>I use code like:
>> (Windows code)
>> (Linux code)
> In Yhc, we use a runtime test to check between Windows and Linux. It
> has various advantages - we only have one code base, everything is
> type checked when we compile, and we've never run into any problems
> once despite developing on two different platforms.
There's a lot to be said for using runtime tests instead of conditional
compilation, I agree. However, it can't be used exclusively: you can't
choose between two foreign calls this way, for example, because one of
the calls won't link.
More information about the Haskell-Cafe