HsLua.Util

hslua-2.3.0: Bindings to Lua, an embeddable scripting language

Copyright | © 2007–2012 Gracjan Polak; © 2012–2016 Ömer Sinan Ağacan; © 2017-2023 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@hslua.org>
Stability | beta
Portability | non-portable (depends on GHC)
Safe Haskell | Safe-Inferred
Language | Haskell2010

HsLua.Util

Description

HsLua utility functions.

Synopsis

- getglobal' :: LuaError e => Name -> LuaE e ()
- setglobal' :: LuaError e => Name -> LuaE e ()

# Documentation

getglobal' :: LuaError e => Name -> LuaE e () #

Like `getglobal`, but knows about packages and nested tables. E.g.

    getglobal' "math.sin"

will return the function `sin` in package `math`.

setglobal' :: 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.