Main.hs 746 B

12345678910111213141516171819202122232425262728
  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 Hypsibius.State as State
  7. import qualified Hypsibius.Draw as Draw
  8. import qualified Hypsibius.Event as Event
  9. import qualified Hypsibius.Formats as Formats
  10. trackerApp :: App State.State Event.Event Int
  11. trackerApp = App
  12. { appDraw = Draw.draw
  13. , appChooseCursor = \_ _ -> Nothing
  14. , appHandleEvent = Event.handle
  15. , appStartEvent = Event.initialize
  16. , appAttrMap = def
  17. , appLiftVtyEvent = Event.VtyEvent
  18. }
  19. main :: IO ()
  20. main = do
  21. eventChan <- Chan.newChan
  22. _ <- customMain (Vty.mkVty def) eventChan trackerApp State.newState
  23. return ()