aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-09-26 14:14:56 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-09-26 14:14:56 +0200
commit4af5dddb8a881572bb6622430dc4c45ec02701df (patch)
treeed018090c6188eeb0c39c0695323f771e264ca3f
parent4b3571a6955c3a817f9b4ef7bcc273b916879a93 (diff)
Fix missing 'lookupEnv' for GHC 7.4
-rw-r--r--CabalHelper/Shared/Common.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/CabalHelper/Shared/Common.hs b/CabalHelper/Shared/Common.hs
index f3497bc..bc9354c 100644
--- a/CabalHelper/Shared/Common.hs
+++ b/CabalHelper/Shared/Common.hs
@@ -92,6 +92,7 @@ appCacheDir :: IO FilePath
appCacheDir =
(</> "cabal-helper") <$> getEnvDefault "XDG_CACHE_HOME" (homeRel cache)
where
+ lookupEnv var = do env <- getEnvironment; return (lookup var env)
getEnvDefault var def = lookupEnv var >>= \m -> case m of Nothing -> def; Just x -> return x
homeRel path = (</> path) <$> getHomeDirectory
cache =