-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMarshalling.hs
More file actions
70 lines (65 loc) · 1.41 KB
/
Marshalling.hs
File metadata and controls
70 lines (65 loc) · 1.41 KB
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
{-|
Module : HsLua.Marshalling
Copyright : © 2007–2012 Gracjan Polak;
© 2012–2016 Ömer Sinan Ağacan;
© 2017-2021 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <tarleb+hslua@zeitkraut.de>
Functions to push and retrieve data to and from Lua.
-}
module HsLua.Marshalling
( -- * Receiving values from Lua stack (Lua → Haskell)
Peeker
, runPeeker
, Result (..)
, force
, retrieving
, failure
, resultToEither
-- ** Primitive types
, peekNil
, peekNoneOrNil
, peekBool
, peekIntegral
, peekRealFloat
-- ** Strings
, peekByteString
, peekLazyByteString
, peekString
, peekText
, peekStringy
, peekName
-- ** Readable types
, peekRead
-- ** Collections
, peekKeyValuePairs
, peekList
, peekMap
, peekSet
-- ** Combinators
, choice
, peekFieldRaw
, peekPair
, peekTriple
-- ** Lua peek monad
, Peek (..)
, forcePeek
, liftLua
, withContext
, failPeek
, lastly
, cleanup
-- ** Building Peek functions
, typeChecked
, typeMismatchMessage
, reportValueOnFailure
-- * Pushing values to Lua stack (Haskell → Lua)
, module HsLua.Marshalling.Push
-- * Utilities
, pushIterator
) where
import Prelude hiding (compare, concat)
import HsLua.Marshalling.Peek
import HsLua.Marshalling.Peekers
import HsLua.Marshalling.Push
import HsLua.Marshalling.Userdata (pushIterator)