Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commentary update. add a minimal example.
- Loading branch information
1 parent
cb428e7
commit 0b8eb61
Showing
3 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Main where | ||
|
||
import Graphics.Vty | ||
|
||
import Data.Default | ||
|
||
main = do | ||
vty <- mkVty def | ||
let line0 = string (def `withForeColor` green) "first line" | ||
line1 = string (def `withBackColor` blue) "second line" | ||
img = line0 <-> line1 | ||
pic = picForImage img | ||
update vty pic | ||
e <- nextEvent vty | ||
shutdown vty | ||
print $ "Last event was: " ++ show e |