[commit: ghc] master: Do not re-encode correctly encoded inputs and arguments (#5795) (0a532c6)
Paolo Capriotti
p.capriotti at gmail.com
Thu Apr 12 12:32:16 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/0a532c6ba5df245aef4f2a127bd0e3ae40048334
>---------------------------------------------------------------
commit 0a532c6ba5df245aef4f2a127bd0e3ae40048334
Author: Paolo Capriotti <p.capriotti at gmail.com>
Date: Wed Mar 28 16:11:34 2012 +0100
Do not re-encode correctly encoded inputs and arguments (#5795)
>---------------------------------------------------------------
ghc/InteractiveUI.hs | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index b7e6241..8d6e23c 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -446,10 +446,8 @@ runGHCi paths maybe_exprs = do
when (not (null paths)) $ do
ok <- ghciHandle (\e -> do showException e; return Failed) $
-- TODO: this is a hack.
- runInputTWithPrefs defaultPrefs defaultSettings $ do
- let (filePaths, phases) = unzip paths
- filePaths' <- mapM (Encoding.decode . BS.pack) filePaths
- loadModule (zip filePaths' phases)
+ runInputTWithPrefs defaultPrefs defaultSettings $
+ loadModule paths
when (isJust maybe_exprs && failed ok) $
liftIO (exitWith (ExitFailure 1))
@@ -2884,10 +2882,7 @@ isHomeModule m = GHC.modulePackageId m == mainPackageId
-- TODO: won't work if home dir is encoded.
-- (changeDirectory may not work either in that case.)
expandPath :: MonadIO m => String -> InputT m String
-expandPath p = do
- exp_path <- liftIO $ expandPathIO p
- e <- fmap BS.unpack $ Encoding.encode exp_path
- return e
+expandPath = liftIO . expandPathIO
expandPathIO :: String -> IO String
expandPathIO p =
More information about the Cvs-ghc
mailing list