summaryrefslogtreecommitdiff
path: root/src/Utility/Env.hs
diff options
context:
space:
mode:
authorJoey Hess2019-01-18 12:08:34 -0400
committerJoey Hess2019-01-18 12:08:34 -0400
commit876458adbc41a94c06d68b70e8b7b27288479592 (patch)
treea04d307b7d6eb0644f51af12285742f9b2f726d5 /src/Utility/Env.hs
parent80af78c2bbbc1684a1085225b5754f4fcda4cbcb (diff)
parentf42a71ab2653707be4fcdaf1ce0f9fff209d8f12 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Utility/Env.hs')
-rw-r--r--src/Utility/Env.hs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/Utility/Env.hs b/src/Utility/Env.hs
index c56f4ec2..dfebd986 100644
--- a/src/Utility/Env.hs
+++ b/src/Utility/Env.hs
@@ -16,7 +16,6 @@ import Control.Applicative
import Data.Maybe
import Prelude
import qualified System.Environment as E
-import qualified System.SetEnv
#else
import qualified System.Posix.Env as PE
#endif
@@ -42,29 +41,6 @@ getEnvironment = PE.getEnvironment
getEnvironment = E.getEnvironment
#endif
-{- Sets an environment variable. To overwrite an existing variable,
- - overwrite must be True.
- -
- - On Windows, setting a variable to "" unsets it. -}
-setEnv :: String -> String -> Bool -> IO ()
-#ifndef mingw32_HOST_OS
-setEnv var val overwrite = PE.setEnv var val overwrite
-#else
-setEnv var val True = System.SetEnv.setEnv var val
-setEnv var val False = do
- r <- getEnv var
- case r of
- Nothing -> setEnv var val True
- Just _ -> return ()
-#endif
-
-unsetEnv :: String -> IO ()
-#ifndef mingw32_HOST_OS
-unsetEnv = PE.unsetEnv
-#else
-unsetEnv = System.SetEnv.unsetEnv
-#endif
-
{- Adds the environment variable to the input environment. If already
- present in the list, removes the old value.
-