Foreign.Lua.Api

Lua API types

type CFunction

type LuaInteger

type LuaNumber

data StackIndex

data NumArgs

data NumResults

Lua API

Constants and pseudo-indices

multret

registryindex

upvalueindex

State manipulation

data LuaState

newstate

close

Basic stack manipulation

gettop

settop

pushvalue

copy

insert

pop

remove

replace

checkstack

types and type checks

data LTYPE

fromLuaType

toLuaType

ltype

typename

isboolean

iscfunction

isfunction

islightuserdata

isnil

isnone

isnoneornil

isnumber

isstring

istable

isthread

isuserdata

access functions (stack → Haskell)

toboolean

tocfunction

tointeger

tonumber

topointer

tostring

tothread

touserdata

objlen

rawlen

strlen

Comparison and arithmetic functions

data LuaRelation

fromLuaRelation

compare

equal

lessthan

rawequal

push functions (Haskell → stack)

pushboolean

pushcfunction

pushcclosure

pushinteger

pushlightuserdata

pushnil

pushnumber

pushstring

pushthread

get functions (Lua → stack)

getglobal

gettable

getfield

rawget

rawgeti

createtable

newtable

newuserdata

getmetatable

set functions (stack → Lua)

setglobal

settable

setfield

rawset

rawseti

setmetatable

load and call functions (load and run Lua code)

call

pcall

loadfile

loadstring

Coroutine functions

data LuaStatus

toLuaStatus

status

garbage-collection function and options

data GCCONTROL

gc

miscellaneous and helper functions

next

lerror

concat

register

loading libraries

openbase

opendebug

openio

openlibs

openmath

openpackage

openos

openstring

opentable

Auxiliary library

newmetatable

ref

unref