Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/51ac19ae613f8926690e661324ec14e4a4f4ca0c

>---------------------------------------------------------------

commit 51ac19ae613f8926690e661324ec14e4a4f4ca0c
Author: Ian Lynagh <[email protected]>
Date:   Fri Nov 18 13:48:33 2011 +0000

    Create the directory for dump files to be put in
    
    Now that we don't necessarily put them in the same place as the source,
    the directory may not exist.

>---------------------------------------------------------------

 compiler/main/ErrUtils.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs
index 3f49863..1cce4ec 100644
--- a/compiler/main/ErrUtils.lhs
+++ b/compiler/main/ErrUtils.lhs
@@ -34,7 +34,7 @@ module ErrUtils (
 #include "HsVersions.h"
 
 import Bag              ( Bag, bagToList, isEmptyBag, emptyBag )
-import Util             ( sortLe )
+import Util
 import Outputable
 import SrcLoc
 import DynFlags
@@ -234,6 +234,7 @@ dumpSDoc dflags dflag hdr doc
                             mode = if append then AppendMode else WriteMode
                         when (not append) $
                             writeIORef gdref (Set.insert fileName gd)
+                        createDirectoryHierarchy (takeDirectory fileName)
                         handle <- openFile fileName mode
                         hPrintDump handle doc
                         hClose handle



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to