Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-toml-parser for openSUSE:Factory
checked in at 2024-06-11 18:28:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-toml-parser (Old)
and /work/SRC/openSUSE:Factory/.ghc-toml-parser.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-toml-parser"
Tue Jun 11 18:28:07 2024 rev:9 rq:1179752 version:2.0.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-toml-parser/ghc-toml-parser.changes
2024-05-21 18:36:37.934802463 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-toml-parser.new.19518/ghc-toml-parser.changes
2024-06-11 18:28:48.155794125 +0200
@@ -1,0 +2,9 @@
+Fri May 31 22:57:05 UTC 2024 - Peter Simons <[email protected]>
+
+- Update toml-parser to version 2.0.1.0.
+ ## 2.0.1.0
+
+ * Added `ToValue UTCTime` and `FromValue UTCTime`. These correspond
+ to offset data-times with the timezone translated to UTC.
+
+-------------------------------------------------------------------
Old:
----
toml-parser-2.0.0.0.tar.gz
toml-parser.cabal
New:
----
toml-parser-2.0.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-toml-parser.spec ++++++
--- /var/tmp/diff_new_pack.bOBhzC/_old 2024-06-11 18:28:49.271834854 +0200
+++ /var/tmp/diff_new_pack.bOBhzC/_new 2024-06-11 18:28:49.275835000 +0200
@@ -20,13 +20,12 @@
%global pkgver %{pkg_name}-%{version}
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.0.0.0
+Version: 2.0.1.0
Release: 0
Summary: TOML 1.0.0 parser
License: ISC
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/2.cabal#/%{pkg_name}.cabal
BuildRequires: alex
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
@@ -85,7 +84,6 @@
%prep
%autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ toml-parser-2.0.0.0.tar.gz -> toml-parser-2.0.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/toml-parser-2.0.0.0/ChangeLog.md
new/toml-parser-2.0.1.0/ChangeLog.md
--- old/toml-parser-2.0.0.0/ChangeLog.md 2001-09-09 03:46:40.000000000
+0200
+++ new/toml-parser-2.0.1.0/ChangeLog.md 2001-09-09 03:46:40.000000000
+0200
@@ -1,5 +1,10 @@
# Revision history for toml-parser
+## 2.0.1.0
+
+* Added `ToValue UTCTime` and `FromValue UTCTime`. These correspond
+ to offset data-times with the timezone translated to UTC.
+
## 2.0.0.0
* Pervasive annotations on the values added to allow for detailed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/toml-parser-2.0.0.0/src/Toml/Schema/FromValue.hs
new/toml-parser-2.0.1.0/src/Toml/Schema/FromValue.hs
--- old/toml-parser-2.0.0.0/src/Toml/Schema/FromValue.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/toml-parser-2.0.1.0/src/Toml/Schema/FromValue.hs 2001-09-09
03:46:40.000000000 +0200
@@ -55,7 +55,7 @@
import Data.Text (Text)
import Data.Text qualified as Text
import Data.Text.Lazy qualified
-import Data.Time (ZonedTime, LocalTime, Day, TimeOfDay)
+import Data.Time (ZonedTime, LocalTime, Day, TimeOfDay, UTCTime,
zonedTimeToUTC)
import Data.Word (Word8, Word16, Word32, Word64)
import Numeric.Natural (Natural)
import Toml.Schema.Matcher
@@ -245,6 +245,11 @@
fromValue (ZonedTime' _ x) = pure x
fromValue v = typeError "offset date-time" v
+-- | Matches offset date-time literals and converts to UTC
+instance FromValue UTCTime where
+ fromValue (ZonedTime' _ x) = pure (zonedTimeToUTC x)
+ fromValue v = typeError "offset date-time" v
+
-- | Matches local date-time literals
instance FromValue LocalTime where
fromValue (LocalTime' _ x) = pure x
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/toml-parser-2.0.0.0/src/Toml/Schema/ToValue.hs
new/toml-parser-2.0.1.0/src/Toml/Schema/ToValue.hs
--- old/toml-parser-2.0.0.0/src/Toml/Schema/ToValue.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/toml-parser-2.0.1.0/src/Toml/Schema/ToValue.hs 2001-09-09
03:46:40.000000000 +0200
@@ -39,7 +39,7 @@
import Data.Text (Text)
import Data.Text qualified as Text
import Data.Text.Lazy qualified
-import Data.Time (Day, TimeOfDay, LocalTime, ZonedTime)
+import Data.Time (Day, TimeOfDay, LocalTime, ZonedTime, UTCTime,
utcToZonedTime, utc)
import Data.Word (Word8, Word16, Word32, Word64)
import Numeric.Natural (Natural)
import Toml.Semantics
@@ -163,6 +163,7 @@
instance ToValue TimeOfDay where toValue = TimeOfDay
instance ToValue LocalTime where toValue = LocalTime
instance ToValue ZonedTime where toValue = ZonedTime
+instance ToValue UTCTime where toValue = ZonedTime . utcToZonedTime utc
instance ToValue Day where toValue = Day
instance ToValue Integer where toValue = Integer
instance ToValue Natural where toValue = Integer . fromIntegral
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/toml-parser-2.0.0.0/test/TomlSpec.hs
new/toml-parser-2.0.1.0/test/TomlSpec.hs
--- old/toml-parser-2.0.0.0/test/TomlSpec.hs 2001-09-09 03:46:40.000000000
+0200
+++ new/toml-parser-2.0.1.0/test/TomlSpec.hs 2001-09-09 03:46:40.000000000
+0200
@@ -12,7 +12,6 @@
-}
module TomlSpec (spec) where
-import Data.Map (Map)
import Data.Map qualified as Map
import Data.Text (Text)
import Data.Time (Day)
@@ -314,9 +313,9 @@
Right (table [
"flt1" .= Double 1.0,
"flt2" .= Double 3.1415,
- "flt3" .= Double (-0.01),
- "flt4" .= Double 5e22,
- "flt5" .= Double 1e06,
+ "flt3" .= Double (-1.0e-2),
+ "flt4" .= Double 4.9999999999999996e22,
+ "flt5" .= Double 1000000.0,
"flt6" .= Double (-2.0e-2),
"flt7" .= Double 6.626e-34,
"flt8" .= Double 224617.445991228,
@@ -325,14 +324,17 @@
"sf3" .= Double (-1/0)])
it "parses nan correctly" $
- decode [quoteStr|
+ let checkNaN (Double' _ x) = isNaN x
+ checkNaN _ = False
+ in
+ parse [quoteStr|
# not a number
sf4 = nan # actual sNaN/qNaN encoding is implementation-specific
sf5 = +nan # same as `nan`
sf6 = -nan # valid, actual encoding is implementation-specific|]
`shouldSatisfy` \case
- Success _ t -> all isNaN (t :: Map Text Double)
- Failure{} -> False
+ Left{} -> False
+ Right (MkTable x) -> all (checkNaN . snd) x
-- code using Numeric.readFloat can use significant
-- resources. this makes sure this doesn't start happening
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/toml-parser-2.0.0.0/toml-parser.cabal
new/toml-parser-2.0.1.0/toml-parser.cabal
--- old/toml-parser-2.0.0.0/toml-parser.cabal 2001-09-09 03:46:40.000000000
+0200
+++ new/toml-parser-2.0.1.0/toml-parser.cabal 2001-09-09 03:46:40.000000000
+0200
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: toml-parser
-version: 2.0.0.0
+version: 2.0.1.0
synopsis: TOML 1.0.0 parser
description:
TOML parser using generated lexers and parsers with
@@ -13,7 +13,7 @@
copyright: 2023 Eric Mertens
category: Text
build-type: Simple
-tested-with: GHC == {8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.4, 9.8.1}
+tested-with: GHC == {8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.5, 9.8.2, 9.10.1}
extra-doc-files:
ChangeLog.md
@@ -71,11 +71,11 @@
Toml.Syntax.ParserUtils
build-depends:
array ^>= 0.5,
- base ^>= {4.14, 4.15, 4.16, 4.17, 4.18, 4.19},
+ base ^>= {4.14, 4.15, 4.16, 4.17, 4.18, 4.19, 4.20},
containers ^>= {0.5, 0.6, 0.7},
prettyprinter ^>= 1.7,
text >= 0.2 && < 3,
- time ^>= {1.9, 1.10, 1.11, 1.12},
+ time ^>= {1.9, 1.10, 1.11, 1.12, 1.14},
transformers ^>= {0.5, 0.6},
build-tool-depends:
alex:alex >= 3.2,
@@ -96,7 +96,7 @@
base,
containers,
hspec ^>= {2.10, 2.11},
- template-haskell ^>= {2.16, 2.17, 2.18, 2.19, 2.20, 2.21},
+ template-haskell ^>= {2.16, 2.17, 2.18, 2.19, 2.20, 2.21, 2.22},
text,
time,
toml-parser,
@@ -128,7 +128,7 @@
base,
toml-parser,
hspec ^>= {2.10, 2.11},
- template-haskell ^>= {2.16, 2.17, 2.18, 2.19, 2.20, 2.21},
+ template-haskell ^>= {2.16, 2.17, 2.18, 2.19, 2.20, 2.21, 2.22},
text,
build-tool-depends:
markdown-unlit:markdown-unlit ^>= {0.5.1, 0.6.0},