on master help sign in
fix test coverage collection. Had to revert tests not depending on full library. Ah well.
c5d9a90Corey O'Connor
CHANGELOG+3
@@ -1,3 +1,6 @@
1+5.0.0
2+ * API changes:
3+
14.7.0.0
44.7.0.0
2 * API changes:
5 * API changes:
3 * Added Graphics.Vty.Image.crop: Ensure an image is no larger than the specified size.
6 * Added Graphics.Vty.Image.crop: Ensure an image is no larger than the specified size.
README.md+12
@@ -54,3 +54,15 @@ special rules might be invalid on newer Mac OS.
54## Windows
54## Windows
55
55
56None!
56None!
57+
58+# Development Notes
59+
60+## Coverage
61+
62+On my system the hpc coverage mix file receives a bad hash when using template haskell. This means
63+Graphics.Vty.Span needs to have the hash value fixed after being re-generated. I just pull the
64+expected hash from the first tix file that fails. The error message is unhelpful:
65+
66+hpc: can not find vty-5.0.0/Graphics.Vty.Span in ["./dist/hpc/mix/vty-5.0.0"]
67+
68+which is incorrect: The file can be found but the hash is incorrect.
src/Codec/Binary/UTF8/Debug.hs+3−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE NoMonomorphismRestriction #-}
1-- Copyright 2009 Corey O'Connor
2-- Copyright 2009 Corey O'Connor
2module Codec.Binary.UTF8.Debug
3module Codec.Binary.UTF8.Debug
3 where
4 where
@@ -10,8 +11,9 @@ import Numeric
10
11
11-- | Converts an array of ISO-10646 characters (Char type) to an array of Word8 bytes that is the
12-- | Converts an array of ISO-10646 characters (Char type) to an array of Word8 bytes that is the
12-- corresponding UTF8 byte sequence
13-- corresponding UTF8 byte sequence
13−utf8_from_iso :: Integral i => [i] -> [Word8]
14+utf8_from_iso :: [Int] -> [Word8]
14utf8_from_iso = encode . map toEnum
15utf8_from_iso = encode . map toEnum
15
16
17+pp_utf8 :: [Int] -> IO ()
16pp_utf8 = print . map (\f -> f "") . map showHex . utf8_from_iso
18pp_utf8 = print . map (\f -> f "") . map showHex . utf8_from_iso
17
19
src/Graphics/Vty/Debug.hs−1
@@ -11,7 +11,6 @@ import Graphics.Vty.Span
11import Graphics.Vty.DisplayRegion
11import Graphics.Vty.DisplayRegion
12
12
13import qualified Data.Vector as Vector
13import qualified Data.Vector as Vector
14−import Data.Word
15
14
16row_ops_effected_columns :: DisplayOps -> [Int]
15row_ops_effected_columns :: DisplayOps -> [Int]
17row_ops_effected_columns spans
16row_ops_effected_columns spans
src/Graphics/Vty/Picture.hs+7−4
@@ -38,22 +38,22 @@ import Control.DeepSeq
38-- reasonable defaults for pic_cursor and pic_background.
38-- reasonable defaults for pic_cursor and pic_background.
39data Picture = Picture
39data Picture = Picture
40 { pic_cursor :: Cursor
40 { pic_cursor :: Cursor
41− , pic_image :: Image
41+ , pic_layers :: [Image]
42 , pic_background :: Background
42 , pic_background :: Background
43 }
43 }
44
44
45instance Show Picture where
45instance Show Picture where
46− show (Picture _ image _ ) = "Picture ?? " ++ show image ++ " ??"
46+ show (Picture _ layers _ ) = "Picture ?? " ++ show layers ++ " ??"
47
47
48instance NFData Picture where
48instance NFData Picture where
49− rnf (Picture c i b) = c `deepseq` i `deepseq` b `deepseq` ()
49+ rnf (Picture c l b) = c `deepseq` l `deepseq` b `deepseq` ()
50
50
51-- | Create a picture for display for the given image. The picture will not have a displayed cursor
51-- | Create a picture for display for the given image. The picture will not have a displayed cursor
52-- and the background display attribute will be `current_attr`.
52-- and the background display attribute will be `current_attr`.
53pic_for_image :: Image -> Picture
53pic_for_image :: Image -> Picture
54pic_for_image i = Picture
54pic_for_image i = Picture
55 { pic_cursor = NoCursor
55 { pic_cursor = NoCursor
56− , pic_image = i
56+ , pic_layers = [i]
57 , pic_background = Background ' ' current_attr
57 , pic_background = Background ' ' current_attr
58 }
58 }
59
59
@@ -92,3 +92,6 @@ data Background = Background
92instance NFData Background where
92instance NFData Background where
93 rnf (Background c a) = c `seq` a `seq` ()
93 rnf (Background c a) = c `seq` a `seq` ()
94
94
95+-- | Compatibility with applications that do not use more than a single layer.
96+pic_image :: Picture -> Image
97+pic_image = head . pic_layers
src/Graphics/Vty/PictureToSpans.hs−3
@@ -2,6 +2,3 @@
2module Graphics.Vty.PictureToSpans
2module Graphics.Vty.PictureToSpans
3 where
3 where
4
4
5−import Graphics.Vty.Picture
6−import Graphics.Vty.Span
7−
src/Graphics/Vty/Span.hs+20−6
@@ -140,13 +140,27 @@ columns_to_char_offset _cx _ = error "columns_to_char_offset applied to span op
140-- | Produces the span ops that will render the given picture, possibly cropped or padded, into the
140-- | Produces the span ops that will render the given picture, possibly cropped or padded, into the
141-- specified region.
141-- specified region.
142spans_for_pic :: Picture -> DisplayRegion -> DisplayOps
142spans_for_pic :: Picture -> DisplayRegion -> DisplayOps
143−spans_for_pic pic r = DisplayOps r $ Vector.create (build_spans pic r)
143+spans_for_pic pic r = DisplayOps r $ Vector.create (combined_spans_for_layers pic r)
144+
145+-- | Produces the span ops for each layer then combines them.
146+--
147+-- TODO: a fold over a builder function. start with span ops that are a bg fill of the entire
148+-- region.
149+combined_spans_for_layers :: Picture -> DisplayRegion -> ST s (MRowOps s)
150+combined_spans_for_layers pic r = do
151+ layer_ops <- mapM (\layer -> build_spans layer r (pic_background pic)) (pic_layers pic)
152+ case layer_ops of
153+ [] -> fail "empty picture"
154+ [ops] -> return ops
155+ _ -> fail "TODO: picture with more than one layer not supported"
144
156
145-- | Builds a vector of row operations that will output the given picture to the terminal.
157-- | Builds a vector of row operations that will output the given picture to the terminal.
146--
158--
147-- Crops to the given display region.
159-- Crops to the given display region.
160+--
161+-- TODO: I'm pretty sure there is an algorithm that does not require a mutable buffer.
148−build_spans :: Picture -> DisplayRegion -> ST s (MRowOps s)
162+build_spans :: Image -> DisplayRegion -> Background -> ST s (MRowOps s)
149−build_spans pic out_region = do
163+build_spans image out_region background = do
150 -- First we create a mutable vector for each rows output operations.
164 -- First we create a mutable vector for each rows output operations.
151 out_ops <- Vector.replicate (region_height out_region) Vector.empty
165 out_ops <- Vector.replicate (region_height out_region) Vector.empty
152 -- \todo I think building the span operations in display order would provide better performance.
166 -- \todo I think building the span operations in display order would provide better performance.
@@ -165,10 +179,10 @@ build_spans pic out_region = do
165 -- display that image. The number of columns remaining in this row before exceeding the
179 -- display that image. The number of columns remaining in this row before exceeding the
166 -- bounds is also provided. This is used to clip the span ops produced to the display.
180 -- bounds is also provided. This is used to clip the span ops produced to the display.
167 let full_build = do
181 let full_build = do
168− start_image_build $ pic_image pic
182+ start_image_build image
169 -- Fill in any unspecified columns with the background pattern.
183 -- Fill in any unspecified columns with the background pattern.
170 forM_ [0 .. (region_height out_region - 1)] (add_row_completion out_region)
184 forM_ [0 .. (region_height out_region - 1)] (add_row_completion out_region)
171− init_env = BlitEnv (pic_background pic) out_region out_ops
185+ init_env = BlitEnv background out_region out_ops
172 init_state = BlitState 0 0 0 0 (region_width out_region) (region_height out_region)
186 init_state = BlitState 0 0 0 0 (region_width out_region) (region_height out_region)
173 _ <- runStateT (runReaderT full_build init_env) init_state
187 _ <- runStateT (runReaderT full_build init_env) init_state
174 return ()
188 return ()
@@ -306,7 +320,7 @@ add_maybe_clipped_join name skip remaining offset i0_dim i0 i1 size = do
306 put $ state & offset +~ i0_dim' & remaining -~ i0_dim'
320 put $ state & offset +~ i0_dim' & remaining -~ i0_dim'
307 add_maybe_clipped i1
321 add_maybe_clipped i1
308
322
309−-- TODO: store a skip list in HorizText
323+-- TODO: store a skip list in HorizText(?)
310-- TODO: represent display strings containing chars that are not 1 column chars as a separate
324-- TODO: represent display strings containing chars that are not 1 column chars as a separate
311-- display string value?
325-- display string value?
312-- TODO: assumes max column width is 2
326-- TODO: assumes max column width is 2
src/Graphics/Vty/Terminal/Debug.hs+3−6
@@ -13,14 +13,11 @@ import Graphics.Vty.Terminal.Generic
13
13
14import Control.Applicative
14import Control.Applicative
15import Control.Monad.Trans
15import Control.Monad.Trans
16−import Control.Monad.State.Strict
17
16
18import qualified Data.ByteString.UTF8 as BS
17import qualified Data.ByteString.UTF8 as BS
19import qualified Data.ByteString as BSCore
18import qualified Data.ByteString as BSCore
20import Data.IORef
19import Data.IORef
21−import qualified Data.Sequence as Seq
22import qualified Data.String.UTF8 as UTF8
20import qualified Data.String.UTF8 as UTF8
23−import Data.Word
24
21
25import Foreign.Marshal.Array ( peekArray )
22import Foreign.Marshal.Array ( peekArray )
26import Foreign.Ptr ( plusPtr )
23import Foreign.Ptr ( plusPtr )
@@ -56,7 +53,7 @@ instance Terminal DebugTerminal where
56 reserve_display _t = return ()
53 reserve_display _t = return ()
57 release_display _t = return ()
54 release_display _t = return ()
58 display_bounds t = return $ debug_terminal_bounds t
55 display_bounds t = return $ debug_terminal_bounds t
59− display_terminal_instance t r c = return $ c (DebugDisplay r)
56+ display_terminal_instance _t r c = return $ c (DebugDisplay r)
60 output_byte_buffer t out_buffer buffer_size
57 output_byte_buffer t out_buffer buffer_size
61 = liftIO $ do
58 = liftIO $ do
62 putStrLn $ "output_byte_buffer ?? " ++ show buffer_size
59 putStrLn $ "output_byte_buffer ?? " ++ show buffer_size
@@ -64,7 +61,7 @@ instance Terminal DebugTerminal where
64 >>= return . UTF8.fromRep . BSCore.pack
61 >>= return . UTF8.fromRep . BSCore.pack
65 >>= writeIORef (debug_terminal_last_output t)
62 >>= writeIORef (debug_terminal_last_output t)
66
63
67− output_handle t = return stdout
64+ output_handle _t = return stdout
68
65
69data DebugDisplay = DebugDisplay
66data DebugDisplay = DebugDisplay
70 { debug_display_bounds :: DisplayRegion
67 { debug_display_bounds :: DisplayRegion
@@ -83,7 +80,7 @@ instance DisplayTerminal DebugDisplay where
83 context_region d = debug_display_bounds d
80 context_region d = debug_display_bounds d
84
81
85 -- | Assume 16 colors
82 -- | Assume 16 colors
86− context_color_count d = 16
83+ context_color_count _d = 16
87
84
88 -- | A cursor move is always visualized as the single character 'M'
85 -- | A cursor move is always visualized as the single character 'M'
89 move_cursor_required_bytes _d _x _y = 1
86 move_cursor_required_bytes _d _x _y = 1
vty.cabal+77−203
@@ -55,7 +55,6 @@ library
55
55
56 exposed-modules: Graphics.Vty
56 exposed-modules: Graphics.Vty
57 Graphics.Vty.Attributes
57 Graphics.Vty.Attributes
58− Graphics.Vty.DisplayRegion
59 Graphics.Vty.Error
58 Graphics.Vty.Error
60 Graphics.Vty.Image
59 Graphics.Vty.Image
61 Graphics.Vty.Inline
60 Graphics.Vty.Inline
@@ -63,13 +62,19 @@ library
63 Graphics.Vty.Picture
62 Graphics.Vty.Picture
64 Graphics.Vty.Terminal
63 Graphics.Vty.Terminal
65 Graphics.Text.Width
64 Graphics.Text.Width
66−
65+ -- the modules below are only meant to be used by the tests.
67− other-modules: Data.Marshalling
66+ Codec.Binary.UTF8.Debug
68 Data.Terminfo.Parse
67 Data.Terminfo.Parse
69 Data.Terminfo.Eval
68 Data.Terminfo.Eval
69+ Data.Marshalling
70+ Graphics.Vty.Debug
71+ Graphics.Vty.Debug.Image
72+ Graphics.Vty.DisplayRegion
70 Graphics.Vty.DisplayAttributes
73 Graphics.Vty.DisplayAttributes
71 Graphics.Vty.Image.Internal
74 Graphics.Vty.Image.Internal
75+ Graphics.Vty.PictureToSpans
72 Graphics.Vty.Span
76 Graphics.Vty.Span
77+ Graphics.Vty.Terminal.Debug
73 Graphics.Vty.Terminal.Generic
78 Graphics.Vty.Terminal.Generic
74 Graphics.Vty.Terminal.MacOSX
79 Graphics.Vty.Terminal.MacOSX
75 Graphics.Vty.Terminal.XTermColor
80 Graphics.Vty.Terminal.XTermColor
@@ -92,9 +97,10 @@ library
92test-suite verify-attribute-ops
97test-suite verify-attribute-ops
93 default-language: Haskell2010
98 default-language: Haskell2010
94 type: detailed-0.9
99 type: detailed-0.9
95− hs-source-dirs: src test
100+ hs-source-dirs: test
96 test-module: VerifyAttributeOps
101 test-module: VerifyAttributeOps
97− build-depends: Cabal == 1.17.*,
102+ build-depends: vty,
103+ Cabal == 1.17.*,
98 QuickCheck >= 2.4,
104 QuickCheck >= 2.4,
99 random == 1.0.*,
105 random == 1.0.*,
100 base >= 4 && < 5,
106 base >= 4 && < 5,
@@ -111,44 +117,26 @@ test-suite verify-attribute-ops
111 unix,
117 unix,
112 utf8-string >= 0.3 && < 0.4,
118 utf8-string >= 0.3 && < 0.4,
113 vector >= 0.7
119 vector >= 0.7
120+
114
121
115test-suite verify-using-mock-terminal
122test-suite verify-using-mock-terminal
116 default-language: Haskell2010
123 default-language: Haskell2010
117
124
118 type: detailed-0.9
125 type: detailed-0.9
119
126
120− hs-source-dirs: src test
127+ hs-source-dirs: test
121
128
122 test-module: VerifyMockTerminal
129 test-module: VerifyMockTerminal
123
130
124− other-modules: Graphics.Vty
131+ other-modules: Verify
125− Graphics.Vty.Attributes
126− Graphics.Vty.DisplayAttributes
127− Graphics.Vty.DisplayRegion
128− Graphics.Vty.Image
129− Graphics.Vty.Image.Internal
130− Graphics.Vty.Picture
131− Graphics.Vty.Span
132− Graphics.Vty.Terminal
133− Graphics.Vty.Terminal.Generic
134− Graphics.Vty.Terminal.Debug
135− Graphics.Vty.Debug
136− Graphics.Vty.Debug.Image
137− Graphics.Text.Width
138− Verify
139 Verify.Graphics.Vty.Attributes
132 Verify.Graphics.Vty.Attributes
140 Verify.Graphics.Vty.DisplayRegion
133 Verify.Graphics.Vty.DisplayRegion
141 Verify.Graphics.Vty.Picture
134 Verify.Graphics.Vty.Picture
142 Verify.Graphics.Vty.Image
135 Verify.Graphics.Vty.Image
143 Verify.Graphics.Vty.Span
136 Verify.Graphics.Vty.Span
144
137
145− c-sources: cbits/gwinsz.c
146− cbits/set_term_timing.c
147− cbits/mk_wcwidth.c
148−
149− include-dirs: cbits
150−
151− build-depends: Cabal == 1.17.*,
138+ build-depends: vty,
139+ Cabal == 1.17.*,
152 QuickCheck >= 2.4,
140 QuickCheck >= 2.4,
153 random == 1.0.*,
141 random == 1.0.*,
154 base >= 4 && < 5,
142 base >= 4 && < 5,
@@ -165,44 +153,26 @@ test-suite verify-using-mock-terminal
165 unix,
153 unix,
166 utf8-string >= 0.3 && < 0.4,
154 utf8-string >= 0.3 && < 0.4,
167 vector >= 0.7
155 vector >= 0.7
156+
168
157
169test-suite verify-display-attributes
158test-suite verify-display-attributes
170 default-language: Haskell2010
159 default-language: Haskell2010
171
160
172 type: detailed-0.9
161 type: detailed-0.9
173
162
174− hs-source-dirs: src test
163+ hs-source-dirs: test
175
164
176 test-module: VerifyDisplayAttributes
165 test-module: VerifyDisplayAttributes
177
166
178− other-modules: Graphics.Vty
167+ other-modules: Verify
179− Graphics.Vty.Attributes
180− Graphics.Vty.DisplayAttributes
181− Graphics.Vty.DisplayRegion
182− Graphics.Vty.Image
183− Graphics.Vty.Image.Internal
184− Graphics.Vty.Picture
185− Graphics.Vty.Span
186− Graphics.Vty.Terminal
187− Graphics.Vty.Terminal.Generic
188− Graphics.Vty.Terminal.Debug
189− Graphics.Vty.Debug
190− Graphics.Vty.Debug.Image
191− Graphics.Text.Width
192− Verify
193 Verify.Graphics.Vty.Attributes
168 Verify.Graphics.Vty.Attributes
194 Verify.Graphics.Vty.DisplayRegion
169 Verify.Graphics.Vty.DisplayRegion
195 Verify.Graphics.Vty.Picture
170 Verify.Graphics.Vty.Picture
196 Verify.Graphics.Vty.Image
171 Verify.Graphics.Vty.Image
197 Verify.Graphics.Vty.Span
172 Verify.Graphics.Vty.Span
198
173
199− c-sources: cbits/gwinsz.c
200− cbits/set_term_timing.c
201− cbits/mk_wcwidth.c
202−
203− include-dirs: cbits
204−
205− build-depends: Cabal == 1.17.*,
174+ build-depends: vty,
175+ Cabal == 1.17.*,
206 QuickCheck >= 2.4,
176 QuickCheck >= 2.4,
207 random == 1.0.*,
177 random == 1.0.*,
208 base >= 4 && < 5,
178 base >= 4 && < 5,
@@ -219,20 +189,21 @@ test-suite verify-display-attributes
219 unix,
189 unix,
220 utf8-string >= 0.3 && < 0.4,
190 utf8-string >= 0.3 && < 0.4,
221 vector >= 0.7
191 vector >= 0.7
192+
222
193
223test-suite verify-empty-image-props
194test-suite verify-empty-image-props
224 default-language: Haskell2010
195 default-language: Haskell2010
225
196
226 type: detailed-0.9
197 type: detailed-0.9
227
198
228− hs-source-dirs: src test
199+ hs-source-dirs: test
229
200
230 test-module: VerifyEmptyImageProps
201 test-module: VerifyEmptyImageProps
231
202
232− other-modules: Graphics.Vty.Picture
203+ other-modules: Verify
233− Verify
234
204
235− build-depends: Cabal == 1.17.*,
205+ build-depends: vty,
206+ Cabal == 1.17.*,
236 QuickCheck >= 2.4,
207 QuickCheck >= 2.4,
237 random == 1.0.*,
208 random == 1.0.*,
238 base >= 4 && < 5,
209 base >= 4 && < 5,
@@ -249,23 +220,21 @@ test-suite verify-empty-image-props
249 unix,
220 unix,
250 utf8-string >= 0.3 && < 0.4,
221 utf8-string >= 0.3 && < 0.4,
251 vector >= 0.7
222 vector >= 0.7
223+
252
224
253test-suite verify-eval-terminfo-caps
225test-suite verify-eval-terminfo-caps
254 default-language: Haskell2010
226 default-language: Haskell2010
255
227
256 type: detailed-0.9
228 type: detailed-0.9
257
229
258− hs-source-dirs: src test
230+ hs-source-dirs: test
259
231
260 test-module: VerifyEvalTerminfoCaps
232 test-module: VerifyEvalTerminfoCaps
261
233
262− other-modules: Data.Terminfo.Parse
234+ other-modules: Verify
263− Data.Terminfo.Eval
264− Data.Marshalling
265− Graphics.Text.Width
266− Verify
267
235
268− build-depends: Cabal == 1.17.*,
236+ build-depends: vty,
237+ Cabal == 1.17.*,
269 QuickCheck >= 2.4,
238 QuickCheck >= 2.4,
270 random == 1.0.*,
239 random == 1.0.*,
271 base >= 4 && < 5,
240 base >= 4 && < 5,
@@ -282,36 +251,23 @@ test-suite verify-eval-terminfo-caps
282 unix,
251 unix,
283 utf8-string >= 0.3 && < 0.4,
252 utf8-string >= 0.3 && < 0.4,
284 vector >= 0.7
253 vector >= 0.7
254+
285
255
286test-suite verify-image-ops
256test-suite verify-image-ops
287 default-language: Haskell2010
257 default-language: Haskell2010
288
258
289 type: detailed-0.9
259 type: detailed-0.9
290
260
291− hs-source-dirs: src test
261+ hs-source-dirs: test
292
262
293 test-module: VerifyImageOps
263 test-module: VerifyImageOps
294
264
295− other-modules: Graphics.Vty.Attributes
296− Graphics.Vty.DisplayAttributes
297− Graphics.Vty.DisplayRegion
298− Graphics.Vty.Image
299− Graphics.Vty.Image.Internal
300− Graphics.Vty.Picture
301− Graphics.Vty.Span
302− Graphics.Vty.Debug.Image
303− Graphics.Text.Width
304− Verify
265+ other-modules: Verify
305 Verify.Graphics.Vty.Attributes
266 Verify.Graphics.Vty.Attributes
306 Verify.Graphics.Vty.Image
267 Verify.Graphics.Vty.Image
307
268
308− c-sources: cbits/gwinsz.c
309− cbits/set_term_timing.c
310− cbits/mk_wcwidth.c
311−
312− include-dirs: cbits
313−
314− build-depends: Cabal == 1.17.*,
269+ build-depends: vty,
270+ Cabal == 1.17.*,
315 QuickCheck >= 2.4,
271 QuickCheck >= 2.4,
316 random == 1.0.*,
272 random == 1.0.*,
317 base >= 4 && < 5,
273 base >= 4 && < 5,
@@ -328,30 +284,23 @@ test-suite verify-image-ops
328 unix,
284 unix,
329 utf8-string >= 0.3 && < 0.4,
285 utf8-string >= 0.3 && < 0.4,
330 vector >= 0.7
286 vector >= 0.7
287+
331
288
332test-suite verify-image-trans
289test-suite verify-image-trans
333 default-language: Haskell2010
290 default-language: Haskell2010
334
291
335 type: detailed-0.9
292 type: detailed-0.9
336
293
337− hs-source-dirs: src test
294+ hs-source-dirs: test
338
295
339 test-module: VerifyImageTrans
296 test-module: VerifyImageTrans
340
297
341− other-modules: Graphics.Vty.Attributes
342− Graphics.Vty.Debug.Image
343− Graphics.Vty.Image
344− Graphics.Vty.Image.Internal
345− Graphics.Text.Width
346− Verify
298+ other-modules: Verify
347 Verify.Graphics.Vty.Attributes
299 Verify.Graphics.Vty.Attributes
348 Verify.Graphics.Vty.Image
300 Verify.Graphics.Vty.Image
349
301
350− c-sources: cbits/mk_wcwidth.c
351−
352− include-dirs: cbits
353−
354− build-depends: Cabal == 1.17.*,
302+ build-depends: vty,
303+ Cabal == 1.17.*,
355 QuickCheck >= 2.4,
304 QuickCheck >= 2.4,
356 random == 1.0.*,
305 random == 1.0.*,
357 base >= 4 && < 5,
306 base >= 4 && < 5,
@@ -368,41 +317,19 @@ test-suite verify-image-trans
368 unix,
317 unix,
369 utf8-string >= 0.3 && < 0.4,
318 utf8-string >= 0.3 && < 0.4,
370 vector >= 0.7
319 vector >= 0.7
320+
371
321
372test-suite verify-inline
322test-suite verify-inline
373 default-language: Haskell2010
323 default-language: Haskell2010
374
324
375 type: detailed-0.9
325 type: detailed-0.9
376
326
377− hs-source-dirs: src test
327+ hs-source-dirs: test
378
328
379 test-module: VerifyInline
329 test-module: VerifyInline
380
330
381− other-modules: Graphics.Text.Width
382− Data.Terminfo.Eval
383− Data.Terminfo.Parse
384− Data.Marshalling
385− Graphics.Vty.Attributes
386− Graphics.Vty.DisplayAttributes
387− Graphics.Vty.DisplayRegion
388− Graphics.Vty.Image
389− Graphics.Vty.Image.Internal
390− Graphics.Vty.Inline
391− Graphics.Vty.Picture
392− Graphics.Vty.Span
393− Graphics.Vty.Terminal
394− Graphics.Vty.Terminal.Generic
395− Graphics.Vty.Terminal.MacOSX
396− Graphics.Vty.Terminal.TerminfoBased
397− Graphics.Vty.Terminal.XTermColor
398−
399− c-sources: cbits/gwinsz.c
400− cbits/set_term_timing.c
401− cbits/mk_wcwidth.c
402−
403− include-dirs: cbits
404−
405− build-depends: Cabal == 1.17.*,
331+ build-depends: vty,
332+ Cabal == 1.17.*,
406 QuickCheck >= 2.4,
333 QuickCheck >= 2.4,
407 random == 1.0.*,
334 random == 1.0.*,
408 base >= 4 && < 5,
335 base >= 4 && < 5,
@@ -419,23 +346,22 @@ test-suite verify-inline
419 unix,
346 unix,
420 utf8-string >= 0.3 && < 0.4,
347 utf8-string >= 0.3 && < 0.4,
421 vector >= 0.7
348 vector >= 0.7
349+
422
350
423test-suite verify-parse-terminfo-caps
351test-suite verify-parse-terminfo-caps
424 default-language: Haskell2010
352 default-language: Haskell2010
425
353
426 type: detailed-0.9
354 type: detailed-0.9
427
355
428− hs-source-dirs: src test
356+ hs-source-dirs: test
429
357
430 test-module: VerifyParseTerminfoCaps
358 test-module: VerifyParseTerminfoCaps
431
359
432− other-modules: Data.Terminfo.Parse
360+ other-modules: Verify
433− Verify
434 Verify.Data.Terminfo.Parse
361 Verify.Data.Terminfo.Parse
435
362
436− include-dirs: cbits
437−
438− build-depends: Cabal == 1.17.*,
363+ build-depends: vty,
364+ Cabal == 1.17.*,
439 QuickCheck >= 2.4,
365 QuickCheck >= 2.4,
440 random == 1.0.*,
366 random == 1.0.*,
441 base >= 4 && < 5,
367 base >= 4 && < 5,
@@ -452,22 +378,21 @@ test-suite verify-parse-terminfo-caps
452 unix,
378 unix,
453 utf8-string >= 0.3 && < 0.4,
379 utf8-string >= 0.3 && < 0.4,
454 vector >= 0.7
380 vector >= 0.7
381+
455
382
456test-suite verify-picture-ops
383test-suite verify-picture-ops
457 default-language: Haskell2010
384 default-language: Haskell2010
458
385
459 type: detailed-0.9
386 type: detailed-0.9
460
387
461− hs-source-dirs: src test
388+ hs-source-dirs: test
462
389
463 test-module: VerifyPictureOps
390 test-module: VerifyPictureOps
464
391
465− other-modules: Graphics.Vty.Picture
392+ other-modules: Verify
466− Verify
467
393
468− include-dirs: cbits
469−
470− build-depends: Cabal == 1.17.*,
394+ build-depends: vty,
395+ Cabal == 1.17.*,
471 QuickCheck >= 2.4,
396 QuickCheck >= 2.4,
472 random == 1.0.*,
397 random == 1.0.*,
473 base >= 4 && < 5,
398 base >= 4 && < 5,
@@ -484,44 +409,26 @@ test-suite verify-picture-ops
484 unix,
409 unix,
485 utf8-string >= 0.3 && < 0.4,
410 utf8-string >= 0.3 && < 0.4,
486 vector >= 0.7
411 vector >= 0.7
412+
487
413
488test-suite verify-picture-to-span
414test-suite verify-picture-to-span
489 default-language: Haskell2010
415 default-language: Haskell2010
490
416
491 type: detailed-0.9
417 type: detailed-0.9
492
418
493− hs-source-dirs: src test
419+ hs-source-dirs: test
494
420
495 test-module: VerifyPictureToSpan
421 test-module: VerifyPictureToSpan
496
422
497− other-modules: Graphics.Vty
423+ other-modules: Verify
498− Graphics.Vty.Attributes
499− Graphics.Vty.DisplayAttributes
500− Graphics.Vty.DisplayRegion
501− Graphics.Vty.Image
502− Graphics.Vty.Image.Internal
503− Graphics.Vty.Picture
504− Graphics.Vty.Span
505− Graphics.Vty.Terminal
506− Graphics.Vty.Terminal.Generic
507− Graphics.Vty.Terminal.Debug
508− Graphics.Vty.Debug
509− Graphics.Vty.Debug.Image
510− Graphics.Text.Width
511− Verify
512 Verify.Graphics.Vty.Attributes
424 Verify.Graphics.Vty.Attributes
513 Verify.Graphics.Vty.DisplayRegion
425 Verify.Graphics.Vty.DisplayRegion
514 Verify.Graphics.Vty.Picture
426 Verify.Graphics.Vty.Picture
515 Verify.Graphics.Vty.Image
427 Verify.Graphics.Vty.Image
516 Verify.Graphics.Vty.Span
428 Verify.Graphics.Vty.Span
517
429
518− c-sources: cbits/gwinsz.c
519− cbits/set_term_timing.c
520− cbits/mk_wcwidth.c
521−
522− include-dirs: cbits
523−
524− build-depends: Cabal == 1.17.*,
430+ build-depends: vty,
431+ Cabal == 1.17.*,
525 QuickCheck >= 2.4,
432 QuickCheck >= 2.4,
526 random == 1.0.*,
433 random == 1.0.*,
527 base >= 4 && < 5,
434 base >= 4 && < 5,
@@ -538,44 +445,26 @@ test-suite verify-picture-to-span
538 unix,
445 unix,
539 utf8-string >= 0.3 && < 0.4,
446 utf8-string >= 0.3 && < 0.4,
540 vector >= 0.7
447 vector >= 0.7
448+
541
449
542test-suite verify-span-ops
450test-suite verify-span-ops
543 default-language: Haskell2010
451 default-language: Haskell2010
544
452
545 type: detailed-0.9
453 type: detailed-0.9
546
454
547− hs-source-dirs: src test
455+ hs-source-dirs: test
548
456
549 test-module: VerifySpanOps
457 test-module: VerifySpanOps
550
458
551− other-modules: Graphics.Vty
459+ other-modules: Verify
552− Graphics.Vty.Attributes
553− Graphics.Vty.DisplayAttributes
554− Graphics.Vty.DisplayRegion
555− Graphics.Vty.Image
556− Graphics.Vty.Image.Internal
557− Graphics.Vty.Picture
558− Graphics.Vty.Span
559− Graphics.Vty.Terminal
560− Graphics.Vty.Terminal.Generic
561− Graphics.Vty.Terminal.Debug
562− Graphics.Vty.Debug
563− Graphics.Vty.Debug.Image
564− Graphics.Text.Width
565− Verify
566 Verify.Graphics.Vty.Attributes
460 Verify.Graphics.Vty.Attributes
567 Verify.Graphics.Vty.DisplayRegion
461 Verify.Graphics.Vty.DisplayRegion
568 Verify.Graphics.Vty.Picture
462 Verify.Graphics.Vty.Picture
569 Verify.Graphics.Vty.Image
463 Verify.Graphics.Vty.Image
570 Verify.Graphics.Vty.Span
464 Verify.Graphics.Vty.Span
571
465
572− c-sources: cbits/gwinsz.c
573− cbits/set_term_timing.c
574− cbits/mk_wcwidth.c
575−
576− include-dirs: cbits
577−
578− build-depends: Cabal == 1.17.*,
466+ build-depends: vty,
467+ Cabal == 1.17.*,
579 QuickCheck >= 2.4,
468 QuickCheck >= 2.4,
580 random == 1.0.*,
469 random == 1.0.*,
581 base >= 4 && < 5,
470 base >= 4 && < 5,
@@ -592,27 +481,21 @@ test-suite verify-span-ops
592 unix,
481 unix,
593 utf8-string >= 0.3 && < 0.4,
482 utf8-string >= 0.3 && < 0.4,
594 vector >= 0.7
483 vector >= 0.7
484+
595
485
596test-suite verify-utf8-width
486test-suite verify-utf8-width
597 default-language: Haskell2010
487 default-language: Haskell2010
598
488
599 type: detailed-0.9
489 type: detailed-0.9
600
490
601− hs-source-dirs: src test
491+ hs-source-dirs: test
602
492
603 test-module: VerifyUtf8Width
493 test-module: VerifyUtf8Width
604
494
605− other-modules: Graphics.Text.Width
495+ other-modules: Verify
606− Graphics.Vty.Attributes
607− Graphics.Vty.Image
608− Graphics.Vty.Image.Internal
609− Verify
610−
611− c-sources: cbits/mk_wcwidth.c
612−
613− include-dirs: cbits
614
496
615− build-depends: Cabal == 1.17.*,
497+ build-depends: vty,
498+ Cabal == 1.17.*,
616 QuickCheck >= 2.4,
499 QuickCheck >= 2.4,
617 random == 1.0.*,
500 random == 1.0.*,
618 base >= 4 && < 5,
501 base >= 4 && < 5,
@@ -629,21 +512,17 @@ test-suite verify-utf8-width
629 unix,
512 unix,
630 utf8-string >= 0.3 && < 0.4,
513 utf8-string >= 0.3 && < 0.4,
631 vector >= 0.7
514 vector >= 0.7
515+
632
516
633executable vty-interactive-terminal-test
517executable vty-interactive-terminal-test
634 main-is: interactive_terminal_test.hs
518 main-is: interactive_terminal_test.hs
635
519
636 default-language: Haskell2010
520 default-language: Haskell2010
637
521
638− hs-source-dirs: src test
522+ hs-source-dirs: test
639−
640− c-sources: cbits/gwinsz.c
641− cbits/set_term_timing.c
642− cbits/mk_wcwidth.c
643−
644− include-dirs: cbits
645
523
646− build-depends: base >= 4 && < 5,
524+ build-depends: vty,
525+ base >= 4 && < 5,
647 bytestring,
526 bytestring,
648 containers,
527 containers,
649 deepseq >= 1.1 && < 1.4,
528 deepseq >= 1.1 && < 1.4,
@@ -664,15 +543,10 @@ executable vty-benchmark
664
543
665 default-language: Haskell2010
544 default-language: Haskell2010
666
545
667− hs-source-dirs: src test
546+ hs-source-dirs: test
668−
669− c-sources: cbits/gwinsz.c
670− cbits/set_term_timing.c
671− cbits/mk_wcwidth.c
672−
673− include-dirs: cbits
674
547
675− build-depends: base >= 4 && < 5,
548+ build-depends: vty,
549+ base >= 4 && < 5,
676 bytestring,
550 bytestring,
677 Cabal == 1.17.*,
551 Cabal == 1.17.*,
678 containers,
552 containers,