Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Corey O'Connor <coreyoconnor <at> gmail.com>
Subject: ANN: vty-4.2.1.0
Newsgroups: gmane.comp.lang.haskell.general
Date: Monday 28th December 2009 23:31:21 UTC (over 8 years ago)
http://hackage.haskell.org/package/vty

4.2.1.0
    * GHC 6.12.1 support
    * API changes:
        * Attr record accessor fore_color changed to attr_fore_color
        * Attr record accessor back_color changed to attr_back_color
        * Attr record accessor style changed to attr_style
        * Added an "inline" display attribute changing DSL:
            * put_attr_change applies a display attribute change
immediately to a terminal
            * For instance, can be used to change the display
attrbiutes of text output via putStrLn
              and putStr. EX: "put_attr_change $ back_color red" will set
the
              background color to red.
            * Changes do not apply to a Picture output via output_picture.
            * See Graphics.Vty.Inline
        * Moved all IO actions into any monad an instance of MonadIO

Short example of Graphics.Vty.Inline:

import Graphics.Vty
import Graphics.Vty.Inline

main = do
    t <- terminal_handle
    putStr "Not styled. "
    put_attr_change t $ back_color red >> apply_style underline
    putStr " Styled! "
    put_attr_change t $ default_all
    putStrLn "Not styled."
    release_terminal t
    return ()

Cheers,
Corey O'Connor
 
CD: 3ms