aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cabal-helper.cabal1
-rw-r--r--src/CabalHelper/Runtime/Main.hs5
-rw-r--r--tests/GhcSession.hs15
3 files changed, 6 insertions, 15 deletions
diff --git a/cabal-helper.cabal b/cabal-helper.cabal
index c580101..e285e69 100644
--- a/cabal-helper.cabal
+++ b/cabal-helper.cabal
@@ -138,6 +138,7 @@ executable cabal-helper-wrapper
build-depends: unix-compat < 0.6 && >= 0.4.3.1
, utf8-string < 1.1 && >= 1.0.1.1
, ghc-prim
+ build-tools: cabal
test-suite compile-test
default-language: Haskell2010
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
index 5c2b9fb..f922dbe 100644
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -444,9 +444,6 @@ main = do
flagName' = unFlagName . flagName
-
-logm str = appendFile "/tmp/cbli.txt" str
-
-- getLibrary :: PackageDescription -> Library
-- getLibrary pd = unsafePerformIO $ do
-- lr <- newIORef (error "libraryMap: empty IORef")
@@ -504,7 +501,6 @@ componentOptions' (lbi, v, distdir) inplaceFlag flags rf f = do
let pd = localPkgDescr lbi
#if CH_MIN_VERSION_Cabal(2,0,0)
includeDirMap <- recursiveDepInfo lbi v distdir
- -- putStrLn $ "\nincludeDirMap=" ++ show includeDirMap ++ "\n"
#endif
componentsMap lbi v distdir $ \c clbi bi ->
@@ -533,7 +529,6 @@ componentOptions (lbi, v, distdir) inplaceFlag flags f =
gmModuleName :: C.ModuleName -> ChModuleName
gmModuleName = ChModuleName . intercalate "." . components
-
#if CH_MIN_VERSION_Cabal(2,0,0)
removeInplaceDeps :: Verbosity
-> LocalBuildInfo
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index f679751..0896780 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -32,10 +32,10 @@ main = do
topdir <- getCurrentDirectory
res <- mapM (setup topdir test) $ case args of
[] -> [
- -- ("tests/exelib" , parseVer "1.10")
- -- , ("tests/exeintlib", parseVer "2.0")
- -- , ("tests/fliblib" , parseVer "2.0")
- ("tests/bkpregex" , parseVer "2.0")
+ ("tests/exelib" , parseVer "1.10")
+ , ("tests/exeintlib", parseVer "2.0")
+ , ("tests/fliblib" , parseVer "2.0")
+ , ("tests/bkpregex" , parseVer "2.0")
]
xs -> map (,parseVer "0") xs
@@ -70,12 +70,7 @@ setup topdir act (srcdir, min_cabal_ver) = do
putStrLn $ "Skipping test '" ++ srcdir ++ "' because " ++ reason ++ "."
return []
Nothing -> do
- -- withSystemTempDirectory "cabal-helper.ghc-session.test" $ \dir -> do
- let dir = "/tmp/xxxx"
- e <- doesDirectoryExist dir
- when e $ removeDirectoryRecursive dir
- createDirectoryIfMissing True dir
- do
+ withSystemTempDirectory "cabal-helper.ghc-session.test" $ \dir -> do
setCurrentDirectory $ topdir </> srcdir
run "cabal" [ "sdist", "--output-dir", dir ]