!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                          Safe _      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 2018-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaportableSafe _#{hsluaDecode  to ^ using UTF-8. Invalid input bytes are replaced with the Unicode replacement character U+FFFD.hsluaDecode  to ^ using UTF-8. Invalid input bytes are replaced with the Unicode replacement character U+FFFD.hsluaEncode  to  using UTF-8.hsluaEncode  to  using UTF-8.r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None 7MSX_ FhsluaReference to a stored value.hsluaReference to a stored valuehsluaReference to a nil valuehslua2The number of results returned by a function call. hslua,The number of arguments expected a function.hslua A stack indexhsluaEnumeration used by gc function.hsluaHInteger code used to signal the status of a thread or computation. See .hsluaLua status values.hsluasuccesshsluayielding / suspended coroutinehsluaa runtime rror hslua"syntax error during precompilation!hslua(memory allocation (out-of-memory) error."hslua(error while running the message handler.#hsluaerror while running a __gc metamethod.$hslua!opening or reading a file failed.%hsluaLua comparison operations.&hslua+Correponds to lua's equality (==) operator.'hslua5Correponds to lua's strictly-lesser-than (<) operator(hslua1Correponds to lua's lesser-or-equal (<=) operator)hslua4Integer code used to encode the type of a lua value.,hslua#Enumeration used as type tag. See  3https://www.lua.org/manual/5.3/manual.html#lua_typelua_type.-hsluanon-valid stack index.hsluatype of lua's nil value/hsluatype of lua booleans0hsluatype of light userdata1hsluatype of lua numbers. See 2hsluatype of lua string values3hsluatype of lua tables4hslua$type of functions, either normal or >5hsluatype of full user data6hsluatype of lua threads7hslua:Boolean value returned by a Lua C API function. This is a  and interpreted as t iff the value is 0, u otherwise.9hsluaThe type of floats in Lua.By default this type is wK, but that can be changed in Lua to a single float or a long double. (See LUA_FLOAT_TYPE in  luaconf.h.)See  5https://www.lua.org/manual/5.3/manual.html#lua_Number lua_Number.;hsluaThe type of integers in Lua.By default this type is <, but that can be changed to different values in lua. (See  LUA_INT_TYPE in  luaconf.h.)See  6https://www.lua.org/manual/5.3/manual.html#lua_Integer lua_Integer.=hsluaThe reader function used by `. Every time it needs another piece of the chunk, lua_load calls the reader, passing along its data parameter. The reader must return a pointer to a block of memory with a new piece of the chunk and set size to the block size. The block must exist until the reader function is called again. To signal the end of the chunk, the reader must return NULL[ or set size to zero. The reader function may return pieces of any size greater than zero.See  5https://www.lua.org/manual/5.3/manual.html#lua_Reader lua_Reader.>hsluaType for C functions.$In order to communicate properly with Lua, a C function must use the following protocol, which defines the way parameters and results are passed: a C function receives its arguments from Lua in its stack in direct order (the first argument is pushed first). So, when the function starts,  returns the number of arguments received by the function. The first argument (if any) is at index 1 and its last argument is at index D. To return values to Lua, a C function just pushes them onto the stack, in direct order (the first result is pushed first), and returns the number of results. Any other value in the stack below the results will be properly discarded by Lua. Like a Lua function, a C function called by Lua can also return many results.See  8https://www.lua.org/manual/5.3/manual.html#lua_CFunction lua_CFunction.?hsluaAn opaque structure that points to a thread and indirectly (through the thread) to the whole state of a Lua interpreter. The Lua library is fully reentrant: it has no global variables. All information about a state is accessible through this structure. Synonym for  lua_State *. See  )https://www.lua.org/manual/5.3/#lua_State lua_State.AhsluaA Lua computation. This is the base type used to run Lua programs of any kind. The Lua state is handled automatically, but can be retrieved via P.Dhslua4Environment in which Lua computations are evaluated.Fhslua9Functions for error and exception handling and conversionGhsluaLua interpreter stateHhslua;Define the ways in which exceptions and errors are handled.Jhslua*Translate Lua errors to Haskell exceptionsKhslua7Add information on the current context to an exception.LhsluauRuns the second computation only if the first fails; returns the result of the first successful computation, if any.Mhslua*Translate Haskell exceptions to Lua errorsNhsluaTurn a function of typ Lua.State -> IO a into a monadic Lua operation.OhsluaTurn a function of typ Lua.State -> a -> IO b into a monadic Lua operation.Phslua*Get the Lua state of this Lua computation.Qhslua$Get the error-to-exception function.Rhslua|Run Lua computation with the given Lua state and error-to-exception converter. Any resulting exceptions are left unhandled.ShsluaCRun the given operation, but crash if any Haskell exceptions occur.ThsluaUnsafe HE; no proper error handling is attempted, any error leads to a crash.Uhslua@Generic Lua representation of a value interpreted as being true.Vhslua5Lua representation of the value interpreted as false.Whslua Convert a 7 to a Haskell s.XhsluaConvert a Haskell s to a 7.YhsluaCConvert a lua Type to a type code which can be passed to the C API.Zhslua#Convert numerical code to lua type.[hslua2Convert relation operator to its C representation.\hsluaConvert C integer constant to .]hslua9Stack index of the nth element from the top of the stack.^hslua<Stack index of the nth element from the bottom of the stack._hsluaTop of the stack`hsluaBottom of the stackhslua.Value signaling that no reference was created.ahslua,Convert a reference to its C representation.bhslua-Create a reference from its C representation._  !"#$%'&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab_ABCDEFGHIJKLMQ?@=NOPRST,-./0123456)*+YZ>78VUWX;<9:^]_`  %'&([ !"#$\ab 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaDeriveDataTypeableNone 2X_hsluaCInt value or an error, using the convention that value below zero indicate an error. Values greater than zero are used verbatim. The phantom type is used for additional type safety and gives the type into which the wrapped CInt should be converted.hslua,Exceptions raised by Lua-related operations.hslua Raise a Lua $ containing the given error message.hslua Catch a Lua .hslua Catch Lua  , alter the message and rethrow.hsluaYReturn either the result of a Lua computation or, if an exception was thrown, the error.hsluakConvert a Lua error into a Haskell exception. The error message is expected to be at the top of the stack.hslua Alias for 0; will be deprecated in the next mayor release.hsluaRConvert the object at the top of the stack into a string and throw it as a HsLua .QThis function serves as the default to convert Lua errors to Haskell exceptions.hslua_Helper function which uses proper error-handling to throw an exception with the given message.hsluaRetrieve and pop the top object as an error message. This is very similar to tostring', but ensures that we don't recurse if getting the message failed.hsluaGRegistry field under which the special HsLua error indicator is stored.hsluaZConvert from Failable to target type, throwing an error if the value indicates a failure.hslua@Throw a Haskell exception if the computation signaled a failure.hsluauConvert lua boolean to Haskell Bool, throwing an exception if the return value indicates that an error had happened.r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaForeignFunctionInterfaceNone _Ahslua.Point to function opening the package library.hslua,Point to function opening the debug library.hslua+Point to function opening the math library.hslua-Point to function opening the string library.hslua)Point to function opening the os library.hslua)Point to function opening the io library.hslua,Point to function opening the table library.hslua+Point to function opening the base library.hsluaSee 8https://www.lua.org/manual/5.3/manual.html#luaL_openlibs luaL_openlibshsluaSee >https://www.lua.org/manual/5.3/manual.html#lua_pushglobaltable-- lua_pushglobaltablehsluaWrapper around  1https://lua.org/manual/5.3/manual.html#lua_concat-- @lua_concat@ which catches any longjmps.hsluaWrapper around  /https://lua.org/manual/5.3/manual.html#lua_next -- @lua_next@ which catches any longjmps.hsluaReplacement for  0https://lua.org/manual/5.3/manual.html#lua_error-- @lua_error@=; it uses the HsLua error signaling convention instead of rawhsluaSee 1https://www.lua.org/manual/5.3/manual.html#lua_gclua_gchsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_status lua_statushsluaSee 3https://www.lua.org/manual/5.3/manual.html#lua_loadlua_loadhsluaSee 4https://www.lua.org/manual/5.1/manual.html#lua_pcall lua_pcallhsluaWrapper around  4https://lua.org/manual/5.3/manual.html#lua_setglobal-- @lua_setglobal@ which catches any longjmps.hsluaSee ;https://www.lua.org/manual/5.3/manual.html#lua_setmetatablelua_setmetatablehsluaSee 6https://www.lua.org/manual/5.3/manual.html#lua_rawseti lua_rawsetihsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_rawset lua_rawsethsluaWrapper around  3https://lua.org/manual/5.3/manual.html#lua_settable-- @lua_settable@ which catches any longjmps.hsluaWrapper around  4https://lua.org/manual/5.3/manual.html#lua_getglobal-- @lua_getglobal@ which catches any longjmps.hsluaSee ;https://www.lua.org/manual/5.3/manual.html#lua_getmetatablelua_getmetatablehsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_newuserdatalua_newuserdatahsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_createtablelua_createtablehsluaSee 6https://www.lua.org/manual/5.3/manual.html#lua_rawgeti lua_rawgetihsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_rawget lua_rawgethsluaWrapper around  3https://lua.org/manual/5.3/manual.html#lua_gettable-- @lua_gettable@ which catches any longjmps.hsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_pushthreadlua_pushthreadhsluaSee @https://www.lua.org/manual/5.3/manual.html#lua_pushlightuserdatalua_pushlightuserdatahsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_pushbooleanlua_pushbooleanhsluaSee ;https://www.lua.org/manual/5.3/manual.html#lua_pushcclosurelua_pushcclosurehsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_pushlstringlua_pushlstringhsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_pushintegerlua_pushintegerhsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_pushnumberlua_pushnumberhsluaSee 6https://www.lua.org/manual/5.3/manual.html#lua_pushnil lua_pushnilhsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_rawlen lua_rawlenhsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_touserdatalua_touserdatahsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_tothread lua_tothreadhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_topointer lua_topointerhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_tolstring lua_tolstringhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_tonumberx lua_tonumberxhsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_tointegerxlua_tointegerxhsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_tocfunctionlua_tocfunctionhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_toboolean lua_tobooleanhsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_rawequal lua_rawequalhsluaWrapper around  2https://lua.org/manual/5.3/manual.html#lua_compare-- @lua_compare@ which catches any longjmps.hsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_typename lua_typenamehsluaSee 3https://www.lua.org/manual/5.3/manual.html#lua_typelua_typehsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_isuserdatalua_isuserdatahsluaSee :https://www.lua.org/manual/5.3/manual.html#lua_iscfunctionlua_iscfunctionhsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_isstring lua_isstringhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_isinteger lua_isintegerhsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_isnumber lua_isnumberhsluaSee 9https://www.lua.org/manual/5.3/manual.html#lua_checkstacklua_checkstackhsluaSee 6https://www.lua.org/manual/5.2/manual.html#lua_replace lua_replacehsluaSee 5https://www.lua.org/manual/5.2/manual.html#lua_insert lua_inserthsluaSee 5https://www.lua.org/manual/5.2/manual.html#lua_remove lua_removehsluaSee 3https://www.lua.org/manual/5.3/manual.html#lua_copylua_copyhsluaSee 8https://www.lua.org/manual/5.3/manual.html#lua_pushvalue lua_pushvaluehsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_settop lua_settophsluaSee 5https://www.lua.org/manual/5.3/manual.html#lua_gettop lua_gettophsluaSee 7https://www.lua.org/manual/5.3/manual.html#lua_absindex lua_absindexhsluaSee 4https://www.lua.org/manual/5.3/manual.html#lua_close lua_closeAAr 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaForeignFunctionInterfaceNone _hsluaAlias for C constant  LUA_MULTRET. See  (https://www.lua.org/manual/5.3/#lua_calllua_call.hsluaAlias for C constant LUA_REGISTRYINDEX. See  #https://www.lua.org/manual/5.3/#3.5 Lua registry.hslua.Value signaling that no reference was created.hslua,Value signaling that no reference was found.r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _ThsluaPExecute an action only if the given index is a table. Throw an error otherwise.hsluaConverts the acceptable index idxY into an equivalent absolute index (that is, one that does not depend on the stack top).hsluaCalls a function.To call a function you must use the following protocol: first, the function to be called is pushed onto the stack; then, the arguments to the function are pushed in direct order; that is, the first argument is pushed first. Finally you call call; nargs is the number of arguments that you pushed onto the stack. All arguments and the function value are popped from the stack when the function is called. The function results are pushed onto the stack when the function returns. The number of results is adjusted to nresults , unless nresults is multret%. In this case, all results from the function are pushed. Lua takes care that the returned values fit into the stack space. The function results are pushed onto the stack in direct order (the first result is pushed first), so that after the call the last result is on the top of the stack.-Any error inside the called function cause a  to be thrown.YThe following example shows how the host program can do the equivalent to this Lua code: a = f("how", t.x, 14)JHere it is in Haskell (assuming the OverloadedStrings language extension): xgetglobal "f" -- function to be called pushstring "how" -- 1st argument getglobal "t" -- table to be indexed getfield (-1) "x" -- push result of t.x (2nd arg) remove (-2) -- remove 't' from the stack pushinteger 14 -- 3rd argument call 3 1 -- call 'f' with 3 arguments and 1 result setglobal "a" -- set global 'a'Note that the code above is "balanced": at its end, the stack is back to its original configuration. This is considered good programming practice.See  3https://www.lua.org/manual/5.3/manual.html#lua_calllua_call.hslua.Ensures that the stack has space for at least n7 extra slots (that is, that you can safely push up to nr values into it). It returns false if it cannot fulfill the request, either because it would cause the stack to be larger than a fixed maximum size (typically at least several thousand elements) or because it cannot allocate memory for the extra space. This function never shrinks the stack; if the stack already has space for the extra slots, it is left unchanged.This is a wrapper function of  9https://www.lua.org/manual/5.3/manual.html#lua_checkstacklua_checkstack.hsluaDestroys all objects in the given Lua state (calling the corresponding garbage-collection metamethods, if any) and frees all dynamic memory used by this state. On several platforms, you may not need to call this function, because all resources are naturally released when the host program ends. On the other hand, long-running programs that create multiple states, such as daemons or web servers, will probably need to close states as soon as they are not needed.This is a wrapper function of  4https://www.lua.org/manual/5.3/manual.html#lua_close lua_close.hslua!Compares two Lua values. Returns True if the value at index idx1 satisfies op' when compared with the value at index idx2t, following the semantics of the corresponding Lua operator (that is, it may call metamethods). Otherwise returns False. Also returns False% if any of the indices is not valid. The value of op must be of type RelationalOperator:iEQ: compares for equality (==) LT: compares for less than (<) LE: compares for less or equal (<=)This is a wrapper function of  6https://www.lua.org/manual/5.3/manual.html#lua_compare lua_compare.hsluaConcatenates the nR values at the top of the stack, pops them, and leaves the result at the top. If n] is 1, the result is the single value on the stack (that is, the function does nothing); if nn is 0, the result is the empty string. Concatenation is performed following the usual semantics of Lua (see  0https://www.lua.org/manual/5.3/manual.html#3.4.63.4.6 of the lua manual).This is a wrapper function of  5https://www.lua.org/manual/5.3/manual.html#lua_concat lua_concat.hsluaCopies the element at index fromidx into the valid index toidxU, replacing the value at that position. Values at other positions are not affected. See also  3https://www.lua.org/manual/5.3/manual.html#lua_copylua_copy in the lua manual.hsluaCreates a new empty table and pushes it onto the stack. Parameter narr is a hint for how many elements the table will have as a sequence; parameter nrec is a hint for how many other elements the table will have. Lua may use these hints to preallocate memory for the new table. This preallocation is useful for performance when you know in advance how many elements the table will have. Otherwise you can use the function lua_newtable. This is a wrapper for function  :https://www.lua.org/manual/5.3/manual.html#lua_createtablelua_createtable.hsluaReturns Truej if the two values in acceptable indices index1 and index2 are equal, following the semantics of the Lua ==> operator (that is, may call metamethods). Otherwise returns False. Also returns False* if any of the indices is non valid. Uses  internally.hsluaWThis is a convenience function to implement error propagation convention described in  #g:1Error handling in hslua. hslua doesn't implement the  lua_error? function from Lua C API because it's never safe to use. (see  #g:1Error handling in hslua for details)hsluaControls the garbage collector.TThis function performs several tasks, according to the value of the parameter what:: stops the garbage collector.!: restarts the garbage collector.+: performs a full garbage-collection cycle.F: returns the current amount of memory (in Kbytes) in use by Lua.e: returns the remainder of dividing the current amount of bytes of memory in use by Lua by 1024.D: performs an incremental step of garbage collection. The step "size" is controlled by data (larger values mean more steps) in a non-specified way. If you want to control the step size you must experimentally tune the value of data. The function returns 1 if the step finished a garbage-collection cycle. 'GCSETPAUSE': sets data as the new value for the pause of the collector (see 2.10). The function returns the previous value of the pause.: sets data as the new value for the step multiplier of the collector (see 2.10). The function returns the previous value of the step multiplier.See  1https://www.lua.org/manual/5.3/manual.html#lua_gclua_gc.hslua Pushes onto the stack the value t[k], where tw is the value at the given stack index. As in Lua, this function may trigger a metamethod for the "index" event (see  .https://www.lua.org/manual/5.3/manual.html#2.42.4 of lua's manual).2Errors on the Lua side are caught and rethrown as . See also:  7https://www.lua.org/manual/5.3/manual.html#lua_getfield lua_getfield. hslua.Pushes onto the stack the value of the global name.2Errors on the Lua side are caught and rethrown as . Wrapper of  8https://www.lua.org/manual/5.3/manual.html#lua_getglobal lua_getglobal. hsluapIf the value at the given index has a metatable, the function pushes that metatable onto the stack and returns True#. Otherwise, the function returns False! and pushes nothing on the stack. See also:  ;https://www.lua.org/manual/5.3/manual.html#lua_getmetatablelua_getmetatable. hslua Pushes onto the stack the value t[k], where t& is the value at the given index and k& is the value at the top of the stack.This function pops the key from the stack, pushing the resulting value in its place. As in Lua, this function may trigger a metamethod for the "index" event (see  .https://www.lua.org/manual/5.3/manual.html#2.42.4 of lua's manual).2Errors on the Lua side are caught and rethrown as . See also:  7https://www.lua.org/manual/5.3/manual.html#lua_gettable lua_gettable. hsluaReturns the index of the top element in the stack. Because indices start at 1, this result is equal to the number of elements in the stack (and so 0 means an empty stack). See also:  5https://www.lua.org/manual/5.3/manual.html#lua_gettop lua_gettop. hsluaMoves the top element into the given valid index, shifting up the elements above this index to open space. This function cannot be called with a pseudo-index, because a pseudo-index is not an actual stack position. See also:  5https://www.lua.org/manual/5.3/manual.html#lua_insert lua_insert.hsluaReturns True3 if the value at the given index is a boolean, and False otherwise. See also:  8https://www.lua.org/manual/5.3/manual.html#lua_isboolean lua_isboolean.hsluaReturns True6 if the value at the given index is a C function, and False otherwise. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_iscfunctionlua_iscfunction.hsluaReturns TrueG if the value at the given index is a function (either C or Lua), and False otherwise. See also:  9https://www.lua.org/manual/5.3/manual.html#lua_isfunctionlua_isfunction.hsluaReturns Truew if the value at the given index is an integer (that is, the value is a number and is represented as an integer), and False otherwise.hsluaReturns True; if the value at the given index is a light userdata, and False otherwise. See also: < >https://www.lua.org/manual/5.3/manual.html#lua_islightuserdata lua_islightuserdata>.hsluaReturns True$ if the value at the given index is nil, and False otherwise. See also:  4https://www.lua.org/manual/5.3/manual.html#lua_isnil lua_isnil.hsluaReturns True& if the given index is not valid, and False otherwise. See also:  5https://www.lua.org/manual/5.3/manual.html#lua_isnone lua_isnone.hsluaReturns TrueH if the given index is not valid or if the value at the given index is nil, and False otherwise. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_isnoneornillua_isnoneornil.hsluaReturns TrueW if the value at the given index is a number or a string convertible to a number, and False otherwise. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_isnumber lua_isnumber.hsluaReturns Truei if the value at the given index is a string or a number (which is always convertible to a string), and False otherwise. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_isstring lua_isstring.hsluaReturns True1 if the value at the given index is a table, and False otherwise. See also:  6https://www.lua.org/manual/5.3/manual.html#lua_istable lua_istable.hsluaReturns True2 if the value at the given index is a thread, and False otherwise. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_isthread lua_isthread.hsluaReturns TrueL if the value at the given index is a userdata (either full or light), and False otherwise. See also:  9https://www.lua.org/manual/5.3/manual.html#lua_isuserdatalua_isuserdata.hslua\Tests whether the object under the first index is smaller than that under the second. Uses  internally.hslua@Loads a Lua chunk (without running it). If there are no errors, j pushes the compiled chunk as a Lua function on top of the stack. Otherwise, it pushes an error message.The return values of  are: : no errors; &: syntax error during pre-compilation;!: memory allocation error;#: error while running a __gcv metamethod. (This error has no relation with the chunk being loaded. It is generated by the garbage collector.)5This function only loads a chunk; it does not run it.loadi automatically detects whether the chunk is text or binary, and loads it accordingly (see program luac).The G function uses a user-supplied reader function to read the chunk (see =G). The data argument is an opaque value passed to the reader function.The  chunknamef argument gives a name to the chunk, which is used for error messages and in debug information (see  .https://www.lua.org/manual/5.3/manual.html#4.94.9). Note that the  chunkname9 is used as a C string, so it may not contain null-bytes.hslua;Returns the type of the value in the given valid index, or -) for a non-valid (but acceptable) index.See  3https://www.lua.org/manual/5.3/manual.html#lua_typelua_type.hsluaMCreates a new empty table and pushes it onto the stack. It is equivalent to createtable 0 0. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_newtable lua_newtable.hsluaThis function allocates a new block of memory with the given size, pushes onto the stack a new full userdata with the block address, and returns this address. The host program can freely use this memory. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_newuserdatalua_newuserdata. hsluaPops a key from the stack, and pushes a key value pair from the table at the given index (the "next" pair after the given key). If there are no more elements in the table, then next returns False (and pushes nothing).4Errors on the Lua side are caught and rethrown as a . See also:  3https://www.lua.org/manual/5.3/manual.html#lua_nextlua_next.!hsluafOpens all standard Lua libraries into the current state and sets each library name as a global value. See also:  8https://www.lua.org/manual/5.3/manual.html#luaL_openlibs luaL_openlibs."hslua Pushes Lua's base library onto the stack.See  ;https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_base luaopen_base.#hslua Pushes Lua's debug library onto the stack. See also:  <https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_debug luaopen_debug.$hslua Pushes Lua's io library onto the stack. See also:  9https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_io luaopen_io.%hslua Pushes Lua's math library onto the stack. See also:  ;https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_math luaopen_math.&hslua Pushes Lua's os library onto the stack. See also:  9https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_os luaopen_os.'hslua Pushes Lua's package library onto the stack. See also:  >https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_packageluaopen_package.(hslua Pushes Lua's string library onto the stack. See also:  =https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_stringluaopen_string.)hslua Pushes Lua's table library onto the stack. See also:  <https://www.lua.org/manual/5.3/manual.html#pdf-luaopen_table luaopen_table.*hslua#Calls a function in protected mode.Both nargs and nresults have the same meaning as in +. If there are no errors during the call, pcall behaves exactly like #. However, if there is any error, pcallg catches it, pushes a single value on the stack (the error message), and returns the error code. Like , pcall> always removes the function and its arguments from the stack.If msgh is Nothinge, then the error object returned on the stack is exactly the original error object. Otherwise, when msgh is Just idx, the stack index idx is the location of a message handler. (This index cannot be a pseudo-index.) In case of runtime errors, this function will be called with the error object and its return value will be the object returned on the stack by *.Typically, the message handler is used to add more debug information to the error object, such as a stack traceback. Such information cannot be gathered after the return of *&, since by then the stack has unwound.See  4https://www.lua.org/manual/5.3/manual.html#lua_pcall lua_pcall.+hsluaPops n elements from the stack. See also:  2https://www.lua.org/manual/5.3/manual.html#lua_poplua_pop.,hslua;Pushes a boolean value with the given value onto the stack. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_pushbooleanlua_pushboolean.-hslua&Pushes a new C closure onto the stack.pWhen a C function is created, it is possible to associate some values with it, thus creating a C closure (see  .https://www.lua.org/manual/5.1/manual.html#3.43.4Q); these values are then accessible to the function whenever it is called. To associate values with a C function, first these values should be pushed onto the stack (when there are multiple values, the first value is pushed first). Then lua_pushcclosure is called to create and push the C function onto the stack, with the argument ny telling how many values should be associated with the function. lua_pushcclosure also pops these values from the stack.The maximum value for n is 255. See also:  ;https://www.lua.org/manual/5.3/manual.html#lua_pushcclosurelua_pushcclosure..hsluaPushes a C function onto the stack. This function receives a pointer to a C function and pushes onto the stack a Lua value of type function that, when called, invokes the corresponding C function.{Any function to be callable by Lua must follow the correct protocol to receive its parameters and return its results (see >) See also:  <https://www.lua.org/manual/5.3/manual.html#lua_pushcfunctionlua_pushcfunction./hslua-Pushes the global environment onto the stack.Wraps < >https://www.lua.org/manual/5.3/manual.html#lua_pushglobaltable lua_pushglobaltable>.0hslua;Pushes an integer with with the given value onto the stack. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_pushintegerlua_pushinteger.1hslua'Pushes a light userdata onto the stack.NUserdata represent C values in Lua. A light userdata represents a pointer, a Ptr () (i.e., void* in C lingo). It is a value (like a number): you do not create it, it has no individual metatable, and it is not collected (as it was never created). A light userdata is equal to "any" light userdata with the same C address. See also:  @https://www.lua.org/manual/5.3/manual.html#lua_pushlightuserdatalua_pushlightuserdata.2hslua"Pushes a nil value onto the stack.See  6https://www.lua.org/manual/5.3/manual.html#lua_pushnil lua_pushnil.3hslua3Pushes a float with the given value onto the stack.See  9https://www.lua.org/manual/5.3/manual.html#lua_pushnumberlua_pushnumber.4hsluaPushes the zero-terminated string pointed to by s onto the stack. Lua makes (or reuses) an internal copy of the given string, so the memory at s can be freed or reused immediately after the function returns. See also: < 9https://www.lua.org/manual/5.3/manual.html#lua_pushstring lua_pushstring>.5hslua2Pushes the current thread onto the stack. Returns True2 if this thread is the main thread of its state, False otherwise. See also:  9https://www.lua.org/manual/5.3/manual.html#lua_pushthreadlua_pushthread.6hslua?Pushes a copy of the element at the given index onto the stack.See  8https://www.lua.org/manual/5.3/manual.html#lua_pushvalue lua_pushvalue.7hsluaReturns True if the two values in indices idx1 and idx26 are primitively equal (that is, without calling the __eq! metamethod). Otherwise returns False. Also returns False% if any of the indices are not valid. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_rawequal lua_rawequal.8hslua Similar to  4, but does a raw access (i.e., without metamethods). See also:  5https://www.lua.org/manual/5.3/manual.html#lua_rawget lua_rawget.9hslua Pushes onto the stack the value t[n], where tV is the table at the given index. The access is raw, that is, it does not invoke the __index metamethod. See also:  6https://www.lua.org/manual/5.3/manual.html#lua_rawgeti lua_rawgeti.:hsluaReturns the raw "length" of the value at the given index: for strings, this is the string length; for tables, this is the result of the length operator (#) with no metamethods; for userdata, this is the size of the block of memory allocated for the userdata; for other values, it is 0. See also:  5https://www.lua.org/manual/5.3/manual.html#lua_rawlen lua_rawlen.;hslua Similar to C9, but does a raw assignment (i.e., without metamethods). See also:  5https://www.lua.org/manual/5.3/manual.html#lua_rawset lua_rawset.<hsluaDoes the equivalent of t[i] = v, where t& is the table at the given index and v& is the value at the top of the stack.eThis function pops the value from the stack. The assignment is raw, that is, it does not invoke the  __newindex metamethod. See also:  6https://www.lua.org/manual/5.3/manual.html#lua_rawseti lua_rawseti.=hsluaSets the C function f as the new value of global name.See  7https://www.lua.org/manual/5.3/manual.html#lua_register lua_register.>hsluaRemoves the element at the given valid index, shifting down the elements above this index to fill the gap. This function cannot be called with a pseudo-index, because a pseudo-index is not an actual stack position.See  5https://www.lua.org/manual/5.3/manual.html#lua_remove lua_remove.?hsluaMoves the top element into the given valid index without shifting any element (therefore replacing the value at that given index), and then pops the top element.See  6https://www.lua.org/manual/5.3/manual.html#lua_replace lua_replace.@hsluaDoes the equivalent to t[k] = v, where t& is the value at the given index and v& is the value at the top of the stack.This function pops the value from the stack. As in Lua, this function may trigger a metamethod for the "newindex" event (see  .https://www.lua.org/manual/5.3/manual.html#2.42.4# of the Lua 5.3 Reference Manual).4Errors on the Lua side are caught and rethrown as a . See also:  7https://www.lua.org/manual/5.3/manual.html#lua_setfield lua_setfield.AhsluaCPops a value from the stack and sets it as the new value of global name.4Errors on the Lua side are caught and rethrown as a . See also:  8https://www.lua.org/manual/5.3/manual.html#lua_setglobal lua_setglobal.Bhslua_Pops a table from the stack and sets it as the new metatable for the value at the given index. See also: < ;https://www.lua.org/manual/5.3/manual.html#lua_setmetatable lua_setmetatable>.ChsluaDoes the equivalent to t[k] = v, where t# is the value at the given index, v+ is the value at the top of the stack, and k" is the value just below the top.This function pops both the key and the value from the stack. As in Lua, this function may trigger a metamethod for the "newindex" event (see  .https://www.lua.org/manual/5.3/manual.html#2.42.4# of the Lua 5.3 Reference Manual).4Errors on the Lua side are caught and rethrown as a . See also:  7https://www.lua.org/manual/5.3/manual.html#lua_settable lua_settable.DhsluaAccepts any index, or 0, and sets the stack top to this index. If the new top is larger than the old one, then the new elements are filled with nil. If index is 0, then all stack elements are removed. See also:  5https://www.lua.org/manual/5.3/manual.html#lua_settop lua_settop.Ehslua&Returns the status of this Lua thread.The status can be P for a normal thread, an error value if the thread finished the execution of a  lua_resume with an error, or  if the thread is suspended.3You can only call functions in threads with status &. You can resume threads with status  (to start a new coroutine) or  (to resume a coroutine). See also:  5https://www.lua.org/manual/5.3/manual.html#lua_status lua_status.Fhslua^Converts the Lua value at the given index to a haskell boolean value. Like all tests in Lua,  toboolean returns True# for any Lua value different from false and nil; otherwise it returns False:. (If you want to accept only actual boolean values, use  to test the value's type.) See also:  8https://www.lua.org/manual/5.3/manual.html#lua_toboolean lua_toboolean.GhsluajConverts a value at the given index to a C function. That value must be a C function; otherwise, returns Nothing. See also:  :https://www.lua.org/manual/5.3/manual.html#lua_tocfunctionlua_tocfunction.HhsluaRConverts the Lua value at the given acceptable index to the signed integral type ;Z. The Lua value must be an integer, a number or a string convertible to an integer (see  0https://www.lua.org/manual/5.3/manual.html#3.4.33.4.3/ of the Lua 5.3 Reference Manual); otherwise,  tointeger returns Nothing.KIf the number is not an integer, it is truncated in some non-specified way. See also:  8https://www.lua.org/manual/5.3/manual.html#lua_tointeger lua_tointeger.IhsluaConverts the Lua value at the given index to the C type lua_Number. The Lua value must be a number or a string convertible to a number; otherwise, tonumber returns |.See  7https://www.lua.org/manual/5.3/manual.html#lua_tonumber lua_tonumber.JhsluaConverts the value at the given index to a generic C pointer (void*). The value can be a userdata, a table, a thread, or a function; otherwise, lua_topointer returns nullPtru. Different objects will give different pointers. There is no way to convert the pointer back to its original value.GTypically this function is used only for hashing and debug information. See also:  8https://www.lua.org/manual/5.3/manual.html#lua_topointer lua_topointer.Khslua/Converts the Lua value at the given index to a P. The Lua value must be a string or a number; otherwise, the function returns |!. If the value is a number, then KP also changes the actual value in the stack to a string. (This change confuses   when K. is applied to keys during a table traversal.)See  8https://www.lua.org/manual/5.3/manual.html#lua_tolstring lua_tolstring.LhsluaConverts the value at the given index to a Lua thread (represented as lua_State*). This value must be a thread; otherwise, the function returns Nothing. See also:  7https://www.lua.org/manual/5.3/manual.html#lua_tothread lua_tothread.MhsluaIf the value at the given index is a full userdata, returns its block address. If the value is a light userdata, returns its pointer. Otherwise, returns Nothing.. See also:  9https://www.lua.org/manual/5.3/manual.html#lua_touserdatalua_touserdata.Nhslua2Returns the name of the type encoded by the value tp,, which must be one the values returned by . See also:  7https://www.lua.org/manual/5.3/manual.html#lua_typename lua_typename.Ohslua-Returns the pseudo-index that represents the i*-th upvalue of the running function (see  .https://www.lua.org/manual/5.3/manual.html#4.44.4# of the Lua 5.3 reference manual). See also:  ;https://www.lua.org/manual/5.3/manual.html#lua_upvalueindexlua_upvalueindex.hsluaindex1hsluaindex2T      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOr 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _Phslua2Key, in the registry, for table of loaded modules.Qhslua5Key, in the registry, for table of preloaded loaders.Rhslua Loads and runs the given string.Returns Y on success, or an error if either loading of the string or calling of the thunk failed.ShsluaLoads and runs the given file. Note that the filepath is interpreted by Haskell, not Lua. The resulting chunk is named using the UTF8 encoded filepath.Thslua Pushes onto the stack the field e, from the metatable of the object at index obj and returns the type of the pushed value. If the object does not have a metatable, or if the metatable does not have this field, pushes nothing and returns TypeNil.Uhslua9Pushes onto the stack the metatable associated with name tname in the registry (see  newmetatable) (nil\ if there is no metatable associated with that name). Returns the type of the pushed value.Vhslua8Push referenced value from the table at the given index.WhsluaEnsures that the value t[fname], where t is the value at index idx, is a table, and pushes that table onto the stack. Returns True if it finds a previous table there and False if it creates a new table.Xhslua"Loads a ByteString as a Lua chunk.*This function returns the same results as . nameO is the chunk name, used for debug information and error messages. Note that name9 is used as a C string, so it may not contain null-bytes.See  :https://www.lua.org/manual/5.3/manual.html#luaL_loadbufferluaL_loadbuffer.Yhslua0Loads a file as a Lua chunk. This function uses lua_load (see k) to load the chunk in the file named filename. The first line in the file is ignored if it starts with a #.%The string mode works as in function .*This function returns the same results as ", but it has an extra error code $B for file-related errors (e.g., it cannot open or read the file).As :, this function only loads the chunk; it does not run it.1Note that the file is opened by Haskell, not Lua.See  8https://www.lua.org/manual/5.3/manual.html#luaL_loadfile luaL_loadfile.Zhslua2Loads a string as a Lua chunk. This function uses lua_loadb to load the chunk in the given ByteString. The given string may not contain any NUL characters.*This function returns the same results as lua_load (see ).Also as :, this function only loads the chunk; it does not run it.See  :https://www.lua.org/manual/5.3/manual.html#luaL_loadstringluaL_loadstring.[hslua3If the registry already has the key tname, returns Falsek. Otherwise, creates a new table to be used as a metatable for userdata, adds to this new table the pair __name = tname , adds to the registry the pair [tname] = new table, and returns True . (The entry __name- is used by some error-reporting functions.)DIn both cases pushes onto the stack the final value associated with tname in the registry. The value of tname> is used as a C string and hence must not contain null bytes. See also:  <https://www.lua.org/manual/5.3/manual.html#luaL_newmetatableluaL_newmetatable.\hslua"Creates a new Lua state. It calls  lua_newstate, with an allocator based on the standard C realloc/ function and then sets a panic function (see  .https://www.lua.org/manual/5.3/manual.html#4.64.6v of the Lua 5.3 Reference Manual) that prints an error message to the standard error output in case of fatal errors. See also:  8https://www.lua.org/manual/5.3/manual.html#luaL_newstate luaL_newstate.]hslua7Creates and returns a reference, in the table at index t@, for the object at the top of the stack (and pops the object).aA reference is a unique integer key. As long as you do not manually add integer keys into table t, refa ensures the uniqueness of the key it returns. You can retrieve an object referred by reference r by calling  rawgeti t r . Function `. frees a reference and its associated object..If the object at the top of the stack is nil, ] returns the constant . The constant ? is guaranteed to be different from any reference returned by ]. See also:  3https://www.lua.org/manual/5.3/manual.html#luaL_refluaL_ref.^hslua/Converts any Lua value at the given index to a k in a reasonable format. The resulting string is pushed onto the stack and also returned by the function.$If the value has a metatable with a  __tostring field, then  tolstring'p calls the corresponding metamethod with the value as argument, and uses the result of the call as its result._hsluaCreates and pushes a traceback of the stack L1. If a message is given it appended at the beginning of the traceback. The level parameter tells at which level to start the traceback.`hsluaReleases reference ] from the table at index idx (see ]f). The entry is removed from the table, so that the referred object can be collected. The reference ] is also freed to be used again. See also:  5https://www.lua.org/manual/5.3/manual.html#luaL_unref luaL_unref.ThsluaobjhsluaeUhsluatnameXhsluaProgram to loadhslua chunk nameYhsluafilename`hsluaidxhsluarefPQRSTUVWXYZ[\]^_`r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _  !"#$%'&()*+,-./01234569:;<>?@ABCDEFGHIJKLMPQRSTYZ[\]^_`ab      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCRSPDEFGHIJKLMQT>;<9:^]_`  O?@\ D6 +>?,-./0123456)*+YZNFGHIJKLM:%'&([7,.-012345  89 AC@;<B*XYZ !"#$\E /="#$!%'&()RSTUW[^_]V`abPQ 2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaPortableNone _ ahslua(Function to push a value to Lua's stack.bhslua Pushes a s as a Lua boolean.chslua Pushes a " value as an UTF-8 encoded string.dhslua Pushes a  as a raw string.ehsluaPushes a lazy  as a raw string.fhslua Pushes a  as an UTF-8 encoded Lua string.ghslua Pushes an Integer to the Lua stack. Values representable as Lua integers are pushed as such; bigger integers are represented using their string representation.hhsluaPush a floating point number to the Lua stack. Uses a string representation for all types which do not match the float properties of the 9 type.ihslua'Push list as numerically indexed table.jhsluaPush  as default key-value Lua table.khsluaPush a K as idiomatic Lua set, i.e., as a table with the set elements as keys and true as values. abcdefghijk abghdefcijkr 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>beta&FlexibleInstances, ScopedTypeVariablesNone =?X_lhslua,A value that can be pushed to the Lua stack.mhsluaNPushes a value onto Lua stack, casting it into meaningfully nearest Lua type.hslua7Set numeric key/value in table at the top of the stack.ilmlmi  2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betaPortableNone _0hslua.Function to retrieve a value from Lua's stack.hsluaGList of errors which occurred while retrieving a value from the stack.hslua*Create a peek error from an error message.hslua*Add a message to the peek traceback stack.hslua4Add context information to the peek traceback stack.hsluaJForce creation of a result, throwing an exception if that's not possible.hslua!Convert an old peek funtion to a .hsluaUse test+ to check whether the value at stack index n has the correct type and use peekfnd to convert it to a Haskell value if possible. A successfully received value is wrapped using the 0 constructor, while a type mismatch results in Left PeekError with the given error message.hslua]Report the expected and actual type of the value under the given index if conversion failed.hsluaGReturn a Result error containing a message about the assertion failure.hslua Retrieves a s as a Lua boolean.hsluaLike @Ku, but ensures that the value at the given index is not silently converted to a string, as would happen with numbers.hslua Retrieves a  as a raw string.hsluaRetrieves a lazy  as a raw string.hslua Retrieves a  as an UTF-8 encoded Lua string.hslua Retrieves a " value as an UTF-8 encoded string.hslua Retrieves an  value from the Lua stack.hslua Retrieve a ; (e.g., x or w) from the stack.hslua"Reads a numerically indexed table t into a list, where the _ of the list is equal to #t/. The operation will fail if a numerical field n with  1 "d n < #t is missing.hslua#Retrieves a key-value Lua table as .hslua"Read a table into a list of pairs.hsluaGet the next key-value pair from a table. Assumes the last key to be on the top of the stack and the table at the given index idx?. The next key, if it exists, is left at the top of the stack.hslua Retrieves a  from an idiomatic Lua representation. A set in Lua is idiomatically represented as a table with the elements as keys. Elements with falsy values are omitted.hslua expected typehsluapre-condition checker r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None =>?X_E~ hslua,A value that can be read from the Lua stack.hsluaCheck if at index nB there is a convertible Lua value and if so return it. Throws a  otherwise.hsluaUse test+ to check whether the value at stack index n has the correct type and use peekfn to convert it to a haskell value if possible. Throws and exception if the test failes with the expected type name as part of the message.hslua]Report the expected and actual type of the value under the given index if conversion failed.hsluaGReturn a Result error containing a message about the assertion failure.hsluaRead a table into a listhslua"Read a table into a list of pairs.hsluaGet the next key-value pair from a table. Assumes the last key to be on the top of the stack and the table at the given index idx.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.hslua*Helper function to get the nth table valuehslua expected typehsluapre-condition Checkerhsluaretrieval function r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _] hsluaSee 9https://www.lua.org/manual/5.3/manual.html#luaL_testudataluaL_testudatahsluaFunction to free the stable pointer in a userdata, ensuring the Haskell value can be garbage collected. This function does not call back into Haskell, making is safe to call even from functions imported as unsafe.hslua0Push data by wrapping it into a userdata object.hsluaPush data by wrapping it into a userdata object, using the object at the top of the stack after performing the given operation as metatable.hslua}Push the metatable used to define the behavior of the given value in Lua. The table will be created if it doesn't exist yet.hslua)Retrieve data which has been pushed with .hslua)Retrieve data which has been pushed with ), where *name* must is the value of the __name field of the metatable.hslua:Retrieve Haskell data which was pushed to Lua as userdata.hsluaReturn the default name for userdata to be used when wrapping an object as the given type as userdata. The argument is never evaluated.hsluaoperation to push the metatablehsluaobject to push to Lua.hslua7name of the registered metatable which should be used.hsluazset additional properties; this operation will be called with the newly created metadata table at the top of the stack.hsluaexpected metatable name 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None __ilm r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _hsluaNewtype wrapper intended to be used for optional Lua values. Nesting this type is strongly discouraged as missing values on inner levels are indistinguishable from missing values on an outer level; wrong values would be the likely result.hsluaRun Lua computation using the default HsLua state as starting point. Exceptions are masked, thus avoiding some issues when using multiple threads. All exceptions are passed through; error handling is the responsibility of the caller.hsluaRun Lua computation using the default HsLua state as starting point. Conversion from Lua errors to Haskell exceptions can be controlled through H.hsluaRun the given Lua computation; exceptions raised in haskell code are caught, but other exceptions (user exceptions raised in haskell, unchecked type errors, etc.) are passed through.hsluaRun Lua computation with the given Lua state and the default error-to-exception converter. Exception handling is left to the caller.hsluaHConversions between Lua errors and Haskell exceptions; only deals with s.hsluaLike  getglobal2, but knows about packages and nested tables. E.g. getglobal' "math.sin"will return the function sin in package math.hsluaLike  setglobal2, but knows about packages and nested tables. E.g. 1pushstring "0.9.4" setglobal' "mypackage.version"=All tables and fields, except for the last field, must exist.hslua=Gives the list of the longest substrings not containing dots.hsluaPushes the value described by the strings to the stack; where the first value is the name of a global variable and the following strings are the field values in nested tables.hslua=Raise a Lua error, using the given value as the error object.hslua8Get a value by retrieving a String from Lua, then using - to convert the String into a Haskell value.hsluaOTry to convert the value at the given stack index to a Haskell value. Returns Left" with an error message on failure.<WARNING: this is not save to use with custom error handling!hsluawGet, then pop the value at the top of the stack. The pop operation is executed even if the retrieval operation failed.   r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>beta@FlexibleInstances, ForeignFunctionInterface, ScopedTypeVariablesNone =>?X_hslua<Helper class used to make lua functions useable from haskellhsluaOperations and functions that can be pushed to the Lua stack. This is a helper function not intended to be used directly. Use the  wrapper instead.hsluaHelper function, called by hslua-Haskell function that can be called from Lua.hslua4Type of raw Haskell functions that can be made into >s.hsluaiConvert callable userdata at top of stack into a CFunction, translating errors to Lua errors. Use with -.hsluaTurn a  into an actual >.hsluaaConvert a Haskell function to Lua function. Any Haskell function can be converted provided that:all arguments are instances of return type is Lua a, where a is an instance of lAny : will be converted to a string and returned as Lua error. Important : this does not catch exceptions other than w; exception handling must be done by the converted Haskell function. Failure to do so will cause the program to crash.uE.g., the following code could be used to handle an Exception of type FooException, if that type is an instance of  and l: ItoHaskellFunction (myFun `catchM` (\e -> raiseError (e :: FooException)))hsluauCreate new foreign Lua function. Function created can be called by the Lua engine. Remeber to free the pointer with  freecfunction.hslua#Free function pointer created with  newcfunction.hsluaCall a Lua function. Use as: 1v <- callfunc "proc" "abc" (1::Int) (5.0::Double)hslua;Imports a Haskell function and registers it at global name.hsluafPushes Haskell function as a callable userdata. All values created will be garbage collected. Use as: +pushHaskellFunction myfun setglobal "myfun"6Error conditions should be indicated by raising a Lua  or by returning the result of .hsluaGConverts a pre C function to a Lua function and pushes it to the stack.@Pre C functions collect parameters from the stack and return a ; that represents number of return values left on the stack.hsluaCall the Haskell function stored in the userdata. This function is exported as a C function and then re-imported in order to get a C function pointer.lmlm 2019-2020 Albert KrewinkelMIT,Albert Krewinkel <albert+hslua@zeitkraut.de>alphaRequires GHC 8 or later.None _hsluaALoad a module, defined by a Haskell action, under the given name. Similar to  luaL_required(: After checking "loaded" table, calls pushMod= to push a module to the stack, and registers the result in package.loaded table.The pushMod function must push exactly one element to the top of the stack. This is not checked, but failure to do so will lead to problems. Lua's packageD module must have been loaded by the time this function is invoked.)Leaves a copy of the module on the stack.hsluahRegisters a preloading function. Takes an module name and the Lua operation which produces the package.hslua@Add a string-indexed field to the table at the top of the stack.hsluaNAttach a function to the table at the top of the stack, using the given name.hslua(Create a new module (i.e., a Lua table).r 2007 2012 Gracjan Polak, 2012 2016 mer Sinan Aacan, 2017-2020 Albert KrewinkelMIT,Albert Krewinkel <tarleb+hslua@zeitkraut.de>betanon-portable (depends on GHC)None _u  !"#$%'&()*+,-./01234569:;<>?@ABCDEFGHIJKLMPQRSTYZ[\]^_`ab      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ilm%lmi !"##$%%&''())*+,-./01234456789:;<=>?@ABBCDEFGHIJKLMNOOPPQRSSTUUVWXXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                  !"#$%&'()*+,-./01234565758595:5;5<5= > ? @ A B C   DEFEGEHIJKLMNOPQRSTUVWXYZ[\]^_`a`b`c`defeghijklmnmompmqmrmsmtmumvmwmxmymz{|{}{~{{P@?mmmmmmm mmEE`````5                           ! " #$"hslua-1.1.1-IXqABYlLj1vAJYUJupHyU6Foreign.Lua.Core.TypesForeign.Lua.Utf8Foreign.Lua.Core.ErrorForeign.Lua.Core.RawBindingsForeign.Lua.Core.ConstantsForeign.Lua.CoreForeign.Lua.PushForeign.Lua.Types.PushableForeign.Lua.PeekForeign.Lua.Types.PeekableForeign.Lua.UserdataForeign.Lua.UtilForeign.Lua.FunctionCallingForeign.Lua.ModulePreludeLuaNumberForeign.Lua.Core.FunctionsloadgettopForeign.Lua.Core.AuxiliaryrefnilnorefForeign.Lua.TypesControl.Monad.Catch MonadCatch Foreign.LuabaseControl.Monad.IO.ClassliftIOtoStringtoText fromStringfromText ReferenceRefNil NumResultsfromNumResultsNumArgs fromNumArgs StackIndexfromStackIndex GCCONTROLGCSTOP GCRESTART GCCOLLECTGCCOUNTGCCOUNTBGCSTEP GCSETPAUSE GCSETSTEPMUL StatusCodeStatusOKYieldErrRun ErrSyntaxErrMemErrErrErrGcmmErrFileRelationalOperatorEQLTLETypeCode fromTypeCodeTypeTypeNoneTypeNil TypeBooleanTypeLightUserdata TypeNumber TypeString TypeTable TypeFunction TypeUserdata TypeThreadLuaBoolIntegerReader CFunctionStateunLuaLuaEnvironmentluaEnvErrorConversion luaEnvStateErrorConversionerrorToExceptionaddContextToException alternativeexceptionToErrorliftLualiftLua1stateerrorConversionrunWithConverter unsafeRunWithunsafeErrorConversiontruefalse fromLuaBool toLuaBoolfromTypetoTypefromRelationalOperatortoStatus nthFromTop nthFromBottomstackTop stackBottom fromReference toReference $fEnumType $fEqState$fGenericState$fBoundedInteger $fEnumInteger $fEqInteger$fIntegralInteger $fNumInteger $fOrdInteger $fRealInteger $fShowInteger $fEqNumber$fFloatingNumber$fFractionalNumber $fNumNumber $fOrdNumber $fRealNumber$fRealFloatNumber$fRealFracNumber $fShowNumber $fEqLuaBool$fStorableLuaBool $fShowLuaBool $fBoundedType$fEqType $fOrdType $fShowType $fEqTypeCode $fOrdTypeCode$fShowTypeCode$fEqRelationalOperator$fOrdRelationalOperator$fShowRelationalOperator $fEqStatus $fShowStatus$fEqStatusCode$fEnumGCCONTROL $fEqGCCONTROL$fOrdGCCONTROL$fShowGCCONTROL$fEnumStackIndex$fEqStackIndex$fNumStackIndex$fOrdStackIndex$fShowStackIndex $fEqNumArgs $fNumNumArgs $fOrdNumArgs $fShowNumArgs$fEqNumResults$fNumNumResults$fOrdNumResults$fShowNumResults$fApplicativeLua $fFunctorLua $fMonadLua$fMonadCatchLua $fMonadIOLua$fMonadMaskLua$fMonadReaderLua$fMonadThrowLua $fEqReference$fShowReferenceFailable ExceptionexceptionMessagethrowExceptioncatchExceptionwithExceptionMessagetrythrowErrorAsExceptionthrowTopMessagethrowTopMessageWithState throwMessage errorMessagehsluaErrorRegistryField fromFailable throwOnErrorboolFromFailable$fAlternativeLua$fExceptionException$fShowException $fEqExceptionlua_open_package_ptrlua_open_debug_ptrlua_open_math_ptrlua_open_string_ptrlua_open_os_ptrlua_open_io_ptrlua_open_table_ptrlua_open_base_ptr luaL_openlibslua_pushglobaltable hslua_concat hslua_next hslua_errorlua_gc lua_statuslua_load lua_pcallhslua_setgloballua_setmetatable lua_rawseti lua_rawsethslua_settablehslua_getgloballua_getmetatablelua_newuserdatalua_createtable lua_rawgeti lua_rawgethslua_gettablelua_pushthreadlua_pushlightuserdatalua_pushbooleanlua_pushcclosurelua_pushlstringlua_pushintegerlua_pushnumber lua_pushnil lua_rawlenlua_touserdata lua_tothread lua_topointer lua_tolstring lua_tonumberxlua_tointegerxlua_tocfunction lua_toboolean lua_rawequal hslua_compare lua_typenamelua_typelua_isuserdatalua_iscfunction lua_isstring lua_isinteger lua_isnumberlua_checkstack lua_replace lua_insert lua_removelua_copy lua_pushvalue lua_settop lua_gettop lua_absindex lua_closemultret registryindexabsindexcall checkstackclosecompareconcatcopy createtableequalerrorgcgetfield getglobal getmetatablegettableinsert isboolean iscfunction isfunction isintegerislightuserdataisnilisnone isnoneornilisnumberisstringistableisthread isuserdatalessthanltypenewtable newuserdatanextopenlibsopenbase opendebugopenioopenmathopenos openpackage openstring opentablepcallpop pushboolean pushcclosure pushcfunctionpushglobaltable pushintegerpushlightuserdatapushnil pushnumber pushstring pushthread pushvaluerawequalrawgetrawgetirawlenrawsetrawsetiregisterremovereplacesetfield setglobal setmetatablesettablesettopstatus toboolean tocfunction tointegertonumber topointertostringtothread touserdatatypename upvalueindexloadedTableRegistryFieldpreloadTableRegistryFielddostringdofile getmetafield getmetatable'getref getsubtable loadbufferloadfile loadstring newmetatablenewstateref tostring' tracebackunrefPusherpushBoolpushTextpushByteStringpushLazyByteString pushString pushIntegral pushRealFloatpushListpushMappushSetPushablepush$fPushable(,,,,,,,)$fPushable(,,,,,,)$fPushable(,,,,,)$fPushable(,,,,)$fPushable(,,,)$fPushable(,,) $fPushable(,) $fPushableSet $fPushableMap $fPushable[] $fPushable[]0$fPushableDouble$fPushableFloat $fPushableInt$fPushableInteger$fPushableByteString$fPushableText $fPushablePtr$fPushableFunPtr$fPushableBool$fPushableByteString0$fPushableNumber$fPushableInteger0 $fPushable()Peeker PeekError fromPeekErrorerrorMsgforcetoPeekerpeekBoolpeekByteStringpeekLazyByteString peekStringpeekText peekIntegral peekRealFloatpeekListpeekMappeekKeyValuePairspeekSet $fEqPeekError$fShowPeekErrorPeekablepeekreportValueOnFailure$fPeekable(,,,,,,,)$fPeekable(,,,,,,)$fPeekable(,,,,,)$fPeekable(,,,,)$fPeekable(,,,)$fPeekable(,,) $fPeekable(,) $fPeekableSet $fPeekableMap $fPeekable[] $fPeekable[]0$fPeekableDouble$fPeekableFloat $fPeekableInt$fPeekableInteger$fPeekableByteString$fPeekableText$fPeekableState $fPeekablePtr$fPeekableFunPtr$fPeekableBool$fPeekableByteString0$fPeekableNumber$fPeekableInteger0 $fPeekable()pushAnypushAnyWithMetatableensureUserdataMetatabletoAny toAnyWithNamepeekAny metatableNameOptional fromOptionalrunrun' runEitherrunWith getglobal' setglobal' raiseErrorpeekRead peekEitherpopValue$fPushableOptional$fPeekableOptional LuaCallFunc callFunc'ToHaskellFunctiontoHsFunHaskellFunction PreCFunctiontoHaskellFunction newCFunction freeCFunctioncallFuncregisterHaskellFunctionpushHaskellFunctionpushPreCFunction$fToHaskellFunction->$fToHaskellFunctionLua$fToHaskellFunctionLua0$fLuaCallFunc->$fLuaCallFuncLua requirehs preloadhsaddfield addfunctioncreateGHC.Base++ghc-primGHC.PrimseqGHC.Listfilterzip System.IOprint Data.Tuplefstsnd otherwisemap$GHC.Real fromIntegral realToFracGHC.EnumBoundedminBoundmaxBoundEnumenumFrom enumFromThenenumFromThenTo enumFromTofromEnumtoEnumsuccpred GHC.ClassesEq==/= GHC.FloatFloatingpiexplogsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanh Fractional fromRational/recipIntegral toIntegerquotremdivmodquotRemdivModMonad>>=>>returnFunctorfmap<$GHC.NumNum+*-negate fromIntegerabssignumOrd>=minmax><<=GHC.ReadRead readsPrecreadListReal toRational RealFloat floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2RealFracproperFractiontruncateroundceilingfloorGHC.ShowShow showsPrecshowshowListControl.Monad.Fail MonadFailfail Applicativepure<*>*><* Data.FoldableFoldablefoldrfoldMapnulllengthfoldlfoldl1sumproductfoldr1maximumminimumelemData.Traversable TraversabletraversemapM sequenceAsequence Semigroup<>Monoidmemptymappendmconcat GHC.TypesBoolFalseTrueCharDoubleFloatInt integer-gmpGHC.Integer.Type GHC.MaybeMaybeNothingJustOrderingGTRationalIOWord Data.EitherEitherLeftRightreadIOreadLn appendFile writeFilereadFileinteract getContentsgetLinegetCharputStrLnputStrputCharGHC.IO.ExceptionioErrorGHC.IOFilePath userErrorIOErrornotElemallanyorand concatMap sequence_mapM_ Data.OldListunwordswordsunlineslines Text.Readreadreadseitherlex readParenText.ParserCombinators.ReadPReadS Data.Functor<$>lcmgcd^^^oddeven showParen showStringshowCharshowsShowSunzip3unzipzipWith3zipWithzip3!!lookupreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrscanl1scanlinitlasttailhead Data.MaybemaybeuncurrycurrysubtractasTypeOfuntil$!flip.constid=<<StringGHC.Err undefinederrorWithoutStackTrace&&||notbytestring-0.10.8.2Data.ByteString.Internal ByteString text-1.2.3.1Data.Text.InternalTextForeign.C.TypesCIntGHC.IntInt64 ensureTableData.ByteString.Lazy.Internalcontainers-0.6.0.1Data.Map.InternalMapData.Set.InternalSet addRawIntpushMsg retrieving typeChecked mismatchError toByteStringnextPair inContextnthValueluaL_testudatahslua_userdata_gc_ptrdefaultErrorConversionsplitdot getnested readMaybehslua_call_hs_ptr mkWrapperhslua_call_wrapped_hs_fun