summaryrefslogtreecommitdiff
path: root/compiler/main/Main.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-07-11 13:43:01 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-07-11 13:43:01 +0000
commited1173a7b3c77c670c1158fd2cb82ef8657dfecc (patch)
tree18e8c1d086a3480989c1afa6327fd28a1912170c /compiler/main/Main.hs
parent648718b07ea3ac4e1d1680a801b58bb913a20763 (diff)
downloadhaskell-ed1173a7b3c77c670c1158fd2cb82ef8657dfecc.tar.gz
FIX #2278: don't complain if the -odir directory doesn't exist
we'll create it anyway
Diffstat (limited to 'compiler/main/Main.hs')
-rw-r--r--compiler/main/Main.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/main/Main.hs b/compiler/main/Main.hs
index a42a67889f..a91df13575 100644
--- a/compiler/main/Main.hs
+++ b/compiler/main/Main.hs
@@ -46,7 +46,6 @@ import Panic
-- Standard Haskell libraries
import Control.Exception ( throwDyn )
import System.IO
-import System.Directory ( doesDirectoryExist )
import System.Environment
import System.Exit
import System.FilePath
@@ -285,11 +284,7 @@ checkOptions cli_mode dflags srcs objs = do
--
verifyOutputFiles :: DynFlags -> IO ()
verifyOutputFiles dflags = do
- let odir = objectDir dflags
- when (isJust odir) $ do
- let dir = fromJust odir
- flg <- doesDirectoryExist dir
- when (not flg) (nonExistentDir "-odir" dir)
+ -- not -odir: we create the directory for -odir if it doesn't exist (#2278).
let ofile = outputFile dflags
when (isJust ofile) $ do
let fn = fromJust ofile