# System

usleep : (i : Int) -> {auto prf : So (i >= fromInteger 0 && Delay (i <= fromInteger 1000000))} -> IO ()

  Specify interval to sleep for, must be in range [0, 1000000]

unsetEnv : String -> IO Bool

  Unsets an environment variable.
  Returns true if the variable was able to be unset.

time : IO Integer

  Get the numbers of seconds since 1st January 1970, 00:00 UTC

system : String -> IO Int
setEnv : String -> String -> IO Bool

  Sets an environment variable with a given value.
  Returns true if the operation was successful.

getEnvironment : IO (List (String, String))
getEnv : String -> IO (Maybe String)

  Retrieves a value from the environment if the given key is present,
  otherwise it returns Nothing.

exitWith : (code : ExitCode) -> IO a

  Terminate the program with an `ExitCode`. This code indicates the
  success of the program's execution, and returns the success code
  to the program's caller.

  code

    The `ExitCode` for program.

exitSuccess : IO a

  Exit the program after a successful run.

exitFailure : IO a

  Exit the program indicating failure.

exit : Int -> IO a

  Quit with a particular exit code

data ExitCode : Type

  Programs can either terminate successfully, or end in a caught
  failure.

  ExitSuccess : ExitCode

    Terminate successfully.

  ExitFailure : (errNo : Int) -> {auto prf : So (not (errNo == fromInteger 0))} -> ExitCode

    Program terminated for some prescribed reason.

    errNo

      A non-zero numerical value indicating failure.

    prf

      Proof that the int value is non-zero.