-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Lua, an embeddable scripting language
--
-- This package provides bindings and types to bridge Haskell and
-- Lua.
--
-- The full Lua interpreter version 5.3.6 is included. Alternatively, a
-- system-wide Lua installation can be linked instead.
@package lua
@version 1.0.0
-- | The core Lua types, including mappings of Lua types to Haskell.
module Foreign.Lua.Raw.Types
-- | An opaque structure that points to a thread and indirectly (through
-- the thread) to the whole state of a Lua interpreter. The Lua library
-- is fully reentrant: it has no global variables. All information about
-- a state is accessible through this structure.
--
-- Synonym for lua_State *. See lua_State.
newtype State
State :: Ptr () -> State
-- | The reader function used by load. Every time it needs
-- another piece of the chunk, lua_load calls the reader, passing along
-- its data parameter. The reader must return a pointer to a block of
-- memory with a new piece of the chunk and set size to the block size.
-- The block must exist until the reader function is called again. To
-- signal the end of the chunk, the reader must return NULL or
-- set size to zero. The reader function may return pieces of any size
-- greater than zero.
--
-- See lua_Reader.
type Reader = FunPtr (State -> Ptr () -> Ptr CSize -> IO (Ptr CChar))
-- | Enumeration used by gc function.
data GCCONTROL
GCSTOP :: GCCONTROL
GCRESTART :: GCCONTROL
GCCOLLECT :: GCCONTROL
GCCOUNT :: GCCONTROL
GCCOUNTB :: GCCONTROL
GCSTEP :: GCCONTROL
GCSETPAUSE :: GCCONTROL
GCSETSTEPMUL :: GCCONTROL
-- | Enumeration used as type tag. See lua_type.
data Type
-- | non-valid stack index
TypeNone :: Type
-- | type of lua's nil value
TypeNil :: Type
-- | type of lua booleans
TypeBoolean :: Type
-- | type of light userdata
TypeLightUserdata :: Type
-- | type of lua numbers. See Number
TypeNumber :: Type
-- | type of lua string values
TypeString :: Type
-- | type of lua tables
TypeTable :: Type
-- | type of functions, either normal or CFunction
TypeFunction :: Type
-- | type of full user data
TypeUserdata :: Type
-- | type of lua threads
TypeThread :: Type
-- | Integer code used to encode the type of a lua value.
newtype TypeCode
TypeCode :: CInt -> TypeCode
[fromTypeCode] :: TypeCode -> CInt
-- | Convert a lua Type to a type code which can be passed to the C API.
fromType :: Type -> TypeCode
-- | Convert numerical code to lua type.
toType :: TypeCode -> Type
-- | Type for C functions.
--
-- In order to communicate properly with Lua, a C function must use the
-- following protocol, which defines the way parameters and results are
-- passed: a C function receives its arguments from Lua in its stack in
-- direct order (the first argument is pushed first). So, when the
-- function starts, gettop returns the number of
-- arguments received by the function. The first argument (if any) is at
-- index 1 and its last argument is at index gettop. To
-- return values to Lua, a C function just pushes them onto the stack, in
-- direct order (the first result is pushed first), and returns the
-- number of results. Any other value in the stack below the results will
-- be properly discarded by Lua. Like a Lua function, a C function called
-- by Lua can also return many results.
--
-- See lua_CFunction.
type CFunction = FunPtr (State -> IO NumResults)
-- | Boolean value returned by a Lua C API function. This is a
-- CInt and interpreted as False iff the
-- value is 0, True otherwise.
newtype LuaBool
LuaBool :: CInt -> LuaBool
-- | Lua representation of the value interpreted as false.
false :: LuaBool
-- | Generic Lua representation of a value interpreted as being true.
true :: LuaBool
-- | Convert a LuaBool to a Haskell Bool.
fromLuaBool :: LuaBool -> Bool
-- | Convert a Haskell Bool to a LuaBool.
toLuaBool :: Bool -> LuaBool
-- | The type of integers in Lua.
--
-- By default this type is Int64, but that can be changed
-- to different values in lua. (See LUA_INT_TYPE in
-- luaconf.h.)
--
-- See lua_Integer.
newtype Integer
Integer :: Int64 -> Integer
-- | The type of floats in Lua.
--
-- By default this type is Double, but that can be
-- changed in Lua to a single float or a long double. (See
-- LUA_FLOAT_TYPE in luaconf.h.)
--
-- See lua_Number.
newtype Number
Number :: Double -> Number
-- | A stack index
newtype StackIndex
StackIndex :: CInt -> StackIndex
[fromStackIndex] :: StackIndex -> CInt
-- | The number of arguments consumed curing a function call.
newtype NumArgs
NumArgs :: CInt -> NumArgs
[fromNumArgs] :: NumArgs -> CInt
-- | The number of results returned by a function call.
newtype NumResults
NumResults :: CInt -> NumResults
[fromNumResults] :: NumResults -> CInt
-- | Lua comparison operations.
data RelationalOperator
-- | Correponds to lua's equality (==) operator.
EQ :: RelationalOperator
-- | Correponds to lua's strictly-lesser-than (<) operator
LT :: RelationalOperator
-- | Correponds to lua's lesser-or-equal (<=) operator
LE :: RelationalOperator
-- | Convert relation operator to its C representation.
fromRelationalOperator :: RelationalOperator -> CInt
-- | Lua status values.
data Status
-- | success
OK :: Status
-- | yielding / suspended coroutine
Yield :: Status
-- | a runtime rror
ErrRun :: Status
-- | syntax error during precompilation
ErrSyntax :: Status
-- | memory allocation (out-of-memory) error.
ErrMem :: Status
-- | error while running the message handler.
ErrErr :: Status
-- | error while running a __gc metamethod.
ErrGcmm :: Status
-- | opening or reading a file failed.
ErrFile :: Status
-- | Integer code used to signal the status of a thread or computation. See
-- Status.
newtype StatusCode
StatusCode :: CInt -> StatusCode
-- | Convert C integer constant to Status.
toStatus :: StatusCode -> Status
instance GHC.Generics.Generic Foreign.Lua.Raw.Types.State
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.State
instance GHC.Show.Show Foreign.Lua.Raw.Types.Integer
instance GHC.Real.Real Foreign.Lua.Raw.Types.Integer
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.Integer
instance GHC.Num.Num Foreign.Lua.Raw.Types.Integer
instance GHC.Real.Integral Foreign.Lua.Raw.Types.Integer
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.Integer
instance GHC.Enum.Enum Foreign.Lua.Raw.Types.Integer
instance GHC.Enum.Bounded Foreign.Lua.Raw.Types.Integer
instance GHC.Show.Show Foreign.Lua.Raw.Types.Number
instance GHC.Real.RealFrac Foreign.Lua.Raw.Types.Number
instance GHC.Float.RealFloat Foreign.Lua.Raw.Types.Number
instance GHC.Real.Real Foreign.Lua.Raw.Types.Number
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.Number
instance GHC.Num.Num Foreign.Lua.Raw.Types.Number
instance GHC.Real.Fractional Foreign.Lua.Raw.Types.Number
instance GHC.Float.Floating Foreign.Lua.Raw.Types.Number
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.Number
instance GHC.Show.Show Foreign.Lua.Raw.Types.LuaBool
instance Foreign.Storable.Storable Foreign.Lua.Raw.Types.LuaBool
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.LuaBool
instance GHC.Show.Show Foreign.Lua.Raw.Types.Type
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.Type
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.Type
instance GHC.Enum.Bounded Foreign.Lua.Raw.Types.Type
instance GHC.Show.Show Foreign.Lua.Raw.Types.TypeCode
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.TypeCode
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.TypeCode
instance GHC.Show.Show Foreign.Lua.Raw.Types.RelationalOperator
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.RelationalOperator
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.RelationalOperator
instance GHC.Show.Show Foreign.Lua.Raw.Types.Status
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.Status
instance Foreign.Storable.Storable Foreign.Lua.Raw.Types.StatusCode
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.StatusCode
instance GHC.Show.Show Foreign.Lua.Raw.Types.GCCONTROL
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.GCCONTROL
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.GCCONTROL
instance GHC.Enum.Enum Foreign.Lua.Raw.Types.GCCONTROL
instance GHC.Show.Show Foreign.Lua.Raw.Types.StackIndex
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.StackIndex
instance GHC.Num.Num Foreign.Lua.Raw.Types.StackIndex
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.StackIndex
instance GHC.Enum.Enum Foreign.Lua.Raw.Types.StackIndex
instance GHC.Show.Show Foreign.Lua.Raw.Types.NumArgs
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.NumArgs
instance GHC.Num.Num Foreign.Lua.Raw.Types.NumArgs
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.NumArgs
instance GHC.Show.Show Foreign.Lua.Raw.Types.NumResults
instance GHC.Classes.Ord Foreign.Lua.Raw.Types.NumResults
instance GHC.Num.Num Foreign.Lua.Raw.Types.NumResults
instance GHC.Classes.Eq Foreign.Lua.Raw.Types.NumResults
instance GHC.Enum.Enum Foreign.Lua.Raw.Types.Type
-- | Haskell bindings to Lua C API functions.
--
-- The exposed functions correspond closely to the respective C Lua API
-- functions. However, C API functions which can throw Lua errors are not
-- exported directly, as any errors would crash the program. Non-error
-- throwing hslua_ versions are provided instead. The
-- hslua ersatz functions have worse performance than the
-- original.
--
-- Some of the Lua functions may, directly or indirectly, call a Haskell
-- function, and trigger garbage collection, rescheduling etc. These
-- functions are always imported safely (i.e., with the safe
-- keyword).
--
-- However, all function can trigger garbage collection. If that can lead
-- to problems, then the package should be configured without flag
-- allow-unsafe-gc.
module Foreign.Lua.Raw.Functions
-- | Wrapper of lua_close. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_close.
lua_close :: State -> IO ()
-- | Wrapper of lua_absindex. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_absindex.
lua_absindex :: State -> StackIndex -> IO StackIndex
-- | Wrapper of lua_gettop. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_gettop.
lua_gettop :: State -> IO StackIndex
-- | Wrapper of lua_settop. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_settop.
lua_settop :: State -> StackIndex -> IO ()
-- | Wrapper of lua_pushvalue. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushvalue.
lua_pushvalue :: State -> StackIndex -> IO ()
-- | Wrapper of lua_pop. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pop.
lua_pop :: State -> StackIndex -> IO ()
-- | Wrapper of lua_copy. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_copy.
lua_copy :: State -> StackIndex -> StackIndex -> IO ()
-- | Wrapper of lua_remove. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_remove.
lua_remove :: State -> StackIndex -> IO ()
-- | Wrapper of lua_insert. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_insert.
lua_insert :: State -> StackIndex -> IO ()
-- | Wrapper of lua_replace. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_replace.
lua_replace :: State -> StackIndex -> IO ()
-- | Wrapper of lua_checkstack. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_checkstack.
lua_checkstack :: State -> CInt -> IO LuaBool
-- | Wrapper of lua_isnumber. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_isnumber.
lua_isnumber :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_isinteger. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_isinteger.
lua_isinteger :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_isstring. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_isstring.
lua_isstring :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_iscfunction. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_iscfunction.
lua_iscfunction :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_isuserdata. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_isuserdata.
lua_isuserdata :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_type. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_type.
lua_type :: State -> StackIndex -> IO TypeCode
-- | Wrapper of lua_typename. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_typename.
lua_typename :: State -> TypeCode -> IO CString
-- | Wrapper around -- @lua_compare@ which catches any Lua errors.
hslua_compare :: State -> StackIndex -> StackIndex -> CInt -> Ptr StatusCode -> IO LuaBool
-- | Wrapper of lua_rawequal. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawequal.
lua_rawequal :: State -> StackIndex -> StackIndex -> IO LuaBool
-- | Wrapper of lua_toboolean. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_toboolean.
lua_toboolean :: State -> StackIndex -> IO LuaBool
-- | Wrapper of lua_tocfunction. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_tocfunction.
lua_tocfunction :: State -> StackIndex -> IO CFunction
-- | Wrapper of lua_tointegerx. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_tointegerx.
lua_tointegerx :: State -> StackIndex -> Ptr LuaBool -> IO Integer
-- | Wrapper of lua_tonumberx. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_tonumberx.
lua_tonumberx :: State -> StackIndex -> Ptr LuaBool -> IO Number
-- | Wrapper of lua_tolstring. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_tolstring.
lua_tolstring :: State -> StackIndex -> Ptr CSize -> IO (Ptr CChar)
-- | Wrapper of lua_topointer. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_topointer.
lua_topointer :: State -> StackIndex -> IO (Ptr ())
-- | Wrapper of lua_tothread. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_tothread.
lua_tothread :: State -> StackIndex -> IO State
-- | Wrapper of lua_touserdata. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_touserdata.
lua_touserdata :: State -> StackIndex -> IO (Ptr a)
-- | Wrapper of lua_rawlen. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawlen.
lua_rawlen :: State -> StackIndex -> IO CSize
-- | Wrapper of lua_pushnil. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushnil.
lua_pushnil :: State -> IO ()
-- | Wrapper of lua_pushnumber. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushnumber.
lua_pushnumber :: State -> Number -> IO ()
-- | Wrapper of lua_pushinteger. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushinteger.
lua_pushinteger :: State -> Integer -> IO ()
-- | Wrapper of lua_pushlstring. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushlstring.
lua_pushlstring :: State -> Ptr CChar -> CSize -> IO ()
-- | Wrapper of lua_pushcclosure. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushcclosure.
lua_pushcclosure :: State -> CFunction -> NumArgs -> IO ()
-- | Wrapper of lua_pushboolean. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushboolean.
lua_pushboolean :: State -> LuaBool -> IO ()
-- | Wrapper of lua_pushlightuserdata. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushlightuserdata.
lua_pushlightuserdata :: State -> Ptr a -> IO ()
-- | Wrapper of lua_pushthread. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushthread.
lua_pushthread :: State -> IO CInt
-- | Wrapper around lua_gettable. which catches any Lua errors.
hslua_gettable :: State -> StackIndex -> Ptr StatusCode -> IO ()
-- | Wrapper of lua_rawget. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawget.
lua_rawget :: State -> StackIndex -> IO ()
-- | Wrapper of lua_rawgeti. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawgeti.
lua_rawgeti :: State -> StackIndex -> Integer -> IO ()
-- | Wrapper of lua_createtable. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_createtable.
lua_createtable :: State -> CInt -> CInt -> IO ()
-- | Wrapper of lua_newuserdata. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_newuserdata.
lua_newuserdata :: State -> CSize -> IO (Ptr ())
-- | Wrapper of lua_getmetatable. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_getmetatable.
lua_getmetatable :: State -> StackIndex -> IO LuaBool
-- | Wrapper around lua_getglobal which catches any Lua errors.
hslua_getglobal :: State -> CString -> CSize -> Ptr StatusCode -> IO ()
-- | Wrapper around -- @lua_settable@ which catches any Lua errors.
hslua_settable :: State -> StackIndex -> Ptr StatusCode -> IO ()
-- | Wrapper of lua_rawset. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawset.
lua_rawset :: State -> StackIndex -> IO ()
-- | Wrapper of lua_rawseti. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_rawseti.
lua_rawseti :: State -> StackIndex -> Integer -> IO ()
-- | Wrapper of lua_setmetatable. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_setmetatable.
lua_setmetatable :: State -> StackIndex -> IO ()
-- | Wrapper around -- @lua_setglobal@ which catches any Lua errors.
hslua_setglobal :: State -> CString -> CSize -> Ptr StatusCode -> IO ()
-- | Wrapper of lua_pcall. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pcall.
lua_pcall :: State -> NumArgs -> NumResults -> StackIndex -> IO StatusCode
-- | Wrapper of lua_load. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_load.
lua_load :: State -> Reader -> Ptr () -> CString -> CString -> IO StatusCode
-- | Wrapper of lua_status. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_status.
lua_status :: State -> IO StatusCode
-- | Wrapper of lua_gc. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_gc.
lua_gc :: State -> CInt -> CInt -> IO CInt
-- | Replacement for lua_error; it uses the HsLua error signaling
-- convention instead of raw Lua errors.
hslua_error :: State -> IO NumResults
-- | Wrapper around lua_next which catches any Lua errors.
hslua_next :: State -> StackIndex -> Ptr StatusCode -> IO LuaBool
-- | Wrapper around lua_concat which catches any Lua errors.
hslua_concat :: State -> NumArgs -> Ptr StatusCode -> IO ()
-- | Wrapper of lua_pushglobaltable. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#lua_pushglobaltable.
lua_pushglobaltable :: State -> IO ()
-- | Wrapper of luaL_openlibs. See the Lua docs at
-- https://www.lua.org/manual/5.3/manual.html#luaL_openlibs.
luaL_openlibs :: State -> IO ()
-- | Point to function opening the base library.
lua_open_base_ptr :: CFunction
-- | Point to function opening the table library.
lua_open_table_ptr :: CFunction
-- | Point to function opening the io library.
lua_open_io_ptr :: CFunction
-- | Point to function opening the os library.
lua_open_os_ptr :: CFunction
-- | Point to function opening the string library.
lua_open_string_ptr :: CFunction
-- | Point to function opening the math library.
lua_open_math_ptr :: CFunction
-- | Point to function opening the debug library.
lua_open_debug_ptr :: CFunction
-- | Point to function opening the package library.
lua_open_package_ptr :: CFunction
-- | Lua constants
module Foreign.Lua.Raw.Constants
-- | Alias for C constant LUA_MULTRET. See lua_call.
multret :: NumResults
-- | Alias for C constant LUA_REGISTRYINDEX. See Lua
-- registry.
registryindex :: StackIndex
-- | Value signaling that no reference was created.
refnil :: Int
-- | Value signaling that no reference was found.
noref :: Int
-- | Raw bindings to function call helpers.
module Foreign.Lua.Raw.Call
-- | Type of raw Haskell functions that can be made into
-- CFunctions.
type HsFunction = State -> IO NumResults
-- | Pushes a new C function created from an HsFunction.
hslua_newhsfunction :: State -> StablePtr a -> IO ()
hslua_pushhsfunction :: State -> HsFunction -> IO ()
-- | Raw bindings to functions and constants of the auxiliary library.
module Foreign.Lua.Raw.Auxiliary
hsluaL_newstate :: IO State
hsluaL_tolstring :: State -> StackIndex -> Ptr CSize -> IO (Ptr CChar)
luaL_getmetafield :: State -> StackIndex -> CString -> IO TypeCode
luaL_getmetatable :: State -> CString -> IO TypeCode
luaL_loadbuffer :: State -> Ptr CChar -> CSize -> CString -> IO StatusCode
luaL_newmetatable :: State -> CString -> IO LuaBool
luaL_ref :: State -> StackIndex -> IO CInt
-- | See luaL_testudata
luaL_testudata :: State -> StackIndex -> CString -> IO (Ptr ())
luaL_traceback :: State -> State -> CString -> CInt -> IO ()
luaL_unref :: State -> StackIndex -> CInt -> IO ()
-- | Key, in the registry, for table of loaded modules.
loadedTableRegistryField :: String
-- | Key, in the registry, for table of preloaded loaders.
preloadTableRegistryField :: String
-- | Reference to a stored value.
data Reference
-- | Reference to a stored value
Reference :: CInt -> Reference
-- | Reference to a nil value
RefNil :: Reference
-- | Convert a reference to its C representation.
fromReference :: Reference -> CInt
-- | Create a reference from its C representation.
toReference :: CInt -> Reference
instance GHC.Show.Show Foreign.Lua.Raw.Auxiliary.Reference
instance GHC.Classes.Eq Foreign.Lua.Raw.Auxiliary.Reference
-- | Lua exceptions and exception handling.
module Foreign.Lua.Raw.Error
-- | Retrieve and pop the top object as an error message. This is very
-- similar to tostring', but ensures that we don't recurse if getting the
-- message failed.
errorMessage :: State -> IO ByteString
-- | Bindings to HsLua-specific functions used to push Haskell values as
-- userdata.
module Foreign.Lua.Raw.Userdata
-- | Retrieves a Haskell object from userdata at the given index. The
-- userdata must have the given name.
hslua_fromuserdata :: State -> StackIndex -> CString -> IO (Maybe a)
-- | Creates a new userdata wrapping the given Haskell object.
hslua_newhsuserdata :: State -> a -> IO ()
-- | Creates and registers a new metatable for a userdata-wrapped Haskell
-- value; checks whether a metatable of that name has been registered yet
-- and uses the registered table if possible.
hslua_newudmetatable :: State -> CString -> IO LuaBool