| Copyright | (c) 2016 Herbert Valerio Riedel |
|---|---|
| License | BSD3 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Distribution.Client.IndexUtils.Timestamp
Description
Timestamp type used in package indexes
Synopsis
- data Timestamp = NoTimestamp
- epochTimeToTimestamp :: EpochTime -> Timestamp
- timestampToUTCTime :: Timestamp -> Maybe UTCTime
- utcTimeToTimestamp :: UTCTime -> Timestamp
- maximumTimestamp :: [Timestamp] -> Timestamp
Documentation
UNIX timestamp (expressed in seconds since unix epoch, i.e. 1970).
Constructors
| NoTimestamp |
Instances
| Parsec Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp Methods parsec :: CabalParsing m => m Timestamp # | |
| Pretty Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp | |
| Structured Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp | |
| Generic Timestamp Source # | |
| Show Timestamp Source # | |
| Binary Timestamp Source # | |
| NFData Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp | |
| Eq Timestamp Source # | |
| Ord Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp | |
| type Rep Timestamp Source # | |
Defined in Distribution.Client.IndexUtils.Timestamp type Rep Timestamp = D1 ('MetaData "Timestamp" "Distribution.Client.IndexUtils.Timestamp" "cabal-install-3.12.1.0-9NqWFHLEtw1EbVuShkL8UM" 'False) (C1 ('MetaCons "NoTimestamp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) | |
maximumTimestamp :: [Timestamp] -> Timestamp Source #
Compute the maximum Timestamp value
Returns NoTimestamp for the empty list. Also note that
NoTimestamp compares as smaller to all non-NoTimestamp
values.