Copyright | © 2007–2012 Gracjan Polak 2012–2016 Ömer Sinan Ağacan 2017 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
Stability | beta |
Portability | ForeignFunctionInterface |
Safe Haskell | None |
Language | Haskell98 |
Haskell bindings to lua C API functions.
- lua_close :: LuaState -> IO ()
- lua_gettop :: LuaState -> IO StackIndex
- lua_settop :: LuaState -> StackIndex -> IO ()
- lua_pushvalue :: LuaState -> StackIndex -> IO ()
- lua_rotate :: LuaState -> StackIndex -> CInt -> IO ()
- lua_copy :: LuaState -> StackIndex -> StackIndex -> IO ()
- lua_checkstack :: LuaState -> StackIndex -> IO LuaBool
- lua_isnumber :: LuaState -> StackIndex -> IO LuaBool
- lua_isstring :: LuaState -> StackIndex -> IO LuaBool
- lua_iscfunction :: LuaState -> StackIndex -> IO LuaBool
- lua_isuserdata :: LuaState -> StackIndex -> IO LuaBool
- lua_type :: LuaState -> StackIndex -> IO TypeCode
- lua_typename :: LuaState -> TypeCode -> IO (Ptr CChar)
- hslua_compare :: LuaState -> StackIndex -> StackIndex -> CInt -> IO (Failable LuaBool)
- lua_rawequal :: LuaState -> StackIndex -> StackIndex -> IO LuaBool
- lua_toboolean :: LuaState -> StackIndex -> IO StackIndex
- lua_tocfunction :: LuaState -> StackIndex -> IO CFunction
- lua_tointegerx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaInteger
- lua_tonumberx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaNumber
- lua_tolstring :: LuaState -> StackIndex -> Ptr CSize -> IO (Ptr CChar)
- lua_topointer :: LuaState -> StackIndex -> IO (Ptr ())
- lua_tothread :: LuaState -> StackIndex -> IO LuaState
- lua_touserdata :: LuaState -> StackIndex -> IO (Ptr a)
- lua_rawlen :: LuaState -> StackIndex -> IO CSize
- lua_pushnil :: LuaState -> IO ()
- lua_pushnumber :: LuaState -> LuaNumber -> IO ()
- lua_pushinteger :: LuaState -> LuaInteger -> IO ()
- lua_pushlstring :: LuaState -> Ptr CChar -> CSize -> IO ()
- lua_pushcclosure :: LuaState -> CFunction -> NumArgs -> IO ()
- lua_pushboolean :: LuaState -> LuaBool -> IO ()
- lua_pushlightuserdata :: LuaState -> Ptr a -> IO ()
- lua_pushthread :: LuaState -> IO CInt
- hslua_gettable :: LuaState -> StackIndex -> IO CInt
- hslua_getfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt
- lua_rawget :: LuaState -> StackIndex -> IO ()
- lua_rawgeti :: LuaState -> StackIndex -> CInt -> IO ()
- lua_createtable :: LuaState -> CInt -> CInt -> IO ()
- lua_newuserdata :: LuaState -> CInt -> IO (Ptr ())
- lua_getmetatable :: LuaState -> StackIndex -> IO CInt
- hslua_getglobal :: LuaState -> Ptr CChar -> IO CInt
- hslua_settable :: LuaState -> StackIndex -> IO CInt
- hslua_setfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt
- lua_rawset :: LuaState -> StackIndex -> IO ()
- lua_rawseti :: LuaState -> StackIndex -> CInt -> IO ()
- lua_setmetatable :: LuaState -> StackIndex -> IO ()
- hslua_setglobal :: LuaState -> Ptr CChar -> IO CInt
- lua_pcallk :: LuaState -> NumArgs -> NumResults -> StackIndex -> CInt -> Ptr () -> IO StatusCode
- lua_status :: LuaState -> IO StatusCode
- lua_gc :: LuaState -> CInt -> CInt -> IO CInt
- hslua_next :: LuaState -> StackIndex -> IO (Failable LuaBool)
- hslua_concat :: LuaState -> NumArgs -> IO (Failable LuaBool)
- luaL_openlibs :: LuaState -> IO ()
- lua_open_base_ptr :: CFunction
- lua_open_table_ptr :: CFunction
- lua_open_io_ptr :: CFunction
- lua_open_os_ptr :: CFunction
- lua_open_string_ptr :: CFunction
- lua_open_math_ptr :: CFunction
- lua_open_debug_ptr :: CFunction
- lua_open_package_ptr :: CFunction
- luaL_newstate :: IO LuaState
- luaL_newmetatable :: LuaState -> Ptr CChar -> IO LuaBool
- luaL_ref :: LuaState -> StackIndex -> IO CInt
- luaL_unref :: LuaState -> StackIndex -> CInt -> IO ()
- luaL_loadfilex :: LuaState -> Ptr CChar -> Ptr CChar -> IO StatusCode
- luaL_loadstring :: LuaState -> Ptr CChar -> IO StatusCode
State manipulation
Basic stack manipulation
lua_gettop :: LuaState -> IO StackIndex Source #
See lua_gettop
lua_settop :: LuaState -> StackIndex -> IO () Source #
See lua_settop
lua_pushvalue :: LuaState -> StackIndex -> IO () Source #
See lua_pushvalue
lua_rotate :: LuaState -> StackIndex -> CInt -> IO () Source #
See lua_rotate
lua_copy :: LuaState -> StackIndex -> StackIndex -> IO () Source #
See lua_copy
lua_checkstack :: LuaState -> StackIndex -> IO LuaBool Source #
See lua_checkstack
Stack access functions
lua_isnumber :: LuaState -> StackIndex -> IO LuaBool Source #
See lua_isnumber
lua_isstring :: LuaState -> StackIndex -> IO LuaBool Source #
See lua_isstring
lua_iscfunction :: LuaState -> StackIndex -> IO LuaBool Source #
See lua_iscfunction
lua_isuserdata :: LuaState -> StackIndex -> IO LuaBool Source #
See lua_isuserdata
lua_typename :: LuaState -> TypeCode -> IO (Ptr CChar) Source #
See lua_typename
hslua_compare :: LuaState -> StackIndex -> StackIndex -> CInt -> IO (Failable LuaBool) Source #
Wrapper around -- @lua_compare@ which catches any longjmp
s.
lua_rawequal :: LuaState -> StackIndex -> StackIndex -> IO LuaBool Source #
See lua_rawequal
lua_toboolean :: LuaState -> StackIndex -> IO StackIndex Source #
See lua_toboolean
lua_tocfunction :: LuaState -> StackIndex -> IO CFunction Source #
See lua_tocfunction
lua_tointegerx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaInteger Source #
See lua_tointegerx
lua_tonumberx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaNumber Source #
See lua_tonumberx
lua_tolstring :: LuaState -> StackIndex -> Ptr CSize -> IO (Ptr CChar) Source #
See lua_tolstring
lua_topointer :: LuaState -> StackIndex -> IO (Ptr ()) Source #
See lua_topointer
lua_tothread :: LuaState -> StackIndex -> IO LuaState Source #
See lua_tothread
lua_touserdata :: LuaState -> StackIndex -> IO (Ptr a) Source #
See lua_touserdata
lua_rawlen :: LuaState -> StackIndex -> IO CSize Source #
See lua_rawlen
Push functions
lua_pushnil :: LuaState -> IO () Source #
See lua_pushnil
lua_pushnumber :: LuaState -> LuaNumber -> IO () Source #
See lua_pushnumber
lua_pushinteger :: LuaState -> LuaInteger -> IO () Source #
See lua_pushinteger
lua_pushlstring :: LuaState -> Ptr CChar -> CSize -> IO () Source #
See lua_pushlstring
lua_pushcclosure :: LuaState -> CFunction -> NumArgs -> IO () Source #
See lua_pushcclosure
lua_pushboolean :: LuaState -> LuaBool -> IO () Source #
See lua_pushboolean
lua_pushthread :: LuaState -> IO CInt Source #
See lua_pushthread
Get functions
hslua_gettable :: LuaState -> StackIndex -> IO CInt Source #
Wrapper around -- @lua_gettable@ which catches any longjmp
s.
hslua_getfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_getfield@ which catches any longjmp
s.
lua_rawget :: LuaState -> StackIndex -> IO () Source #
See lua_rawget
lua_rawgeti :: LuaState -> StackIndex -> CInt -> IO () Source #
See lua_rawgeti
lua_createtable :: LuaState -> CInt -> CInt -> IO () Source #
See lua_createtable
lua_newuserdata :: LuaState -> CInt -> IO (Ptr ()) Source #
See lua_newuserdata
lua_getmetatable :: LuaState -> StackIndex -> IO CInt Source #
See lua_getmetatable
hslua_getglobal :: LuaState -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_getglobal@ which catches any longjmp
s.
Set functions
hslua_settable :: LuaState -> StackIndex -> IO CInt Source #
Wrapper around -- @lua_settable@ which catches any longjmp
s.
hslua_setfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_setfield@ which catches any longjmp
s.
lua_rawset :: LuaState -> StackIndex -> IO () Source #
See lua_rawset
lua_rawseti :: LuaState -> StackIndex -> CInt -> IO () Source #
See lua_rawseti
lua_setmetatable :: LuaState -> StackIndex -> IO () Source #
See lua_setmetatable
hslua_setglobal :: LuaState -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_setglobal@ which catches any longjmp
s.
load
and call
functions (load and run Lua code)
lua_pcallk :: LuaState -> NumArgs -> NumResults -> StackIndex -> CInt -> Ptr () -> IO StatusCode Source #
See lua_pcallk
Coroutine functions
lua_status :: LuaState -> IO StatusCode Source #
See lua_status
Garbage-collection functions and options
Miscellaneous functions
hslua_next :: LuaState -> StackIndex -> IO (Failable LuaBool) Source #
Wrapper around -- @lua_next@ which catches any longjmp
s.
hslua_concat :: LuaState -> NumArgs -> IO (Failable LuaBool) Source #
Wrapper around -- @lua_concat@ which catches any longjmp
s.
Lua Libraries
luaL_openlibs :: LuaState -> IO () Source #
See luaL_openlibs
lua_open_base_ptr :: CFunction Source #
Point to function opening the base library.
lua_open_table_ptr :: CFunction Source #
Point to function opening the table library.
lua_open_io_ptr :: CFunction Source #
Point to function opening the io library.
lua_open_os_ptr :: CFunction Source #
Point to function opening the os library.
lua_open_string_ptr :: CFunction Source #
Point to function opening the string library.
lua_open_math_ptr :: CFunction Source #
Point to function opening the math library.
lua_open_debug_ptr :: CFunction Source #
Point to function opening the debug library.
lua_open_package_ptr :: CFunction Source #
Point to function opening the package library.
The Auxiliary Library
luaL_newstate :: IO LuaState Source #
See luaL_newstate
luaL_unref :: LuaState -> StackIndex -> CInt -> IO () Source #
See luaL_unref
luaL_loadfilex :: LuaState -> Ptr CChar -> Ptr CChar -> IO StatusCode Source #
See luaL_loadfilex
luaL_loadstring :: LuaState -> Ptr CChar -> IO StatusCode Source #
See luaL_loadstring