Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
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.
Synopsis
- module System.Environment
- getExecutablePath :: IO FilePath
- lookupEnv :: String -> IO (Maybe String)
Documentation
module System.Environment
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 4.11.0.0, getExecutablePath
resolves symlinks on Windows.
If an executable is launched through a symlink, getExecutablePath
returns the absolute path of the original executable.
Since: base-4.6.0.0