Permalink
Browse files

Merge pull request #2 from phonohawk/no-time-gte-flag

Use Cabal's MIN_VERSION_package() macro instead of time_gte_113 flag.
  • Loading branch information...
2 parents 41f43aa + e6a2c99 commit c64574052c3bac35853a782875f65e629fec1df1 @snoyberg committed Dec 4, 2011
Showing with 4 additions and 11 deletions.
  1. +2 −2 Data/Convertible/Instances/Time.hs
  2. +2 −9 convertible-text.cabal
@@ -36,7 +36,7 @@ import qualified System.Time as ST
import Data.Time
import Data.Time.Clock.POSIX
import Data.Time.Calendar.OrdinalDate
-#ifndef TIME_GTE_113
+#if !MIN_VERSION_time(1,1,3)
import Data.Typeable
#endif
import Data.Ratio
@@ -81,7 +81,7 @@ instance ConvertSuccess Integer ST.ClockTime where
------------------------------ POSIX and UTC times
-#ifndef TIME_GTE_113
+#if !MIN_VERSION_time(1,1,3)
instance Typeable NominalDiffTime where
typeOf _ = mkTypeName "NominalDiffTime"
View
@@ -30,9 +30,6 @@ flag nolib
description: Skip building the library.
default: False
-flag time_gte_113
- description: time > 1.1.3 has defined some more instances so omit them here
-
library
if flag(nolib)
Buildable: False
@@ -44,12 +41,8 @@ library
text >= 0.5 && < 0.12,
bytestring >= 0.9.1.4 && < 0.10,
attempt >= 0.3.0 && < 0.4,
- template-haskell
- if flag(time_gte_113)
- Build-Depends: time>=1.1.3 && <= 1.3
- CPP-OPTIONS: -DTIME_GTE_113
- else
- Build-Depends: time<1.1.3
+ template-haskell,
+ time <= 1.3
GHC-Options: -Wall -fno-warn-orphans

0 comments on commit c645740

Please sign in to comment.