Google

>
 Haskell Core Libraries (base package)ParentContentsIndex
System.Environment
Portability portable
Stability provisional
Maintainer libraries@haskell.org
Description
Miscellaneous information about the system environment.
Synopsis
getArgs :: IO [String]
getProgName :: IO String
getEnv :: String -> IO String
Documentation
getArgs :: IO [String]
getProgName :: IO String

Computation getProgName returns the name of the program as it was invoked.

However, this is hard-to-impossible to implement on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked. Even then there are some differences between platforms: on Windows, for example, a program invoked as foo is probably really FOO.EXE, and that is what getProgName will return.

getEnv :: String -> IO String
Produced by Haddock version 0.4