hslua

A Lua language interpreter embedding in Haskell

Version on this page:0.4.0@rev:2
LTS Haskell 22.14:2.3.1
Stackage Nightly 2024-03-28:2.3.1
Latest on Hackage:2.3.1

See all snapshots hslua appears in

MIT licensed by Gracjan Polak, Ömer Sinan Ağacan
Maintained by [email protected]
This version can be pinned in stack with:hslua-0.4.0@sha256:43f6956aba870857548523718d3d5645e422187964e5158d14a9c17d96671ccb,4614

Module documentation for 0.4.0

Depends on 2 packages(full list with versions):
Used by 1 package in nightly-2015-06-02(full list with versions):

The Scripting.Lua module is a wrapper of Lua language interpreter as described in lua.org.

This package contains full Lua interpreter version 5.1.5. If you want to link it with system-wide Lua installation, use system-lua flag.

Example programs

Changes

Changelog

0.4.0

  • pushstring and tostring now uses ByteString instead of [Char].
  • StackValue [Char] instance is removed, StackValue ByteString is added.
  • StackValue a => StackValue [a] instance is added. It pushes a Lua array to the stack. pushlist, islist and tolist functions are added.
  • Type errors in Haskell functions now propagated differently. See the Scripting.Lua documentation for detailed explanation. This should fix segfaults reported several times.
  • lua_error function is removed, it’s never safe to call in Haskell.

Related issues and pull requests: #12, #26, #24, #23, #18.

0.3.14

  • Pkgconf-based setup removed. Cabal is now using extra-libraries to link with Lua.
  • luajit flag is added to link hslua with LuaJIT.

0.3.13

  • Small bugfix related with GHCi running under Windows.

0.3.12

  • pushrawhsfunction and registerrawhsfunction functions are added.
  • apicheck flag is added to Cabal package to enable Lua API checking. (useful for debugging)

0.3.11

  • luaL_ref and luaL_unref functions are added.