2019-09-23 17:46:21 +03:00
|
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
|
|
|
|
module Types where
|
|
|
|
|
|
|
|
import Lens.Micro.TH (makeLenses)
|
|
|
|
|
|
|
|
import Data.Default
|
2020-06-08 21:25:52 +03:00
|
|
|
import Data.Text (Text)
|
2019-09-23 17:46:21 +03:00
|
|
|
|
|
|
|
data App = App {
|
2020-04-09 19:46:49 +03:00
|
|
|
_clickCount :: !Int,
|
2020-06-08 21:25:52 +03:00
|
|
|
_msgCount :: !Int,
|
|
|
|
_textField1 :: Text,
|
2020-06-28 03:03:06 +03:00
|
|
|
_textField2 :: Text,
|
|
|
|
_textField3 :: Text,
|
2020-06-22 05:37:30 +03:00
|
|
|
_dropdown1 :: Text
|
2019-09-23 17:46:21 +03:00
|
|
|
} deriving (Show, Eq)
|
|
|
|
|
|
|
|
instance Default App where
|
2020-06-28 03:03:06 +03:00
|
|
|
def = App 0 0 "" "" "" ""
|
2019-09-23 17:46:21 +03:00
|
|
|
|
|
|
|
makeLenses ''App
|
2020-06-04 23:36:01 +03:00
|
|
|
|
2020-06-15 00:53:04 +03:00
|
|
|
data AppEvent = InitApp
|
|
|
|
| RunShortTask
|
2020-06-05 22:53:11 +03:00
|
|
|
| RunLongTask
|
|
|
|
| PrintTextFields
|
2020-06-08 21:25:52 +03:00
|
|
|
| AppButton
|
|
|
|
| IncreaseMessage
|
2020-06-22 05:37:30 +03:00
|
|
|
| UpdateText Text
|
2020-06-05 22:53:11 +03:00
|
|
|
deriving (Show, Eq)
|