X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FEnvironment.hs;h=2b6dec272d6df2a74278c75c80e7463353181a22;hb=41e8fba828acbae1751628af50849f5352b27873;hp=247a905e055980b6a06f330f8fb21e7430142e4c;hpb=8afc9fecd586d3c4f7ef9c69fb1686a79e5f441d;p=ghc-base.git diff --git a/System/Environment.hs b/System/Environment.hs index 247a905..2b6dec2 100644 --- a/System/Environment.hs +++ b/System/Environment.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Environment @@ -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 ()