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 /CabalHelper/Compiletime | |
parent | 2bd30ac61cab9c66d6155ed1ed3e5f4dd0470444 (diff) |
Remove 'extra' dependency
..constrains dependency versions too much and just causes failures.
Diffstat (limited to 'CabalHelper/Compiletime')
-rw-r--r-- | CabalHelper/Compiletime/Compat/Environment.hs | 6 | ||||
-rw-r--r-- | CabalHelper/Compiletime/Data.hs | 3 |
2 files changed, 8 insertions, 1 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" |