monomer/app/Types.hs

32 lines
619 B
Haskell
Raw Normal View History

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 {
_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,
_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
| RunLongTask
| PrintTextFields
2020-06-08 21:25:52 +03:00
| AppButton
| IncreaseMessage
| UpdateText Text
deriving (Show, Eq)