hslua-packaging 2.2.0 → 2.2.0.1
raw patch · 3 files changed
+18/−3 lines, 3 filesdep ~mtlPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: mtl
API changes (from Hackage documentation)
+ HsLua.Packaging.Function: registerDocumentatedFunction :: LuaError e => DocumentedFunction e -> LuaE e ()
Files
- CHANGELOG.md +6/−0
- hslua-packaging.cabal +2/−2
- src/HsLua/Packaging/Function.hs +10/−1
CHANGELOG.md view
@@ -2,6 +2,12 @@ `hslua-packaging` uses [PVP Versioning][]. +## hslua-packaging-2.2.0.1++Released 2022-05-20.++- Relax upper bound for mtl, allow mtl-2.3.+ ## hslua-packaging-2.2.0 Released 2022-02-19.
hslua-packaging.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hslua-packaging-version: 2.2.0+version: 2.2.0.1 synopsis: Utilities to build Lua modules. description: Utilities to package up Haskell functions and values into a Lua module.@@ -38,7 +38,7 @@ , hslua-core >= 2.2 && < 2.3 , hslua-marshalling >= 2.2 && < 2.3 , hslua-objectorientation >= 2.2 && < 2.3- , mtl >= 2.2 && < 2.3+ , mtl >= 2.2 && < 2.4 , text >= 1.2 && < 2.1 ghc-options: -Wall -Wincomplete-record-updates
src/HsLua/Packaging/Function.hs view
@@ -42,6 +42,7 @@ , since -- * Pushing to Lua , pushDocumentedFunction+ , registerDocumentatedFunction -- * Convenience functions , parameter , opt@@ -53,7 +54,7 @@ ) where import Control.Applicative ((<|>))-import Control.Monad.Except+import Control.Monad ((<$!>), forM_) import Data.Text (Text) import Data.Version (Version) import HsLua.Core@@ -297,6 +298,14 @@ Lua.pushHaskellFunction $ callFunction fn -- push function pushFunctionDoc fn -- function documentation registerDocumentation (Lua.nth 2) -- store documentation++-- | Registers a documented Haskell function as a Lua function. The+-- function is made available as a global under its name.+registerDocumentatedFunction :: LuaError e+ => DocumentedFunction e -> LuaE e ()+registerDocumentatedFunction fn = do+ pushDocumentedFunction fn+ setglobal (functionName fn) -- -- Convenience functions