aboutsummaryrefslogtreecommitdiff
path: root/Utility/Env
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-11-14 14:59:51 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-11-14 14:59:51 -0400
commit92f36a1d31418e747eeaaaad03aeb85cec939d21 (patch)
tree0013232fca756f278dd44fefc45a18a1a9d35289 /Utility/Env
parent1b0e53cd9a1289c2eb7b3b29cb3804e3d61a8744 (diff)
still can't express custom-setup deps
They need unix on non-windows, for Utility.Env, which Build.Configure uses, but cabal can't express that in a custom-setup stanza. To avoid this problem, Utility.Env would need to be moved into unix-compat..
Diffstat (limited to 'Utility/Env')
-rw-r--r--Utility/Env/Set.hs40
1 files changed, 0 insertions, 40 deletions
diff --git a/Utility/Env/Set.hs b/Utility/Env/Set.hs
deleted file mode 100644
index fd8d5140d..000000000
--- a/Utility/Env/Set.hs
+++ /dev/null
@@ -1,40 +0,0 @@
-{- portable environment variables
- -
- - Copyright 2013 Joey Hess <id@joeyh.name>
- -
- - License: BSD-2-clause
- -}
-
-{-# LANGUAGE CPP #-}
-
-module Utility.Env.Set where
-
-#ifdef mingw32_HOST_OS
-import qualified System.Environment as E
-import qualified System.SetEnv
-#else
-import qualified System.Posix.Env as PE
-#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