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


-- | Bindings to Lua, an embeddable scripting language
--   
--   HsLua provides wrappers and helpers to bridge Haskell and <a>Lua</a>.
--   
--   It builds upon the <i>lua</i> package, which allows to bundle a Lua
--   interpreter with a Haskell program.
--   
--   Example programs are can be found in the <tt>hslua-examples</tt>
--   subdir of the project <a>repository</a>.
@package hslua
@version 2.2.1


-- | HsLua utility functions.
module HsLua.Util

-- | Like <tt>getglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   getglobal' "math.sin"
--   </pre>
--   
--   will return the function <tt>sin</tt> in package <tt>math</tt>.
getglobal' :: LuaError e => Name -> LuaE e ()

-- | Like <tt>setglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   pushstring "0.9.4"
--   setglobal' "mypackage.version"
--   </pre>
--   
--   All tables and fields, except for the last field, must exist.
setglobal' :: LuaError e => Name -> LuaE e ()


-- | Functions and utilities enabling the seamless integration of a Lua
--   interpreter into a Haskell project.
--   
--   This module combines and re-exports the functionality of the HsLua
--   framework. Basic access to the Lua API is provided by
--   <tt><a>Core</a></tt> from Hackage package <i>lua</i>.
module HsLua

-- | A value that can be pushed to the Lua stack.
class Pushable a

-- | Pushes a value onto Lua stack, casting it into meaningfully nearest
--   Lua type.
push :: (Pushable a, LuaError e) => a -> LuaE e ()

-- | Like <tt>getglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   getglobal' "math.sin"
--   </pre>
--   
--   will return the function <tt>sin</tt> in package <tt>math</tt>.
getglobal' :: LuaError e => Name -> LuaE e ()

-- | Like <tt>setglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   pushstring "0.9.4"
--   setglobal' "mypackage.version"
--   </pre>
--   
--   All tables and fields, except for the last field, must exist.
setglobal' :: LuaError e => Name -> LuaE e ()
