[Haskell-cafe] Detect Either Windows or Linux environment

Andrew Coppin andrewcoppin at btinternet.com
Sat May 5 07:00:29 EDT 2007


>> > Thank you for your help.  I somehow missed that when I was browsing 
>> through
>> > the library documentation.
>> > On windows, interestingly the os function returns "mingw"
>>
>> Yes, that's one of Neil's pet hates. It might change so something more
>> obvious some time.
>
> On Yhc the os function will return the name of the OS, on GHC and Hugs
> it returns mingw even if you are using the native WinHugs build done
> using Visual Studio and have never installed mingw...
>
> And its still one of my pet hates!

Presumably GHC is compiled under mingw. (Personally I'm not a fan of 
having to use a UNIX emulator when you're actually in M$ Windoze, but 
never mind...)



More information about the Haskell-Cafe mailing list