How to use #ifdef WIN32

2007-12-20 Thread Jim Burton
predefined? Thanks, -- View this message in context: http://www.nabble.com/How-to-use--ifdef-WIN32-tp14448173p14448173.html Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com. ___ Glasgow-haskell-users mailing list Glasgow

Re: How to use #ifdef WIN32

2007-12-20 Thread Neil Mitchell
Hi Jim I want to switch code on the OS but this always goes through to the #else (on windows or elsewhere): {-# OPTIONS -cpp #-} #ifdef WIN32 main = putStrLn hello windows #else main = putStrLn hello something else #endif Does this depend on a Makefile setting WIN32, or should there be

Re: How to use #ifdef WIN32

2007-12-20 Thread Spencer Janssen
On Thursday 20 December 2007 18:37:15 Jim Burton wrote: I want to switch code on the OS but this always goes through to the #else (on windows or elsewhere): {-# OPTIONS -cpp #-} #ifdef WIN32 main = putStrLn hello windows #else main = putStrLn hello something else #endif Does this depend

Re: How to use #ifdef WIN32

2007-12-20 Thread Duncan Coutts
On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote: If you're using Cabal, something like this should work: if os(win32) cpp-options: -DWIN32 To be precise: if os(windows) cpp-options: -DWIN32 See, Cabal is (mostly) Neil I hate mingw Mitchell compliant. :-)

Re: How to use #ifdef WIN32

2007-12-20 Thread Spencer Janssen
On Thursday 20 December 2007 22:04:13 Duncan Coutts wrote: On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote: If you're using Cabal, something like this should work: if os(win32) cpp-options: -DWIN32 To be precise: if os(windows) cpp-options: -DWIN32