Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-text-short for openSUSE:Factory 
checked in at 2021-11-11 21:37:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-text-short (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-text-short.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-text-short"

Thu Nov 11 21:37:02 2021 rev:6 rq:930367 version:0.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-text-short/ghc-text-short.changes    
2021-03-10 08:57:42.438916977 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-text-short.new.1890/ghc-text-short.changes  
2021-11-11 21:37:28.172934492 +0100
@@ -1,0 +2,16 @@
+Mon Nov  1 08:28:51 UTC 2021 - [email protected]
+
+- Update text-short to version 0.1.4 revision 1.
+  Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
+Tue Oct 12 10:51:26 UTC 2021 - [email protected]
+
+- Update text-short to version 0.1.4.
+  ## 0.1.4
+
+    * Fix `fromString` for single character strings.
+      https://github.com/haskell-hvr/text-short/issues/20
+    * Add Template Haskell `Lift ShortText` instance.
+
+-------------------------------------------------------------------

Old:
----
  text-short-0.1.3.tar.gz

New:
----
  text-short-0.1.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-text-short.spec ++++++
--- /var/tmp/diff_new_pack.4YIfF5/_old  2021-11-11 21:37:28.744934909 +0100
+++ /var/tmp/diff_new_pack.4YIfF5/_new  2021-11-11 21:37:28.744934909 +0100
@@ -19,19 +19,20 @@
 %global pkg_name text-short
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.3
+Version:        0.1.4
 Release:        0
 Summary:        Memory-efficient representation of Unicode text strings
 License:        BSD-3-Clause
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal
+Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-binary-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-hashable-devel
 BuildRequires:  ghc-rpm-macros
+BuildRequires:  ghc-template-haskell-devel
 BuildRequires:  ghc-text-devel
 ExcludeArch:    %{ix86}
 %if %{with tests}

++++++ text-short-0.1.3.tar.gz -> text-short-0.1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-short-0.1.3/ChangeLog.md 
new/text-short-0.1.4/ChangeLog.md
--- old/text-short-0.1.3/ChangeLog.md   2019-07-20 17:36:12.000000000 +0200
+++ new/text-short-0.1.4/ChangeLog.md   2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,9 @@
+## 0.1.4
+
+  * Fix `fromString` for single character strings.
+    https://github.com/haskell-hvr/text-short/issues/20
+  * Add Template Haskell `Lift ShortText` instance.
+
 ## 0.1.3
 
   * Add `Data ShortText` instance
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-short-0.1.3/Setup.hs 
new/text-short-0.1.4/Setup.hs
--- old/text-short-0.1.3/Setup.hs       2019-07-20 17:36:12.000000000 +0200
+++ new/text-short-0.1.4/Setup.hs       1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-short-0.1.3/src/Data/Text/Short/Internal.hs 
new/text-short-0.1.4/src/Data/Text/Short/Internal.hs
--- old/text-short-0.1.3/src/Data/Text/Short/Internal.hs        2019-07-20 
17:36:12.000000000 +0200
+++ new/text-short-0.1.4/src/Data/Text/Short/Internal.hs        2001-09-09 
03:46:40.000000000 +0200
@@ -10,6 +10,12 @@
 {-# LANGUAGE Unsafe                     #-}
 {-# LANGUAGE ViewPatterns               #-}
 
+#if __GLASGOW_HASKELL__ >= 800
+{-# LANGUAGE TemplateHaskellQuotes #-}
+#else
+{-# LANGUAGE TemplateHaskell #-}
+#endif
+
 -- |
 -- Module      : Data.Text.Short.Internal
 -- Copyright   : ?? Herbert Valerio Riedel 2017
@@ -141,6 +147,8 @@
 import           Text.Printf                    (PrintfArg, formatArg,
                                                  formatString)
 
+import qualified Language.Haskell.TH.Syntax     as TH
+
 import qualified PrimOps
 
 -- | A compact representation of Unicode strings.
@@ -240,6 +248,18 @@
           Just st -> return st
 #endif
 
+-- | Since 0.1.3
+instance TH.Lift ShortText where
+    -- TODO: Use DeriveLift with bytestring-0.11.2.0
+    lift t = [| fromString s |]
+      where s = toString t
+
+#if MIN_VERSION_template_haskell(2,17,0)
+    liftTyped = TH.unsafeCodeCoerce . TH.lift
+#elif MIN_VERSION_template_haskell(2,16,0)
+    liftTyped = TH.unsafeTExpCoerce . TH.lift
+#endif
+
 -- | \(\mathcal{O}(1)\) Test whether a 'ShortText' is empty.
 --
 -- >>> null ""
@@ -657,9 +677,10 @@
 --
 -- @since 0.1
 fromString :: String -> ShortText
-fromString []  = mempty
-fromString [c] = singleton c
-fromString s = ShortText . encodeStringShort utf8 . map r $ s
+fromString s = case s of
+  []  -> mempty
+  [c] -> singleton $ r c
+  _   -> ShortText . encodeStringShort utf8 . map r $ s
   where
     r c | isSurr (ord c) = '\xFFFD'
         | otherwise      = c
@@ -1271,7 +1292,12 @@
 {-# INLINE writeWord8Array #-}
 writeWord8Array :: MBA s -> B -> Word -> ST s ()
 writeWord8Array (MBA# mba#) (B (I# i#)) (W# w#)
-  = ST $ \s -> case GHC.Exts.writeWord8Array# mba# i# w# s of
+  = ST $ \s ->
+#if __GLASGOW_HASKELL__ >= 902
+      case GHC.Exts.writeWord8Array# mba# i# (GHC.Exts.wordToWord8# w#) s of
+#else
+      case GHC.Exts.writeWord8Array# mba# i# w# s of
+#endif
                  s' -> (# s', () #)
 {- not needed yet
 {-# INLINE indexWord8Array #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-short-0.1.3/src-test/Tests.hs 
new/text-short-0.1.4/src-test/Tests.hs
--- old/text-short-0.1.3/src-test/Tests.hs      2019-07-20 17:36:12.000000000 
+0200
+++ new/text-short-0.1.4/src-test/Tests.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,11 @@
+{-# LANGUAGE CPP               #-}
 {-# LANGUAGE OverloadedLists   #-}
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell   #-}
+
+#ifndef MIN_VERSION_GLASGOW_HASKELL
+#define MIN_VERSION_GLASGOW_HASKELL(x,y,z,w) ((x*100 + y) >= 
__GLASGOW_HASKELL__)
+#endif
 
 module Main(main) where
 
@@ -164,8 +170,11 @@
   , testCase "IsString U+D800" $ "\xFFFD" @?= (IUT.fromString "\xD800")
 --  , testCase "IsString U+D800" $ (IUT.fromString "\xD800") @?= IUT.fromText 
("\xD800" :: T.Text)
 
+#if !(MIN_VERSION_bytestring(0,11,0) && MIN_VERSION_GLASGOW_HASKELL(9,0,1,0) 
&& !MIN_VERSION_GLASGOW_HASKELL(9,0,2,0))
+  -- https://gitlab.haskell.org/ghc/ghc/-/issues/19976
   , testCase "Binary.encode" $ encode ("Hello \8364 & \171581!\NUL" :: 
IUT.ShortText) @?= "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\DC2Hello \226\130\172 & 
\240\169\184\189!\NUL"
   , testCase "Binary.decode" $ decode ("\NUL\NUL\NUL\NUL\NUL\NUL\NUL\DC2Hello 
\226\130\172 & \240\169\184\189!\NUL") @?= ("Hello \8364 & \171581!\NUL" :: 
IUT.ShortText)
+#endif
   , testCase "singleton" $ [ c | c <- [minBound..maxBound], IUT.singleton c /= 
IUT.fromText (T.singleton c) ] @?= []
 
   , testCase "splitAtEnd" $ IUT.splitAtEnd 1 "??????" @?= ("???","???")
@@ -188,6 +197,27 @@
   , testCase "literal9"  $ [] @?= ("" :: IUT.ShortText)
   , testCase "literal10" $ ['??','???','$'] @?= ("?????$" :: IUT.ShortText)
   , testCase "literal12" $ IUT.unpack ['\xD800','\xD7FF','\xDFFF','\xE000'] 
@?= ['\xFFFD','\xD7FF','\xFFFD','\xE000']
+
+    -- template haskell
+  , testCase "TH.Lift" $ do
+      testLit1 @?= $([| testLit1 |])
+      testLit2 @?= $([| testLit2 |])
+      testLit3 @?= $([| testLit3 |])
+      testLit4 @?= $([| testLit4 |])
+      testLit5 @?= $([| testLit5 |])
+      testLit6 @?= $([| testLit6 |])
+      testLit7 @?= $([| testLit7 |])
+      testLit8 @?= $([| testLit8 |])
+
+  , testCase "TTH.Lift" $ do
+      testLit1 @?= $$([|| testLit1 ||])
+      testLit2 @?= $$([|| testLit2 ||])
+      testLit3 @?= $$([|| testLit3 ||])
+      testLit4 @?= $$([|| testLit4 ||])
+      testLit5 @?= $$([|| testLit5 ||])
+      testLit6 @?= $$([|| testLit6 ||])
+      testLit7 @?= $$([|| testLit7 ||])
+      testLit8 @?= $$([|| testLit8 ||])
  ]
 
 -- isScalar :: Char -> Bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/text-short-0.1.3/text-short.cabal 
new/text-short-0.1.4/text-short.cabal
--- old/text-short-0.1.3/text-short.cabal       2019-07-20 17:36:12.000000000 
+0200
+++ new/text-short-0.1.4/text-short.cabal       2001-09-09 03:46:40.000000000 
+0200
@@ -1,7 +1,6 @@
 cabal-version:       1.18
-
 name:                text-short
-version:             0.1.3
+version:             0.1.4
 synopsis:            Memory-efficient representation of Unicode text strings
 license:             BSD3
 license-file:        LICENSE
@@ -14,7 +13,7 @@
                      .
                      The main difference between 'Text' and 'ShortText' is 
that 'ShortText' uses UTF-8 instead of UTF-16 internally and also doesn't 
support zero-copy slicing (thereby saving 2 words). Consequently, the memory 
footprint of a (boxed) 'ShortText' value is 4 words (2 words when unboxed) plus 
the length of the UTF-8 encoded payload.
 
-tested-with:         GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, 
GHC==7.10.3, GHC==7.8.4
+tested-with:         GHC==9.0.1, GHC==8.10.4, GHC==8.8.3, GHC==8.6.5, 
GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==9.2.0.20210821
 extra-source-files:  ChangeLog.md
 
 Source-Repository head
@@ -33,13 +32,17 @@
 
   other-modules:       Data.Text.Short.Internal
 
-  build-depends:       base        >= 4.7    && < 4.13
-                     , bytestring  >= 0.10.4 && < 0.11
+  build-depends:       base        >= 4.7    && < 4.17
+                     , bytestring  >= 0.10.4 && < 0.12
                      , hashable    >= 1.2.6  && < 1.4
                      , deepseq     >= 1.3    && < 1.5
                      , text        >= 1.0    && < 1.3
                      , binary      >= 0.7.1  && < 0.9
-                     , ghc-prim    >= 0.3.1  && < 0.6
+                     , ghc-prim    >= 0.3.1  && < 0.9
+                     , template-haskell >= 2.9.0.0 && <2.19
+
+  if impl(ghc >=8.0)
+    build-depends: bytestring >= 0.10.8.0
 
   if !impl(ghc >= 8.0)
      build-depends: semigroups >= 0.18.2 && < 0.20
@@ -62,6 +65,11 @@
                      , Trustworthy
                      , Unsafe
 
+  if impl(ghc >= 8)
+    other-extensions: TemplateHaskellQuotes
+  else
+    other-extensions: TemplateHaskell
+
   c-sources: cbits/cbits.c
 
   if flag(asserts)
@@ -70,19 +78,22 @@
      cc-options: -DNDEBUG=1
 
   ghc-options: -Wall
-  cc-options: -O3 -Wall
+  cc-options: -Wall
 
 test-suite tests
   type:                exitcode-stdio-1.0
   hs-source-dirs:      src-test
   main-is:             Tests.hs
 
+  -- bytestring dependency for cabal_macros.h
   build-depends: base
+               , bytestring
                , binary
                , text
                , text-short
+               , template-haskell
                  -- deps which don't inherit constraints from library stanza:
-               , tasty                >= 1.0.0  && < 1.3
+               , tasty                >= 1.0.0  && < 1.5
                , tasty-quickcheck     >= 0.10   && < 0.11
                , tasty-hunit          >= 0.10.0 && < 0.11
                , quickcheck-instances >= 0.3.14 && < 0.4

++++++ text-short.cabal ++++++
--- /var/tmp/diff_new_pack.4YIfF5/_old  2021-11-11 21:37:28.816934961 +0100
+++ /var/tmp/diff_new_pack.4YIfF5/_new  2021-11-11 21:37:28.816934961 +0100
@@ -1,91 +1,102 @@
-cabal-version:       1.18
-
-name:                text-short
-version:             0.1.3
-x-revision: 3
-synopsis:            Memory-efficient representation of Unicode text strings
-license:             BSD3
-license-file:        LICENSE
-author:              Herbert Valerio Riedel
-maintainer:          [email protected]
-bug-reports:         https://github.com/hvr/text-short/issues
-category:            Data
-build-type:          Simple
-description:         This package provides the 'ShortText' type which is 
suitable for keeping many short strings in memory. This is similiar to how 
'ShortByteString' relates to 'ByteString'.
-                     .
-                     The main difference between 'Text' and 'ShortText' is 
that 'ShortText' uses UTF-8 instead of UTF-16 internally and also doesn't 
support zero-copy slicing (thereby saving 2 words). Consequently, the memory 
footprint of a (boxed) 'ShortText' value is 4 words (2 words when unboxed) plus 
the length of the UTF-8 encoded payload.
-
-tested-with:         GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, 
GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4
-extra-source-files:  ChangeLog.md
-
-Source-Repository head
-    Type:              git
-    Location:          https://github.com/hvr/text-short.git
-
-flag asserts
-  description: Enable runtime-checks via @assert@
-  default: False
-  manual: True
-
-library
-  exposed-modules:     Data.Text.Short
-                       Data.Text.Short.Partial
-                       Data.Text.Short.Unsafe
-
-  other-modules:       Data.Text.Short.Internal
-
-  build-depends:       base        >= 4.7    && < 4.16
-                     , bytestring  >= 0.10.4 && < 0.12
-                     , hashable    >= 1.2.6  && < 1.4
-                     , deepseq     >= 1.3    && < 1.5
-                     , text        >= 1.0    && < 1.3
-                     , binary      >= 0.7.1  && < 0.9
-                     , ghc-prim    >= 0.3.1  && < 0.8
-
-  if !impl(ghc >= 8.0)
-     build-depends: semigroups >= 0.18.2 && < 0.20
-
-  -- GHC version specific PrimOps
-  if impl(ghc >= 8.4)
-     hs-source-dirs:   src-ghc804
-  else
-     c-sources:        cbits/memcmp.c
-     hs-source-dirs:   src-ghc708
-  other-modules:       PrimOps
-
-  hs-source-dirs:      src
-
-  default-language:    Haskell2010
-  other-extensions:    CPP
-                     , GeneralizedNewtypeDeriving
-                     , MagicHash
-                     , UnliftedFFITypes
-                     , Trustworthy
-                     , Unsafe
-
-  c-sources: cbits/cbits.c
-
-  if flag(asserts)
-     ghc-options: -fno-ignore-asserts
-  else
-     cc-options: -DNDEBUG=1
-
-  ghc-options: -Wall
-  cc-options: -O3 -Wall
-
-test-suite tests
-  type:                exitcode-stdio-1.0
-  hs-source-dirs:      src-test
-  main-is:             Tests.hs
-
-  build-depends: base
-               , binary
-               , text
-               , text-short
-                 -- deps which don't inherit constraints from library stanza:
-               , tasty                >= 1.0.0  && < 1.3
-               , tasty-quickcheck     >= 0.10   && < 0.11
-               , tasty-hunit          >= 0.10.0 && < 0.11
-               , quickcheck-instances >= 0.3.14 && < 0.4
-
-  default-language:    Haskell2010
+cabal-version:       1.18
+name:                text-short
+version:             0.1.4
+x-revision:          1
+synopsis:            Memory-efficient representation of Unicode text strings
+license:             BSD3
+license-file:        LICENSE
+author:              Herbert Valerio Riedel
+maintainer:          [email protected]
+bug-reports:         https://github.com/hvr/text-short/issues
+category:            Data
+build-type:          Simple
+description:         This package provides the 'ShortText' type which is 
suitable for keeping many short strings in memory. This is similiar to how 
'ShortByteString' relates to 'ByteString'.
+                     .
+                     The main difference between 'Text' and 'ShortText' is 
that 'ShortText' uses UTF-8 instead of UTF-16 internally and also doesn't 
support zero-copy slicing (thereby saving 2 words). Consequently, the memory 
footprint of a (boxed) 'ShortText' value is 4 words (2 words when unboxed) plus 
the length of the UTF-8 encoded payload.
+
+tested-with:         GHC==9.0.1, GHC==8.10.4, GHC==8.8.3, GHC==8.6.5, 
GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==9.2.1
+extra-source-files:  ChangeLog.md
+
+Source-Repository head
+    Type:              git
+    Location:          https://github.com/hvr/text-short.git
+
+flag asserts
+  description: Enable runtime-checks via @assert@
+  default: False
+  manual: True
+
+library
+  exposed-modules:     Data.Text.Short
+                       Data.Text.Short.Partial
+                       Data.Text.Short.Unsafe
+
+  other-modules:       Data.Text.Short.Internal
+
+  build-depends:       base        >= 4.7    && < 4.17
+                     , bytestring  >= 0.10.4 && < 0.12
+                     , hashable    >= 1.2.6  && < 1.5
+                     , deepseq     >= 1.3    && < 1.5
+                     , text        >= 1.0    && < 1.3
+                     , binary      >= 0.7.1  && < 0.9
+                     , ghc-prim    >= 0.3.1  && < 0.9
+                     , template-haskell >= 2.9.0.0 && <2.19
+
+  if impl(ghc >=8.0)
+    build-depends: bytestring >= 0.10.8.0
+
+  if !impl(ghc >= 8.0)
+     build-depends: semigroups >= 0.18.2 && < 0.20
+
+  -- GHC version specific PrimOps
+  if impl(ghc >= 8.4)
+     hs-source-dirs:   src-ghc804
+  else
+     c-sources:        cbits/memcmp.c
+     hs-source-dirs:   src-ghc708
+  other-modules:       PrimOps
+
+  hs-source-dirs:      src
+
+  default-language:    Haskell2010
+  other-extensions:    CPP
+                     , GeneralizedNewtypeDeriving
+                     , MagicHash
+                     , UnliftedFFITypes
+                     , Trustworthy
+                     , Unsafe
+
+  if impl(ghc >= 8)
+    other-extensions: TemplateHaskellQuotes
+  else
+    other-extensions: TemplateHaskell
+
+  c-sources: cbits/cbits.c
+
+  if flag(asserts)
+     ghc-options: -fno-ignore-asserts
+  else
+     cc-options: -DNDEBUG=1
+
+  ghc-options: -Wall
+  cc-options: -Wall
+
+test-suite tests
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      src-test
+  main-is:             Tests.hs
+
+  -- bytestring dependency for cabal_macros.h
+  build-depends: base
+               , bytestring
+               , binary
+               , text
+               , text-short
+               , template-haskell
+                 -- deps which don't inherit constraints from library stanza:
+               , tasty                >= 1.0.0  && < 1.5
+               , tasty-quickcheck     >= 0.10   && < 0.11
+               , tasty-hunit          >= 0.10.0 && < 0.11
+               , quickcheck-instances >= 0.3.14 && < 0.4
+
+  default-language:    Haskell2010

Reply via email to