From: ross Date: Thu, 29 Aug 2002 05:11:41 +0000 (+0000) Subject: [project @ 2002-08-29 05:11:41 by ross] X-Git-Tag: nhc98-1-18-release~899 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9f3b4ae6cba7835faa57ddc5b859dd00c23c56fd;p=haskell-directory.git [project @ 2002-08-29 05:11:41 by ross] The functions rawSystem, withArgs and withProgName aren't supported by Hugs yet. --- diff --git a/System/Cmd.hs b/System/Cmd.hs index b4bb038..f5c85ec 100644 --- a/System/Cmd.hs +++ b/System/Cmd.hs @@ -14,7 +14,9 @@ module System.Cmd ( system, -- :: String -> IO ExitCode +#ifndef __HUGS__ rawSystem, -- :: String -> IO ExitCode +#endif ) where import Prelude @@ -66,7 +68,6 @@ system cmd = n -> return (ExitFailure n) foreign import ccall unsafe "systemCmd" primSystem :: CString -> IO Int -#endif /* __HUGS__ */ {- | The same as 'system', but bypasses the shell. Will behave more portably between @@ -84,3 +85,4 @@ rawSystem cmd = foreign import ccall unsafe "rawSystemCmd" primRawSystem :: CString -> IO Int +#endif /* __HUGS__ */ diff --git a/System/Environment.hs b/System/Environment.hs index 02c11a7..99b25bb 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -17,8 +17,10 @@ module System.Environment getArgs, -- :: IO [String] getProgName, -- :: IO String getEnv, -- :: String -> IO String +#ifndef __HUGS__ withArgs, withProgName, +#endif ) where import Prelude @@ -114,7 +116,6 @@ getEnv name = foreign import ccall unsafe "getenv" c_getenv :: CString -> IO (Ptr CChar) -#endif /* __HUGS__ */ {-| @withArgs args act@ - while executing action @act@, have 'System.getArgs' @@ -155,3 +156,4 @@ setArgs argv = do foreign import ccall unsafe "setProgArgv" setArgsPrim :: Int -> Ptr CString -> IO () +#endif /* __HUGS__ */