This file is indexed.

/usr/share/doc/libghc-hslua-doc/html/hslua.txt is in libghc-hslua-doc 0.4.1-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A Lua language interpreter embedding in Haskell
--   
--   The Scripting.Lua module is a wrapper of Lua language interpreter as
--   described in <a>lua.org</a>.
--   
--   This package contains full Lua interpreter version 5.1.5. If you want
--   to link it with system-wide Lua installation, use <tt>system-lua</tt>
--   flag.
--   
--   <a>Example programs</a>
@package hslua
@version 0.4.1

module Scripting.Lua.Raw

-- | Synonym for <tt>lua_State *</tt>. See <tt>lua_State</tt> in Lua
--   Reference Manual.
newtype LuaState
LuaState :: (Ptr ()) -> LuaState

-- | Synonym for <tt>lua_Alloc</tt>. See <tt>lua_Alloc</tt> in Lua
--   Reference Manual.
type LuaAlloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())

-- | Synonym for <tt>lua_Reader</tt>. See <tt>lua_Reader</tt> in Lua
--   Reference Manual.
type LuaReader = Ptr () -> Ptr () -> Ptr CSize -> IO (Ptr CChar)

-- | Synonym for <tt>lua_Writer</tt>. See <tt>lua_Writer</tt> in Lua
--   Reference Manual.
type LuaWriter = LuaState -> Ptr CChar -> CSize -> Ptr () -> IO CInt

-- | Synonym for <tt>lua_CFunction</tt>. See <tt>lua_CFunction</tt> in Lua
--   Reference Manual.
type LuaCFunction = LuaState -> IO CInt

-- | Synonym for <tt>lua_Integer</tt>. See <tt>lua_Integer</tt> in Lua
--   Reference Manual.
type LuaInteger = Int64

-- | Synonym for <tt>lua_Number</tt>. See <tt>lua_Number</tt> in Lua
--   Reference Manual.
type LuaNumber = Double
c_lua_newstate :: FunPtr LuaAlloc -> Ptr () -> IO LuaState
c_lua_close :: LuaState -> IO ()
c_lua_newthread :: LuaState -> IO LuaState
c_lua_atpanic :: LuaState -> FunPtr LuaCFunction -> IO (FunPtr LuaCFunction)
c_lua_gettop :: LuaState -> IO CInt
c_lua_settop :: LuaState -> CInt -> IO ()
c_lua_pushvalue :: LuaState -> CInt -> IO ()
c_lua_remove :: LuaState -> CInt -> IO ()
c_lua_insert :: LuaState -> CInt -> IO ()
c_lua_replace :: LuaState -> CInt -> IO ()
c_lua_checkstack :: LuaState -> CInt -> IO CInt
c_lua_xmove :: LuaState -> LuaState -> CInt -> IO ()
c_lua_isnumber :: LuaState -> CInt -> IO CInt
c_lua_isstring :: LuaState -> CInt -> IO CInt
c_lua_iscfunction :: LuaState -> CInt -> IO CInt
c_lua_isuserdata :: LuaState -> CInt -> IO CInt
c_lua_type :: LuaState -> CInt -> IO CInt
c_lua_typename :: LuaState -> CInt -> IO (Ptr CChar)
c_lua_equal :: LuaState -> CInt -> CInt -> IO CInt
c_lua_rawequal :: LuaState -> CInt -> CInt -> IO CInt
c_lua_lessthan :: LuaState -> CInt -> CInt -> IO CInt
c_lua_tonumber :: LuaState -> CInt -> IO LuaNumber
c_lua_tointeger :: LuaState -> CInt -> IO LuaInteger
c_lua_toboolean :: LuaState -> CInt -> IO CInt
c_lua_tolstring :: LuaState -> CInt -> Ptr CSize -> IO (Ptr CChar)
c_lua_objlen :: LuaState -> CInt -> IO CSize
c_lua_tocfunction :: LuaState -> CInt -> IO (FunPtr LuaCFunction)
c_lua_touserdata :: LuaState -> CInt -> IO (Ptr a)
c_lua_tothread :: LuaState -> CInt -> IO LuaState
c_lua_topointer :: LuaState -> CInt -> IO (Ptr ())
c_lua_pushnil :: LuaState -> IO ()
c_lua_pushnumber :: LuaState -> LuaNumber -> IO ()
c_lua_pushinteger :: LuaState -> LuaInteger -> IO ()
c_lua_pushlstring :: LuaState -> Ptr CChar -> CSize -> IO ()
c_lua_pushstring :: LuaState -> Ptr CChar -> IO ()
c_lua_pushcclosure :: LuaState -> FunPtr LuaCFunction -> CInt -> IO ()
c_lua_pushboolean :: LuaState -> CInt -> IO ()
c_lua_pushlightuserdata :: LuaState -> Ptr a -> IO ()
c_lua_pushthread :: LuaState -> IO CInt
c_lua_gettable :: LuaState -> CInt -> IO ()
c_lua_getfield :: LuaState -> CInt -> Ptr CChar -> IO ()
c_lua_rawget :: LuaState -> CInt -> IO ()
c_lua_rawgeti :: LuaState -> CInt -> CInt -> IO ()
c_lua_createtable :: LuaState -> CInt -> CInt -> IO ()
c_lua_newuserdata :: LuaState -> CInt -> IO (Ptr ())
c_lua_getmetatable :: LuaState -> CInt -> IO CInt
c_lua_getfenv :: LuaState -> CInt -> IO ()
c_lua_settable :: LuaState -> CInt -> IO ()
c_lua_setfield :: LuaState -> CInt -> Ptr CChar -> IO ()
c_lua_rawset :: LuaState -> CInt -> IO ()
c_lua_rawseti :: LuaState -> CInt -> CInt -> IO ()
c_lua_setmetatable :: LuaState -> CInt -> IO ()
c_lua_setfenv :: LuaState -> CInt -> IO CInt
c_lua_call :: LuaState -> CInt -> CInt -> IO ()
c_lua_pcall :: LuaState -> CInt -> CInt -> CInt -> IO CInt
c_lua_cpcall :: LuaState -> FunPtr LuaCFunction -> Ptr a -> IO CInt
c_lua_load :: LuaState -> FunPtr LuaReader -> Ptr () -> Ptr CChar -> IO CInt
c_lua_dump :: LuaState -> FunPtr LuaWriter -> Ptr () -> IO ()
c_lua_yield :: LuaState -> CInt -> IO CInt
c_lua_resume :: LuaState -> CInt -> IO CInt
c_lua_status :: LuaState -> IO CInt
c_lua_gc :: LuaState -> CInt -> CInt -> IO CInt
c_lua_error :: LuaState -> IO CInt
c_lua_next :: LuaState -> CInt -> IO CInt
c_lua_concat :: LuaState -> CInt -> IO ()
c_luaL_openlibs :: LuaState -> IO ()
c_luaL_newstate :: IO LuaState
c_luaL_newmetatable :: LuaState -> Ptr CChar -> IO CInt
c_luaL_argerror :: LuaState -> CInt -> Ptr CChar -> IO CInt
c_luaL_ref :: LuaState -> CInt -> IO CInt
c_luaL_unref :: LuaState -> CInt -> CInt -> IO ()

module Scripting.Lua

-- | Synonym for <tt>lua_State *</tt>. See <tt>lua_State</tt> in Lua
--   Reference Manual.
data LuaState

-- | Synonym for <tt>lua_CFunction</tt>. See <tt>lua_CFunction</tt> in Lua
--   Reference Manual.
type LuaCFunction = LuaState -> IO CInt

-- | Synonym for <tt>lua_Integer</tt>. See <tt>lua_Integer</tt> in Lua
--   Reference Manual.
type LuaInteger = Int64

-- | Synonym for <tt>lua_Number</tt>. See <tt>lua_Number</tt> in Lua
--   Reference Manual.
type LuaNumber = Double

-- | Enumeration used as type tag. See <tt>lua_type</tt> in Lua Reference
--   Manual.
data LTYPE
TNONE :: LTYPE
TNIL :: LTYPE
TBOOLEAN :: LTYPE
TLIGHTUSERDATA :: LTYPE
TNUMBER :: LTYPE
TSTRING :: LTYPE
TTABLE :: LTYPE
TFUNCTION :: LTYPE
TUSERDATA :: LTYPE
TTHREAD :: LTYPE

-- | Enumeration used by <tt>gc</tt> function.
data GCCONTROL
GCSTOP :: GCCONTROL
GCRESTART :: GCCONTROL
GCCOLLECT :: GCCONTROL
GCCOUNT :: GCCONTROL
GCCOUNTB :: GCCONTROL
GCSTEP :: GCCONTROL
GCSETPAUSE :: GCCONTROL
GCSETSTEPMUL :: GCCONTROL

-- | See <tt>LUA_MULTRET</tt> in Lua Reference Manual.
multret :: Int

-- | See <tt>lua_settop</tt> in Lua Reference Manual.
settop :: LuaState -> Int -> IO ()

-- | See <tt>lua_createtable</tt> in Lua Reference Manual.
createtable :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_objlen</tt> in Lua Reference Manual.
objlen :: LuaState -> Int -> IO Int

-- | See <tt>lua_pop</tt> in Lua Reference Manual.
pop :: LuaState -> Int -> IO ()

-- | See <tt>lua_newtable</tt> in Lua Reference Manual.
newtable :: LuaState -> IO ()

-- | See <tt>lua_pushcclosure</tt> in Lua Reference Manual.
pushcclosure :: LuaState -> FunPtr LuaCFunction -> Int -> IO ()

-- | See <tt>lua_pushcfunction</tt> in Lua Reference Manual.
pushcfunction :: LuaState -> FunPtr LuaCFunction -> IO ()

-- | See <tt>lua_strlen</tt> in Lua Reference Manual.
strlen :: LuaState -> Int -> IO Int

-- | See <tt>lua_type</tt> in Lua Reference Manual.
ltype :: LuaState -> Int -> IO LTYPE

-- | See <tt>lua_isfunction</tt> in Lua Reference Manual.
isfunction :: LuaState -> Int -> IO Bool

-- | See <tt>lua_istable</tt> in Lua Reference Manual.
istable :: LuaState -> Int -> IO Bool

-- | Try to convert Lua array at given index to Haskell list.
tolist :: StackValue a => LuaState -> Int -> IO (Maybe [a])

-- | See <tt>lua_islightuserdata</tt> in Lua Reference Manual.
islightuserdata :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isnil</tt> in Lua Reference Manual.
isnil :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isboolean</tt> in Lua Reference Manual.
isboolean :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isthread</tt> in Lua Reference Manual.
isthread :: LuaState -> Int -> IO Bool

-- | See <tt>lua_none</tt> in Lua Reference Manual.
isnone :: LuaState -> Int -> IO Bool

-- | See <tt>lua_noneornil</tt> in Lua Reference Manual.
isnoneornil :: LuaState -> Int -> IO Bool

-- | See <tt>LUA_REGISTRYINDEX</tt> in Lua Reference Manual.
registryindex :: Int

-- | See <tt>LUA_ENVIRONINDEX</tt> in Lua Reference Manual.
environindex :: Int

-- | See <tt>LUA_GLOBALSINDEX</tt> in Lua Reference Manual.
globalsindex :: Int

-- | See <tt>lua_upvalueindex</tt> in Lua Reference Manual.
upvalueindex :: Int -> Int

-- | See <tt>lua_atpanic</tt> in Lua Reference Manual.
atpanic :: LuaState -> FunPtr LuaCFunction -> IO (FunPtr LuaCFunction)

-- | See <tt>lua_tostring</tt> in Lua Reference Manual.
tostring :: LuaState -> Int -> IO ByteString

-- | See <tt>lua_tothread</tt> in Lua Reference Manual.
tothread :: LuaState -> Int -> IO LuaState

-- | See <tt>lua_touserdata</tt> in Lua Reference Manual.
touserdata :: LuaState -> Int -> IO (Ptr a)

-- | See <tt>lua_typename</tt> in Lua Reference Manual.
typename :: LuaState -> LTYPE -> IO String

-- | See <tt>lua_xmove</tt> in Lua Reference Manual.
xmove :: LuaState -> LuaState -> Int -> IO ()

-- | See <tt>lua_yield</tt> in Lua Reference Manual.
yield :: LuaState -> Int -> IO Int

-- | See <tt>lua_checkstack</tt> in Lua Reference Manual.
checkstack :: LuaState -> Int -> IO Bool

-- | See <tt>lua_newstate</tt> and <tt>luaL_newstate</tt> in Lua Reference
--   Manual.
newstate :: IO LuaState

-- | See <tt>lua_close</tt> in Lua Reference Manual.
close :: LuaState -> IO ()

-- | See <tt>lua_concat</tt> in Lua Reference Manual.
concat :: LuaState -> Int -> IO ()

-- | See <tt>lua_call</tt> and <tt>lua_call</tt> in Lua Reference Manual.
call :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_pcall</tt> in Lua Reference Manual.
pcall :: LuaState -> Int -> Int -> Int -> IO Int

-- | See <tt>lua_cpcall</tt> in Lua Reference Manual.
cpcall :: LuaState -> FunPtr LuaCFunction -> Ptr a -> IO Int

-- | See <tt>lua_getfield</tt> in Lua Reference Manual.
getfield :: LuaState -> Int -> String -> IO ()

-- | See <tt>lua_setfield</tt> in Lua Reference Manual.
setfield :: LuaState -> Int -> String -> IO ()

-- | See <tt>lua_getglobal</tt> in Lua Reference Manual.
getglobal :: LuaState -> String -> IO ()

-- | See <tt>lua_setglobal</tt> in Lua Reference Manual.
setglobal :: LuaState -> String -> IO ()

-- | See <tt>luaL_openlibs</tt> in Lua Reference Manual.
openlibs :: LuaState -> IO ()
mkStringWriter :: LuaWriter -> IO (FunPtr LuaWriter)

-- | See <tt>lua_dump</tt> in Lua Reference Manual.
dump :: LuaState -> IO String

-- | See <tt>lua_equal</tt> in Lua Reference Manual.
equal :: LuaState -> Int -> Int -> IO Bool

-- | This is a convenience function to implement error propagation
--   convention described in <a>Error handling in hslua</a>. hslua doesn't
--   implement <tt>lua_error</tt> function from Lua C API because it's
--   never safe to use. (see <a>Error handling in hslua</a> for details)
lerror :: LuaState -> IO Int

-- | See <tt>lua_gc</tt> in Lua Reference Manual.
gc :: LuaState -> GCCONTROL -> Int -> IO Int

-- | See <tt>lua_getfenv</tt> in Lua Reference Manual.
getfenv :: LuaState -> Int -> IO ()

-- | See <tt>lua_getmetatable</tt> in Lua Reference Manual.
getmetatable :: LuaState -> Int -> IO Bool

-- | See <tt>lua_gettable</tt> in Lua Reference Manual.
gettable :: LuaState -> Int -> IO ()

-- | See <tt>lua_gettop</tt> in Lua Reference Manual.
gettop :: LuaState -> IO Int

-- | See <tt>lua_insert</tt> in Lua Reference Manual.
insert :: LuaState -> Int -> IO ()

-- | See <tt>lua_iscfunction</tt> in Lua Reference Manual.
iscfunction :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isnumber</tt> in Lua Reference Manual.
isnumber :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isstring</tt> in Lua Reference Manual.
isstring :: LuaState -> Int -> IO Bool

-- | See <tt>lua_isuserdata</tt> in Lua Reference Manual.
isuserdata :: LuaState -> Int -> IO Bool

-- | See <tt>lua_lessthan</tt> in Lua Reference Manual.
lessthan :: LuaState -> Int -> Int -> IO Bool

-- | See <tt>luaL_loadfile</tt> in Lua Reference Manual.
loadfile :: LuaState -> String -> IO Int
mkStringReader :: LuaReader -> IO (FunPtr LuaReader)

-- | See <tt>luaL_loadstring</tt> in Lua Reference Manual.
loadstring :: LuaState -> String -> String -> IO Int

-- | See <tt>lua_newthread</tt> in Lua Reference Manual.
newthread :: LuaState -> IO LuaState

-- | See <tt>lua_newuserdata</tt> in Lua Reference Manual.
newuserdata :: LuaState -> Int -> IO (Ptr ())

-- | See <tt>lua_next</tt> in Lua Reference Manual.
next :: LuaState -> Int -> IO Bool

-- | See <tt>lua_pushboolean</tt> in Lua Reference Manual.
pushboolean :: LuaState -> Bool -> IO ()

-- | See <tt>lua_pushinteger</tt> in Lua Reference Manual.
pushinteger :: LuaState -> LuaInteger -> IO ()

-- | See <tt>lua_pushlightuserdata</tt> in Lua Reference Manual.
pushlightuserdata :: LuaState -> Ptr a -> IO ()

-- | See <tt>lua_pushnil</tt> in Lua Reference Manual.
pushnil :: LuaState -> IO ()

-- | See <tt>lua_pushnumber</tt> in Lua Reference Manual.
pushnumber :: LuaState -> LuaNumber -> IO ()

-- | See <tt>lua_pushstring</tt> in Lua Reference Manual.
pushstring :: LuaState -> ByteString -> IO ()

-- | Push a list to Lua stack as a Lua array.
pushlist :: StackValue a => LuaState -> [a] -> IO ()

-- | See <tt>lua_pushthread</tt> in Lua Reference Manual.
pushthread :: LuaState -> IO Bool

-- | See <tt>lua_pushvalue</tt> in Lua Reference Manual.
pushvalue :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawequal</tt> in Lua Reference Manual.
rawequal :: LuaState -> Int -> Int -> IO Bool

-- | See <tt>lua_rawget</tt> in Lua Reference Manual.
rawget :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawgeti</tt> in Lua Reference Manual.
rawgeti :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_rawset</tt> in Lua Reference Manual.
rawset :: LuaState -> Int -> IO ()

-- | See <tt>lua_rawseti</tt> in Lua Reference Manual.
rawseti :: LuaState -> Int -> Int -> IO ()

-- | See <tt>lua_remove</tt> in Lua Reference Manual.
remove :: LuaState -> Int -> IO ()

-- | See <tt>lua_replace</tt> in Lua Reference Manual.
replace :: LuaState -> Int -> IO ()

-- | See <tt>lua_resume</tt> in Lua Reference Manual.
resume :: LuaState -> Int -> IO Int

-- | See <tt>lua_setfenv</tt> in Lua Reference Manual.
setfenv :: LuaState -> Int -> IO Int

-- | See <tt>lua_setmetatable</tt> in Lua Reference Manual.
setmetatable :: LuaState -> Int -> IO ()

-- | See <tt>lua_settable</tt> in Lua Reference Manual.
settable :: LuaState -> Int -> IO ()

-- | See <tt>lua_status</tt> in Lua Reference Manual.
status :: LuaState -> IO Int

-- | See <tt>lua_toboolean</tt> in Lua Reference Manual.
toboolean :: LuaState -> Int -> IO Bool

-- | See <tt>lua_tocfunction</tt> in Lua Reference Manual.
tocfunction :: LuaState -> Int -> IO (FunPtr LuaCFunction)

-- | See <tt>lua_tointeger</tt> in Lua Reference Manual.
tointeger :: LuaState -> Int -> IO LuaInteger

-- | See <tt>lua_tonumber</tt> in Lua Reference Manual.
tonumber :: LuaState -> Int -> IO LuaNumber

-- | See <tt>lua_topointer</tt> in Lua Reference Manual.
topointer :: LuaState -> Int -> IO (Ptr ())

-- | See <tt>lua_register</tt> in Lua Reference Manual.
register :: LuaState -> String -> FunPtr LuaCFunction -> IO ()

-- | See <tt>luaL_newmetatable</tt> in Lua Reference Manual.
newmetatable :: LuaState -> String -> IO Int

-- | See <tt>luaL_argerror</tt> in Lua Reference Manual. Contrary to the
--   manual, Haskell function does return with value less than zero.
argerror :: LuaState -> Int -> String -> IO CInt

-- | See <tt>luaL_ref</tt> in Lua Reference Manual.
ref :: LuaState -> Int -> IO Int

-- | See <tt>luaL_unref</tt> in Lua Reference Manual.
unref :: LuaState -> Int -> Int -> IO ()

-- | A value that can be pushed and poped from the Lua stack. All instances
--   are natural, except following:
--   
--   <ul>
--   <li><tt>LuaState</tt> push ignores its argument, pushes current
--   state</li>
--   <li><tt>()</tt> push ignores its argument, just pushes nil</li>
--   <li><tt>Ptr ()</tt> pushes light user data, peek checks for
--   lightuserdata or userdata</li>
--   <li>See "A note about integer functions" for integer functions.</li>
--   </ul>
class StackValue a

-- | Pushes a value onto Lua stack, casting it into meaningfully nearest
--   Lua type.
push :: StackValue a => LuaState -> a -> IO ()

-- | Check if at index <tt>n</tt> there is a convertible Lua value and if
--   so return it wrapped in <tt>Just</tt>. Return <tt>Nothing</tt>
--   otherwise.
peek :: StackValue a => LuaState -> Int -> IO (Maybe a)

-- | Lua type id code of the vaule expected. Parameter is unused.
valuetype :: StackValue a => a -> LTYPE
maybepeek :: l -> n -> (l -> n -> IO Bool) -> (l -> n -> IO r) -> IO (Maybe r)

-- | Like <tt>getglobal</tt>, but knows about packages. e. g.
--   
--   <pre>
--   getglobal l "math.sin"
--   </pre>
--   
--   returns correct result
getglobal2 :: LuaState -> String -> IO ()
typenameindex :: LuaState -> Int -> IO String
class LuaImport a
luaimport' :: LuaImport a => Int -> a -> LuaCFunction
luaimportargerror :: LuaImport a => Int -> String -> a -> LuaCFunction
mkWrapper :: LuaCFunction -> IO (FunPtr LuaCFunction)

-- | Create new foreign Lua function. Function created can be called by Lua
--   engine. Remeber to free the pointer with <tt>freecfunction</tt>.
newcfunction :: LuaImport a => a -> IO (FunPtr LuaCFunction)

-- | Convert a Haskell function to Lua function. Any Haskell function can
--   be converted provided that:
--   
--   <ul>
--   <li>all arguments are instances of StackValue</li>
--   <li>return type is IO t, where t is an instance of StackValue</li>
--   </ul>
--   
--   Any Haskell exception will be converted to a string and returned as
--   Lua error.
luaimport :: LuaImport a => a -> LuaCFunction

-- | Free function pointer created with <tt>newcfunction</tt>.
freecfunction :: FunPtr LuaCFunction -> IO ()
class LuaCallProc a
callproc' :: LuaCallProc a => LuaState -> String -> IO () -> Int -> a

-- | Call a Lua procedure. Use as:
--   
--   <pre>
--   callproc l "proc" "abc" (1::Int) (5.0::Double)
--   </pre>
callproc :: (LuaCallProc a) => LuaState -> String -> a
class LuaCallFunc a
callfunc' :: LuaCallFunc a => LuaState -> String -> IO () -> Int -> a

-- | Call a Lua function. Use as:
--   
--   <pre>
--   Just v &lt;- callfunc l "proc" "abc" (1::Int) (5.0::Double)
--   </pre>
callfunc :: (LuaCallFunc a) => LuaState -> String -> a
hsmethod__gc_addr :: FunPtr LuaCFunction
hsmethod__call_addr :: FunPtr LuaCFunction
hsmethod__gc :: LuaState -> IO CInt
hsmethod__call :: LuaState -> IO CInt

-- | Pushes Haskell function converted to a Lua function. All values
--   created will be garbage collected. Use as:
--   
--   <pre>
--   Lua.pushhsfunction l myfun
--   Lua.setglobal l "myfun"
--   </pre>
--   
--   You are not allowed to use <tt>lua_error</tt> anywhere, but use an
--   error code of (-1) to the same effect. Push error message as the sole
--   return value.
pushhsfunction :: LuaImport a => LuaState -> a -> IO ()

-- | Pushes _raw_ Haskell function converted to a Lua function. Raw Haskell
--   functions collect parameters from the stack and return a <a>CInt</a>
--   that represents number of return values left in the stack.
pushrawhsfunction :: LuaState -> LuaCFunction -> IO ()

-- | Imports a Haskell function and registers it at global name.
registerhsfunction :: LuaImport a => LuaState -> String -> a -> IO ()

-- | Imports a raw Haskell function and registers it at global name.
registerrawhsfunction :: LuaState -> String -> (LuaState -> IO CInt) -> IO ()
instance GHC.Enum.Enum Scripting.Lua.GCCONTROL
instance GHC.Show.Show Scripting.Lua.GCCONTROL
instance GHC.Classes.Ord Scripting.Lua.GCCONTROL
instance GHC.Classes.Eq Scripting.Lua.GCCONTROL
instance GHC.Classes.Ord Scripting.Lua.LTYPE
instance GHC.Show.Show Scripting.Lua.LTYPE
instance GHC.Classes.Eq Scripting.Lua.LTYPE
instance GHC.Enum.Enum Scripting.Lua.LTYPE
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaInteger
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaNumber
instance Scripting.Lua.StackValue GHC.Types.Int
instance Scripting.Lua.StackValue Data.ByteString.Internal.ByteString
instance Scripting.Lua.StackValue a => Scripting.Lua.StackValue [a]
instance Scripting.Lua.StackValue GHC.Types.Bool
instance Scripting.Lua.StackValue (GHC.Ptr.FunPtr Scripting.Lua.Raw.LuaCFunction)
instance Scripting.Lua.StackValue (GHC.Ptr.Ptr a)
instance Scripting.Lua.StackValue Scripting.Lua.Raw.LuaState
instance Scripting.Lua.StackValue ()
instance Scripting.Lua.StackValue a => Scripting.Lua.LuaImport (GHC.Types.IO a)
instance (Scripting.Lua.StackValue a, Scripting.Lua.LuaImport b) => Scripting.Lua.LuaImport (a -> b)
instance Scripting.Lua.LuaCallProc (GHC.Types.IO t)
instance Scripting.Lua.StackValue t => Scripting.Lua.LuaCallFunc (GHC.Types.IO t)
instance (Scripting.Lua.StackValue t, Scripting.Lua.LuaCallProc b) => Scripting.Lua.LuaCallProc (t -> b)
instance (Scripting.Lua.StackValue t, Scripting.Lua.LuaCallFunc b) => Scripting.Lua.LuaCallFunc (t -> b)