on master help sign in
cleanup dependencies and docs
9c0f1e7Corey O'Connor
src/Graphics/Vty.hs+1
@@ -66,6 +66,7 @@ data Vty = Vty
66 -- might want to force a refresh.
66 -- might want to force a refresh.
67 , refresh :: IO ()
67 , refresh :: IO ()
68 -- | Clean up after vty.
68 -- | Clean up after vty.
69+ -- The above methods will throw an exception if executed after this is executed.
69 , shutdown :: IO ()
70 , shutdown :: IO ()
70 }
71 }
71
72
src/Graphics/Vty/Picture.hs+4
@@ -1,3 +1,7 @@
1+-- | The Picture data structure is representative of the final terminal view.
2+--
3+-- This module re-exports most of the Graphics.Vty.Image and Graphics.Vty.Attributes modules.
4+--
1-- Copyright 2009-2010 Corey O'Connor
5-- Copyright 2009-2010 Corey O'Connor
2module Graphics.Vty.Picture ( module Graphics.Vty.Picture
6module Graphics.Vty.Picture ( module Graphics.Vty.Picture
3 , Image
7 , Image
src/Graphics/Vty/Terminal/TerminfoBased.hs+12−12
@@ -1,4 +1,4 @@
1−-- Copyright 2009-2010 Corey O'Connor
1+-- Copyright Corey O'Connor (coreyoconnor@gmail.com)
2{-# LANGUAGE ForeignFunctionInterface #-}
2{-# LANGUAGE ForeignFunctionInterface #-}
3{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
4{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE FlexibleInstances #-}
@@ -133,28 +133,28 @@ current_display_attr_caps ti
133instance Terminal Term where
133instance Terminal Term where
134 terminal_ID t = term_info_ID t ++ " :: TerminfoBased"
134 terminal_ID t = term_info_ID t ++ " :: TerminfoBased"
135
135
136− release_terminal t = do
136+ release_terminal t = liftIO $ do
137− liftIO $ marshall_cap_to_terminal t set_default_attr []
137+ marshall_cap_to_terminal t set_default_attr []
138− liftIO $ marshall_cap_to_terminal t cnorm []
138+ marshall_cap_to_terminal t cnorm []
139− liftIO $ hClose $ term_handle t
139+ hClose $ term_handle t
140 return ()
140 return ()
141
141
142− reserve_display t = do
142+ reserve_display t = liftIO $ do
143 if (isJust $ smcup t)
143 if (isJust $ smcup t)
144− then liftIO $ marshall_cap_to_terminal t (fromJust . smcup) []
144+ then marshall_cap_to_terminal t (fromJust . smcup) []
145 else return ()
145 else return ()
146 -- Screen on OS X does not appear to support smcup?
146 -- Screen on OS X does not appear to support smcup?
147 -- To approximate the expected behavior: clear the screen and then move the mouse to the
147 -- To approximate the expected behavior: clear the screen and then move the mouse to the
148 -- home position.
148 -- home position.
149− liftIO $ hFlush stdout
149+ hFlush stdout
150− liftIO $ marshall_cap_to_terminal t clear_screen []
150+ marshall_cap_to_terminal t clear_screen []
151 return ()
151 return ()
152
152
153− release_display t = do
153+ release_display t = liftIO $ do
154 if (isJust $ rmcup t)
154 if (isJust $ rmcup t)
155− then liftIO $ marshall_cap_to_terminal t (fromJust . rmcup) []
155+ then marshall_cap_to_terminal t (fromJust . rmcup) []
156 else return ()
156 else return ()
157− liftIO $ marshall_cap_to_terminal t cnorm []
157+ marshall_cap_to_terminal t cnorm []
158 return ()
158 return ()
159
159
160 display_terminal_instance t b c = do
160 display_terminal_instance t b c = do
vty.cabal+11−13
@@ -1,5 +1,5 @@
1name: vty
1name: vty
2−version: 4.7.1
2+version: 4.7.2
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: AUTHORS
5author: AUTHORS
@@ -14,8 +14,8 @@ description:
14 Included in the source distribution is a program test/interactive_terminal_test.hs that
14 Included in the source distribution is a program test/interactive_terminal_test.hs that
15 demonstrates the various features.
15 demonstrates the various features.
16 .
16 .
17− If your terminal is not behaving as expected the results of the test/interactive_terminal_test.hs
17+ If your terminal is not behaving as expected the results of the vty-interactive-terminal-test
18− program should be sent to the Vty maintainter to aid in debugging the issue.
18+ executable should be sent to the Vty maintainter to aid in debugging the issue.
19 .
19 .
20 Notable infelicities: Sometimes poor efficiency; Assumes UTF-8 character encoding support by the
20 Notable infelicities: Sometimes poor efficiency; Assumes UTF-8 character encoding support by the
21 terminal;
21 terminal;
@@ -26,7 +26,7 @@ description:
26 .
26 .
27 © 2006-2007 Stefan O'Rear; BSD3 license.
27 © 2006-2007 Stefan O'Rear; BSD3 license.
28 .
28 .
29− © 2008-2012 Corey O'Connor; BSD3 license.
29+ © Corey O'Connor; BSD3 license.
30-- the test suites require >= 1.17.0
30-- the test suites require >= 1.17.0
31cabal-version: >= 1.14.0
31cabal-version: >= 1.14.0
32build-type: Simple
32build-type: Simple
@@ -52,16 +52,17 @@ library
52 vector >= 0.7
52 vector >= 0.7
53
53
54 exposed-modules: Graphics.Vty
54 exposed-modules: Graphics.Vty
55− Graphics.Vty.Terminal
56− Graphics.Vty.LLInput
57 Graphics.Vty.Attributes
55 Graphics.Vty.Attributes
56+ Graphics.Vty.DisplayRegion
57+ Graphics.Vty.Error
58 Graphics.Vty.Image
58 Graphics.Vty.Image
59 Graphics.Vty.Inline
59 Graphics.Vty.Inline
60+ Graphics.Vty.LLInput
60 Graphics.Vty.Picture
61 Graphics.Vty.Picture
61− Graphics.Vty.DisplayRegion
62+ Graphics.Vty.Terminal
63+ Codec.Binary.UTF8.Width
62
64
63− other-modules: Codec.Binary.UTF8.Width
64− Data.Marshalling
65+ other-modules: Data.Marshalling
65 Data.Terminfo.Parse
66 Data.Terminfo.Parse
66 Data.Terminfo.Eval
67 Data.Terminfo.Eval
67 Graphics.Vty.DisplayAttributes
68 Graphics.Vty.DisplayAttributes
@@ -604,10 +605,7 @@ executable vty-interactive-terminal-test
604
605
605 include-dirs: cbits
606 include-dirs: cbits
606
607
607− build-depends: Cabal == 1.17.*,
608+ build-depends: base >= 4 && < 5,
608− QuickCheck >= 2.4,
609− random == 1.0.*,
610− base >= 4 && < 5,
611 bytestring,
609 bytestring,
612 containers,
610 containers,
613 deepseq >= 1.1 && < 1.4,
611 deepseq >= 1.1 && < 1.4,