lensify AppState
This commit is contained in:
@@ -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