on 5.23 help sign in
vty/test/MinimalExample.hs
14 lines 369 B history raw
1module Main where
3import Graphics.Vty
5main = do
6 vty <- mkVty defaultConfig
7 let line0 = string (def `withForeColor` green) "first line"
8 line1 = string (def `withBackColor` blue) "second line"
9 img = line0 <-> line1
10 pic = picForImage img
11 update vty pic
12 e <- nextEvent vty
13 shutdown vty
14 print $ "Last event was: " ++ show e