HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehslua-core-2.3.2Haskell2010

HsLua.Core.Debug

Bindings to Lua's debug interface.

  • 2 values
valuegetupvalue
  1. :: StackIndex

    funcindex

  2. -> Int

    n

  3. -> LuaE e (Maybe Name)
#

Gets information about the n-th upvalue of the closure at index funcindex. It pushes the upvalue's value onto the stack and returns its name. Returns Nothing (and pushes nothing) when the index n is greater than the number of upvalues.

See debug.getupvalue for more information about upvalues.

[0, +(0|1), -]

Wraps lua_getupvalue.

valuesetupvalue
  1. :: StackIndex

    funcindex

  2. -> Int

    n

  3. -> LuaE e (Maybe Name)
#

Sets the value of a closure’s upvalue. It assigns the value on the top of the stack to the upvalue and returns its name. It also pops the value from the stack.

Returns Nothing (and pops nothing) when the index n is greater than the number of upvalues.

Parameters funcindex and n are as in the function getupvalue.

[-(0|1), +0, -]

Wraps lua_setupvalue.