Hello community,

here is the log from the commit of package ghc-time-parsers for 
openSUSE:Factory checked in at 2016-10-22 13:20:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-time-parsers (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-time-parsers.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-time-parsers"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-time-parsers/ghc-time-parsers.changes        
2016-07-20 09:24:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-time-parsers.new/ghc-time-parsers.changes   
2016-10-22 13:20:52.000000000 +0200
@@ -1,0 +2,10 @@
+Thu Sep 15 07:03:16 UTC 2016 - [email protected]
+
+- Update to version 0.1.1.0 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------
+Mon Aug  1 10:10:43 UTC 2016 - [email protected]
+
+- Update to version 0.1.0.0 revision 4 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  3.cabal
  time-parsers-0.1.0.0.tar.gz

New:
----
  time-parsers-0.1.1.0.tar.gz

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

Other differences:
------------------
++++++ ghc-time-parsers.spec ++++++
--- /var/tmp/diff_new_pack.wQvJjf/_old  2016-10-22 13:20:53.000000000 +0200
+++ /var/tmp/diff_new_pack.wQvJjf/_new  2016-10-22 13:20:53.000000000 +0200
@@ -19,16 +19,14 @@
 %global pkg_name time-parsers
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.0.0
+Version:        0.1.1.0
 Release:        0
 Summary:        Parsers for types in `time`
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 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
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-parsers-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
@@ -42,7 +40,6 @@
 BuildRequires:  ghc-tasty-hunit-devel
 BuildRequires:  ghc-text-devel
 %endif
-# End cabal-rpm deps
 
 %description
 Parsers for types in `time`.
@@ -60,22 +57,15 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
 
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache
@@ -89,6 +79,6 @@
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
-%doc README.md
+%doc CHANGELOG.md README.md
 
 %changelog

++++++ time-parsers-0.1.0.0.tar.gz -> time-parsers-0.1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-parsers-0.1.0.0/CHANGELOG.md 
new/time-parsers-0.1.1.0/CHANGELOG.md
--- old/time-parsers-0.1.0.0/CHANGELOG.md       1970-01-01 01:00:00.000000000 
+0100
+++ new/time-parsers-0.1.1.0/CHANGELOG.md       2016-09-12 06:45:07.000000000 
+0200
@@ -0,0 +1,2 @@
+- 0.1.1.0
+    - add `mkDay`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-parsers-0.1.0.0/src/Data/Time/TH.hs 
new/time-parsers-0.1.1.0/src/Data/Time/TH.hs
--- old/time-parsers-0.1.0.0/src/Data/Time/TH.hs        2015-12-08 
22:01:36.000000000 +0100
+++ new/time-parsers-0.1.1.0/src/Data/Time/TH.hs        2016-09-12 
06:45:07.000000000 +0200
@@ -1,9 +1,10 @@
 {-# LANGUAGE TemplateHaskell #-}
 -- | Template Haskell extras for `Data.Time`.
-module Data.Time.TH (mkUTCTime) where
+module Data.Time.TH (mkUTCTime, mkDay) where
 
+import Data.List                    (nub)
 import Data.Time                    (Day (..), UTCTime (..))
-import Data.Time.Parsers            (utcTime)
+import Data.Time.Parsers            (day, utcTime)
 import Language.Haskell.TH          (Exp, Q, integerL, litE, rationalL)
 import Text.ParserCombinators.ReadP (readP_to_S)
 
@@ -11,13 +12,23 @@
 --
 -- > t :: UTCTime
 -- > t = $(mkUTCTime "2014-05-12 00:02:03.456000Z")
---
--- /Since: 0.2.3.0/
 mkUTCTime :: String -> Q Exp
-mkUTCTime s =
-    case readP_to_S utcTime s of
-        [(UTCTime (ModifiedJulianDay d) dt, "")] ->
-            [| UTCTime (ModifiedJulianDay $(d')) $(dt') :: UTCTime |]
-          where d'  = litE $ integerL d
-                dt' = litE $ rationalL $ toRational dt
-        _ -> error $ "Cannot parse date: " ++ s
+mkUTCTime s = case nub $ readP_to_S utcTime s of
+    [(UTCTime (ModifiedJulianDay d) dt, "")] ->
+        [| UTCTime (ModifiedJulianDay $(d')) $(dt') :: UTCTime |]
+      where
+        d'  = litE $ integerL d
+        dt' = litE $ rationalL $ toRational dt
+    ps -> error $ "Cannot parse date: " ++ s ++ " -- " ++ show ps
+
+-- | Make  a 'Day'. Accepts the same strings as  `day` parser accepts.
+--
+-- > d :: Day
+-- > d = $(mkDay "2014-05-12")
+mkDay :: String -> Q Exp
+mkDay s = case nub $ readP_to_S day s of
+    [(ModifiedJulianDay d, "")] ->
+        [| ModifiedJulianDay $(d') :: Day |]
+      where
+        d'  = litE $ integerL d
+    ps -> error $ "Cannot parse day: " ++ s ++ " -- " ++ show ps
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-parsers-0.1.0.0/test/Tests.hs 
new/time-parsers-0.1.1.0/test/Tests.hs
--- old/time-parsers-0.1.0.0/test/Tests.hs      2015-12-08 21:57:08.000000000 
+0100
+++ new/time-parsers-0.1.1.0/test/Tests.hs      2016-09-12 06:45:07.000000000 
+0200
@@ -44,11 +44,25 @@
     , "2015-09-07 08:16:40.807 +00:00"
     , "2015-09-07 11:16:40.807 +03:00"
     , "2015-09-07 05:16:40.807 -03:00"
+    , "2015-09-07 05:16:40.807-03:00"
+    , "2015-09-07T05:16:40Z"
+    , "2015-09-07 05:16:40Z"
+    , "2015-09-07 05:16:40 Z"
+    , "2015-09-07 05:16:40+03:00"
+    , "2015-09-07 05:16:40 +03:00"
     ]
 
 timeTHTests :: TestTree
-timeTHTests =
-    testCase "time TH example" $ assertBool "should be equal" $ lhs == rhs
-      where lhs = UTCTime (ModifiedJulianDay 56789) 123.456
-            rhs = $(mkUTCTime "2014-05-12 00:02:03.456000Z")
+timeTHTests = testGroup "TH"
+    [ testCase "time"   $ assertBool "should be equal" $ lhs0 == rhs0
+    , testCase "time' " $ assertBool "should be equal" $ lhs1 == rhs1
+    , testCase "day"    $ assertBool "should be equal" $ lhs2 == rhs2
+    ]
+  where
+    lhs0 = UTCTime (ModifiedJulianDay 56789) 123.456
+    rhs0 = $(mkUTCTime "2014-05-12 00:02:03.456Z")
+    lhs1 = UTCTime (ModifiedJulianDay 56789) 123.0
+    rhs1 = $(mkUTCTime "2014-05-12 00:02:03Z")
+    lhs2 = ModifiedJulianDay 56789
+    rhs2 = $(mkDay "2014-05-12")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-parsers-0.1.0.0/time-parsers.cabal 
new/time-parsers-0.1.1.0/time-parsers.cabal
--- old/time-parsers-0.1.0.0/time-parsers.cabal 2015-12-25 16:07:28.000000000 
+0100
+++ new/time-parsers-0.1.1.0/time-parsers.cabal 2016-09-12 06:45:07.000000000 
+0200
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.8.0.
+-- This file has been generated from package.yaml by hpack version 0.14.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           time-parsers
-version:        0.1.0.0
+version:        0.1.1.0
 synopsis:       Parsers for types in `time`.
 description:    Parsers for types in `time`.
 category:       Web
@@ -13,11 +13,12 @@
 maintainer:     Oleg Grenrus <[email protected]>
 license:        BSD3
 license-file:   LICENSE
-tested-with:    GHC==7.6.3, GHC==7.8.4, GHC==7.10.3
+tested-with:    GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
 build-type:     Simple
 cabal-version:  >= 1.10
 
 extra-source-files:
+    CHANGELOG.md
     README.md
 
 source-repository head
@@ -29,9 +30,9 @@
       src
   ghc-options: -Wall
   build-depends:
-      base             >=4.6      && <4.9
+      base             >=4.6      && <4.10
     , parsers          >=0.12.2.1 && <0.13
-    , template-haskell >=2.8.0.0  && <2.11
+    , template-haskell >=2.8.0.0  && <2.12
     , time             >=1.4.2    && <1.7
   exposed-modules:
       Data.Time.Parsers
@@ -45,13 +46,13 @@
       test
   ghc-options: -Wall
   build-depends:
-      base             >=4.6      && <4.9
+      base             >=4.6      && <4.10
     , parsers          >=0.12.2.1 && <0.13
-    , template-haskell >=2.8.0.0  && <2.11
+    , template-haskell >=2.8.0.0  && <2.12
     , time             >=1.4.2    && <1.7
     , time-parsers
     , attoparsec    >=0.12.1.6 && <0.14
-    , bifunctors    >=4.2.1    && <5.2
+    , bifunctors    >=4.2.1    && <5.5
     , parsec        >=3.1.9    && <3.2
     , parsers       >=0.12.3   && <0.13
     , tasty         >=0.10.1.2 && <0.12


Reply via email to