Foreign.Lua.Core

Lua Computations

data Lua a

runWith

liftIO

state

Lua API types

type CFunction

data Integer

data Number

Stack index

data StackIndex

nthFromBottom

nthFromTop

stackTop

stackBottom

Number of arguments and return values

data NumArgs

data NumResults

Lua API

Constants and pseudo-indices

multret

registryindex

upvalueindex

State manipulation

data State

newstate

close

Basic stack manipulation

absindex

gettop

settop

pushvalue

copy

insert

pop

remove

replace

checkstack

types and type checks

data Type

data TypeCode

fromType

toType

ltype

typename

isboolean

iscfunction

isfunction

isinteger

islightuserdata

isnil

isnone

isnoneornil

isnumber

isstring

istable

isthread

isuserdata

access functions (stack → Haskell)

toboolean

tocfunction

tointeger

tonumber

topointer

tostring

tothread

touserdata

rawlen

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

load

loadbuffer

loadfile

loadstring

Coroutine functions

data Status

toStatus

status

garbage-collection function and options

data GCCONTROL

gc

miscellaneous and helper functions

next

error

concat

pushglobaltable

register

loading libraries

openbase

opendebug

openio

openlibs

openmath

openpackage

openos

openstring

opentable

Auxiliary library

dostring

dofile

getmetafield

getmetatable'

getsubtable

newmetatable

tostring'

traceback

References

data Reference

ref

getref

unref

fromReference

toReference

noref

refnil

Registry fields

loadedTableRegistryField

preloadTableRegistryField

Error handling

data Exception

throwException

catchException

withExceptionMessage

try

throwTopMessage