-- | Take everything that was put into the 'displayChan' at that point
-- out, and make a 'Display' out of it.
displayFromChan :: IO (Maybe Display)
displayFromChan =
  Just . many <$> unfoldM (atomically $ tryReadTChan displayChan)
displayFromChan :: IO (Maybe Display)
displayFromChan =
  Just . many <$> unfoldM (atomically $ tryReadTChan displayChan)
displayFromChan =
  Just . many <$> unfoldM (atomically $ tryReadTChan displayChan)