
22 Oct
2007
22 Oct
'07
5:23 p.m.
On 10/22/07, Neil Mitchell
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: http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-Info.html However, since it just returns a string, it may not be too much better than using CPP... Cheers, Tim -- 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