hslua v0.9.3 Release Notes
-
- Re-export more FunctionCalling helpers in
Foreign.Lua
: The typeclassToHaskellFunction
and the helper functiontoHaskellFunction
are useful when working with functions. Importing them separately fromForeign.Lua.FunctionCalling
was an unnecessary burden; they are therefor now re-exported by the main module. - Export registry-relatd constants
refnil
andnoref
: The constants are related to Lua's registry functions (ref
andunref
). - ➕ Add helper to convert functions into CFunction: A new helper
wrapHaskellFunction
is provided. It expects a HaskellImportedFunction userdata (as produced bypushHaskellFunction
) on top of the stack and replaces it with a C function. The new function converts error values generated withlerror
into Lua errors, i.e. it callslua_error
. - ➕ Add utility function
setglobal'
: It works likesetglobal
, but works with packages and nested tables (dot-notation only).
- Re-export more FunctionCalling helpers in