@[inline]
Look up an environment variable by name.
$$\text{lookupEnv} : \text{String} \to \text{IO}\ (\text{Option}\ \text{String})$$
Returns some value if the variable is set, none otherwise.
Equations
- System.Environment.lookupEnv name = liftM (IO.getEnv name)
Instances For
Get an environment variable, returning empty string if not set.
$$\text{getEnv} : \text{String} \to \text{IO}\ \text{String}$$
Total accessor: returns "" when the variable is absent.
Equations
- System.Environment.getEnv name = do let __do_lift ← System.Environment.lookupEnv name match __do_lift with | some v => pure v | none => pure ""
Instances For
Get the value of the HOME environment variable.
$$\text{getHome} : \text{IO}\ (\text{Option}\ \text{String})$$
Equations
Instances For
Get the value of the PATH environment variable.
$$\text{getPath} : \text{IO}\ (\text{Option}\ \text{String})$$