Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
IThingAll :: l -> Name l -> ImportSpec lhaskell-src-exts Language.Haskell.Exts.Syntax T(..): a class imported with all of its methods, or a datatype imported with all of its constructors.
-
haskell-src-exts Language.Haskell.Exts.Syntax No documentation available.
TyForall :: l -> Maybe [TyVarBind l] -> Maybe (Context l) -> Type l -> Type lhaskell-src-exts Language.Haskell.Exts.Syntax qualified type
-
haskell-src-exts Language.Haskell.Exts.Syntax No documentation available.
-
haskell-src-exts Language.Haskell.Exts.Syntax No documentation available.
-
haskell-src-exts Language.Haskell.Exts.Syntax No documentation available.
-
hmatrix Numeric.LinearAlgebra.Static No documentation available.
call :: LuaError e => NumArgs -> NumResults -> LuaE e ()hslua-core HsLua.Core Calls 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 is propagated as exception of type e. The following example shows how the host program can do the equivalent to this Lua code:
a = f("how", t.x, 14)Here it is in Haskell (assuming the OverloadedStrings language extension):getglobal "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 lua_call.callTrace :: LuaError e => NumArgs -> NumResults -> LuaE e ()hslua-core HsLua.Core Like call, but adds a traceback if an error occurs.
pcall :: NumArgs -> NumResults -> Maybe StackIndex -> LuaE e Statushslua-core HsLua.Core Calls a function in protected mode. Both nargs and nresults have the same meaning as in call. If there are no errors during the call, pcall behaves exactly like call. However, if there is any error, pcall catches it, pushes a single value on the stack (the error message), and returns the error code. Like call, pcall always removes the function and its arguments from the stack. If msgh is Nothing, 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 pcall. 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 pcall, since by then the stack has unwound. This function wraps lua_pcall.