hslua-1.2.0: Bindings to Lua, an embeddable scripting language

Copyright© 2007–2012 Gracjan Polak
2012–2016 Ömer Sinan Ağacan
2017-2020 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+hslua@zeitkraut.de>
Stabilitybeta
PortabilityForeignFunctionInterface, CPP
Safe HaskellNone
LanguageHaskell2010

Foreign.Lua.Raw.Functions

Contents

Description

Haskell bindings to Lua C API functions.

Synopsis

State manipulation

Basic stack manipulation

Stack access functions

hslua_compare :: State -> StackIndex -> StackIndex -> CInt -> Ptr StatusCode -> IO LuaBool Source #

Wrapper around -- @lua_compare@ which catches any longjmps.

Push functions

Get functions

hslua_gettable :: State -> StackIndex -> Ptr StatusCode -> IO () Source #

Wrapper around -- @lua_gettable@ which catches any longjmps.

hslua_getglobal :: State -> CString -> CSize -> Ptr StatusCode -> IO () Source #

Wrapper around -- @lua_getglobal@ which catches any longjmps.

Set functions

hslua_settable :: State -> StackIndex -> Ptr StatusCode -> IO () Source #

Wrapper around -- @lua_settable@ which catches any longjmps.

hslua_setglobal :: State -> CString -> CSize -> Ptr StatusCode -> IO () Source #

Wrapper around -- @lua_setglobal@ which catches any longjmps.

'load' and 'call' functions (load and run Lua code)

Coroutine functions

Garbage-collection functions and options

Miscellaneous functions

hslua_error :: State -> IO NumResults Source #

Replacement for -- @lua_error@; it uses the HsLua error signaling convention instead of raw

hslua_next :: State -> StackIndex -> Ptr StatusCode -> IO LuaBool Source #

Wrapper around -- @lua_next@ which catches any longjmps.

hslua_concat :: State -> NumArgs -> Ptr StatusCode -> IO () Source #

Wrapper around -- @lua_concat@ which catches any longjmps.

Lua Libraries

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.