Module "System.curry"

Library to access parts of the system environment.

Author: Michael Hanus, Bernd Brassel

Version: August 2007


 Exported names:

Functions:
exitWith | getArgs | getCPUTime | getElapsedTime | getEnviron | getHostname | getPID | getProgName | setEnviron | sleep | system | unsetEnviron


 Summary of exported functions:

getCPUTime  :: IO Int  deterministic 
          Returns the current cpu time of the process in milliseconds.
getElapsedTime  :: IO Int  deterministic 
          Returns the current elapsed time of the process in milliseconds.
getArgs  :: IO [String]  deterministic 
          Returns the list of the program's command line arguments.
getEnviron  :: String -> IO String  deterministic 
          Returns the value of an environment variable.
setEnviron  :: String -> String -> IO ()  deterministic 
          Set an environment variable to a value.
unsetEnviron  :: String -> IO ()  deterministic 
          Removes an environment variable that has been set by setEnviron.
getHostname  :: IO String  deterministic 
          Returns the hostname of the machine running this process.
getPID  :: IO Int  deterministic 
          Returns the process identifier of the current Curry process.
getProgName  :: IO String  deterministic 
          Returns the name of the current program, i.e., the name of the main module currently executed.
system  :: String -> IO Int  deterministic 
          Executes a shell command and return with the exit code of the command.
exitWith  :: Int -> IO a  deterministic 
          Terminates the execution of the current Curry program and returns the exit code given by the argument.
sleep  :: Int -> IO ()  deterministic 
          The evaluation of the action (sleep n) puts the Curry process asleep for n seconds.

 Imported modules:

Global
Prelude

 Exported datatypes:


 Exported functions:

getCPUTime :: IO Int  deterministic 

Returns the current cpu time of the process in milliseconds.

Further infos:
  • externally defined

getElapsedTime :: IO Int  deterministic 

Returns the current elapsed time of the process in milliseconds.

Further infos:
  • externally defined

getArgs :: IO [String]  deterministic 

Returns the list of the program's command line arguments. The program name is not included.

Further infos:
  • externally defined

getEnviron :: String -> IO String  deterministic 

Returns the value of an environment variable. The empty string is returned for undefined environment variables.


setEnviron :: String -> String -> IO ()  deterministic 

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 ()  deterministic 

Removes an environment variable that has been set by setEnviron.


getHostname :: IO String  deterministic 

Returns the hostname of the machine running this process.

Further infos:
  • externally defined

getPID :: IO Int  deterministic 

Returns the process identifier of the current Curry process.

Further infos:
  • externally defined

getProgName :: IO String  deterministic 

Returns the name of the current program, i.e., the name of the main module currently executed.

Further infos:
  • externally defined

system :: String -> IO Int  deterministic 

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  deterministic 

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 ()  deterministic 

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 Nov 9 18:03:05 2009