System.Info.os is wrong, Was Re: HDBC-ODBC compile problem

Simon Marlow simonmarhaskell at
Wed Jul 19 05:42:28 EDT 2006

Neil Mitchell wrote:
>>           let isWindows = "mingw" `isPrefixOf` System.Info.os
> Eeeeekkkkkk!!!!! Arrrrrggggghhhhh!!!!
> You're relying on the fact that System.Info.os is wrong to do a
> conditional test.

It's not a complete accident: we did envisage that making a distinction between 
a compiler that produces binaries via MinGW's gcc and a hypothetical compiler 
that produces binaries via MS's C compiler might be important, so we made 
System.Info.os include that distinction.  Similarly it would have the value 
"cygwin" for a cygwin build.

Nevertheless, you could persuade me that this is less than useful if you just 
want to know if the OS is Windows.  But then perhaps there should be some other 
System.Info entity with more information about the OS?


More information about the Libraries mailing list