Skip to content

Commit

Permalink
Merge pull request #2 from phonohawk/no-time-gte-flag
Browse files Browse the repository at this point in the history
Use Cabal's MIN_VERSION_package() macro instead of time_gte_113 flag.
  • Loading branch information
snoyberg committed Dec 4, 2011
2 parents 41f43aa + e6a2c99 commit c645740
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Data/Convertible/Instances/Time.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down
11 changes: 2 additions & 9 deletions convertible-text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit c645740

Please sign in to comment.