[Haskell-cafe] different code in different platforms

Neil Mitchell ndmitchell at gmail.com
Wed Mar 15 10:51:17 EST 2006


Does it really have to change statically?

> I use code like:
> #ifdef __WIN32__
>     (Windows code)
> #else
>     (Linux code)
> #endif

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.




More information about the Haskell-Cafe mailing list