HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulelua-2.3.2Haskell2010

Lua.Debug

Haskell bindings to Lua's debug interface.

  • 2 values
  • Packagelua-2.3.2
  • Exports2
  • LanguageHaskell2010
  • LicenceMIT
  • SourceDebug.hs
valuelua_getupvalue
  1. :: State
  2. -> StackIndex

    funcindex

  3. -> CInt

    n

  4. -> IO CString
#

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 NULL (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), -]

lua_getupvalue.

valuelua_setupvalue
  1. :: State
  2. -> StackIndex

    funcindex

  3. -> CInt

    n

  4. -> IO CString
#

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 NULL (and pops nothing) when the index n is greater than the number of upvalues.

Parameters funcindex and n are as in the function lua_getupvalue.

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

lua_setupvalue.