on master help sign in
Merge pull request #69 from glguy/example-fix

Update the example in Graphics.Vty

commit11cc9e30322686ea084c8ee2caeeed5832fd77ce authorCorey O'Connor <coreyoconnor@gmail.com> dateSat 2 May 2015, 13:22 (11 years ago) parent475c45d83c2203
1 file changed+8−5
src/Graphics/Vty.hs+8−5
src/Graphics/Vty.hs+8−5
@@ -14,16 +14,19 @@
1414-- See the vty-examples package for a number of examples.
1515--
1616-- @
17+-- import "Graphics.Vty"
18+--
1719-- main = do
18−-- vty <- 'mkVty' def
19−-- let line0 = 'string' (def `withForeColor` 'green') \"first line\"
20−-- line1 = 'string' (def `withBackColor` 'blue') \"second line\"
20+-- cfg <- 'standardIOConfig'
21+-- vty <- 'mkVty' cfg
22+-- let line0 = 'string' ('defAttr' ` 'withForeColor' ` 'green') \"first line\"
23+-- line1 = 'string' ('defAttr' ` 'withBackColor' ` 'blue') \"second line\"
2124-- img = line0 '<->' line1
2225-- pic = 'picForImage' img
2326-- 'update' vty pic
24−-- e :: 'Event' <- 'nextEvent' vty
27+-- e <- 'nextEvent' vty
2528-- 'shutdown' vty
26−-- print $ \"Last event was: \" ++ show e
29+-- 'print' (\"Last event was: \" '++' 'show' e)
2730-- @
2831--
2932-- Good sources of documentation for terminal programming are: