diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-12-14 16:37:58 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-01-18 14:10:26 +0100 |
commit | a2908a6f31ea480b2236ff62d76157b2f01ed5b7 (patch) | |
tree | b4c2ec6690bbd4c2ad69f7b505e1fa4561e4c03e | |
parent | 39c135e5d5710459827f0d40861512c13eeb1ae7 (diff) |
Clean up
-rw-r--r-- | cabal-helper.cabal | 1 | ||||
-rw-r--r-- | src/CabalHelper/Runtime/Main.hs | 5 | ||||
-rw-r--r-- | tests/GhcSession.hs | 15 |
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 ] |