packages feed

hslua 2.3.1 → 2.4.0

raw patch · 5 files changed

+110/−39 lines, 5 filesdep +hslua-clidep +hslua-module-pathdep +hslua-module-systemdep −QuickCheckdep −containersdep −luadep ~hslua-coredep ~hslua-objectorientationdep ~hslua-packagingnew-component:exe:hsluaPVP ok

version bump matches the API change (PVP)

Dependencies added: hslua-cli, hslua-module-path, hslua-module-system, hslua-module-text, hslua-module-version, hslua-module-zip

Dependencies removed: QuickCheck, containers, lua, lua-arbitrary, mtl, quickcheck-instances

Dependency ranges changed: hslua-core, hslua-objectorientation, hslua-packaging

API changes (from Hackage documentation)

- HsLua: class () => Pushable a
+ HsLua: class Pushable a

Files

CHANGELOG.md view
@@ -2,6 +2,15 @@  `hslua` uses [PVP Versioning][]. +## Dev++Released 2025-06-23.++-   Require hslua-objectorientation-2.4.0++-   Provide a full Lua app with Haskell-defined modules preloaded.+    The app is only built if the `executable` flag is enabled.+ ## hslua-2.3.1  Released 2024-01-18.
LICENSE view
@@ -1,4 +1,4 @@-Copyright © 1994-2022 Lua.org, PUC-Rio.+Copyright © 1994-2023 Lua.org, PUC-Rio. Copyright © 2007-2012 Gracjan Polak Copyright © 2012-2015 Ömer Sinan Ağacan Copyright © 2016-2024 Albert Krewinkel
README.md view
@@ -28,7 +28,7 @@ software and embedded devices. This package provides Haskell bindings to Lua, enable coders to embed the language into their programs, making them scriptable. -HsLua ships with batteries included and includes Lua 5.4.4. Cabal+HsLua ships with batteries included and includes Lua 5.4.7. Cabal flags make it easy to compile against a system-wide Lua installation. 
+ app/hslua.hs view
@@ -0,0 +1,46 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeApplications  #-}+{- |+Module      : Main+Copyright   : © 2022-2025 Albert Krewinkel+License     : MIT+Maintainer  : Albert Krewinkel <tarleb@hslua.org>++A Haskell-wrapped Lua interpreter with Haskell modules.+-}+module Main (main) where+import Control.Monad (when)+import HsLua.Core  as Lua+  (Exception, openlibs, pushboolean, registryindex, run, setfield)+import HsLua.Packaging (preloadModule)+import HsLua.CLI (EnvBehavior (IgnoreEnvVars), Settings (..), runStandalone)+import System.Environment (getArgs, getProgName)+import qualified HsLua.Module.Path    as Path+import qualified HsLua.Module.System  as System+import qualified HsLua.Module.Text    as Text+import qualified HsLua.Module.Version as Version+import qualified HsLua.Module.Zip     as Zip++-- | Run a default Lua interpreter.+main :: IO ()+main = do+  let settings = Settings+        { settingsVersionInfo = ""+        , settingsRunner = \envBehavior action -> run $ do+            when (envBehavior == IgnoreEnvVars) $ do+              pushboolean True+              setfield registryindex "LUA_NOENV"+            openlibs+            mapM_ preloadModule+              [ Path.documentedModule+              , System.documentedModule+              , Text.documentedModule+              , Version.documentedModule+              , Zip.documentedModule+              ]+            action+        , settingsHistory = Just ".hslua-history"+        }+  prg  <- getProgName+  args <- getArgs+  runStandalone @Lua.Exception settings prg args
hslua.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                hslua-version:             2.3.1+version:             2.4.0 synopsis:            Bindings to Lua, an embeddable scripting language description:         HsLua provides wrappers and helpers                      to bridge Haskell and <https://www.lua.org/ Lua>.@@ -8,7 +8,7 @@                      It builds upon the /lua/ package, which allows to bundle                      a Lua interpreter with a Haskell program.                      .-                     Example programs are can be found in the @hslua-examples@+                     Example programs can be found in the @hslua-examples@                      subdir of the project                      <https://github.com/hslua/hslua repository>. homepage:            https://hslua.org/@@ -25,47 +25,41 @@ extra-source-files:  README.md                    , CHANGELOG.md                    , test/lua/*.lua-tested-with:         GHC == 8.4.4-                   , GHC == 8.6.5-                   , GHC == 8.8.4+tested-with:         GHC == 8.8.4                    , GHC == 8.10.7                    , GHC == 9.0.2                    , GHC == 9.2.8                    , GHC == 9.4.8-                   , GHC == 9.6.3-                   , GHC == 9.8.1+                   , GHC == 9.6.7+                   , GHC == 9.8.4+                   , GHC == 9.10.2+                   , GHC == 9.12.2  source-repository head   type:                git   location:            https://github.com/hslua/hslua.git +Flag executable+  description:         Compile `hslua` standalone executable.+  default:             False+ common common-options   default-language:    Haskell2010-  build-depends:       base                    >= 4.11  && < 5-                     , bytestring              >= 0.10.2 && < 0.13-                     , containers              >= 0.5.9  && < 0.8-                     , exceptions              >= 0.8    && < 0.11-                     , hslua-aeson             >= 2.3.1  && < 2.4-                     , hslua-core              >= 2.3.2  && < 2.4-                     , hslua-classes           >= 2.2.1  && < 2.4-                     , hslua-marshalling       >= 2.3.1  && < 2.4-                     , hslua-objectorientation >= 2.3.1  && < 2.4-                     , hslua-packaging         >= 2.3.1  && < 2.4-                     , hslua-typing            >= 0.1.1  && < 0.2-                     , mtl                     >= 2.2    && < 2.4-                     , text                    >= 1.2    && < 2.2+  build-depends:       base                     >= 4.11  && < 5   ghc-options:         -Wall+                       -Wcpp-undef+                       -Werror=missing-home-modules+                       -Widentities                        -Wincomplete-record-updates+                       -Wincomplete-uni-patterns                        -Wnoncanonical-monad-instances+                       -Wpartial-fields                        -Wredundant-constraints-  if impl(ghc >= 8.2)-    ghc-options:         -Wcpp-undef-                         -Werror=missing-home-modules-  if impl(ghc >= 8.4)-    ghc-options:         -Widentities-                         -Wincomplete-uni-patterns-                         -Wpartial-fields-                         -fhide-source-paths+                       -fhide-source-paths+  if impl(ghc >= 8.10)+    ghc-options:         -Wunused-packages+  if impl(ghc >= 9.0)+    ghc-options:         -Winvalid-haddock  library   import:              common-options@@ -89,6 +83,13 @@                      , HsLua.Packaging.Rendering                      , HsLua.Typing   hs-source-dirs:      src+  build-depends:       hslua-aeson              >= 2.3.1  && < 2.4+                     , hslua-classes            >= 2.2.1  && < 2.4+                     , hslua-core               >= 2.3.2  && < 2.4+                     , hslua-marshalling        >= 2.3.1  && < 2.4+                     , hslua-objectorientation  >= 2.4    && < 2.5+                     , hslua-packaging          >= 2.3.1  && < 2.4+                     , hslua-typing             >= 0.1.1  && < 0.2  test-suite test-hslua   import:              common-options@@ -99,16 +100,31 @@   other-modules:       HsLuaTests                      , HsLua.UtilTests   build-depends:       hslua-                     -- The lua package is needed only to check for it's-                     -- version so we know whether to expect behavior of-                     -- Lua 5.3 or Lua 5.4.-                     , lua                  >= 2.0-                     , lua-arbitrary        >= 1.0-                     , QuickCheck           >= 2.7-                     , quickcheck-instances >= 0.3+                     , bytestring               >= 0.10.2 && < 0.13+                     , exceptions               >= 0.8    && < 0.11+                     , hslua-core               >= 2.3.2  && < 2.4                      , tasty-hslua-                     , tasty                >= 0.11-                     , tasty-hunit          >= 0.9+                     , tasty                    >= 0.11+                     , tasty-hunit              >= 0.9+                     , text                     >= 1.2    && < 2.2   other-extensions:    LambdaCase                      , OverloadedStrings                      , TypeApplications++executable hslua+  import:              common-options+  hs-source-dirs:      app+  main-is:             hslua.hs+  ghc-options:         -rtsopts -with-rtsopts=-A8m -threaded+  if flag(executable)+    buildable:           True+    build-depends:       hslua-cli+                       , hslua-core+                       , hslua-packaging+                       , hslua-module-path+                       , hslua-module-system+                       , hslua-module-text+                       , hslua-module-version+                       , hslua-module-zip+  else+   buildable:            False