| Copyright | © 2007–2012 Gracjan Polak; © 2012–2016 Ömer Sinan Ağacan; © 2017-2024 Albert Krewinkel |
|---|---|
| License | MIT |
| Maintainer | Albert Krewinkel <tarleb@hslua.org> |
| Stability | beta |
| Portability | non-portable (depends on GHC) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
HsLua
Description
Functions and utilities enabling the seamless integration of a Lua interpreter into a Haskell project.
This module combines and re-exports the functionality of the HsLua
framework. Basic access to the Lua API is provided by from
Hackage package lua.Core
Synopsis
- module HsLua.Core
- module HsLua.Marshalling
- module HsLua.ObjectOrientation
- module HsLua.Packaging
- module HsLua.Class.Exposable
- module HsLua.Class.Invokable
- module HsLua.Class.Peekable
- class Pushable a where
- module HsLua.Aeson
- getglobal' :: LuaError e => Name -> LuaE e ()
- setglobal' :: LuaError e => Name -> LuaE e ()
- module HsLua.Class.Util
Core functionality
module HsLua.Core
Marshalling
module HsLua.Marshalling
Module, data, and function packaging
module HsLua.ObjectOrientation
module HsLua.Packaging
Type classes
module HsLua.Class.Exposable
module HsLua.Class.Invokable
module HsLua.Class.Peekable
class Pushable a where Source #
A value that can be pushed to the Lua stack.
Methods
push :: LuaError e => a -> LuaE e () Source #
Pushes a value onto Lua stack, casting it into meaningfully nearest Lua type.
Instances
| Pushable ByteString | |
| Pushable ByteString | |
| Pushable CFunction | |
| Pushable Integer | |
| Pushable Number | |
| Pushable Text | |
| Pushable Integer | |
| Pushable () | |
| Pushable Bool | |
| Pushable Double | |
| Pushable Float | |
| Pushable Int | |
| Pushable (Ptr a) | |
| Pushable a => Pushable (Set a) | |
| Pushable a => Pushable (Optional a) | |
| Pushable [Char] | |
| Pushable a => Pushable [a] | |
| (Pushable a, Pushable b) => Pushable (Map a b) | |
| (Pushable a, Pushable b) => Pushable (a, b) | |
| (Pushable a, Pushable b, Pushable c) => Pushable (a, b, c) | |
| (Pushable a, Pushable b, Pushable c, Pushable d) => Pushable (a, b, c, d) | |
| (Pushable a, Pushable b, Pushable c, Pushable d, Pushable e) => Pushable (a, b, c, d, e) | |
| (Pushable a, Pushable b, Pushable c, Pushable d, Pushable e, Pushable f) => Pushable (a, b, c, d, e, f) | |
| (Pushable a, Pushable b, Pushable c, Pushable d, Pushable e, Pushable f, Pushable g) => Pushable (a, b, c, d, e, f, g) | |
| (Pushable a, Pushable b, Pushable c, Pushable d, Pushable e, Pushable f, Pushable g, Pushable h) => Pushable (a, b, c, d, e, f, g, h) | |
Marshal to and from JSON-like structures
module HsLua.Aeson
Utility functions
getglobal' :: LuaError e => Name -> LuaE e () Source #
Like getglobal, but knows about packages and nested tables. E.g.
getglobal' "math.sin"
will return the function sin in package math.
setglobal' :: LuaError e => Name -> LuaE e () Source #
Like setglobal, but knows about packages and nested tables. E.g.
pushstring "0.9.4" setglobal' "mypackage.version"
All tables and fields, except for the last field, must exist.
module HsLua.Class.Util