[project @ 2004-03-30 07:05:46 by panne]
[ghc-base.git] / System / Environment.hs
index a0761d5..245a9db 100644 (file)
@@ -17,20 +17,18 @@ module System.Environment
       getArgs,      -- :: IO [String]
       getProgName,   -- :: IO String
       getEnv,        -- :: String -> IO String
-#ifdef __GLASGOW_HASKELL__
+#ifndef __NHC__
       withArgs,
       withProgName,
 #endif
   ) where
 
 import Prelude
-#ifndef __NHC__
-import Control.Exception       ( bracket )
-#endif
 
 #ifdef __GLASGOW_HASKELL__
 import Foreign
 import Foreign.C
+import Control.Exception       ( bracket )
 import Control.Monad
 import GHC.IOBase
 #include "config.h"
@@ -128,8 +126,8 @@ foreign import ccall unsafe "getenv"
    c_getenv :: CString -> IO (Ptr CChar)
 
 {-|
-@withArgs args act@ - while executing action @act@, have 'System.getArgs'
-return @args@ (GHC only).
+'withArgs' @args act@ - while executing action @act@, have 'getArgs'
+return @args@.
 -}
 withArgs :: [String] -> IO a -> IO a
 withArgs xs act = do
@@ -137,8 +135,8 @@ withArgs xs act = do
    withArgv (p:xs) act
 
 {-|
-@withProgName name act@ - while executing action @act@,
-have 'System.getProgName' return @name@ (GHC only).
+'withProgName' @name act@ - while executing action @act@,
+have 'getProgName' return @name@.
 -}
 withProgName :: String -> IO a -> IO a
 withProgName nm act = do