diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2017-09-19 21:51:04 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2017-09-19 22:00:53 +0200 |
commit | f5dee82eed5ece2819b33b6bb41b990cdd407b39 (patch) | |
tree | a6b4f4aa7c93042ba1331cc593a0dc7e5cad41de | |
parent | 2bd30ac61cab9c66d6155ed1ed3e5f4dd0470444 (diff) |
Remove 'extra' dependency
..constrains dependency versions too much and just causes failures.
-rw-r--r-- | CabalHelper/Compiletime/Compat/Environment.hs | 6 | ||||
-rw-r--r-- | CabalHelper/Compiletime/Data.hs | 3 | ||||
-rw-r--r-- | cabal-helper.cabal | 8 | ||||
-rw-r--r-- | tests/CompileTest.hs | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/CabalHelper/Compiletime/Compat/Environment.hs b/CabalHelper/Compiletime/Compat/Environment.hs new file mode 100644 index 0000000..15cf05a --- /dev/null +++ b/CabalHelper/Compiletime/Compat/Environment.hs @@ -0,0 +1,6 @@ +module CabalHelper.Compiletime.Compat.Environment where + +import System.Environment + +lookupEnv :: String -> IO (Maybe String) +lookupEnv var = lookup var <$> getEnvironment diff --git a/CabalHelper/Compiletime/Data.hs b/CabalHelper/Compiletime/Data.hs index 288094e..9539ef3 100644 --- a/CabalHelper/Compiletime/Data.hs +++ b/CabalHelper/Compiletime/Data.hs @@ -27,11 +27,12 @@ import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as UTF8 import Language.Haskell.TH import System.Directory -import System.Environment.Extra import System.FilePath import System.IO.Temp import Prelude +import CabalHelper.Compiletime.Compat.Environment + withSystemTempDirectoryEnv :: String -> (FilePath -> IO b) -> IO b withSystemTempDirectoryEnv tpl f = do m <- liftIO $ lookupEnv "CABAL_HELPER_KEEP_SOURCEDIR" diff --git a/cabal-helper.cabal b/cabal-helper.cabal index 6b95b29..31d3aca 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -76,6 +76,7 @@ executable cabal-helper-wrapper other-extensions: TemplateHaskell main-is: CabalHelper/Compiletime/Wrapper.hs other-modules: + CabalHelper.Compiletime.Compat.Environment CabalHelper.Compiletime.Compat.Version CabalHelper.Compiletime.Compile CabalHelper.Compiletime.Data @@ -99,8 +100,7 @@ executable cabal-helper-wrapper , process < 1.7 && >= 1.1.0.1 , temporary < 1.3 && >= 1.2.0.4 , utf8-string < 1.1 && >= 1.0.1.1 - , time < 1.9 && >= 1.8.0.3 - , extra < 1.6 && >= 1.4.10 + , time < 1.9 && >= 1.8.0.2 , template-haskell , ghc-prim @@ -111,6 +111,7 @@ test-suite compile-test type: exitcode-stdio-1.0 main-is: tests/CompileTest.hs other-modules: + CabalHelper.Compiletime.Compat.Environment CabalHelper.Compiletime.Compat.Version CabalHelper.Compiletime.Compile CabalHelper.Compiletime.Data @@ -134,8 +135,7 @@ test-suite compile-test , process < 1.7 && >= 1.1.0.1 , temporary < 1.3 && >= 1.2.0.4 , utf8-string < 1.1 && >= 1.0.1.1 - , time < 1.9 && >= 1.8.0.3 - , extra < 1.6 && >= 1.4.10 + , time < 1.9 && >= 1.8.0.2 -- additional test deps , unix < 2.8 && >= 2.5.1.0 diff --git a/tests/CompileTest.hs b/tests/CompileTest.hs index eb10b76..e778de0 100644 --- a/tests/CompileTest.hs +++ b/tests/CompileTest.hs @@ -1,5 +1,4 @@ import Distribution.Helper -import System.Environment.Extra (lookupEnv) import System.Posix.Env (setEnv) import System.Process import System.Exit @@ -17,6 +16,7 @@ import Control.Arrow import Control.Monad import Prelude +import CabalHelper.Compiletime.Compat.Environment import CabalHelper.Compiletime.Compat.Version import CabalHelper.Compiletime.Compile import CabalHelper.Shared.Common |