Haskell equivallent to CFunction, i.e., function callable from Lua.
Constructors
Instances1HasName
HasName (DocumentedFunction e)Defined in hslua-packaging-2.4.1 · HsLua.Packaging.Types
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
Modulehslua-packaging-2.4.1Haskell2010
Marshaling and documenting Haskell functions.
Haskell equivallent to CFunction, i.e., function callable from Lua.
HasName (DocumentedFunction e)Defined in hslua-packaging-2.4.1 · HsLua.Packaging.TypesBegin wrapping a monadic Lua function such that it can be turned into a documented function exposable to Lua.
Just like defun, but uses an empty name for the documented
function. Should be used when defining methods or operators.
Partially apply a parameter.
Like returnResult, but returns only a single result.
Take a HaskellFunction precursor and convert it into a full HaskellFunction, using the given FunctionResults to return the result to Lua.
Take a HaskellFunction precursor and convert it into a full HaskellFunction, using the given FunctionResults to return the result to Lua.
Updates the description of a Haskell function. Leaves the function unchanged if it has no documentation.
Turns a pure function into a monadic Lua function.
The resulting function is strict.
Turns a binary function into a Lua function.
The resulting function is strict in both its arguments.
Turns a ternary function into a Lua function.
The resulting function is strict in all of its arguments.
Turns a quarternary function into a Lua function.
The resulting function is strict in all of its arguments.
Turns a quinary function into a Lua function.
The resulting function is strict in all of its arguments.
Function parameter.
Result of a call to a Haskell function.
List of function results in the order in which they are returned in Lua.
Like ($), but left associative.
Inline version of applyParameter.
Inline version of returnResults.
Return a flexible number of results that have been pushed by the function action.
Inline version of updateFunctionDescription.
Sets the library version at which the function was introduced in its current form.
Pushes a documented Haskell function to the Lua stack, making it usable as a normal function in Lua. At the same time, the function docs are registered in the documentation table.
parameter Creates a parameter.
Makes a parameter optional.
optionalParameter Deprecated. Use `opt (parameter ...)` instead.
Creates an optional parameter.
DEPRECATED: Use opt (parameter ...) instead.
functionResult :: Pusher e amethod to push the Haskell result to Lua
-> TypeSpecLua type of result
-> Textresult description
-> FunctionResults e aCreates a function result.
Helper type used to create HaskellFunctions.
Functor (HsFnPrecursor e)Defined in hslua-packaging-2.4.1 · HsLua.Packaging.FunctionCreate a HaskellFunction precursor from a monadic function, selecting the stack index after which the first function parameter will be placed.