HsLua 2.0.0
hslua-2.0.0
Released 2021-10-21.
-
Moved module hierarchy from Foreign.Lua to HsLua.
-
Error handling has been reworked completely. The type of
exceptions used and handled by HsLua is now exposed to the type
system. The typeLuamakes use of a default error type. Custom
error handling can be implemented by using theLuaEtype with
an exception type that is an instance of classLuaError. -
Renamed stack index helpers to
nth,nthTop,nthBottom,
top. The following have been removed:stackTop,
nthFromTop,nthFromBottom. -
Extracted raw Lua bindings into new package lua. This means
that all cabal flags have been moved to package lua as well.
Version lua-1.0.0 contained theForeign.Lua.Rawhierarchy as
present in hslua-1.3.0. See that package's changelog for
info on the additional modifications since then. -
The module Foreign.Lua.Raw.Error was merged into the
HsLua.Core.Error module. -
The functions
getglobalandgettablenow return the Lua
Typeof the pushed value. -
Extracted new packages:
- hslua-core: the package contains all modules from the
Core sub-hierarchy.
- hslua-classes: typclasses Peekable and Pushable for
pushing and pulling, as well as function calling.
- tasty-hslua: makes testing helpers available for reuse.
- hslua-core: the package contains all modules from the
-
Moved run functions from Util to Core.Run.
-
Moved module Utf8 from the base level into Core.
-
Refactored code to expose Haskell functions to Lua:
-
Removed functions
newCFunction,freeCFunction. Use
pushHaskellFunctioninstead, it takes care of garbage
collection. -
Renamed typeclass
ToHaskellFunctiontoExposable,
functioncallFunctoinvoke. All these have been moved
to hslua-classes. -
The type PreCFunction is now defined in package lua;
HaskellFunction is defined in hslua-core. -
Changed
pushHaskellFunctionto only accept HaskellFunction
arguments, move it to hslua-core. -
Removed helper functions
addfunctionandaddfieldfrom
Module. Use documented functions and fields instead.
-
-
Added support for a "since" tag on documented functions; allows
to mark the library version when a function was introduced in
its present form.