state package:hslua-core
Get the Lua state of this Lua computation.
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.
Wrapper of a Lua state whose lifetime is managed by the Haskell
garbage collector and has a finalizer attached. This means that the
state does not have to be closed explicitly, but will be closed
automatically when the value is garbage collected in Haskell.
Closes the Lua state and runs all finalizers associated with it. The
state _may not_ be used after it has been closed.
Creates a new Lua state that is under the control of the Haskell
garbage collector.
Creates a new Lua state. It calls
lua_newstate with an
allocator based on the standard C
realloc function and then
sets a panic function (see
§4.4 of the Lua 5.4 Reference
Manual) that prints an error message to the standard error output in
case of fatal errors.
Wraps
hsluaL_newstate. See also:
luaL_newstate.
Runs a Lua action with a state that's managed by GC.