On Tue, 2007-08-07 at 13:02 +1000, Manuel M T Chakravarty wrote:
> Duncan,
> 
> BTW why do you think the System.Info.os problem is MacOS specific? 
> The buildbot seems to think otherwise:
> 
>    http://www.haskell.org/pipermail/cvs-ghc/2007-August/037167.html
> 
> So, no validate after all?

Oh Ive no idea if the person who comitted this code ran validate, what I
mean was that it looks from the code like it would not have helped:

module Distribution.System where

data OS = Linux | Windows Windows | Other String
data Windows = MingW

os :: OS
os =
#if defined(linux_HOST_OS)
    Linux
#elif defined(mingw32_HOST_OS)
    Windows MingW
#else
    Other System.Info.os
#endif


System.Info.os is used without being imported only if linux_HOST_OS and
mingw32_HOST_OS are not defined. Why that might be failing on linux too
I have no idea. I'm going to rearrange the code so it does not use cpp,
something along the lines of:

os :: OS
os = case System.os of
  "linux"    -> Linux
  "mingw32"  -> Windows MingW
  "darwin"   -> OSX
  "solaris2" -> Solaris
  other      -> Other other

btw, anyone any idea why Solaris gets "solaris2" ? This is an artifact
of ghc's configure.ac script.

Duncan

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to