Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. Call :: Operation

    hslua-packaging HsLua.Packaging.UDType

    The call operation func(args). This event happens when Lua tries to call a non-function value (that is, func is not a function). The metamethod is looked up in func. If present, the metamethod is called with func as its first argument, followed by the arguments of the original call (args). All results of the call are the result of the operation. (This is the only metamethod that allows multiple results.)

  2. lua_pcall :: State -> NumArgs -> NumResults -> StackIndex -> IO StatusCode

    lua Lua

    Calls a function in protected mode. 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 lua_pcall; 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 LUA_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. If there is any error, lua_pcall catches it, pushes a single value on the stack (the error message), and returns the error code. lua_pcall always removes the function and its arguments from the stack. If msgh is 0, then the error object returned on the stack is exactly the original error object. Otherwise, msgh 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 lua_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 lua_pcall, since by then the stack has unwound. https://www.lua.org/manual/5.4/manual.html#lua_pcall.

  3. module Lua.Call

    Function to push Haskell functions as Lua C functions. Haskell functions are converted into C functions in a two-step process. First, a function pointer to the Haskell function is stored in a Lua userdata object. The userdata gets a metatable which allows to invoke the object as a function. The userdata also ensures that the function pointer is freed when the object is garbage collected in Lua. In a second step, the userdata is then wrapped into a C closure. The wrapping function calls the userdata object and implements the error protocol, converting special error values into proper Lua errors.

  4. lua_pcall :: State -> NumArgs -> NumResults -> StackIndex -> IO StatusCode

    lua Lua.Primary

    Calls a function in protected mode. 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 lua_pcall; 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 LUA_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. If there is any error, lua_pcall catches it, pushes a single value on the stack (the error message), and returns the error code. lua_pcall always removes the function and its arguments from the stack. If msgh is 0, then the error object returned on the stack is exactly the original error object. Otherwise, msgh 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 lua_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 lua_pcall, since by then the stack has unwound. https://www.lua.org/manual/5.4/manual.html#lua_pcall.

  5. tally :: (Manifest r e, Load r ix e, Ord e) => Array r ix e -> Vector DS (e, Int)

    massiv Data.Massiv.Array

    Count number of occurrences of each element in the array. Results will be sorted in ascending order of the element.

    Example

    >>> import Data.Massiv.Array as A
    
    >>> xs = fromList Seq [2, 4, 3, 2, 4, 5, 2, 1] :: Array P Ix1 Int
    
    >>> xs
    Array P Seq (Sz1 8)
    [ 2, 4, 3, 2, 4, 5, 2, 1 ]
    
    >>> tally xs
    Array DS Seq (Sz1 5)
    [ (1,1), (2,3), (3,1), (4,2), (5,1) ]
    

  6. evalLazyArray :: Index ix => Array BL ix e -> Array B ix e

    massiv Data.Massiv.Array.Manifest

    O(n) - Evaluate all elements of a boxed lazy array to weak head normal form

  7. mallocCompute :: (Size r, Load r ix e, Storable e) => Array r ix e -> IO (Array S ix e)

    massiv Data.Massiv.Array.Manifest

    Very similar to computeAs S except load the source array into memory allocated with malloc on C heap. It can potentially be useful when iteroperating with some C programs.

  8. mallocCopy :: (Index ix, Storable e) => Array S ix e -> IO (Array S ix e)

    massiv Data.Massiv.Array.Manifest

    Allocate memory on C heap with malloc and copy the source array over.

  9. unsafeMallocMArray :: (Index ix, Storable e, PrimMonad m) => Sz ix -> m (MArray (PrimState m) S ix e)

    massiv Data.Massiv.Array.Unsafe

    Allocate memory using malloc on C heap, instead of on Haskell heap. Memory is left uninitialized

  10. sall :: Stream r ix e => (e -> Bool) -> Array r ix e -> Bool

    massiv Data.Massiv.Vector

    Examples

Page 507 of many | Previous | Next