Copyright | © 2020 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
Stability | beta |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Functions which marshal and push Haskell values onto Lua's stack.
Synopsis
- type Pusher a = a -> Lua ()
- pushBool :: Pusher Bool
- pushIntegral :: (Integral a, Show a) => a -> Lua ()
- pushRealFloat :: RealFloat a => a -> Lua ()
- pushByteString :: Pusher ByteString
- pushLazyByteString :: Pusher ByteString
- pushString :: String -> Lua ()
- pushText :: Pusher Text
- pushList :: Pusher a -> [a] -> Lua ()
- pushMap :: Pusher a -> Pusher b -> Pusher (Map a b)
- pushSet :: Pusher a -> Pusher (Set a)
Documentation
Primitives
pushIntegral :: (Integral a, Show a) => a -> Lua () Source #
Pushes an Integer
to the Lua stack. Values representable as Lua
integers are pushed as such; bigger integers are represented using
their string representation.
pushRealFloat :: RealFloat a => a -> Lua () Source #
Push a floating point number to the Lua stack. Uses a string
representation for all types which do not match the float properties
of the Number
type.
Strings
pushByteString :: Pusher ByteString Source #
Pushes a ByteString
as a raw string.
pushLazyByteString :: Pusher ByteString Source #
Pushes a lazy ByteString
as a raw string.