on master help sign in
correct compile failures
b34a7f0Corey O'Connor
test/BenchImageFuzz.hs+3−1
@@ -8,6 +8,8 @@ import Verify
8import Control.Applicative
8import Control.Applicative
9import Control.Monad
9import Control.Monad
10
10
11+import Data.Default (def)
12+
11import System.Random
13import System.Random
12
14
13rand :: Arbitrary a => IO a
15rand :: Arbitrary a => IO a
@@ -19,7 +21,7 @@ random_image = rand
19random_picture = pic_for_image <$> random_image
21random_picture = pic_for_image <$> random_image
20
22
21bench_0 = do
23bench_0 = do
22− vty <- mkVty
24+ vty <- mkVty def
23 (w,h) <- display_bounds $ output_iface vty
25 (w,h) <- display_bounds $ output_iface vty
24 let pictures = replicateM 3000 random_picture
26 let pictures = replicateM 3000 random_picture
25 bench ps = do
27 bench ps = do
test/BenchNoDiffOpt.hs+2−1
@@ -9,6 +9,7 @@ import Control.Concurrent( threadDelay )
9import Control.Monad( liftM2 )
9import Control.Monad( liftM2 )
10
10
11import qualified Data.ByteString.Char8 as B
11import qualified Data.ByteString.Char8 as B
12+import Data.Default (def)
12import Data.List
13import Data.List
13
14
14import System.Environment( getArgs )
15import System.Environment( getArgs )
@@ -18,7 +19,7 @@ import System.Random
18bench_0 = do
19bench_0 = do
19 let fixed_gen = mkStdGen 0
20 let fixed_gen = mkStdGen 0
20 setStdGen fixed_gen
21 setStdGen fixed_gen
21− vty <- mkVty
22+ vty <- mkVty def
22 (w,h) <- display_bounds $ output_iface vty
23 (w,h) <- display_bounds $ output_iface vty
23 let images = return $ (image_0, image_1)
24 let images = return $ (image_0, image_1)
24 image_0 = char_fill def_attr 'X' w h
25 image_0 = char_fill def_attr 'X' w h
test/BenchRenderChar.hs+4−2
@@ -9,8 +9,10 @@ import Verify
9
9
10import Control.Monad ( forM_ )
10import Control.Monad ( forM_ )
11
11
12+import Data.Default (def)
13+
12bench_0 = do
14bench_0 = do
13− vty <- mkVty
15+ vty <- mkVty def
14 (w,h) <- display_bounds $ output_iface vty
16 (w,h) <- display_bounds $ output_iface vty
15 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
17 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
16 bench d = do
18 bench d = do
@@ -26,7 +28,7 @@ test_image_using_char c w h
26 $ horiz_cat $ map (char def_attr) (replicate (fromIntegral w) c)
28 $ horiz_cat $ map (char def_attr) (replicate (fromIntegral w) c)
27
29
28bench_1 = do
30bench_1 = do
29− vty <- mkVty
31+ vty <- mkVty def
30 (w,h) <- display_bounds $ output_iface vty
32 (w,h) <- display_bounds $ output_iface vty
31 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
33 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
32 bench d = do
34 bench d = do
test/BenchVerticalScroll.hs+2−1
@@ -6,6 +6,7 @@ import Verify
6import Control.Concurrent( threadDelay )
6import Control.Concurrent( threadDelay )
7import Control.Monad( liftM2 )
7import Control.Monad( liftM2 )
8
8
9+import Data.Default (def)
9import Data.List
10import Data.List
10import Data.Word
11import Data.Word
11
12
@@ -16,7 +17,7 @@ import System.Random
16bench_0 = do
17bench_0 = do
17 let fixed_gen = mkStdGen 0
18 let fixed_gen = mkStdGen 0
18 setStdGen fixed_gen
19 setStdGen fixed_gen
19− return $ Bench (return ()) (\() -> mkVty >>= liftM2 (>>) run shutdown)
20+ return $ Bench (return ()) (\() -> mkVty def >>= liftM2 (>>) run shutdown)
20
21
21run vt = mapM_ (\p -> update vt p) . benchgen =<< display_bounds (output_iface vt)
22run vt = mapM_ (\p -> update vt p) . benchgen =<< display_bounds (output_iface vt)
22
23
test/EventEcho.hs+2−1
@@ -6,6 +6,7 @@ import Control.Applicative
6import Control.Arrow
6import Control.Arrow
7import Control.Monad.RWS
7import Control.Monad.RWS
8
8
9+import Data.Default (def)
9import Data.Sequence (Seq, (<|) )
10import Data.Sequence (Seq, (<|) )
10import qualified Data.Sequence as Seq
11import qualified Data.Sequence as Seq
11import Data.Foldable
12import Data.Foldable
@@ -15,7 +16,7 @@ event_buffer_size = 1000
15type App = RWST Vty () (Seq String) IO
16type App = RWST Vty () (Seq String) IO
16
17
17main = do
18main = do
18− vty <- mkVty
19+ vty <- mkVty def
19 _ <- execRWST vty_interact vty Seq.empty
20 _ <- execRWST vty_interact vty Seq.empty
20 shutdown vty
21 shutdown vty
21
22
test/Rouge.hs+2−1
@@ -5,6 +5,7 @@ import Graphics.Vty
5
5
6import Data.Array
6import Data.Array
7import qualified Data.ByteString as B
7import qualified Data.ByteString as B
8+import Data.Default (def)
8import Data.Word
9import Data.Word
9
10
10import Control.Applicative
11import Control.Applicative
@@ -45,7 +46,7 @@ data LevelPiece
45type Game = RWST Vty () World IO
46type Game = RWST Vty () World IO
46
47
47main = do
48main = do
48− vty <- mkVty
49+ vty <- mkVty def
49 level_0 <- mkLevel 1
50 level_0 <- mkLevel 1
50 let world_0 = World (Dude (fst $ start level_0) (snd $ start level_0)) level_0
51 let world_0 = World (Dude (fst $ start level_0) (snd $ start level_0)) level_0
51 (_final_world, ()) <- execRWST (play >> update_display) vty world_0
52 (_final_world, ()) <- execRWST (play >> update_display) vty world_0
test/current_benchmark_results.txt+8−4
@@ -1,7 +1,10 @@
1+pre-blaze-builder 2.4 ghz intel core duo
2+[("no-diff-opt-0",43,9),("render-char-0",345,28),("render-char-1",76,14),("vertical-scroll-0",431,62),("image-fuzz-0",169,21)]
3+
1no unclipped opt 5.0
4no unclipped opt 5.0
2on toast
5on toast
3−[("no-diff-opt-0",147,8),("render-char-0",332,18),("render-char-1",277,16),("vertical-scroll-0",1503,61),("image-fuzz-0",46,3)]
6+ [("no-diff-opt-0",147,8),("render-char-0",332,18),("render-char-1",277,16),("vertical-scroll-0",1503,61),("image-fuzz-0",46,3)]
4−[("no-diff-opt-0",137,11),("render-char-0",470,18),("render-char-1",254,18),("vertical-scroll-0",1240,56),("image-fuzz-0",46,3)]
7+ [("no-diff-opt-0",137,11),("render-char-0",470,18),("render-char-1",254,18),("vertical-scroll-0",1240,56),("image-fuzz-0",46,3)]
5
8
6on ooyala, no screen, iTerm:
9on ooyala, no screen, iTerm:
7
10
@@ -12,5 +15,6 @@ on ooyala, no screen, iTerm:
12 * [("no-diff-opt-0",26,3),("render-char-0",109,8),("render-char-1",44,5),("vertical-scroll-0",244,26),("image-fuzz-0",17,2)]
15 * [("no-diff-opt-0",26,3),("render-char-0",109,8),("render-char-1",44,5),("vertical-scroll-0",244,26),("image-fuzz-0",17,2)]
13 * [("no-diff-opt-0",25,4),("render-char-0",110,7),("render-char-1",43,6),("vertical-scroll-0",239,24),("image-fuzz-0",17,2)]
16 * [("no-diff-opt-0",25,4),("render-char-0",110,7),("render-char-1",43,6),("vertical-scroll-0",239,24),("image-fuzz-0",17,2)]
14
17
15−release 4.7 on toast
18+release 4.7
19+on toast
16−[("no-diff-opt-0",226,13),("render-char-0",411,22),("render-char-1",386,21),("vertical-scroll-0",1930,96),("image-fuzz-0",1225,52)]
20+ [("no-diff-opt-0",226,13),("render-char-0",411,22),("render-char-1",386,21),("vertical-scroll-0",1930,96),("image-fuzz-0",1225,52)]
test/interactive_terminal_test.hs+2−1
@@ -11,6 +11,7 @@ import Control.Concurrent (threadDelay)
11import Control.Exception
11import Control.Exception
12import Control.Monad
12import Control.Monad
13
13
14+import Data.Default (def)
14import Data.List ( lookup )
15import Data.List ( lookup )
15import Data.Maybe ( isJust, fromJust )
16import Data.Maybe ( isJust, fromJust )
16import Data.Monoid
17import Data.Monoid
@@ -937,7 +938,7 @@ cursor_hide_test_0 = Test
937 { test_name = "Verify the cursor is hid and re-shown. issue #7"
938 { test_name = "Verify the cursor is hid and re-shown. issue #7"
938 , test_ID = "cursor_hide_test_0"
939 , test_ID = "cursor_hide_test_0"
939 , test_action = do
940 , test_action = do
940− vty <- mkVty
941+ vty <- mkVty def
941 show_cursor $ output_iface vty
942 show_cursor $ output_iface vty
942 set_cursor_pos (output_iface vty) 5 5
943 set_cursor_pos (output_iface vty) 5 5
943 next_event vty
944 next_event vty
test/vty-examples.cabal+4
@@ -31,6 +31,7 @@ executable vty-interactive-terminal-test
31 base >= 4 && < 5,
31 base >= 4 && < 5,
32 bytestring,
32 bytestring,
33 containers,
33 containers,
34+ data-default >= 0.5.3,
34 deepseq >= 1.1 && < 1.4,
35 deepseq >= 1.1 && < 1.4,
35 ghc-prim,
36 ghc-prim,
36 lens,
37 lens,
@@ -56,6 +57,7 @@ executable vty-event-echo
56 array >= 0.4 && < 2.0,
57 array >= 0.4 && < 2.0,
57 bytestring,
58 bytestring,
58 containers,
59 containers,
60+ data-default >= 0.5.3,
59 lens,
61 lens,
60 mtl >= 1.1.1.0 && < 2.2,
62 mtl >= 1.1.1.0 && < 2.2,
61 parallel >= 2.2 && < 3.3,
63 parallel >= 2.2 && < 3.3,
@@ -75,6 +77,7 @@ executable vty-rouge
75 array >= 0.4 && < 2.0,
77 array >= 0.4 && < 2.0,
76 bytestring,
78 bytestring,
77 containers,
79 containers,
80+ data-default >= 0.5.3,
78 lens,
81 lens,
79 mtl >= 1.1.1.0 && < 2.2,
82 mtl >= 1.1.1.0 && < 2.2,
80 parallel >= 2.2 && < 3.3,
83 parallel >= 2.2 && < 3.3,
@@ -95,6 +98,7 @@ executable vty-benchmark
95 bytestring,
98 bytestring,
96 Cabal == 1.18.*,
99 Cabal == 1.18.*,
97 containers,
100 containers,
101+ data-default >= 0.5.3,
98 deepseq >= 1.1 && < 1.4,
102 deepseq >= 1.1 && < 1.4,
99 ghc-prim,
103 ghc-prim,
100 lens,
104 lens,