From 220f0ae70e7880202b1ffaf199296e9736451424 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 23 Jan 2005 09:41:01 +0000 Subject: [PATCH] [project @ 2005-01-23 09:41:01 by krasimir] Use withProgName. Without it getProgName from the executed script will return "" --- ghc/utils/runghc/runghc.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.10.4