getEnv -package:base

getEnv for OsString. @since X.Y.Z
getEnv looks up a variable in the environment.
getEnv looks up a variable in the environment.
getEnv looks up a variable in the environment.
Get the current environment from the monad.
Lifted getEnv.
Computation getEnv var returns the value of the environment variable var. For the inverse, the setEnv function can be used. This computation may fail with:
Returns the value of an environment variable. On UNIX, the name and value are byte strings which might or might not be in some consistent character set and encoding. On Windows, they are in UTF-8. On Windows, in case the environment variable's value contains references to other environment variables, they are expanded.
Return Just the value of the environment variable, or Nothing if the variable is not set. The environment variable is tracked as a dependency, and if it changes the rule will rerun in subsequent builds. This function is a tracked version of getEnv / lookupEnv from the base library.
flags <- getEnv "CFLAGS"
cmd "gcc -c" [out] (maybe [] words flags)
Deprecated: use get_env or get_env_text
Extract a specific data type from the environment.
Get the current environment
Similar to lookupEnv.
Returns the value of an environment variable
Lifted version of getEnv
getEnvironment for OsString. @since X.Y.Z
getEnvDefault is a wrapper around getEnv where the programmer can specify a fallback if the variable is not found in the environment.
getEnvironment retrieves the entire environment as a list of (key,value) pairs.
getEnvDefault is a wrapper around getEnv where the programmer can specify a fallback as the second argument, which will be used if the variable is not found in the environment.