-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Lua module wrapper around Haskell's System module.
--   
--   Provides access to system information and functionality to Lua scripts
--   via Haskell's <a>System</a> module.
--   
--   This package is part of HsLua, a Haskell framework built around the
--   embeddable scripting language <a>Lua</a>.
@package hslua-module-system
@version 1.1.2


-- | Provide a Lua module containing a selection of
--   <tt><tt>System</tt></tt> functions.
module HsLua.Module.System

-- | The "system" module.
documentedModule :: LuaError e => Module e

-- | Module field containing the machine architecture on which the program
--   is running. Wraps <tt><a>arch</a></tt>
arch :: Field e

-- | Module field containing the Haskell implementation with which the host
--   program was compiled. Wraps <tt><a>compilerName</a></tt>.
compiler_name :: Field e

-- | Module field containing the version of <a>compiler_name</a> with which
--   the host program was compiled.
compiler_version :: LuaError e => Field e

-- | Field containing the operating system on which the program is running.
os :: Field e

-- | Access the CPU time, e.g. for benchmarking.
cputime :: LuaError e => DocumentedFunction e

-- | Retrieve the entire environment
env :: LuaError e => DocumentedFunction e

-- | Returns the value of an environment variable
getenv :: LuaError e => DocumentedFunction e

-- | Return the current working directory as an absolute path.
getwd :: LuaError e => DocumentedFunction e

-- | List the contents of a directory.
ls :: LuaError e => DocumentedFunction e

-- | Create a new directory which is initially empty, or as near to empty
--   as the operating system allows.
--   
--   If the optional second parameter is <tt>false</tt>, then create the
--   new directory only if it doesn't exist yet. If the parameter is
--   <tt>true</tt>, then parent directories are created as necessary.
mkdir :: LuaError e => DocumentedFunction e

-- | Remove an existing directory.
rmdir :: LuaError e => DocumentedFunction e

-- | Set the specified environment variable to a new value.
setenv :: LuaError e => DocumentedFunction e

-- | Change current working directory.
setwd :: LuaError e => DocumentedFunction e

-- | Get the current directory for temporary files.
tmpdirname :: LuaError e => DocumentedFunction e

-- | Run an action, then restore the old environment variable values.
with_env :: LuaError e => DocumentedFunction e
with_tmpdir :: LuaError e => DocumentedFunction e

-- | Run an action in a different directory, then restore the old working
--   directory.
with_wd :: LuaError e => DocumentedFunction e
