aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Compiletime
diff options
context:
space:
mode:
Diffstat (limited to 'CabalHelper/Compiletime')
-rw-r--r--CabalHelper/Compiletime/Compile.hs8
-rw-r--r--CabalHelper/Compiletime/Wrapper.hs5
2 files changed, 7 insertions, 6 deletions
diff --git a/CabalHelper/Compiletime/Compile.hs b/CabalHelper/Compiletime/Compile.hs
index 8da3802..0af950d 100644
--- a/CabalHelper/Compiletime/Compile.hs
+++ b/CabalHelper/Compiletime/Compile.hs
@@ -151,7 +151,7 @@ compileHelper opts cabalVer projdir distdir = do
compile :: FilePath -> Options -> Compile -> IO (Either ExitCode FilePath)
compile distdir opts@Options {..} Compile {..} = do
cnCabalSourceDir <- canonicalizePath `traverse` compCabalSourceDir
- appdir <- appDataDir
+ appdir <- appCacheDir
let (outdir, exedir, exe, mchsrcdir) =
case cnCabalSourceDir of
@@ -250,7 +250,7 @@ processFailedException fn exe args rv =
installCabal :: Options -> Version -> IO FilePath
installCabal opts ver = do
- appdir <- appDataDir
+ appdir <- appCacheDir
let sver = showVersion ver
hPutStr stderr $ printf "\
\cabal-helper-wrapper: Installing a private copy of Cabal because we couldn't\n\
@@ -435,7 +435,7 @@ errorInstallCabal cabalVer _distdir = panic $ printf "\
cachedExe :: Version -> IO (Maybe FilePath)
cachedExe compCabalVersion = do
- appdir <- appDataDir
+ appdir <- appCacheDir
let exe = appdir </> exeName (Right compCabalVersion)
exists <- doesFileExist exe
return $ if exists then Just exe else Nothing
@@ -487,7 +487,7 @@ createPkgDb opts@Options {..} cabalVer = do
getPrivateCabalPkgDb :: Options -> Either String Version -> IO FilePath
getPrivateCabalPkgDb opts cabalVer = do
- appdir <- appDataDir
+ appdir <- appCacheDir
ghcVer <- ghcVersion opts
return $ appdir </> exeName cabalVer ++ "-ghc" ++ showVersion ghcVer ++ ".package-db"
diff --git a/CabalHelper/Compiletime/Wrapper.hs b/CabalHelper/Compiletime/Wrapper.hs
index d002886..dccbc29 100644
--- a/CabalHelper/Compiletime/Wrapper.hs
+++ b/CabalHelper/Compiletime/Wrapper.hs
@@ -51,7 +51,7 @@ usage = do
hPutStr stderr $ "Usage: " ++ prog ++ " " ++ usageMsg
where
usageMsg = "\
-\( print-appdatadir\n\
+\( print-appcachedir\n\
\| print-build-platform\n\
\| [--verbose]\n\
\ [--with-ghc=GHC_PATH]\n\
@@ -124,7 +124,8 @@ main = handlePanic $ do
[] -> usage
"help":[] -> usage
"version":[] -> putStrLn $ showVersion version
- "print-appdatadir":[] -> putStrLn =<< appDataDir
+ "print-appdatadir":[] -> putStrLn =<< appCacheDir
+ "print-appcachedir":[] -> putStrLn =<< appCacheDir
"print-build-platform":[] -> putStrLn $ display buildPlatform
projdir:_distdir:"package-id":[] -> do