vty 4.7.1 → 4.7.2
raw patch · 5 files changed
+39/−25 lines, 5 filesdep ~base
Dependency ranges changed: base
Files
- src/Graphics/Vty.hs +1/−0
- src/Graphics/Vty/Error.hs +11/−0
- src/Graphics/Vty/Picture.hs +4/−0
- src/Graphics/Vty/Terminal/TerminfoBased.hs +12/−12
- vty.cabal +11/−13
src/Graphics/Vty.hs view
@@ -66,6 +66,7 @@ -- might want to force a refresh. , refresh :: IO () -- | Clean up after vty.+ -- The above methods will throw an exception if executed after this is executed. , shutdown :: IO () }
+ src/Graphics/Vty/Error.hs view
@@ -0,0 +1,11 @@+module Graphics.Vty.Error+ where++import Control.Exception+++-- | The type of exceptions specific to vty.+--+-- These have fully qualified names by default since, IMO, exception handling requires this.+data VtyException+ = VtyFailure String -- | Uncategorized failure specific to vty.
src/Graphics/Vty/Picture.hs view
@@ -1,3 +1,7 @@+-- | The Picture data structure is representative of the final terminal view.+--+-- This module re-exports most of the Graphics.Vty.Image and Graphics.Vty.Attributes modules.+-- -- Copyright 2009-2010 Corey O'Connor module Graphics.Vty.Picture ( module Graphics.Vty.Picture , Image
src/Graphics/Vty/Terminal/TerminfoBased.hs view
@@ -1,4 +1,4 @@--- Copyright 2009-2010 Corey O'Connor+-- Copyright Corey O'Connor (coreyoconnor@gmail.com) {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-}@@ -133,28 +133,28 @@ instance Terminal Term where terminal_ID t = term_info_ID t ++ " :: TerminfoBased" - release_terminal t = do - liftIO $ marshall_cap_to_terminal t set_default_attr []- liftIO $ marshall_cap_to_terminal t cnorm []- liftIO $ hClose $ term_handle t+ release_terminal t = liftIO $ do+ marshall_cap_to_terminal t set_default_attr []+ marshall_cap_to_terminal t cnorm []+ hClose $ term_handle t return () - reserve_display t = do+ reserve_display t = liftIO $ do if (isJust $ smcup t)- then liftIO $ marshall_cap_to_terminal t (fromJust . smcup) []+ then marshall_cap_to_terminal t (fromJust . smcup) [] else return () -- Screen on OS X does not appear to support smcup? -- To approximate the expected behavior: clear the screen and then move the mouse to the -- home position.- liftIO $ hFlush stdout- liftIO $ marshall_cap_to_terminal t clear_screen []+ hFlush stdout+ marshall_cap_to_terminal t clear_screen [] return () - release_display t = do+ release_display t = liftIO $ do if (isJust $ rmcup t)- then liftIO $ marshall_cap_to_terminal t (fromJust . rmcup) []+ then marshall_cap_to_terminal t (fromJust . rmcup) [] else return ()- liftIO $ marshall_cap_to_terminal t cnorm []+ marshall_cap_to_terminal t cnorm [] return () display_terminal_instance t b c = do
vty.cabal view
@@ -1,5 +1,5 @@ name: vty-version: 4.7.1+version: 4.7.2 license: BSD3 license-file: LICENSE author: AUTHORS@@ -14,8 +14,8 @@ Included in the source distribution is a program test/interactive_terminal_test.hs that demonstrates the various features. .- If your terminal is not behaving as expected the results of the test/interactive_terminal_test.hs- program should be sent to the Vty maintainter to aid in debugging the issue.+ If your terminal is not behaving as expected the results of the vty-interactive-terminal-test+ executable should be sent to the Vty maintainter to aid in debugging the issue. . Notable infelicities: Sometimes poor efficiency; Assumes UTF-8 character encoding support by the terminal;@@ -26,7 +26,7 @@ . © 2006-2007 Stefan O'Rear; BSD3 license. .- © 2008-2012 Corey O'Connor; BSD3 license.+ © Corey O'Connor; BSD3 license. -- the test suites require >= 1.17.0 cabal-version: >= 1.14.0 build-type: Simple@@ -52,16 +52,17 @@ vector >= 0.7 exposed-modules: Graphics.Vty- Graphics.Vty.Terminal- Graphics.Vty.LLInput Graphics.Vty.Attributes+ Graphics.Vty.DisplayRegion+ Graphics.Vty.Error Graphics.Vty.Image Graphics.Vty.Inline+ Graphics.Vty.LLInput Graphics.Vty.Picture- Graphics.Vty.DisplayRegion+ Graphics.Vty.Terminal+ Codec.Binary.UTF8.Width - other-modules: Codec.Binary.UTF8.Width- Data.Marshalling+ other-modules: Data.Marshalling Data.Terminfo.Parse Data.Terminfo.Eval Graphics.Vty.DisplayAttributes@@ -604,10 +605,7 @@ include-dirs: cbits - build-depends: Cabal == 1.17.*,- QuickCheck >= 2.4,- random == 1.0.*,- base >= 4 && < 5,+ build-depends: base >= 4 && < 5, bytestring, containers, deepseq >= 1.1 && < 1.4,