Foreign.Lua.Api

Lua API types

type CFunction

data LuaInteger

data 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 Type

data TypeCode

fromType

toType

ltype

typename

isboolean

iscfunction

isfunction

islightuserdata

isnil

isnone

isnoneornil

isnumber

isstring

istable

isthread

isuserdata

access functions (stack → Haskell)

toboolean

tocfunction

tointeger

tointegerx

tonumber

tonumberx

topointer

tostring

tothread

touserdata

objlen

rawlen

strlen

Comparison and arithmetic functions

data RelationalOperator

fromRelationalOperator

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 Status

toStatus

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

dostring

dofile

newmetatable

ref

unref

Helper functions

throwTopMessageAsError

throwTopMessageAsError'