diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-27 17:54:31 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-27 17:54:31 +0530 |
| commit | 98af698a806e41904368c0114f9d8d9f377d9c09 (patch) | |
| tree | b09e835b1cf4c678fe557b1ab01905e75ee3922f /src/Chelleport/AppState.hs | |
| parent | 3d461b234d0b30cb7085251390b264089f447a97 (diff) | |
| download | chelleport-98af698a806e41904368c0114f9d8d9f377d9c09.tar.gz chelleport-98af698a806e41904368c0114f9d8d9f377d9c09.zip | |
Minor refactor
Diffstat (limited to '')
| -rw-r--r-- | src/Chelleport/AppState.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Chelleport/AppState.hs b/src/Chelleport/AppState.hs index 72a1afe..8c7bac1 100644 --- a/src/Chelleport/AppState.hs +++ b/src/Chelleport/AppState.hs @@ -9,13 +9,12 @@ import Chelleport.Types import Chelleport.Utils (cIntToInt, clamp, intToCInt, isEmpty, itemAt) import Control.Monad (replicateM_) import Data.Char (toLower) -import Data.List (isInfixOf) -import Data.Maybe (fromMaybe, isJust) +import Data.Maybe (isJust) import qualified Text.Fuzzy as Fuzzy initialState :: (Monad m) => m (State, Maybe AppAction) initialState = do - let cells = fromMaybe (pure undefined) $ generateGrid 0 (rows, columns) hintKeys + let cells = either error id $ generateGrid 0 (rows, columns) hintKeys pure (defaultAppState {stateGrid = cells}, Just $ SetMode defaultHintsMode) where rows = 9 |
