Skip to content

Commit

Permalink
use of time-compat to circumvent directory change of old-time to time
Browse files Browse the repository at this point in the history
  • Loading branch information
atzedijkstra committed Nov 29, 2012
1 parent ba18b9e commit f091db9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
4 changes: 4 additions & 0 deletions src/UHC/Util/Time.hs
Expand Up @@ -2,8 +2,11 @@

-- wrapping around different versions of directory, enforcing different time packages to be used.

#define DIRECTORY_USES_UTCTIME 1

module UHC.Util.Time
(
module Data.Time.Compat,
# ifdef DIRECTORY_USES_UTCTIME
module Data.Time,
module Data.Time.Clock,
Expand All @@ -23,6 +26,7 @@ import Data.Time.Clock
#else
import System.Time
#endif
import Data.Time.Compat

#ifdef DIRECTORY_USES_UTCTIME
-- | a for now alias for old-time ClockTime
Expand Down
20 changes: 4 additions & 16 deletions uhc-util.cabal
Expand Up @@ -13,33 +13,21 @@ Category: Development
Description: General purpose utilities for UHC and related tools
Synopsis: UHC utilities

Flag directory-uses-UTCTime
Description: Use the directory version which uses UTCTime
Default: True

library
if flag(directory-uses-UTCTime)
build-depends:
directory >= 1.2 && < 2,
time >= 1.4 && < 2
cpp-options:
-DDIRECTORY_USES_UTCTIME
else
build-depends:
directory >= 1.1 && < 1.2,
old-time >= 1.1 && < 1.2
Build-Depends:
base >= 4 && < 5,
mtl >= 2 && < 3,
fgl >= 5.4 && < 6.0,
directory >= 1.2 && < 2,
hashable >= 1.1 && < 1.2,
containers >= 0.4 && < 0.5,
directory >= 1.1 && < 2,
array >= 0.4 && < 0.5,
process >= 1.1 && < 1.2,
binary >= 0.5 && < 1,
bytestring >= 0.9 && < 1,
uulib >= 0.9 && < 1
uulib >= 0.9 && < 1,
time-compat >= 0.1.0.1 && < 0.2,
time >= 1.4 && < 2
Exposed-Modules:
UHC.Util.AGraph,
UHC.Util.Binary,
Expand Down

0 comments on commit f091db9

Please sign in to comment.