projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14f9af4
)
Create ~/.ghc/ if it doesn't already exist; fixes trac #4522
author
Ian Lynagh
<igloo@earth.li>
Sat, 18 Dec 2010 18:49:25 +0000
(18:49 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sat, 18 Dec 2010 18:49:25 +0000
(18:49 +0000)
ghc/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/ghc/InteractiveUI.hs
b/ghc/InteractiveUI.hs
index
a2ba64e
..
5a26324
100644
(file)
--- a/
ghc/InteractiveUI.hs
+++ b/
ghc/InteractiveUI.hs
@@
-369,14
+369,16
@@
interactiveUI srcs maybe_exprs = do
withGhcAppData :: (FilePath -> IO a) -> IO a -> IO a
withGhcAppData right left = do
withGhcAppData :: (FilePath -> IO a) -> IO a -> IO a
withGhcAppData right left = do
- either_dir <- IO.try (getAppUserDataDirectory "ghc")
- case either_dir of
- Right dir -> right dir
- _ -> left
+ either_dir <- IO.try (getAppUserDataDirectory "ghc")
+ case either_dir of
+ Right dir ->
+ do createDirectoryIfMissing False dir `catchIO` \_ -> return ()
+ right dir
+ _ -> left
runGHCi :: [(FilePath, Maybe Phase)] -> Maybe [String] -> GHCi ()
runGHCi paths maybe_exprs = do
runGHCi :: [(FilePath, Maybe Phase)] -> Maybe [String] -> GHCi ()
runGHCi paths maybe_exprs = do
- let
+ let
read_dot_files = not opt_IgnoreDotGhci
current_dir = return (Just ".ghci")
read_dot_files = not opt_IgnoreDotGhci
current_dir = return (Just ".ghci")