-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to Lua, an embeddable scripting language -- -- HsLua provides wrappers and helpers to bridge Haskell and Lua. -- -- It builds upon the lua package, which allows to bundle a Lua -- interpreter with a Haskell program. -- -- Example programs are available in a separate repository. @package hslua @version 2.0.1 -- | HsLua utility functions. module HsLua.Util -- | Like getglobal, but knows about packages and nested tables. -- E.g. -- --
-- getglobal' "math.sin" ---- -- will return the function sin in package math. getglobal' :: LuaError e => Name -> LuaE e () -- | Like setglobal, but knows about packages and nested tables. -- E.g. -- --
-- pushstring "0.9.4" -- setglobal' "mypackage.version" ---- -- All tables and fields, except for the last field, must exist. setglobal' :: LuaError e => Name -> LuaE e () -- | Functions and utilities enabling the seamless integration of a Lua -- interpreter into a Haskell project. -- -- This module combines and re-exports the functionality of the HsLua -- framework. Basic access to the Lua API is provided by -- Core from Hackage package lua. module HsLua -- | Specify a name for the context in which a computation is run. The name -- is added to the error message in case of an exception. inContext :: PeekError e => String -> LuaE e a -> LuaE e a -- | A value that can be read from the Lua stack. class Peekable a -- | Check if at index n there is a convertible Lua value and if -- so return it. Throws a Exception otherwise. peek :: (Peekable a, PeekError e) => StackIndex -> LuaE e a messageFromException :: PeekError e => e -> String -- | A value that can be pushed to the Lua stack. class Pushable a -- | Pushes a value onto Lua stack, casting it into meaningfully nearest -- Lua type. push :: (Pushable a, LuaError e) => a -> LuaE e () -- | Like getglobal, but knows about packages and nested tables. -- E.g. -- --
-- getglobal' "math.sin" ---- -- will return the function sin in package math. getglobal' :: LuaError e => Name -> LuaE e () -- | Like setglobal, but knows about packages and nested tables. -- E.g. -- --
-- pushstring "0.9.4" -- setglobal' "mypackage.version" ---- -- All tables and fields, except for the last field, must exist. setglobal' :: LuaError e => Name -> LuaE e ()