hslua-classes-2.0.0: Type classes for HsLua
Copyright© 2007–2012 Gracjan Polak
2012–2016 Ömer Sinan Ağacan
2017-2021 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+hslua@zeitkraut.de>
Stabilitybeta
PortabilityFlexibleInstances, ForeignFunctionInterface, ScopedTypeVariables
Safe HaskellNone
LanguageHaskell2010

HsLua.Class.Invokable

Description

Call Lua functions from Haskell.

Synopsis

Documentation

class PeekError e => Invokable e a where Source #

Helper class used to make Lua functions useable from Haskell.

Methods

addArg :: Name -> LuaE e () -> NumArgs -> a Source #

Instances

Instances details
(Pushable a, PeekError e, Invokable e b) => Invokable e (a -> b) Source # 
Instance details

Defined in HsLua.Class.Invokable

Methods

addArg :: Name -> LuaE e () -> NumArgs -> a -> b Source #

(PeekError e, Peekable a) => Invokable e (LuaE e a) Source # 
Instance details

Defined in HsLua.Class.Invokable

Methods

addArg :: Name -> LuaE e () -> NumArgs -> LuaE e a Source #

invoke :: forall e a. Invokable e a => Name -> a Source #

Invoke a Lua function. Use as:

v <- invoke "proc" "abc" (1::Int) (5.0::Double)