packages feed

lua 2.0.0.1 → 2.0.1

raw patch · 4 files changed

+39/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Lua: lua_rotate :: State -> StackIndex -> CInt -> IO ()
+ Lua: lua_version :: State -> IO (Ptr Number)
+ Lua.Primary: lua_rotate :: State -> StackIndex -> CInt -> IO ()
+ Lua.Primary: lua_version :: State -> IO (Ptr Number)

Files

CHANGELOG.md view
@@ -2,17 +2,23 @@  `lua` uses [PVP Versioning][1]. +## lua 2.0.1++Released 2021-11-03.++- Added bindings to `lua_rotate` and `lua_version`.+ ## lua 2.0.0.1  Released 2021-10-30. -- Only install includes when using the Lua code shipped with the-  package. Cabal no longer tries to install the header files if a-  system-wide installation is used.+- Only install includes when using the Lua code shipped with the package+  (Ellie Hermaszewska). Cabal no longer tries to install the header+  files if a system-wide installation is used.  ## lua 2.0.0 -Release pending.+Release 2021-10-21.  - Module hierarchy moved from `Foreign.Lua.Raw` to `Lua`. 
lua.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                lua-version:             2.0.0.1+version:             2.0.1 synopsis:            Lua, an embeddable scripting language description:         This package provides bindings and types to bridge                      Haskell and <https://www.lua.org/ Lua>.
src/Lua.hs view
@@ -93,6 +93,7 @@   , -- ** State manipulation     lua_close   , lua_newthread+  , lua_version     -- ** Basic stack manipulation   , lua_absindex   , lua_gettop@@ -103,6 +104,7 @@   , lua_remove   , lua_insert   , lua_replace+  , lua_rotate   , lua_checkstack     -- ** Access functions (stack → Haskell)   , lua_isnil
src/Lua/Primary.hs view
@@ -77,6 +77,7 @@   , lua_rawseti   , lua_remove   , lua_replace+  , lua_rotate   , lua_setglobal   , lua_setmetatable   , lua_settable@@ -93,6 +94,7 @@   , lua_touserdata   , lua_type   , lua_typename+  , lua_version   , module Lua.Ersatz.Functions   , module Lua.Ersatz.Auxiliary   )@@ -698,6 +700,21 @@ foreign import capi unsafe "lua.h lua_replace"   lua_replace :: Lua.State -> StackIndex -> IO () +-- | Rotates the stack elements between the valid index @idx@ and the+-- top of the stack. The elements are rotated @n@ positions in the+-- direction of the top, for a positive @n@, or @-n@ positions in the+-- direction of the bottom, for a negative @n@. The absolute value of+-- @n@ must not be greater than the size of the slice being rotated.+-- This function cannot be called with a pseudo-index, because a+-- pseudo-index is not an actual stack position.+--+-- <https://www.lua.org/manual/5.3/manual.html#lua_rotate>+foreign import capi unsafe "lua.h lua_rotate"+  lua_rotate :: Lua.State+             -> StackIndex  -- ^ idx+             -> CInt        -- ^ n+             -> IO ()+ -- | Pops a value from the stack and sets it as the new value of global -- @name@. --@@ -894,3 +911,12 @@ -- <https://www.lua.org/manual/5.3/manual.html#lua_typename> foreign import ccall unsafe "lua.h lua_typename"   lua_typename :: Lua.State -> TypeCode {- ^ tp -} -> IO CString++-- | Returns the address of the version number (a C static variable)+-- stored in the Lua core. When called with a valid 'Lua.State', returns+-- the address of the version used to create that state. When called+-- with @NULL@, returns the address of the version running the call.+--+-- <https://www.lua.org/manual/5.3/manual.html#lua_version>+foreign import ccall unsafe "lua.h lua_version"+  lua_version :: Lua.State -> IO (Ptr Lua.Number)