[Haskell] ANN: vty-4.2.1.0
Corey O'Connor
coreyoconnor at gmail.com
Mon Dec 28 18:31:21 EST 2009
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
More information about the Haskell
mailing list