Library to access parts of the system environment.
Author: Michael Hanus, Bernd Brassel
Version: August 2007
Functions:
exitWith
| getArgs
| getCPUTime
| getElapsedTime
| getEnviron
| getHostname
| getPID
| getProgName
| setEnviron
| sleep
| system
| unsetEnviron
|
Summary of exported functions:
|
getCPUTime :: IO Int
|
|
Returns the current cpu time of the process in milliseconds.
|
|
getElapsedTime :: IO Int
|
|
Returns the current elapsed time of the process in milliseconds.
|
|
getArgs :: IO [String]
|
|
Returns the list of the program's command line arguments.
|
|
getEnviron :: String -> IO String
|
|
Returns the value of an environment variable.
|
|
setEnviron :: String -> String -> IO ()
|
|
Set an environment variable to a value.
|
|
unsetEnviron :: String -> IO ()
|
Removes an environment variable that has been set by
setEnviron.
|
|
getHostname :: IO String
|
|
Returns the hostname of the machine running this process.
|
|
getPID :: IO Int
|
|
Returns the process identifier of the current Curry process.
|
|
getProgName :: IO String
|
|
Returns the name of the current program, i.e., the name of the
main module currently executed.
|
|
system :: String -> IO Int
|
|
Executes a shell command and return with the exit code of the command.
|
|
exitWith :: Int -> IO a
|
|
Terminates the execution of the current Curry program
and returns the exit code given by the argument.
|
|
sleep :: Int -> IO ()
|
|
The evaluation of the action (sleep n) puts the Curry process
asleep for n seconds.
|
|
Global
Prelude
getCPUTime :: IO Int
Returns the current cpu time of the process in milliseconds.
-
Further infos:
-
getElapsedTime :: IO Int
Returns the current elapsed time of the process in milliseconds.
-
Further infos:
-
getArgs :: IO [String]
Returns the list of the program's command line arguments.
The program name is not included.
-
Further infos:
-
getEnviron :: String -> IO String
Returns the value of an environment variable.
The empty string is returned for undefined environment variables.
setEnviron :: String -> String -> IO ()
Set an environment variable to a value.
The new value will be passed to subsequent shell commands
(see system) and visible to subsequent calls to
getEnviron (but it is not visible in the environment
of the process that started the program execution).
unsetEnviron :: String -> IO ()
Removes an environment variable that has been set by
setEnviron.
getHostname :: IO String
Returns the hostname of the machine running this process.
-
Further infos:
-
getPID :: IO Int
Returns the process identifier of the current Curry process.
-
Further infos:
-
getProgName :: IO String
Returns the name of the current program, i.e., the name of the
main module currently executed.
-
Further infos:
-
system :: String -> IO Int
Executes a shell command and return with the exit code of the command.
An exit status of zero means successful execution.
exitWith :: Int -> IO a
Terminates the execution of the current Curry program
and returns the exit code given by the argument.
An exit code of zero means successful execution.
sleep :: Int -> IO ()
The evaluation of the action (sleep n) puts the Curry process
asleep for n seconds.
Generated by CurryDoc
(Version 0.4.1 of June 7, 2007) at Aug 28 15:25:54 2008