diff options
Diffstat (limited to 'CabalHelper/Shared')
-rw-r--r-- | CabalHelper/Shared/Common.hs | 5 |
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 |