Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyled [WIP] toplevel record reorganization #2283

Open
wants to merge 1 commit into
base: refactor/toplevel-records
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/swarm-tui/Swarm/TUI/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,11 @@ data SwarmKeyDispatchers = SwarmKeyDispatchers
, robotDispatcher :: SwarmKeyDispatcher
}


-- | This encapsulates both game and UI state for an actively-playing scenario.
data PlayState = PlayState {
_gameState :: GameState
data PlayState = PlayState
{ _gameState :: GameState
, _somethingState :: ()
}
}

--------------------------------------------------
-- Lenses for PlayState
Expand All @@ -182,7 +181,6 @@ gameState :: Lens' PlayState GameState
-- | The 'UIGameplay' record.
somethingState :: Lens' PlayState ()


-- ----------------------------------------------------------------------------
-- APPSTATE --
-- ----------------------------------------------------------------------------
Expand Down Expand Up @@ -330,11 +328,11 @@ keyConfig :: Lens' KeyEventHandlingState (KeyConfig SwarmEvent)

-- | Dispatchers that will call handler on key combo.
keyDispatchers :: Lens' KeyEventHandlingState SwarmKeyDispatchers

--------------------------------------------------
-- Lenses for AppState

playState :: Functor f => (PlayState -> f PlayState) -> AppState -> f AppState

makeLensesNoSigs ''AppState

-- | The 'UIState' record.
Expand Down