Copyright | © 2019-2023 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb@hslua.org> |
Stability | alpha |
Portability | Requires GHC 8 or later. |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
HsLua.Packaging.Module
Contents
Description
Utility functions for HsLua modules.
Synopsis
- data Module e = Module {
- moduleName :: Name
- moduleDescription :: Text
- moduleFields :: [Field e]
- moduleFunctions :: [DocumentedFunction e]
- moduleOperations :: [(Operation, DocumentedFunction e)]
- moduleTypeInitializers :: [LuaE e Name]
- data Field e = Field {
- fieldName :: Text
- fieldType :: TypeSpec
- fieldDescription :: Text
- fieldPushValue :: LuaE e ()
- registerModule :: LuaError e => Module e -> LuaE e ()
- preloadModule :: LuaError e => Module e -> LuaE e ()
- preloadModuleWithName :: LuaError e => Module e -> Name -> LuaE e ()
- pushModule :: LuaError e => Module e -> LuaE e ()
- data Operation
Documented module
Named and documented Lua module.
Constructors
Module | |
Fields
|
Self-documenting module field
Constructors
Field | |
Fields
|
registerModule :: LuaError e => Module e -> LuaE e () Source #
Registers a Module
; leaves a copy of the module table on
the stack.
preloadModule :: LuaError e => Module e -> LuaE e () Source #
Preload self-documenting module using the module's default name.
preloadModuleWithName :: LuaError e => Module e -> Name -> LuaE e () Source #
Add the module under a different name to the table of preloaded packages.
pushModule :: LuaError e => Module e -> LuaE e () Source #
Pushes a documented module to the Lua stack.
Constructors
Add | |
Sub | |
Mul | |
Div | |
Mod | |
Pow | |
Unm | |
Idiv | |
Band | |
Bor | |
Bxor | |
Bnot | |
Shl | |
Shr | |
Concat | |
Len | |
Eq | |
Lt | |
Le | |
Index | |
Newindex | |
Call | |
Tostring | |
Pairs | |
CustomOperation Name |
Instances
Show Operation | |
Eq Operation | |
Ord Operation | |
Defined in HsLua.ObjectOrientation.Operation |