HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleunix-2.8.7.0Haskell2010

System.Posix.Env

POSIX environment support

  • 9 values
  • Packageunix-2.8.7.0
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEnv.hsc
valueputEnv
  1. :: String

    "key=value"

  2. -> IO ()
#

putEnv function takes an argument of the form name=value and is equivalent to setEnv(key,value,True{-overwrite-}).

valuesetEnv
  1. :: String

    variable name

  2. -> String

    variable value

  3. -> Bool

    overwrite

  4. -> IO ()
#

The setEnv function inserts or resets the environment variable name in the current environment list. If the variable name does not exist in the list, it is inserted with the given value. If the variable does exist, the argument overwrite is tested; if overwrite is False, the variable is not reset, otherwise it is reset to the given value.

valueunsetEnv
  1. :: String

    variable name

  2. -> IO ()
#

The unsetEnv function deletes all instances of the variable name from the environment.

valueclearEnv :: IO ()
#

The clearEnv function clears the environment of all name-value pairs.