diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-08-30 12:54:22 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2013-08-30 12:54:22 -0400 |
commit | 26bf3dd478dce53eb50c2ce13821d61e416e3fe7 (patch) | |
tree | 7b025b1eca208e96cf5e1916dd12f0054fda79ea /compiler/rename/RnNames.lhs | |
parent | 6d755c08ca125d991a95fbdc3ae1dc0608b722f1 (diff) | |
parent | 85c1715d086bf2d35bc05133398f462919f2aa7b (diff) | |
download | haskell-26bf3dd478dce53eb50c2ce13821d61e416e3fe7.tar.gz |
Merge branch 'master' into ghc-parmake-gsoc
Conflicts:
compiler/main/DynFlags.hs
compiler/utils/FastString.lhs
Diffstat (limited to 'compiler/rename/RnNames.lhs')
-rw-r--r-- | compiler/rename/RnNames.lhs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 203e1e271c..cdd53d199b 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -41,6 +41,7 @@ import Data.Map ( Map ) import qualified Data.Map as Map import Data.List ( partition, (\\), find ) import qualified Data.Set as Set +import System.FilePath ((</>)) import System.IO \end{code} @@ -1468,7 +1469,7 @@ printMinimalImports imports_w_usage ; this_mod <- getModule ; dflags <- getDynFlags ; liftIO $ - do { h <- openFile (mkFilename this_mod) WriteMode + do { h <- openFile (mkFilename dflags this_mod) WriteMode ; printForUser dflags h neverQualify (vcat (map ppr imports')) } -- The neverQualify is important. We are printing Names -- but they are in the context of an 'import' decl, and @@ -1477,7 +1478,11 @@ printMinimalImports imports_w_usage -- not import Blag( Blag.f, Blag.g )! } where - mkFilename this_mod = moduleNameString (moduleName this_mod) ++ ".imports" + mkFilename dflags this_mod + | Just d <- dumpDir dflags = d </> basefn + | otherwise = basefn + where + basefn = moduleNameString (moduleName this_mod) ++ ".imports" mk_minimal (L l decl, used, unused) | null unused |