Hello community,
here is the log from the commit of package ghc-hslua-module-text for
openSUSE:Factory checked in at 2019-05-12 11:35:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hslua-module-text (Old)
and /work/SRC/openSUSE:Factory/.ghc-hslua-module-text.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hslua-module-text"
Sun May 12 11:35:37 2019 rev:4 rq:701768 version:0.2.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-hslua-module-text/ghc-hslua-module-text.changes
2018-10-25 08:17:17.184045960 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-hslua-module-text.new.5148/ghc-hslua-module-text.changes
2019-05-12 11:35:38.614264219 +0200
@@ -1,0 +2,12 @@
+Sun May 5 02:01:31 UTC 2019 - [email protected]
+
+- Update hslua-module-text to version 0.2.1.
+ ## 0.2.1 -- 2019-05-04
+
+ - Require at least HsLua v1.0.3: that version has better support
+ for modules.
+
+ - Rename `pushModuleText` to `pushModule`. The old name is keeped
+ as an alias for now.
+
+-------------------------------------------------------------------
Old:
----
hslua-module-text-0.2.0.tar.gz
New:
----
hslua-module-text-0.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-hslua-module-text.spec ++++++
--- /var/tmp/diff_new_pack.NkKPdP/_old 2019-05-12 11:35:42.122274489 +0200
+++ /var/tmp/diff_new_pack.NkKPdP/_new 2019-05-12 11:35:42.126274501 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-hslua-module-text
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%global pkg_name hslua-module-text
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.2.0
+Version: 0.2.1
Release: 0
Summary: Lua module for text
License: MIT
++++++ hslua-module-text-0.2.0.tar.gz -> hslua-module-text-0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hslua-module-text-0.2.0/ChangeLog.md
new/hslua-module-text-0.2.1/ChangeLog.md
--- old/hslua-module-text-0.2.0/ChangeLog.md 2018-09-24 08:20:00.000000000
+0200
+++ new/hslua-module-text-0.2.1/ChangeLog.md 1970-01-01 01:00:00.000000000
+0100
@@ -1,5 +1,13 @@
# Revision history for hslua-module-text
+## 0.2.1 -- 2019-05-04
+
+- Require at least HsLua v1.0.3: that version has better support
+ for modules.
+
+- Rename `pushModuleText` to `pushModule`. The old name is keeped
+ as an alias for now.
+
## 0.2.0 -- 2018-09-24
- Use hslua 1.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hslua-module-text-0.2.0/hslua-module-text.cabal
new/hslua-module-text-0.2.1/hslua-module-text.cabal
--- old/hslua-module-text-0.2.0/hslua-module-text.cabal 2018-09-24
08:20:00.000000000 +0200
+++ new/hslua-module-text-0.2.1/hslua-module-text.cabal 1970-01-01
01:00:00.000000000 +0100
@@ -1,5 +1,5 @@
name: hslua-module-text
-version: 0.2.0
+version: 0.2.1
synopsis: Lua module for text
description: UTF-8 aware subset of Lua's `string` module.
homepage: https://github.com/hslua/hslua-module-text
@@ -7,12 +7,17 @@
license-file: LICENSE
author: Albert Krewinkel
maintainer: [email protected]
-copyright: © 2017–2018 Albert Krewinkel
+copyright: © 2017–2019 Albert Krewinkel
category: Foreign
build-type: Simple
extra-source-files: ChangeLog.md
test/hstext-test.lua
cabal-version: >=1.10
+tested-with: GHC == 7.10.3
+ , GHC == 8.0.2
+ , GHC == 8.2.2
+ , GHC == 8.4.4
+ , GHC == 8.6.5
source-repository head
type: git
@@ -22,7 +27,7 @@
exposed-modules: Foreign.Lua.Module.Text
build-depends: base >= 4.7 && < 5
, bytestring >= 0.10.2 && < 0.11
- , hslua >= 1.0 && < 1.1
+ , hslua >= 1.0.3 && < 1.2
, text >= 1 && < 1.3
hs-source-dirs: src
default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hslua-module-text-0.2.0/src/Foreign/Lua/Module/Text.hs
new/hslua-module-text-0.2.1/src/Foreign/Lua/Module/Text.hs
--- old/hslua-module-text-0.2.0/src/Foreign/Lua/Module/Text.hs 2018-09-24
08:20:00.000000000 +0200
+++ new/hslua-module-text-0.2.1/src/Foreign/Lua/Module/Text.hs 1970-01-01
01:00:00.000000000 +0100
@@ -1,28 +1,7 @@
-{-
-Copyright © 2017–2018 Albert Krewinkel
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
--}
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Foreign.Lua.Module.Text
-Copyright : © 2017–2018 Albert Krewinkel
+Copyright : © 2017–2019 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <[email protected]>
Stability : alpha
@@ -31,7 +10,8 @@
Provide a lua module containing a selection of useful Text functions.
-}
module Foreign.Lua.Module.Text
- ( pushModuleText
+ ( pushModule
+ , pushModuleText
, preloadTextModule
)where
@@ -43,38 +23,25 @@
import qualified Foreign.Lua as Lua
import qualified Data.Text as T
--- | Pushes the @text@ module to the lua stack.
-pushModuleText :: Lua NumResults
-pushModuleText = do
+-- | Pushes the @text@ module to the Lua stack.
+pushModule :: Lua NumResults
+pushModule = do
Lua.newtable
- addFunction "lower" (return . T.toLower :: Text -> Lua Text)
- addFunction "upper" (return . T.toUpper :: Text -> Lua Text)
- addFunction "reverse" (return . T.reverse :: Text -> Lua Text)
- addFunction "len" (return . fromIntegral . T.length :: Text -> Lua
Lua.Integer)
- addFunction "sub" sub
+ Lua.addfunction "lower" (return . T.toLower :: Text -> Lua Text)
+ Lua.addfunction "upper" (return . T.toUpper :: Text -> Lua Text)
+ Lua.addfunction "reverse" (return . T.reverse :: Text -> Lua Text)
+ Lua.addfunction "len" (return . fromIntegral . T.length :: Text -> Lua
Lua.Integer)
+ Lua.addfunction "sub" sub
return 1
+-- | Legacy alias for '@pushModule@'.
+pushModuleText :: Lua NumResults
+pushModuleText = pushModule
+
-- | Add the text module under the given name to the table of preloaded
-- packages.
preloadTextModule :: String -> Lua ()
-preloadTextModule = flip addPackagePreloader pushModuleText
-
--- | Registers a preloading function. Takes an module name and the Lua
operation
--- which produces the package.
-addPackagePreloader :: String -> Lua NumResults -> Lua ()
-addPackagePreloader name modulePusher = do
- Lua.getfield Lua.registryindex Lua.preloadTableRegistryField
- Lua.pushHaskellFunction modulePusher
- Lua.setfield (-2) name
- Lua.pop 1
-
--- | Attach a function to the table at the top of the stack, using the given
--- name.
-addFunction :: ToHaskellFunction a => String -> a -> Lua ()
-addFunction name fn = do
- Lua.push name
- Lua.pushHaskellFunction fn
- Lua.rawset (-3)
+preloadTextModule = flip Lua.preloadhs pushModule
-- | Returns a substring, using Lua's string indexing rules.
sub :: Text -> Lua.Integer -> Lua.Optional Lua.Integer -> Lua Text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hslua-module-text-0.2.0/test/test-hslua-module-text.hs
new/hslua-module-text-0.2.1/test/test-hslua-module-text.hs
--- old/hslua-module-text-0.2.0/test/test-hslua-module-text.hs 2018-09-24
08:20:00.000000000 +0200
+++ new/hslua-module-text-0.2.1/test/test-hslua-module-text.hs 1970-01-01
01:00:00.000000000 +0100
@@ -1,5 +1,5 @@
{-
-Copyright © 2017–2018 Albert Krewinkel
+Copyright © 2017–2019 Albert Krewinkel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal