diff --git a/src/Password/App/Types.hs b/src/Password/App/Types.hs index 1087c0e..91b8343 100644 --- a/src/Password/App/Types.hs +++ b/src/Password/App/Types.hs @@ -33,6 +33,7 @@ module Password.App.Types ( -- * Lenses -- ** AppState randGen, + database, appMode, -- ** AppMode initState, @@ -51,11 +52,16 @@ import Lens.Micro (_1, _2) import Lens.Micro.TH (makeLenses) import System.Random (StdGen, initStdGen) +import Password + -- | The application state data AppState = AppState { _randGen :: StdGen -- ^ The random number generator + , _database :: PWDatabase + -- ^ The password database , _appMode :: AppMode + -- ^ The current operating mode } -- | The applicaiton's mode @@ -88,6 +94,7 @@ concat <$> mapM makeLenses mkInitialState :: MonadIO m => m AppState mkInitialState = AppState <$> initStdGen + <*> return newPWDatabase <*> return (InitMode newInitState) -- | New `InitState` value