X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FEnvironment.hs;h=2b6dec272d6df2a74278c75c80e7463353181a22;hb=41e8fba828acbae1751628af50849f5352b27873;hp=4f0ab96779e1b707354dd3fb06c3b2d53bff5c87;hpb=d2063b5b0be014545b21819172c87756efcb0b0c;p=ghc-base.git diff --git a/System/Environment.hs b/System/Environment.hs index 4f0ab96..2b6dec2 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Environment @@ -34,7 +36,7 @@ import Foreign import Foreign.C import Control.Exception.Base ( bracket ) import Control.Monad -import GHC.IO +-- import GHC.IO import GHC.IO.Exception #endif @@ -155,7 +157,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 ()