packages feed

hslua-packaging 2.3.1 → 2.3.2

raw patch · 3 files changed

+47/−29 lines, 3 filesdep −mtldep ~containersdep ~hslua-objectorientationPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: mtl

Dependency ranges changed: containers, hslua-objectorientation

API changes (from Hackage documentation)

- HsLua.Packaging.Module: data () => Operation
+ HsLua.Packaging.Module: data Operation
- HsLua.Packaging.UDType: data () => Member e fn a
+ HsLua.Packaging.UDType: data Member e fn a
- HsLua.Packaging.UDType: data () => Operation
+ HsLua.Packaging.UDType: data Operation
- HsLua.Packaging.UDType: data () => Possible a
+ HsLua.Packaging.UDType: data Possible a
- HsLua.Packaging.UDType: data () => Property e a
+ HsLua.Packaging.UDType: data Property e a
- HsLua.Packaging.UDType: initType :: LuaError e => DocumentedTypeWithList e a itemtype -> LuaE e Name
+ HsLua.Packaging.UDType: initType :: LuaError e => UDTypeGeneric e fn a -> LuaE e Name
- HsLua.Packaging.UDType: type DocumentedType e a = UDType e (DocumentedFunction e) a
+ HsLua.Packaging.UDType: type DocumentedType e a = UDType e DocumentedFunction e a
- HsLua.Packaging.UDType: type DocumentedTypeWithList e a itemtype = UDTypeWithList e (DocumentedFunction e) a itemtype
+ HsLua.Packaging.UDType: type DocumentedTypeWithList e a itemtype = UDTypeWithList e DocumentedFunction e a itemtype
- HsLua.Packaging.UDType: udDocs :: UDTypeWithList e fn a itemtype -> TypeDocs
+ HsLua.Packaging.UDType: udDocs :: UDTypeGeneric e fn a -> TypeDocs
- HsLua.Packaging.UDType: udTypeSpec :: UDTypeWithList e fn a itemtype -> TypeSpec
+ HsLua.Packaging.UDType: udTypeSpec :: UDTypeGeneric e fn a -> TypeSpec

Files

CHANGELOG.md view
@@ -2,6 +2,12 @@  `hslua-packaging` uses [PVP Versioning][]. +## hslua-packaging-2.3.2++Released 2025-06-23.++-   Require hslua-objectorientation-2.4.+ ## hslua-packaging-2.3.1  Released 2024-01-18.
hslua-packaging.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                hslua-packaging-version:             2.3.1+version:             2.3.2 synopsis:            Utilities to build Lua modules. description:         Utilities to package up Haskell functions and                      values into a Lua module.@@ -18,15 +18,15 @@ category:            Foreign extra-source-files:  README.md                    , CHANGELOG.md-tested-with:         GHC == 8.4.4-                   , GHC == 8.6.5-                   , GHC == 8.8.4+tested-with:         GHC == 8.8.4                    , GHC == 8.10.3                    , 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@@ -38,22 +38,22 @@   build-depends:       base                    >= 4.11   && < 5                      , hslua-core              >= 2.2.1  && < 2.4                      , hslua-marshalling       >= 2.2.1  && < 2.4-                     , hslua-objectorientation >= 2.3    && < 2.4-                     , hslua-typing            >= 0.1    && < 0.2-                     , mtl                     >= 2.2    && < 2.4                      , text                    >= 1.2    && < 2.2+   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@@ -70,7 +70,9 @@                      , StrictData   other-extensions:    DeriveFunctor                      , OverloadedStrings-  build-depends:       containers              >= 0.5.9    && < 0.8+  build-depends:       containers              >= 0.5.9  && < 0.9+                     , hslua-objectorientation >= 2.4    && < 2.5+                     , hslua-typing            >= 0.1    && < 0.2  test-suite test-hslua-packaging   import:              common-options
src/HsLua/Packaging/UDType.hs view
@@ -28,7 +28,7 @@   , operation   , peekUD   , pushUD-  , initType+  , initType  -- Reexported from ObjectOrientation   , udparam   , udresult   , udDocs@@ -67,7 +67,8 @@         -> [(Operation, DocumentedFunction e)]  -- ^ operations         -> [Member e (DocumentedFunction e) a]  -- ^ methods         -> DocumentedType e a-deftype = deftypeGeneric pushDocumentedFunction+deftype name ops methods = addDocHooks $+  deftypeGeneric' pushDocumentedFunction name ops methods emptyHooks  -- | Defines a new type that could also be treated as a list; defines -- the behavior of objects in Lua. Note that the type name must be@@ -78,7 +79,9 @@          -> [Member e (DocumentedFunction e) a]  -- ^ methods          -> Maybe (ListSpec e a itemtype)  -- ^ list access          -> DocumentedTypeWithList e a itemtype-deftype' = deftypeGeneric' pushDocumentedFunction+deftype' name ops methods mlistSpec = addDocHooks .+  deftypeGeneric' pushDocumentedFunction name ops methods $+    maybe emptyHooks listExtension mlistSpec  -- | Use a documented function as an object method. method :: DocumentedFunction e@@ -108,19 +111,26 @@  -- | Pushes a userdata value of the given type. pushUD :: LuaError e => DocumentedTypeWithList e a itemtype -> a -> LuaE e ()-pushUD = pushUDGeneric pushUDTypeDocs+pushUD = pushUDGeneric  -- | Retrieves a userdata value of the given type. peekUD :: LuaError e => DocumentedTypeWithList e a itemtype -> Peeker e a peekUD = peekUDGeneric --- | Ensures that the type has been fully initialized, i.e., that all--- metatables have been created and stored in the registry. Returns the--- name of the initialized type.-initType :: LuaError e-         => DocumentedTypeWithList e a itemtype-         -> LuaE e Name-initType = initTypeGeneric pushUDTypeDocs+-- | Adds a hook to the type that pushes the documentation.+addDocHooks+  :: LuaError e+  => UDTypeGeneric e (DocumentedFunction e) a+  -> UDTypeGeneric e (DocumentedFunction e) a+addDocHooks ty =+  let hooks = udHooks ty+  in ty+     { udHooks = hooks+       { hookMetatableSetup = do+           hookMetatableSetup hooks+           pushUDTypeDocs ty+       }+     }  -- | Pushes a documentation table for the given UD type. pushUDTypeDocs :: LuaError e