aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-09-26 14:23:41 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-09-26 14:23:41 +0200
commit80535597aa07f31a9bc15bd2e4bebc250906cb63 (patch)
treee3606743f5685e6202759fbb2d587018b672de5c
parent4af5dddb8a881572bb6622430dc4c45ec02701df (diff)
Fix shadowing warning
-rw-r--r--CabalHelper/Shared/Common.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/CabalHelper/Shared/Common.hs b/CabalHelper/Shared/Common.hs
index bc9354c..12c7d93 100644
--- a/CabalHelper/Shared/Common.hs
+++ b/CabalHelper/Shared/Common.hs
@@ -92,8 +92,9 @@ 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
+ -- for GHC 7.4
+ 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 =
case System.Info.os of