hslua-2.3.1: Bindings to Lua, an embeddable scripting language

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 | None
Language | Haskell2010

HsLua

Contents

- Core functionality
- Marshalling
- Module, data, and function packaging
- Type classes
- Marshal to and from JSON-like structures
- Utility functions

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 ``Core`` from Hackage package lua.

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
  - push :: LuaError e => a -> LuaE e ()
- 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

Instances details

Pushable ByteString |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => ByteString -> LuaE e () Source #
Pushable ByteString |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => ByteString -> LuaE e () Source #
Pushable CFunction |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => CFunction -> LuaE e () Source #
Pushable Integer |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Integer -> LuaE e () Source #
Pushable Number |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Number -> LuaE e () Source #
Pushable Text |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Text -> LuaE e () Source #
Pushable Integer |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Integer -> LuaE e () Source #
Pushable () |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => () -> LuaE e () Source #
Pushable Bool |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Bool -> LuaE e () Source #
Pushable Double |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Double -> LuaE e () Source #
Pushable Float |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Float -> LuaE e () Source #
Pushable Int |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Int -> LuaE e () Source #
Pushable a => Pushable (Set a) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Set a -> LuaE e () Source #
Pushable (Ptr a) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Ptr a -> LuaE e () Source #
Pushable a => Pushable (Optional a) |
Instance details Defined in HsLua.Class.Util Methods push :: LuaError e => Optional a -> LuaE e () Source #
Pushable [Char] |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => [Char] -> LuaE e () Source #
Pushable a => Pushable [a] |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => [a] -> LuaE e () Source #
(Pushable a, Pushable b) => Pushable (Map a b) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => Map a b -> LuaE e () Source #
(Pushable a, Pushable b) => Pushable (a, b) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => (a, b) -> LuaE e () Source #
(Pushable a, Pushable b, Pushable c) => Pushable (a, b, c) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => (a, b, c) -> LuaE e () Source #
(Pushable a, Pushable b, Pushable c, Pushable d) => Pushable (a, b, c, d) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e => (a, b, c, d) -> LuaE e () Source #
(Pushable a, Pushable b, Pushable c, Pushable d, Pushable e) => Pushable (a, b, c, d, e) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e0 => (a, b, c, d, e) -> LuaE e0 () Source #
(Pushable a, Pushable b, Pushable c, Pushable d, Pushable e, Pushable f) => Pushable (a, b, c, d, e, f) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e0 => (a, b, c, d, e, f) -> LuaE e0 () Source #
(Pushable a, Pushable b, Pushable c, Pushable d, Pushable e, Pushable f, Pushable g) => Pushable (a, b, c, d, e, f, g) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e0 => (a, b, c, d, e, f, g) -> LuaE e0 () Source #
(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) |
Instance details Defined in HsLua.Class.Pushable Methods push :: LuaError e0 => (a, b, c, d, e, f, g, h) -> LuaE e0 () Source #

# 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