EQXRXRZDYCM7BDAVBOXQYPG6C7IJT3OFGNIXCDAHJJBRKAXNGL7AC
tags
TAGS
Flag old-base
default: False
manual: False
library
default-language: Haskell2010
hs-source-dirs: src
exposed-modules:
Ananke
Ananke.TimeLog
Ananke.Interval
build-depends:
base >= 4.4 && < 5,
lens >= 3.7.6 && < 3.11,
text >= 0.11 && < 0.12,
time >= 1.1 && < 1.5,
iso8601-time == 0.1.1,
containers == 0.5.*,
postgresql-simple >= 0.3.10
Executable ananke
hs-source-dirs: src
main-is: Main.hs
Test-Suite test-ananke
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Test.hs
build-depends:
tasty >= 0.7,
tasty-hunit,
tasty-quickcheck,
base,
text,
time,
iso8601-time,
ananke
snaplet-postgresql-simple >= 0.4.1
if flag(old-base)
build-depends:
base >= 4 && < 4.4,
lens >= 3.7.6 && < 3.8
else
build-depends:
base >= 4.4 && < 5,
lens >= 3.7.6 && < 3.11
snaplet-postgresql-simple >= 0.4.1,
ananke
cabal install --enable-tests --only-dependencies
module Ananke.Interval
( Interval, interval, start, end
) where
import Data.Time.Clock
import Data.Time.LocalTime
data Interval = Interval { start :: UTCTime
, end :: UTCTime
} deriving (Show, Eq)
interval s e = if s < e then Just (Interval s e) else Nothing