lensify AppState
This commit is contained in:
1 parent
696b17fae1
commit
21242ecbfa
3 files changed
+15
-2
No files matched your search
@@ -24,15 +24,24 @@ License along with this program. If not, see
|
||||
|
||||
|-}
|
||||
|
||||
module Hamming.App.Types (AppState (..), initialState) where
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Hamming.App.Types (
|
||||
AppState (..),
|
||||
hammingCode,
|
||||
initialState
|
||||
) where
|
||||
|
||||
import Data.Word (Word16)
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
|
||||
-- | The main state of the application
|
||||
data AppState = AppState
|
||||
{ hammingCode :: Word16
|
||||
{ _hammingCode :: Word16
|
||||
}
|
||||
|
||||
makeLenses ''AppState
|
||||
|
||||
-- | Initial application state
|
||||
initialState :: AppState
|
||||
initialState = AppState 0
|
||||
|
||||
Reference in new issue
Block a user