System.Info.os

Neil Mitchell ndmitchell at gmail.com
Thu Nov 10 20:36:48 EST 2005


I noticed GHC also gets it wrong in this case, with the same result.
It's a bit of a shame, but maybe its too late to change...

On 11/10/05, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Thu, Nov 10, 2005 at 01:14:34PM +0000, Neil Mitchell wrote:
> > The function System.Info.os on WinHugs returns "mingw32", which is not
> > really true. I guess its because the libraries are compiled using
> > mingw32, since they can't be compiled natively from windows? Is there
> > some way to alter the library build scripts?
>
> As MinGW produces native binaries, "mingw32" isn't an appropriate value
> for os in any case -- it should be "mswin32" or the like, whether the
> Win32 binary was compiled with MSVC or MinGW.  However "mingw32" is the
> name used by autoconf, and it's pervasive in the libraries.  Maybe it
> should be special-cased in System.Info.
>
> Then again, Cabal uses the values of System.Info.{arch,os} to construct
> the CPP symbols to be defined when preprocessing packages for Hugs,
> and package authors have #ifdef mingw32_HOST_OS all over the place.
>
> _______________________________________________
> Cvs-hugs mailing list
> Cvs-hugs at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-hugs
>


More information about the Cvs-hugs mailing list