-- definitions for Lua 5.1 debug library

--# -- TODO many of them will interfere with Kailua's own reasoning, so the support is minimal
--# assume global `debug`:
--#     {
--#         `debug`: function();
--#         `getfenv`: function(o: WHATEVER) --> table;
--#         `gethook`: function(thread: thread?) --> (WHATEVER, string, integer);
--#         -- XXX overloading required
--#         `getinfo`: function(`thread/function`: WHATEVER,
--#                             `function/what`: WHATEVER, what: WHATEVER?) --> table;
--#         -- XXX overloading required
--#         `getlocal`: function(`thread/level`: WHATEVER,
--#                              `level/local`: WHATEVER,
--#                              `local`: WHATEVER?) --> (string, WHATEVER);
--#         `getmetatable`: function(object: any) --> table;
--#         `getregistry`: function() --> table;
--#         `getupvalue`: function(func: function, up: integer) --> (string, WHATEVER);
--#         `setfenv`: function(object: WHATEVER, table: table) --> table;
--#         -- XXX overloading required
--#         `sethook`: function(`thread/hook`: WHATEVER,
--#                             `hook/mask`: WHATEVER,
--#                             `mask/count`: WHATEVER, count: integer?);
--#         -- XXX overloading required
--#         `setlocal`: function(`thread/level`: WHATEVER,
--#                              `level/local`: WHATEVER,
--#                              `local/value`: WHATEVER, value: WHATEVER?) --> string;
--#         `setmetatable`: function(object: any, table: table);
--#         `setupvalue`: function(func: function, up: integer, value: WHATEVER) --> string;
--#         -- XXX overloading required
--#         `traceback`: function(`thread/message`: WHATEVER?,
--#                               `message/level`: WHATEVER?, level: integer?) --> string;
--#         ...
--#     }

