Library to access parts of the system environment.
Author: Michael Hanus, Bernd Brassel, Bjoern Peemoeller
Version: July 2012
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. |
isPosix
:: Bool
Is the underlying operating system a POSIX system (unix, MacOS)? |
isWindows
:: Bool
Is the underlying operating system a Windows system? |
Returns the current cpu time of the process in milliseconds.
|
Returns the current elapsed time of the process in milliseconds. This operation is not supported in KiCS2 (there it always returns 0), but only included for compatibility reasons.
|
Returns the list of the program's command line arguments. The program name is not included.
|
Returns the value of an environment variable. The empty string is returned for undefined environment variables. |
Set an environment variable to a value.
The new value will be passed to subsequent shell commands
(see |
Removes an environment variable that has been set by
|
Returns the hostname of the machine running this process.
|
Returns the process identifier of the current Curry process.
|
Returns the name of the current program, i.e., the name of the main module currently executed.
|
Executes a shell command and return with the exit code of the command. An exit status of zero means successful execution. |
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. |
The evaluation of the action (sleep n) puts the Curry process asleep for n seconds. |
Is the underlying operating system a POSIX system (unix, MacOS)? |
Is the underlying operating system a Windows system?
|