Skip to content

Commit

Permalink
Merge pull request #69 from glguy/example-fix
Browse files Browse the repository at this point in the history
Update the example in Graphics.Vty
  • Loading branch information
coreyoconnor committed May 2, 2015
2 parents 475c45d + 83c2203 commit 11cc9e3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Graphics/Vty.hs
Expand Up @@ -14,16 +14,19 @@
-- See the vty-examples package for a number of examples.
--
-- @
-- import "Graphics.Vty"
--
-- main = do
-- vty <- 'mkVty' def
-- let line0 = 'string' (def `withForeColor` 'green') \"first line\"
-- line1 = 'string' (def `withBackColor` 'blue') \"second line\"
-- cfg <- 'standardIOConfig'
-- vty <- 'mkVty' cfg
-- let line0 = 'string' ('defAttr' ` 'withForeColor' ` 'green') \"first line\"
-- line1 = 'string' ('defAttr' ` 'withBackColor' ` 'blue') \"second line\"
-- img = line0 '<->' line1
-- pic = 'picForImage' img
-- 'update' vty pic
-- e :: 'Event' <- 'nextEvent' vty
-- e <- 'nextEvent' vty
-- 'shutdown' vty
-- print $ \"Last event was: \" ++ show e
-- 'print' (\"Last event was: \" '++' 'show' e)
-- @
--
-- Good sources of documentation for terminal programming are:
Expand Down

0 comments on commit 11cc9e3

Please sign in to comment.