achille-0.0.0: A library for building static site generators
Safe HaskellSafe
LanguageHaskell2010

Achille.Timestamped

Description

Defines utilies for working with timestamped things.

Synopsis

Documentation

data Timestamped a Source #

Container for timestamping data.

Constructors

Timestamped UTCTime a 

Instances

Instances details
Functor Timestamped Source # 
Instance details

Defined in Achille.Timestamped

Methods

fmap :: (a -> b) -> Timestamped a -> Timestamped b #

(<$) :: a -> Timestamped b -> Timestamped a #

Eq a => Eq (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

Ord a => Ord (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

Show a => Show (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

Binary a => Binary (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

Methods

put :: Timestamped a -> Put #

get :: Get (Timestamped a) #

putList :: [Timestamped a] -> Put #

IsTimestamped (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

class IsTimestamped a Source #

Class for values that can be timestamped.

Minimal complete definition

timestamp

Instances

Instances details
IsTimestamped FilePath Source # 
Instance details

Defined in Achille.Timestamped

IsTimestamped (Timestamped a) Source # 
Instance details

Defined in Achille.Timestamped

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.