You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then the current MonadClientUI can only read and write to UI session state (and read form client and main game states) and probably most of the code will remain in MonadClientUI, making it easier to test and perhaps suggesting refactorings that minimize MonadClientUIFrontend usage.
Bonus points if liftIO can be removed from MonadClientRead after this change, so that mocking is easier and more obviously safe.
The text was updated successfully, but these errors were encountered:
I'm surprised this is not done already, so there may be some good reasons I forgot. But probably the MonadClientUI code was not as large and nasty last time I considered that.
[Edit: possibly, almost everywhere the frontend is called directly or indirectly. If so, that's a challenge and the new monad class will help monitor success in unravelling that. Getting rid of liftIO will be useful regardless.]
[Edit2: no, it's not so bad, e.g., all the messages-related code does not touch the frontend.]
Then the current
MonadClientUI
can only read and write to UI session state (and read form client and main game states) and probably most of the code will remain inMonadClientUI
, making it easier to test and perhaps suggesting refactorings that minimizeMonadClientUIFrontend
usage.Bonus points if
liftIO
can be removed fromMonadClientRead
after this change, so that mocking is easier and more obviously safe.The text was updated successfully, but these errors were encountered: