-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Space-efficient Unix timestamp and utilities -- -- Space-efficient Unix timestamp and utilities @package timestamp @version 0.2 module Timestamp -- | A value paired with a timestamp. data Timestamped event Timestamped :: {-# UNPACK #-} !Timestamp -> !event -> Timestamped event -- | Amount of microseconds since 1970-01-01 00:00.000000 UTC. The -- semantics are the same as of POSIXTime. This datatype is used -- instead of UTCTime or POSIXTime for space-efficiency. newtype Timestamp Timestamp :: Int64 -> Timestamp timestampMicroSecondsInt64 :: Timestamp -> Int64 timestampNominalDiffTime :: Timestamp -> NominalDiffTime timestampPosixTime :: Timestamp -> POSIXTime timestampUtcTime :: Timestamp -> UTCTime timestampDay :: Timestamp -> Day utcTimeTimestamp :: UTCTime -> Timestamp posixTimeTimestamp :: POSIXTime -> Timestamp -- | Folds on timestamped values module Timestamp.Folds untimestamped :: Fold input output -> Fold (Timestamped input) output filteringByUtcTime :: (UTCTime -> Bool) -> Fold (Timestamped input) output -> Fold (Timestamped input) output filteringByTimestamp :: (Timestamp -> Bool) -> Fold (Timestamped input) output -> Fold (Timestamped input) output inUtcTimeRange :: UTCTime -> UTCTime -> Fold (Timestamped input) output -> Fold (Timestamped input) output inTimestampRange :: Timestamp -> Timestamp -> Fold (Timestamped input) output -> Fold (Timestamped input) output