[Pkg-haskell-commits] [SCM] Haskell Database Connectivity branch, master, updated. debian/2.2.0-2-10-g8c4adfd

John Goerzen jgoerzen at complete.org
Wed Feb 17 16:43:42 UTC 2010


The following commit has been merged in the master branch:
commit 17edd3f36e1bda0c0e97f0536caa7baf5df143cf
Author: Marc Weber <marco-oweber at gmx.de>
Date:   Sun Nov 29 06:55:29 2009 +0100

    HDBC time-1.1.4 patch
    
    Same applies to HDBC.
    
    Marc Weber

diff --git a/Database/HDBC/SqlValue.hs b/Database/HDBC/SqlValue.hs
index bc789db..d2151df 100644
--- a/Database/HDBC/SqlValue.hs
+++ b/Database/HDBC/SqlValue.hs
@@ -582,6 +582,7 @@ instance Convertible SqlValue Rational where
     safeConvert (SqlTimeDiff x) = return . fromIntegral $ x
     safeConvert y@(SqlNull) = quickError y
 
+#ifndef TIME_GT_113
 instance Typeable Day where
     typeOf _ = mkTypeName "Day"
 instance Typeable TimeOfDay where
@@ -594,6 +595,7 @@ instance Typeable DiffTime where
     typeOf _ = mkTypeName "DiffTime"
 instance Typeable TimeZone where
     typeOf _ = mkTypeName "TimeZone"
+#endif
 
 instance Typeable ST.ClockTime where
     typeOf _ = mkTypeName "ClockTime"
diff --git a/HDBC.cabal b/HDBC.cabal
index 8f33eaa..600b5ec 100644
--- a/HDBC.cabal
+++ b/HDBC.cabal
@@ -24,9 +24,17 @@ flag buildtests
   description: Build the executable to run unit tests
   default: False
 
+flag time_gte_113
+  description: time > 1.1.3 has defined some more instances so omit them here
+
 library
   if flag(splitBase)
-    Build-Depends: base>=3 && <5, old-time, time>=1.1.2.4 && <1.1.3, bytestring, containers, old-locale
+    Build-Depends: base>=3 && <5, old-time, time>=1.1.2.4 && <=1.1.4, bytestring, containers, old-locale
+    if flag(time_gte_113)
+      Build-Depends: time>=1.1.3
+      CPP-OPTIONS: -DTIME_GT_113
+    else
+      Build-Depends: time<1.1.3
   else
     Build-Depends: base<3
   Build-Depends: mtl, convertible >= 1.0.1, utf8-string

-- 
Haskell Database Connectivity



More information about the Pkg-haskell-commits mailing list