projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
54a3222
)
FIX #1838: use System.Directory.getHomeDirectory instead of getEnv "HOME"
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 7 Nov 2007 10:06:53 +0000
(10:06 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 7 Nov 2007 10:06:53 +0000
(10:06 +0000)
compiler/ghci/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
d524ff1
..
3adcfd3
100644
(file)
--- a/
compiler/ghci/InteractiveUI.hs
+++ b/
compiler/ghci/InteractiveUI.hs
@@
-334,7
+334,7
@@
runGHCi paths maybe_expr = do
when (read_dot_files) $ do
-- Read in $HOME/.ghci
- either_dir <- io (IO.try (getEnv "HOME"))
+ either_dir <- io (IO.try getHomeDirectory)
case either_dir of
Left _e -> return ()
Right dir -> do
@@
-1535,7
+1535,7
@@
expandPath :: String -> GHCi String
expandPath path =
case dropWhile isSpace path of
('~':d) -> do
- tilde <- io (getEnv "HOME") -- will fail if HOME not defined
+ tilde <- io getHomeDirectory -- will fail if HOME not defined
return (tilde ++ '/':d)
other ->
return other