From: krasimir Date: Sun, 23 Jan 2005 09:41:01 +0000 (+0000) Subject: [project @ 2005-01-23 09:41:01 by krasimir] X-Git-Tag: Initial_conversion_from_CVS_complete~1201 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=220f0ae70e7880202b1ffaf199296e9736451424;p=ghc-hetmet.git [project @ 2005-01-23 09:41:01 by krasimir] Use withProgName. Without it getProgName from the executed script will return "" --- diff --git a/ghc/utils/runghc/runghc.hs b/ghc/utils/runghc/runghc.hs index 55e622a..22719a3 100644 --- a/ghc/utils/runghc/runghc.hs +++ b/ghc/utils/runghc/runghc.hs @@ -45,9 +45,9 @@ main = do dieProg "syntax: runghc [-f GHCPATH] FILE ARG..." doIt ghc filename args = do - res <- rawSystem ghc ["-e","System.Environment.withArgs [" + res <- rawSystem ghc ["-e","System.Environment.withProgName "++show filename++" (System.Environment.withArgs [" ++ concat (intersperse "," (map show args)) - ++ "] Main.main", filename] + ++ "] Main.main)", filename] exitWith res dieProg :: String -> IO a