X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FEnvironment.hs;h=b85bc42e5e0c1a104780b60e19b7ac1b711e6a43;hb=59ee8fd08785dec7421bc3ec74cc71872683bc2f;hp=c734158e0f22bccae3c39704102048ebe84837dc;hpb=dfa89e180abad4d06a4b444e0a97aa2e05fa43cc;p=ghc-base.git diff --git a/System/Environment.hs b/System/Environment.hs index c734158..b85bc42 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -34,7 +34,8 @@ import Foreign import Foreign.C import Control.Exception.Base ( bracket ) import Control.Monad -import GHC.IOBase +-- import GHC.IO +import GHC.IO.Exception #endif #ifdef __HUGS__ @@ -154,7 +155,8 @@ withArgv new_args act = do pName <- System.Environment.getProgName existing_args <- System.Environment.getArgs bracket (setArgs new_args) - (\argv -> do setArgs (pName:existing_args); freeArgv argv) + (\argv -> do _ <- setArgs (pName:existing_args) + freeArgv argv) (const act) freeArgv :: Ptr CString -> IO ()