Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Defines utilies for working with timestamped things.
Synopsis
- data Timestamped a = Timestamped UTCTime a
- class IsTimestamped a
- timestamp :: IsTimestamped a => a -> UTCTime
- timestamped :: IsTimestamped a => a -> Timestamped a
- timestampedWith :: (a -> UTCTime) -> a -> Timestamped a
- compareTimestamped :: IsTimestamped a => a -> a -> Ordering
- recentFirst :: IsTimestamped a => [a] -> [a]
- oldFirst :: IsTimestamped a => [a] -> [a]
Documentation
data Timestamped a Source #
Container for timestamping data.
Instances
class IsTimestamped a Source #
Class for values that can be timestamped.
Instances
IsTimestamped FilePath Source # | |
IsTimestamped (Timestamped a) Source # | |
Defined in Achille.Timestamped timestamp :: Timestamped a -> UTCTime Source # |
timestamp :: IsTimestamped a => a -> UTCTime Source #
Retrieve a datetime from a value.
timestamped :: IsTimestamped a => a -> Timestamped a Source #
Wrap a value that can be timestamped.
timestampedWith :: (a -> UTCTime) -> a -> Timestamped a Source #
Wrap a value that can be timestamped, using the given function for retrieving the timestamp.
compareTimestamped :: IsTimestamped a => a -> a -> Ordering Source #
Compare two timestamped values.
recentFirst :: IsTimestamped a => [a] -> [a] Source #
Sort timestamped values from most recent to oldest.
oldFirst :: IsTimestamped a => [a] -> [a] Source #
Sort timestamped values from oldest to most recent.