[Haskell-cafe] OS Abstraction module??

Tim Chevalier catamorphism at gmail.com
Mon Oct 22 13:23:16 EDT 2007

On 10/22/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> The key thing to note about this is that whether a program is running
> on Windows or Posix is fixed at compile time. Things like classes can
> do some of what you seem to be after, but it tends to be easier to
> reach for the C pre processor.

Although there's also the System.Info.os function if you want to avoid CPP:

However, since it just returns a string, it may not be too much better
than using CPP...


Tim Chevalier * catamorphism.org * Often in error, never in doubt
"We have no knowledge and so we have stuff / but stuff without
knowledge is never enough to get you there" -- Greg Brown

More information about the Haskell-Cafe mailing list