HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehslua-packaging-2.4.1Haskell2010

HsLua.Packaging.Function

Marshaling and documenting Haskell functions.

Contents
  1. Creating documented functions
  2. Types
  3. Operators
  4. Modifying functions
  5. Pushing to Lua
  6. Convenience functions
  7. Internal
Synopsis

Creating documented functions

valuedefun :: Name -> a -> HsFnPrecursor e a

Begin wrapping a monadic Lua function such that it can be turned into a documented function exposable to Lua.

valuelambda :: a -> HsFnPrecursor e a

Just like defun, but uses an empty name for the documented function. Should be used when defining methods or operators.

valueliftPure :: (a -> b) -> a -> LuaE e b

Turns a pure function into a monadic Lua function.

The resulting function is strict.

valueliftPure2 :: (a -> b -> c) -> a -> b -> LuaE e c

Turns a binary function into a Lua function.

The resulting function is strict in both its arguments.

valueliftPure3 :: (a -> b -> c -> d) -> a -> b -> c -> LuaE e d

Turns a ternary function into a Lua function.

The resulting function is strict in all of its arguments.

valueliftPure4 :: (a -> b -> c -> d -> e) -> a -> b -> c -> d -> LuaE err e

Turns a quarternary function into a Lua function.

The resulting function is strict in all of its arguments.

valueliftPure5
  1. :: a -> b -> c -> d -> e -> f
  2. -> a
  3. -> b
  4. -> c
  5. -> d
  6. -> e
  7. -> LuaE err f

Turns a quinary function into a Lua function.

The resulting function is strict in all of its arguments.

Types

Operators

Modifying functions

Pushing to Lua

Convenience functions

valueoptionalParameter
  1. :: Peeker e a

    method to retrieve the value from Lua

  2. -> TypeSpec

    expected Lua type

  3. -> Text

    parameter name

  4. -> Text

    parameter description

  5. -> Parameter e (Maybe a)

Deprecated. Use `opt (parameter ...)` instead.

Creates an optional parameter.

DEPRECATED: Use opt (parameter ...) instead.

Internal