Safe Haskell | None |
---|---|
Language | Haskell2010 |
Dealing with server times.
If you are importing this module, you are probably doing something wrong.
Synopsis
- data ServerTime
- initialServerTime :: ServerTime
- incrementServerTime :: ServerTime -> ServerTime
- data Timed a = Timed {
- timedValue :: !a
- timedTime :: !ServerTime
Documentation
data ServerTime Source #
A "time", as "measured" by the server.
This is closer to a version number than an actual timestamp, but that distinction should not matter for your usage of this library.
In any case, a client should not be changing this value.
Instances
initialServerTime :: ServerTime Source #
A server time to start with.
incrementServerTime :: ServerTime -> ServerTime Source #
Increment a server time, this will only start repeating after at least 2^64 - 1
values, so you're probably fine.
A value along with a server time.
Timed | |
|
Instances
Eq a => Eq (Timed a) Source # | |
Show a => Show (Timed a) Source # | |
Generic (Timed a) Source # | |
ToJSON a => ToJSON (Timed a) Source # | |
Defined in Data.Mergeful.Timed | |
FromJSON a => FromJSON (Timed a) Source # | |
Validity a => Validity (Timed a) Source # | |
Defined in Data.Mergeful.Timed validate :: Timed a -> Validation # | |
type Rep (Timed a) Source # | |
Defined in Data.Mergeful.Timed type Rep (Timed a) = D1 (MetaData "Timed" "Data.Mergeful.Timed" "mergeful-0.0.0.0-LTwAvhb2uEKNxaCunTl9g" False) (C1 (MetaCons "Timed" PrefixI True) (S1 (MetaSel (Just "timedValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a) :*: S1 (MetaSel (Just "timedTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ServerTime))) |