:: IO String

getContents :: IO String
base Prelude, base System.IO
The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin).
getLine :: IO String
base Prelude, base System.IO
Read a line from the standard input device (same as hGetLine stdin).
getProgName :: IO String
base System.Environment
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.
dlerror :: IO String
unix System.Posix.DynamicLinker.ByteString, unix System.Posix.DynamicLinker
getEffectiveUserName :: IO String
unix System.Posix.User
getEffectiveUserName gets the name associated with the effective UserID of the process.
getLoginName :: IO String
unix System.Posix.User
getLoginName calls getlogin to obtain the login name associated with the current process.
moduleError :: IO String
unix System.Posix.DynamicLinker.Module, unix System.Posix.DynamicLinker.Module.ByteString
getHostName :: IO HostName
network Network.BSD
Calling getHostName returns the standard host name for the current processor, as set at boot time.
getControllingTerminalName :: IO FilePath
unix System.Posix.Terminal
getControllingTerminalName calls ctermid to obtain a name associated with the controlling terminal for the process. If a controlling terminal exists, getControllingTerminalName returns the name of the controlling terminal.
getCurrentDirectory :: IO FilePath
directory System.Directory
If the operating system has a notion of current directories, getCurrentDirectory returns an absolute path to the current directory of the calling process. The operation may fail with: * HardwareFault A physical I/O error has occurred. [EIO] * isDoesNotExistError / NoSuchThing There is no path referring to the current directory. [EPERM, ENOENT, ESTALE...] * isPermissionError / PermissionDenied The process has insufficient privileges to perform the operation. [EACCES] * ResourceExhausted Insufficient resources are available to perform the operation. * UnsupportedOperation The operating system has no notion of current directory. Note that in a concurrent program, the current directory is global state shared between all threads of the process. When using filesystem operations from multiple threads, it is therefore highly recommended to use absolute rather than relative FilePaths.
getHomeDirectory :: IO FilePath
directory System.Directory
Returns the current user's home directory. The directory returned is expected to be writable by the current user, but note that it isn't generally considered good practice to store application-specific data here; use getAppUserDataDirectory instead. On Unix, getHomeDirectory returns the value of the HOME environment variable. On Windows, the system is queried for a suitable path; a typical path might be C:Documents And Settingsuser. The operation may fail with: * UnsupportedOperation The operating system has no notion of home directory. * isDoesNotExistError The home directory for the current user does not exist, or cannot be found.
getTemporaryDirectory :: IO FilePath
directory System.Directory
Returns the current directory for temporary files. On Unix, getTemporaryDirectory returns the value of the TMPDIR environment variable or "/tmp" if the variable isn't defined. On Windows, the function checks for the existence of environment variables in the following order and uses the first path found: * TMP environment variable. * TEMP environment variable. * USERPROFILE environment variable. * The Windows directory The operation may fail with: * UnsupportedOperation The operating system has no notion of temporary directory. The function doesn't verify whether the path exists.
getUserDocumentsDirectory :: IO FilePath
directory System.Directory
Returns the current user's document directory. The directory returned is expected to be writable by the current user, but note that it isn't generally considered good practice to store application-specific data here; use getAppUserDataDirectory instead. On Unix, getUserDocumentsDirectory returns the value of the HOME environment variable. On Windows, the system is queried for a suitable path; a typical path might be C:/Documents and Settings/user/My Documents. The operation may fail with: * UnsupportedOperation The operating system has no notion of document directory. * isDoesNotExistError The document directory for the current user does not exist, or cannot be found.
getWorkingDirectory :: IO FilePath
unix System.Posix.Directory
getWorkingDirectory calls getcwd to obtain the name of the current working directory.
terminalOutput :: Terminal -> IO String
QuickCheck Test.QuickCheck.Text
hGetContents :: Handle -> IO String
base System.IO, base GHC.IO.Handle
Computation hGetContents hdl returns the list of characters corresponding to the unread portion of the channel or file managed by hdl, which is put into an intermediate state, semi-closed. In this state, hdl is effectively closed, but items are read from hdl on demand and accumulated in a special list returned by hGetContents hdl. Any operation that fails because a handle is closed, also fails if a handle is semi-closed. The only exception is hClose. A semi-closed handle becomes closed: * if hClose is applied to it; * if an I/O error occurs when reading an item from the handle; * or once the entire contents of the handle has been read. Once a semi-closed handle becomes closed, the contents of the associated list becomes fixed. The contents of this final list is only partially specified: it will contain at least all the items of the stream that were evaluated prior to the handle becoming closed. Any I/O errors encountered while a handle is semi-closed are simply discarded. This operation may fail with: * isEOFError if the end of file has been reached.
hGetLine :: Handle -> IO String
base System.IO, base GHC.IO.Handle
Computation hGetLine hdl reads a line from the file or channel managed by hdl. This operation may fail with: * isEOFError if the end of file is encountered when reading the first character of the line. If hGetLine encounters end-of-file at any other point while reading in a line, it is treated as a line terminator and the (partial) line is returned.
hShow :: Handle -> IO String
base System.IO, base GHC.IO.Handle
hShow is in the IO monad, and gives more comprehensive output than the (pure) instance of Show for Handle.
getEnv :: String -> IO String
base System.Environment
Computation getEnv var returns the value of the environment variable var. This computation may fail with: * System.IO.Error.isDoesNotExistError if the environment variable does not exist.
inet_ntoa :: HostAddress -> IO String
network Network.Socket

Show more results