Hello community,

here is the log from the commit of package ghc-persistent for openSUSE:Factory 
checked in at 2015-12-09 19:52:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-persistent (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-persistent.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-persistent"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-persistent/ghc-persistent.changes    
2015-11-26 17:02:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-persistent.new/ghc-persistent.changes       
2015-12-09 22:17:18.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Dec  7 11:15:00 UTC 2015 - [email protected]
+
+- update to 2.2.3
+* PersistField instance for Natural
+* better oracle support in odbc
+
+-------------------------------------------------------------------

Old:
----
  persistent-2.2.2.1.tar.gz

New:
----
  persistent-2.2.3.tar.gz

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

Other differences:
------------------
++++++ ghc-persistent.spec ++++++
--- /var/tmp/diff_new_pack.ckPCpW/_old  2015-12-09 22:17:19.000000000 +0100
+++ /var/tmp/diff_new_pack.ckPCpW/_new  2015-12-09 22:17:19.000000000 +0100
@@ -15,17 +15,18 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 %global pkg_name persistent
 
 %bcond_with tests
 
 Name:           ghc-persistent
-Version:        2.2.2.1
+Version:        2.2.3
 Release:        0
 Summary:        Type-safe, multi-backend data serialization
+License:        MIT
 Group:          System/Libraries
 
-License:        MIT
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -87,37 +88,29 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
 %if %{with tests}
 %cabal test
 %endif
 
-
 %post devel
 %ghc_pkg_recache
 
-
 %postun devel
 %ghc_pkg_recache
 
-
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
 
-
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
 %doc README.md
 
-
 %changelog

++++++ persistent-2.2.2.1.tar.gz -> persistent-2.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.2.2.1/ChangeLog.md 
new/persistent-2.2.3/ChangeLog.md
--- old/persistent-2.2.2.1/ChangeLog.md 2015-10-27 20:10:26.000000000 +0100
+++ new/persistent-2.2.3/ChangeLog.md   2015-11-29 18:59:28.000000000 +0100
@@ -1,3 +1,12 @@
+## 2.2.3
+
+* PersistField instance for Natural
+* better oracle support in odbc
+
+## 2.2.2
+
+* Add liftSqlPersistMPool function
+
 ## 2.2.1
 
 * Migration failure message with context
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/persistent-2.2.2.1/Database/Persist/Class/PersistField.hs 
new/persistent-2.2.3/Database/Persist/Class/PersistField.hs
--- old/persistent-2.2.2.1/Database/Persist/Class/PersistField.hs       
2015-11-15 15:31:39.000000000 +0100
+++ new/persistent-2.2.3/Database/Persist/Class/PersistField.hs 2015-11-29 
18:59:28.000000000 +0100
@@ -55,6 +55,10 @@
 import System.Locale (defaultTimeLocale)
 #endif
 
+#if MIN_VERSION_base(4,8,0)
+import Numeric.Natural (Natural)
+#endif
+
 -- | A value which can be marshalled to and from a 'PersistValue'.
 class PersistField a where
     toPersistValue :: a -> PersistValue
@@ -189,7 +193,7 @@
     [(a, "")] -> Right $ toRational (a :: Pico)
     _ -> Left $ "Can not read " <> t <> " as Rational (Pico in fact)"
   fromPersistValue (PersistInt64 i) = Right $ fromIntegral i
-  fromPersistValue (PersistByteString bs) = case double $ T.cons '0' $ 
T.decodeUtf8With T.lenientDecode bs of 
+  fromPersistValue (PersistByteString bs) = case double $ T.cons '0' $ 
T.decodeUtf8With T.lenientDecode bs of
                                               Right (ret,"") -> Right $ 
toRational ret
                                               Right (a,b) -> Left $ "Invalid 
bytestring[" <> T.pack (show bs) <> "]: expected a double but returned " <> 
T.pack (show (a,b))
                                               Left xs -> Left $ "Invalid 
bytestring[" <> T.pack (show bs) <> "]: expected a double but returned " <> 
T.pack (show xs)
@@ -199,7 +203,7 @@
     toPersistValue = PersistBool
     fromPersistValue (PersistBool b) = Right b
     fromPersistValue (PersistInt64 i) = Right $ i /= 0
-    fromPersistValue (PersistByteString i) = case readInt i of 
+    fromPersistValue (PersistByteString i) = case readInt i of
                                                Just (0,"") -> Right False
                                                Just (1,"") -> Right True
                                                xs -> error $ "PersistField 
Bool failed parsing PersistByteString xs["++show xs++"] i["++show i++"]"
@@ -254,6 +258,12 @@
 
     fromPersistValue x = Left $ T.pack $ "Expected UTCTime, received: " ++ 
show x
 
+#if MIN_VERSION_base(4,8,0)
+instance PersistField Natural where
+  toPersistValue = (toPersistValue :: Int64 -> PersistValue) . fromIntegral
+  fromPersistValue x = fromIntegral <$> (fromPersistValue x :: Either Text 
Int64)
+#endif
+
 instance PersistField a => PersistField (Maybe a) where
     toPersistValue Nothing = PersistNull
     toPersistValue (Just a) = toPersistValue a
@@ -342,7 +352,7 @@
     fromPersistValue PersistNull         = Right Inactive
     fromPersistValue (PersistBool True)  = Right Active
     fromPersistValue (PersistInt64 1)    = Right Active
-    fromPersistValue (PersistByteString i) = case readInt i of 
+    fromPersistValue (PersistByteString i) = case readInt i of
                                                Just (0,"") -> Left $ T.pack 
"PersistField Checkmark: found unexpected 0 value"
                                                Just (1,"") -> Right Active
                                                xs -> Left $ T.pack $ 
"PersistField Checkmark failed parsing PersistByteString xs["++show xs++"] 
i["++show i++"]"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.2.2.1/Database/Persist/Sql/Class.hs 
new/persistent-2.2.3/Database/Persist/Sql/Class.hs
--- old/persistent-2.2.2.1/Database/Persist/Sql/Class.hs        2015-11-10 
16:38:19.000000000 +0100
+++ new/persistent-2.2.3/Database/Persist/Sql/Class.hs  2015-11-29 
18:59:28.000000000 +0100
@@ -34,6 +34,10 @@
 import Data.Bits (bitSize)
 import qualified Data.Vector as V
 
+#if MIN_VERSION_base(4,8,0)
+import Numeric.Natural (Natural)
+#endif
+
 -- | Class for data types that may be retrived from a 'rawSql'
 -- query.
 class RawSql a where
@@ -274,6 +278,11 @@
 instance PersistFieldSql Rational where
     sqlType _ = SqlNumeric 32 20   --  need to make this field big enough to 
handle Rational to Mumber string conversion for ODBC
 
+#if MIN_VERSION_base(4,8,0)
+instance PersistFieldSql Natural where
+  sqlType _ = SqlInt64
+#endif
+
 -- An embedded Entity
 instance (PersistField record, PersistEntity record) => PersistFieldSql 
(Entity record) where
     sqlType _ = SqlString
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.2.2.1/persistent.cabal 
new/persistent-2.2.3/persistent.cabal
--- old/persistent-2.2.2.1/persistent.cabal     2015-11-15 15:31:39.000000000 
+0100
+++ new/persistent-2.2.3/persistent.cabal       2015-11-29 18:59:28.000000000 
+0100
@@ -1,5 +1,5 @@
 name:            persistent
-version:         2.2.2.1
+version:         2.2.3
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <[email protected]>


Reply via email to