hslua-classes-2.1.0: Type classes for HsLua
Copyright© 2007–2012 Gracjan Polak
2012–2016 Ömer Sinan Ağacan
2017-2022 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 Invokable a where Source #

Helper class used to make Lua functions useable from Haskell.

Methods

addArg :: Name -> (forall e. LuaError e => LuaE e ()) -> NumArgs -> a Source #

Instances

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

Defined in HsLua.Class.Invokable

Methods

addArg :: Name -> (forall e. LuaError e => LuaE e ()) -> NumArgs -> a -> b Source #

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

Defined in HsLua.Class.Invokable

Methods

addArg :: Name -> (forall e0. LuaError e0 => LuaE e0 ()) -> NumArgs -> LuaE e a Source #

invoke :: Invokable a => Name -> a Source #

Invoke a Lua function. Use as:

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