extra-1.6.14: Extra functions I use.

Safe HaskellSafe



Extra functions for System.Environment. All these functions are available in later GHC versions, but this code works all the way back to GHC 7.2.



getExecutablePath :: IO FilePath #

Returns the absolute pathname of the current executable.

Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)

Since base, getExecutablePath resolves symlinks on Windows. If an executable is launched through a symlink, getExecutablePath returns the absolute path of the original executable.

Since: base-

lookupEnv :: String -> IO (Maybe String) #

Return the value of the environment variable var, or Nothing if there is no such value.

For POSIX users, this is equivalent to getEnv.

Since: base-