From f5dee82eed5ece2819b33b6bb41b990cdd407b39 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 19 Sep 2017 21:51:04 +0200 Subject: Remove 'extra' dependency ..constrains dependency versions too much and just causes failures. --- CabalHelper/Compiletime/Compat/Environment.hs | 6 ++++++ CabalHelper/Compiletime/Data.hs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 CabalHelper/Compiletime/Compat/Environment.hs (limited to 'CabalHelper/Compiletime') 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" -- cgit v1.2.3