Re: [Haskell-cafe] Detect Either Windows or Linux environment

2007-05-05 Thread Duncan Coutts
On Fri, 2007-05-04 at 22:23 -0700, SevenThunders wrote:

  Prelude System.Info [os, arch]
  [darwin,powerpc]

 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.

Duncan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Detect Either Windows or Linux environment

2007-05-05 Thread Neil Mitchell

Hi


 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!

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Detect Either Windows or Linux environment

2007-05-05 Thread Andrew Coppin


 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...)


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Detect Either Windows or Linux environment

2007-05-04 Thread SevenThunders

Is there a simple way to detect what operating system a given Haskell program
is running under?
It would help to make some programs that might have to interact with the
operating system more portable.

I haven't been able to quite figure out a simple way to do this.


-- 
View this message in context: 
http://www.nabble.com/Detect-Either-Windows-or-Linux-environment-tf3695277.html#a10333531
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Detect Either Windows or Linux environment

2007-05-04 Thread Brandon S. Allbery KF8NH


On May 5, 2007, at 0:21 , SevenThunders wrote:
Is there a simple way to detect what operating system a given  
Haskell program

is running under?


mress:5002 Z$ ghci
   ___ ___ _
  / _ \ /\  /\/ __(_)
/ /_\// /_/ / /  | |  GHC Interactive, version 6.7.20070322, for  
Haskell 98.

/ /_\\/ __  / /___| |  http://www.haskell.org/ghc/
\/\/ /_/\/|_|  Type :? for help.

Loading package base ... linking ... done.
Prelude :m +System.Info
Prelude System.Info [os, arch]
[darwin,powerpc]
Prelude System.Info

--
brandon s. allbery  [solaris,freebsd,perl,pugs,haskell]   
[EMAIL PROTECTED]
system administrator  [openafs,heimdal,too many hats]   
[EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university   
KF8NH



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Detect Either Windows or Linux environment

2007-05-04 Thread SevenThunders



Brandon S. Allbery KF8NH wrote:
 
 
 On May 5, 2007, at 0:21 , SevenThunders wrote:
 Is there a simple way to detect what operating system a given  
 Haskell program
 is running under?
 
 mress:5002 Z$ ghci
 ___ ___ _
/ _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |  GHC Interactive, version 6.7.20070322, for  
 Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.
 
 Loading package base ... linking ... done.
 Prelude :m +System.Info
 Prelude System.Info [os, arch]
 [darwin,powerpc]
 Prelude System.Info
 
 -- 
 brandon s. allbery  [solaris,freebsd,perl,pugs,haskell]   
 [EMAIL PROTECTED]
 system administrator  [openafs,heimdal,too many hats]   
 [EMAIL PROTECTED]
 electrical and computer engineering, carnegie mellon university   
 KF8NH
 
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 

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
-- 
View this message in context: 
http://www.nabble.com/Detect-Either-Windows-or-Linux-environment-tf3695277.html#a10333801
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe