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


-- | A Lua language interpreter embedding in Haskell
--   
--   The Scripting.Lua module is a wrapper of Lua language interpreter as
--   described in <a>lua.org</a>.
--   
--   This package contains full Lua interpreter version 5.1.5. If you want
--   to link it with system-wide Lua installation, use <tt>system-lua</tt>
--   flag.
--   
--   <a>Example programs</a>
@package hslua
@version 0.4.1

module Scripting.Lua.Raw

-- | Synonym for <tt>lua_State *</tt>. See <tt>lua_State</tt> in Lua
--   Reference Manual.
newtype LuaState
LuaState :: (Ptr ()) -> LuaState

-- | Synonym for <tt>lua_Alloc</tt>. See <tt>lua_Alloc</tt> in Lua
--   Reference Manual.
type LuaAlloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())

-- | Synonym for <tt>lua_Reader</tt>. See <tt>lua_Reader</tt> in Lua
--   Reference Manual.
type LuaReader = Ptr () -> Ptr () -> Ptr CSize -> IO (Ptr CChar)

-- | Synonym for <tt>lua_Writer</tt>. See <tt>lua_Writer</tt> in Lua
--   Reference Manual.
type LuaWriter = LuaState -> Ptr CChar -> CSize -> Ptr () -> IO CInt

-- | Synonym for <tt>lua_CFunction</tt>. See <tt>lua_CFunction</tt> in Lua
--   Reference Manual.
type LuaCFunction = LuaState -> IO CInt

-- | Synonym for <tt>lua_Integer</tt>. See <tt>lua_Integer</tt> in Lua
--   Reference Manual.
type LuaInteger = Int32

-- | Synonym for <tt>lua_Number</tt>. See <tt>lua_Number</tt> in Lua
--   Reference Manual.
type LuaNumber = Double
c_lua_newstate :: FunPtr LuaAlloc -> Ptr () -> IO LuaState
c_lua_close :: LuaState -> IO ()
c_lua_newthread :: LuaState -> IO LuaState
c_lua_atpanic :: LuaState -> FunPtr LuaCFunction -> IO (FunPtr LuaCFunction)
c_lua_gettop :: LuaState -> IO CInt
c_lua_settop :: LuaState -> CInt -> IO ()
c_lua_pushvalue :: LuaState -> CInt -> IO ()
c_lua_remove :: LuaState -> CInt -> IO ()
c_lua_insert :: LuaState -> CInt -> IO ()
c_lua_replace :: LuaState -> CInt -> IO ()
c_lua_checkstack :: LuaState -> CInt -> IO CInt
c_lua_xmove :: LuaState -> LuaState -> CInt -> IO ()
c_lua_isnumber :: LuaState -> CInt -> IO CInt
c_lua_isstring :: LuaState -> CInt -> IO CInt
c_lua_iscfunction :: LuaState -> CInt -> IO CInt
c_lua_isuserdata :: LuaState -> CInt -> IO CInt
c_lua_type :: LuaState -> CInt -> IO CInt
c_lua_typename :: LuaState -> CInt -> IO (Ptr CChar)
c_lua_equal :: LuaState -> CInt -> CInt -> IO CInt
c_lua_rawequal :: LuaState -> CInt -> CInt -> IO CInt
c_lua_lessthan :: LuaState -> CInt -> CInt -> IO CInt
c_lua_tonumber :: LuaState -> CInt -> IO LuaNumber
c_lua_tointeger :: LuaState -> CInt -> IO LuaInteger
c_lua_toboolean :: LuaState -> CInt -> IO CInt
c_lua_tolstring :: LuaState -> CInt -> Ptr CSize -> IO (Ptr CChar)
c_lua_objlen :: LuaState -> CInt -> IO CSize
c_lua_tocfunction :: LuaState -> CInt -> IO (FunPtr LuaCFunction)
c_lua_touserdata :: LuaState -> CInt -> IO (Ptr a)
c_lua_tothread :: LuaState -> CInt -> IO LuaState
c_lua_topointer :: LuaState -> CInt -> IO (Ptr ())
c_lua_pushnil :: LuaState -> IO ()
c_lua_pushnumber :: LuaState -> LuaNumber -> IO ()
c_lua_pushinteger :: LuaState -> LuaInteger -> IO ()
c_lua_pushlstring :: LuaState -> Ptr CChar -> CSize -> IO ()
c_lua_pushstring :: LuaState -> Ptr CChar -> IO ()
c_lua_pushcclosure :: LuaState -> FunPtr LuaCFunction -> CInt -> IO ()
c_lua_pushboolean :: LuaState -> CInt -> IO ()
c_lua_pushlightuserdata :: LuaState -> Ptr a -> IO ()
c_lua_pushthread :: LuaState -> IO CInt
c_lua_gettable :: LuaState -> CInt -> IO ()
c_lua_getfield :: LuaState -> CInt -> Ptr CChar -> IO ()
c_lua_rawget :: LuaState -> CInt -> IO ()
c_lua_rawgeti :: LuaState -> CInt -> CInt -> IO ()
c_lua_createtable :: LuaState -> CInt -> CInt -> IO ()
c_lua_newuserdata :: LuaState -> CInt -> IO (Ptr ())
c_lua_getmetatable :: LuaState -> CInt -> IO CInt
c_lua_getfenv :: LuaState -> CInt -> IO ()
c_lua_settable :: LuaState -> CInt -> IO ()
c_lua_setfield :: LuaState -> CInt -> Ptr CChar -> IO ()
c_lua_rawset :: LuaState -> CInt -> IO ()
c_lua_rawseti :: LuaState -> CInt -> CInt -> IO ()
c_lua_setmetatable :: LuaState -> CInt -> IO ()
c_lua_setfenv :: LuaState -> CInt -> IO CInt
c_lua_call :: LuaState -> CInt -> CInt -> IO ()
c_lua_pcall :: LuaState -> CInt -> CInt -> CInt -> IO CInt
c_lua_cpcall :: LuaState -> FunPtr LuaCFunction -> Ptr a -> IO CInt
c_lua_load :: LuaState -> FunPtr LuaReader -> Ptr () -> Ptr CChar -> IO CInt
c_lua_dump :: LuaState -> FunPtr LuaWriter -> Ptr () -> IO ()
c_lua_yield :: LuaState -> CInt -> IO CInt
c_lua_resume :: LuaState -> CInt -> IO CInt
c_lua_status :: LuaState -> IO CInt
c_lua_gc :: LuaState -> CInt -> CInt -> IO CInt
c_lua_error :: LuaState -> IO CInt
c_lua_next :: LuaState -> CInt -> IO CInt
c_lua_concat :: LuaState -> CInt -> IO ()
c_luaL_openlibs :: LuaState -> IO ()
c_luaL_newstate :: IO LuaState
c_luaL_newmetatable :: LuaState -> Ptr CChar -> IO CInt
c_luaL_argerror :: LuaState -> CInt -> Ptr CChar -> IO CInt
c_luaL_ref :: LuaState -> CInt -> IO CInt
c_luaL_unref :: LuaState -> CInt -> CInt -> IO ()

module Scripting.Lua

-- | Synonym for <tt>lua_State *</tt>. See <tt>lua_State</tt> in Lua
--   Reference Manual.
data LuaState

-- | Synonym for <tt>lua_CFunction</tt>. See <tt>lua_CFunction</tt> in Lua
--   Reference Manual.
type LuaCFunction = LuaState -> IO CInt

-- | Synonym for <tt>lua_Integer</tt>. See <tt>lua_Integer</tt> in Lua
--   Reference Manual.
type LuaInteger = Int32

-- | Synonym for <tt>lua_Number</tt>. See <tt>lua_Number</tt> in Lua
--   Reference Manual.
type LuaNumber = Double

-- | Enumeration used as type tag. See <tt>lua_type</tt> in Lua Reference
--   Manual.
data LTYPE
TNONE :: LTYPE
TNIL :: LTYPE
TBOOLEAN :: LTYPE
TLIGHTUSERDATA :: LTYPE
TNUMBER :: LTYPE
TSTRING :: LTYPE
TTABLE :: LTYPE
TFUNCTION :: LTYPE
TUSERDATA :: LTYPE
TTHREAD :: LTYPE

-- | Enumeration used by <tt>gc</tt> function.
data GCCONTROL
GCSTOP :: GCCONTROL
GCRESTART :: GCCONTROL
GCCOLLECT :: GCCONTROL
GCCOUNT :: GCCONTROL
GCCOUNTB :: GCCONTROL
GCSTEP :: GCCONTROL
GCSETPAUSE :: GCCONTROL
GCSETSTEPMUL :: GCCONTROL

-- | See <tt>LUA_MULTRET</tt> in Lua Reference Manual.
multret :: Int

-- | See <tt>lua_settop</tt> in Lua Reference Manual.
settop :: LuaState -> Int -> IO ()

-- | See <tt>lua_createtable</tt> in Lua Reference Manual.
createtable :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_objlen</tt> in Lua Reference Manual.
objlen :: LuaState -> Int -> IO Int

-- | See <tt>lua_pop</tt> in Lua Reference Manual.
pop :: LuaState -> Int -> IO ()

-- | See <tt>lua_newtable</tt> in Lua Reference Manual.
newtable :: LuaState -> IO ()

-- | See <tt>lua_pushcclosure</tt> in Lua Reference Manual.
pushcclosure :: LuaState -> FunPtr LuaCFunction -> Int -> IO ()

-- | See <tt>lua_pushcfunction</tt> in Lua Reference Manual.
pushcfunction :: LuaState -> FunPtr LuaCFunction -> IO ()

-- | See <tt>lua_strlen</tt> in Lua Reference Manual.
strlen :: LuaState -> Int -> IO Int

-- | See <tt>lua_type</tt> in Lua Reference Manual.
ltype :: LuaState -> Int -> IO LTYPE

-- | See <tt>lua_isfunction</tt> in Lua Reference Manual.
isfunction :: LuaState -> Int -> IO Bool

-- | See <tt>lua_istable</tt> in Lua Reference Manual.
istable :: LuaState -> Int -> IO Bool

-- | Try to convert Lua array at given index to Haskell list.
tolist :: StackValue a => LuaState -> Int -> IO (Maybe [a])

-- | See <tt>lua_islightuserdata</tt> in Lua Reference Manual.
islightuserdata :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isnil</tt> in Lua Reference Manual.
isnil :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isboolean</tt> in Lua Reference Manual.
isboolean :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isthread</tt> in Lua Reference Manual.
isthread :: LuaState -> Int -> IO Bool

-- | See <tt>lua_none</tt> in Lua Reference Manual.
isnone :: LuaState -> Int -> IO Bool

-- | See <tt>lua_noneornil</tt> in Lua Reference Manual.
isnoneornil :: LuaState -> Int -> IO Bool

-- | See <tt>LUA_REGISTRYINDEX</tt> in Lua Reference Manual.
registryindex :: Int

-- | See <tt>LUA_ENVIRONINDEX</tt> in Lua Reference Manual.
environindex :: Int

-- | See <tt>LUA_GLOBALSINDEX</tt> in Lua Reference Manual.
globalsindex :: Int

-- | See <tt>lua_upvalueindex</tt> in Lua Reference Manual.
upvalueindex :: Int -> Int

-- | See <tt>lua_atpanic</tt> in Lua Reference Manual.
atpanic :: LuaState -> FunPtr LuaCFunction -> IO (FunPtr LuaCFunction)

-- | See <tt>lua_tostring</tt> in Lua Reference Manual.
tostring :: LuaState -> Int -> IO ByteString

-- | See <tt>lua_tothread</tt> in Lua Reference Manual.
tothread :: LuaState -> Int -> IO LuaState

-- | See <tt>lua_touserdata</tt> in Lua Reference Manual.
touserdata :: LuaState -> Int -> IO (Ptr a)

-- | See <tt>lua_typename</tt> in Lua Reference Manual.
typename :: LuaState -> LTYPE -> IO String

-- | See <tt>lua_xmove</tt> in Lua Reference Manual.
xmove :: LuaState -> LuaState -> Int -> IO ()

-- | See <tt>lua_yield</tt> in Lua Reference Manual.
yield :: LuaState -> Int -> IO Int

-- | See <tt>lua_checkstack</tt> in Lua Reference Manual.
checkstack :: LuaState -> Int -> IO Bool

-- | See <tt>lua_newstate</tt> and <tt>luaL_newstate</tt> in Lua Reference
--   Manual.
newstate :: IO LuaState

-- | See <tt>lua_close</tt> in Lua Reference Manual.
close :: LuaState -> IO ()

-- | See <tt>lua_concat</tt> in Lua Reference Manual.
concat :: LuaState -> Int -> IO ()

-- | See <tt>lua_call</tt> and <tt>lua_call</tt> in Lua Reference Manual.
call :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_pcall</tt> in Lua Reference Manual.
pcall :: LuaState -> Int -> Int -> Int -> IO Int

-- | See <tt>lua_cpcall</tt> in Lua Reference Manual.
cpcall :: LuaState -> FunPtr LuaCFunction -> Ptr a -> IO Int

-- | See <tt>lua_getfield</tt> in Lua Reference Manual.
getfield :: LuaState -> Int -> String -> IO ()

-- | See <tt>lua_setfield</tt> in Lua Reference Manual.
setfield :: LuaState -> Int -> String -> IO ()

-- | See <tt>lua_getglobal</tt> in Lua Reference Manual.
getglobal :: LuaState -> String -> IO ()

-- | See <tt>lua_setglobal</tt> in Lua Reference Manual.
setglobal :: LuaState -> String -> IO ()

-- | See <tt>luaL_openlibs</tt> in Lua Reference Manual.
openlibs :: LuaState -> IO ()
mkStringWriter :: LuaWriter -> IO (FunPtr LuaWriter)

-- | See <tt>lua_dump</tt> in Lua Reference Manual.
dump :: LuaState -> IO String

-- | See <tt>lua_equal</tt> in Lua Reference Manual.
equal :: LuaState -> Int -> Int -> IO Bool

-- | This is a convenience function to implement error propagation
--   convention described in <a>Error handling in hslua</a>. hslua doesn't
--   implement <tt>lua_error</tt> function from Lua C API because it's
--   never safe to use. (see <a>Error handling in hslua</a> for details)
lerror :: LuaState -> IO Int

-- | See <tt>lua_gc</tt> in Lua Reference Manual.
gc :: LuaState -> GCCONTROL -> Int -> IO Int

-- | See <tt>lua_getfenv</tt> in Lua Reference Manual.
getfenv :: LuaState -> Int -> IO ()

-- | See <tt>lua_getmetatable</tt> in Lua Reference Manual.
getmetatable :: LuaState -> Int -> IO Bool

-- | See <tt>lua_gettable</tt> in Lua Reference Manual.
gettable :: LuaState -> Int -> IO ()

-- | See <tt>lua_gettop</tt> in Lua Reference Manual.
gettop :: LuaState -> IO Int

-- | See <tt>lua_insert</tt> in Lua Reference Manual.
insert :: LuaState -> Int -> IO ()

-- | See <tt>lua_iscfunction</tt> in Lua Reference Manual.
iscfunction :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isnumber</tt> in Lua Reference Manual.
isnumber :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isstring</tt> in Lua Reference Manual.
isstring :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isuserdata</tt> in Lua Reference Manual.
isuserdata :: LuaState -> Int -> IO Bool

-- | See <tt>lua_lessthan</tt> in Lua Reference Manual.
lessthan :: LuaState -> Int -> Int -> IO Bool

-- | See <tt>luaL_loadfile</tt> in Lua Reference Manual.
loadfile :: LuaState -> String -> IO Int
mkStringReader :: LuaReader -> IO (FunPtr LuaReader)

-- | See <tt>luaL_loadstring</tt> in Lua Reference Manual.
loadstring :: LuaState -> String -> String -> IO Int

-- | See <tt>lua_newthread</tt> in Lua Reference Manual.
newthread :: LuaState -> IO LuaState

-- | See <tt>lua_newuserdata</tt> in Lua Reference Manual.
newuserdata :: LuaState -> Int -> IO (Ptr ())

-- | See <tt>lua_next</tt> in Lua Reference Manual.
next :: LuaState -> Int -> IO Bool

-- | See <tt>lua_pushboolean</tt> in Lua Reference Manual.
pushboolean :: LuaState -> Bool -> IO ()

-- | See <tt>lua_pushinteger</tt> in Lua Reference Manual.
pushinteger :: LuaState -> LuaInteger -> IO ()

-- | See <tt>lua_pushlightuserdata</tt> in Lua Reference Manual.
pushlightuserdata :: LuaState -> Ptr a -> IO ()

-- | See <tt>lua_pushnil</tt> in Lua Reference Manual.
pushnil :: LuaState -> IO ()

-- | See <tt>lua_pushnumber</tt> in Lua Reference Manual.
pushnumber :: LuaState -> LuaNumber -> IO ()

-- | See <tt>lua_pushstring</tt> in Lua Reference Manual.
pushstring :: LuaState -> ByteString -> IO ()

-- | Push a list to Lua stack as a Lua array.
pushlist :: StackValue a => LuaState -> [a] -> IO ()

-- | See <tt>lua_pushthread</tt> in Lua Reference Manual.
pushthread :: LuaState -> IO Bool

-- | See <tt>lua_pushvalue</tt> in Lua Reference Manual.
pushvalue :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawequal</tt> in Lua Reference Manual.
rawequal :: LuaState -> Int -> Int -> IO Bool

-- | See <tt>lua_rawget</tt> in Lua Reference Manual.
rawget :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawgeti</tt> in Lua Reference Manual.
rawgeti :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_rawset</tt> in Lua Reference Manual.
rawset :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawseti</tt> in Lua Reference Manual.
rawseti :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_remove</tt> in Lua Reference Manual.
remove :: LuaState -> Int -> IO ()

-- | See <tt>lua_replace</tt> in Lua Reference Manual.
replace :: LuaState -> Int -> IO ()

-- | See <tt>lua_resume</tt> in Lua Reference Manual.
resume :: LuaState -> Int -> IO Int

-- | See <tt>lua_setfenv</tt> in Lua Reference Manual.
setfenv :: LuaState -> Int -> IO Int

-- | See <tt>lua_setmetatable</tt> in Lua Reference Manual.
setmetatable :: LuaState -> Int -> IO ()

-- | See <tt>lua_settable</tt> in Lua Reference Manual.
settable :: LuaState -> Int -> IO ()

-- | See <tt>lua_status</tt> in Lua Reference Manual.
status :: LuaState -> IO Int

-- | See <tt>lua_toboolean</tt> in Lua Reference Manual.
toboolean :: LuaState -> Int -> IO Bool

-- | See <tt>lua_tocfunction</tt> in Lua Reference Manual.
tocfunction :: LuaState -> Int -> IO (FunPtr LuaCFunction)

-- | See <tt>lua_tointeger</tt> in Lua Reference Manual.
tointeger :: LuaState -> Int -> IO LuaInteger

-- | See <tt>lua_tonumber</tt> in Lua Reference Manual.
tonumber :: LuaState -> Int -> IO LuaNumber

-- | See <tt>lua_topointer</tt> in Lua Reference Manual.
topointer :: LuaState -> Int -> IO (Ptr ())

-- | See <tt>lua_register</tt> in Lua Reference Manual.
register :: LuaState -> String -> FunPtr LuaCFunction -> IO ()

-- | See <tt>luaL_newmetatable</tt> in Lua Reference Manual.
newmetatable :: LuaState -> String -> IO Int

-- | See <tt>luaL_argerror</tt> in Lua Reference Manual. Contrary to the
--   manual, Haskell function does return with value less than zero.
argerror :: LuaState -> Int -> String -> IO CInt

-- | See <tt>luaL_ref</tt> in Lua Reference Manual.
ref :: LuaState -> Int -> IO Int

-- | See <tt>luaL_unref</tt> in Lua Reference Manual.
unref :: LuaState -> Int -> Int -> IO ()

-- | A value that can be pushed and poped from the Lua stack. All instances
--   are natural, except following:
--   
--   <ul>
--   <li><tt>LuaState</tt> push ignores its argument, pushes current
--   state</li>
--   <li><tt>()</tt> push ignores its argument, just pushes nil</li>
--   <li><tt>Ptr ()</tt> pushes light user data, peek checks for
--   lightuserdata or userdata</li>
--   <li>See "A note about integer functions" for integer functions.</li>
--   </ul>
class StackValue a

-- | Pushes a value onto Lua stack, casting it into meaningfully nearest
--   Lua type.
push :: StackValue a => LuaState -> a -> IO ()

-- | Check if at index <tt>n</tt> there is a convertible Lua value and if
--   so return it wrapped in <tt>Just</tt>. Return <tt>Nothing</tt>
--   otherwise.
peek :: StackValue a => LuaState -> Int -> IO (Maybe a)

-- | Lua type id code of the vaule expected. Parameter is unused.
valuetype :: StackValue a => a -> LTYPE
maybepeek :: l -> n -> (l -> n -> IO Bool) -> (l -> n -> IO r) -> IO (Maybe r)

-- | Like <tt>getglobal</tt>, but knows about packages. e. g.
--   
--   <pre>
--   getglobal l "math.sin"
--   </pre>
--   
--   returns correct result
getglobal2 :: LuaState -> String -> IO ()
typenameindex :: LuaState -> Int -> IO String
class LuaImport a
luaimport' :: LuaImport a => Int -> a -> LuaCFunction
luaimportargerror :: LuaImport a => Int -> String -> a -> LuaCFunction
mkWrapper :: LuaCFunction -> IO (FunPtr LuaCFunction)

-- | Create new foreign Lua function. Function created can be called by Lua
--   engine. Remeber to free the pointer with <tt>freecfunction</tt>.
newcfunction :: LuaImport a => a -> IO (FunPtr LuaCFunction)

-- | Convert a Haskell function to Lua function. Any Haskell function can
--   be converted provided that:
--   
--   <ul>
--   <li>all arguments are instances of StackValue</li>
--   <li>return type is IO t, where t is an instance of StackValue</li>
--   </ul>
--   
--   Any Haskell exception will be converted to a string and returned as
--   Lua error.
luaimport :: LuaImport a => a -> LuaCFunction

-- | Free function pointer created with <tt>newcfunction</tt>.
freecfunction :: FunPtr LuaCFunction -> IO ()
class LuaCallProc a
callproc' :: LuaCallProc a => LuaState -> String -> IO () -> Int -> a

-- | Call a Lua procedure. Use as:
--   
--   <pre>
--   callproc l "proc" "abc" (1::Int) (5.0::Double)
--   </pre>
callproc :: (LuaCallProc a) => LuaState -> String -> a
class LuaCallFunc a
callfunc' :: LuaCallFunc a => LuaState -> String -> IO () -> Int -> a

-- | Call a Lua function. Use as:
--   
--   <pre>
--   Just v &lt;- callfunc l "proc" "abc" (1::Int) (5.0::Double)
--   </pre>
callfunc :: (LuaCallFunc a) => LuaState -> String -> a
hsmethod__gc_addr :: FunPtr LuaCFunction
hsmethod__call_addr :: FunPtr LuaCFunction
hsmethod__gc :: LuaState -> IO CInt
hsmethod__call :: LuaState -> IO CInt

-- | Pushes Haskell function converted to a Lua function. All values
--   created will be garbage collected. Use as:
--   
--   <pre>
--   Lua.pushhsfunction l myfun
--   Lua.setglobal l "myfun"
--   </pre>
--   
--   You are not allowed to use <tt>lua_error</tt> anywhere, but use an
--   error code of (-1) to the same effect. Push error message as the sole
--   return value.
pushhsfunction :: LuaImport a => LuaState -> a -> IO ()

-- | Pushes _raw_ Haskell function converted to a Lua function. Raw Haskell
--   functions collect parameters from the stack and return a <a>CInt</a>
--   that represents number of return values left in the stack.
pushrawhsfunction :: LuaState -> LuaCFunction -> IO ()

-- | Imports a Haskell function and registers it at global name.
registerhsfunction :: LuaImport a => LuaState -> String -> a -> IO ()

-- | Imports a raw Haskell function and registers it at global name.
registerrawhsfunction :: LuaState -> String -> (LuaState -> IO CInt) -> IO ()
instance GHC.Enum.Enum Scripting.Lua.GCCONTROL
instance GHC.Show.Show Scripting.Lua.GCCONTROL
instance GHC.Classes.Ord Scripting.Lua.GCCONTROL
instance GHC.Classes.Eq Scripting.Lua.GCCONTROL
instance GHC.Classes.Ord Scripting.Lua.LTYPE
instance GHC.Show.Show Scripting.Lua.LTYPE
instance GHC.Classes.Eq Scripting.Lua.LTYPE
instance GHC.Enum.Enum Scripting.Lua.LTYPE
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaInteger
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaNumber
instance Scripting.Lua.StackValue GHC.Types.Int
instance Scripting.Lua.StackValue Data.ByteString.Internal.ByteString
instance Scripting.Lua.StackValue a => Scripting.Lua.StackValue [a]
instance Scripting.Lua.StackValue GHC.Types.Bool
instance Scripting.Lua.StackValue (GHC.Ptr.FunPtr Scripting.Lua.Raw.LuaCFunction)
instance Scripting.Lua.StackValue (GHC.Ptr.Ptr a)
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaState
instance Scripting.Lua.StackValue ()
instance Scripting.Lua.StackValue a => Scripting.Lua.LuaImport (GHC.Types.IO a)
instance (Scripting.Lua.StackValue a, Scripting.Lua.LuaImport b) => Scripting.Lua.LuaImport (a -> b)
instance Scripting.Lua.LuaCallProc (GHC.Types.IO t)
instance Scripting.Lua.StackValue t => Scripting.Lua.LuaCallFunc (GHC.Types.IO t)
instance (Scripting.Lua.StackValue t, Scripting.Lua.LuaCallProc b) => Scripting.Lua.LuaCallProc (t -> b)
instance (Scripting.Lua.StackValue t, Scripting.Lua.LuaCallFunc b) => Scripting.Lua.LuaCallFunc (t -> b)
