At the moment, the app's state is stored as a tuple (Maybe UTCTime, [Result]) inside an IORef, where:
The first part stores the timestamp of the last successful update
The second part stores the latest results
The timestamp is wrapped inside a Maybe to reflect that there might be no successful update yet, in which case the list of results should be empty. Although this hasn't too much impact, the invariant could be encoded more clearly: If there was no update yet, there is neither an timestamp nor a list of results.
The UI also should indicate whether there was no successful update yet or whether the are no results
At the moment, the app's state is stored as a tuple
(Maybe UTCTime, [Result])
inside anIORef
, where:The timestamp is wrapped inside a
Maybe
to reflect that there might be no successful update yet, in which case the list of results should be empty. Although this hasn't too much impact, the invariant could be encoded more clearly: If there was no update yet, there is neither an timestamp nor a list of results.The UI also should indicate whether there was no successful update yet or whether the are no results