luautils-0.1.3: Helpers for Haskell integration with Lua

Portabilitynon-portable (uses ghc extensions)
Safe HaskellNone



This package is an add-on to the HsLua package by Gracjan Polak (http:hackage.haskell.orgpackagehslua).

HsLua only provides a very bare-bones wrapper over the Lua API, and this package is meant to fill in the gap by providing some commonly used features.

Currently the following features are provided -

  1. Lua.StackValue instances for a variety of commonly used datatypes, such as Lists, Tuples, Either, Maybe etc. 2. luaDoString and luaDoFile utility functions. 3. A function to dump the contents of the stack for debugging purposes (dumpStack).



luaDoString :: LuaState -> String -> IO ()Source

Execute a String containing Lua Code

luaDoFile :: LuaState -> String -> IO ()Source

Execute a Lua script file

dumpStack :: LuaState -> IO ()Source

Pretty print the contents of the entire Lua stack in a human readable form