Main.hs 644 B

123456789101112131415161718192021222324252627
  1. module Main where
  2. import Brick
  3. import qualified Control.Concurrent.Chan as Chan
  4. import Data.Default (def)
  5. import qualified Graphics.Vty as Vty
  6. import qualified State
  7. import qualified Draw
  8. import qualified Event
  9. trackerApp :: App State.State Event.Event Int
  10. trackerApp = App
  11. { appDraw = Draw.draw
  12. , appChooseCursor = \_ _ -> Nothing
  13. , appHandleEvent = Event.handle
  14. , appStartEvent = Event.initialize
  15. , appAttrMap = def
  16. , appLiftVtyEvent = Event.VtyEvent
  17. }
  18. main :: IO ()
  19. main = do
  20. eventChan <- Chan.newChan
  21. _ <- customMain (Vty.mkVty def) eventChan trackerApp State.newState
  22. return ()