From 80535597aa07f31a9bc15bd2e4bebc250906cb63 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 26 Sep 2017 14:23:41 +0200 Subject: Fix shadowing warning --- CabalHelper/Shared/Common.hs | 5 +++-- 1 file 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 -- cgit v1.2.3