on master help sign in
correct compile failures
commitb34a7f0bb8c2c5a9e3a8f61540d6d9bcf6dc37e5 authorCorey O'Connor <coreyoconnor@gmail.com> dateSun 26 Jan 2014, 13:25 (13 years ago) parent6bef63a
9 files changed+29−12
test/BenchImageFuzz.hs+3−1 test/BenchNoDiffOpt.hs+2−1 test/BenchRenderChar.hs+4−2 test/BenchVerticalScroll.hs+2−1 test/EventEcho.hs+2−1 test/Rouge.hs+2−1 test/current_benchmark_results.txt+8−4 test/interactive_terminal_test.hs+2−1 test/vty-examples.cabal+4
test/BenchImageFuzz.hs+3−1
@@ -8,6 +8,8 @@ import Verify
88import Control.Applicative
99import Control.Monad
1010
11+import Data.Default (def)
12+
1113import System.Random
1214
1315rand :: Arbitrary a => IO a
@@ -19,7 +21,7 @@ random_image = rand
1921random_picture = pic_for_image <$> random_image
2022
2123bench_0 = do
22− vty <- mkVty
24+ vty <- mkVty def
2325 (w,h) <- display_bounds $ output_iface vty
2426 let pictures = replicateM 3000 random_picture
2527 bench ps = do
test/BenchNoDiffOpt.hs+2−1
@@ -9,6 +9,7 @@ import Control.Concurrent( threadDelay )
99import Control.Monad( liftM2 )
1010
1111import qualified Data.ByteString.Char8 as B
12+import Data.Default (def)
1213import Data.List
1314
1415import System.Environment( getArgs )
@@ -18,7 +19,7 @@ import System.Random
1819bench_0 = do
1920 let fixed_gen = mkStdGen 0
2021 setStdGen fixed_gen
21− vty <- mkVty
22+ vty <- mkVty def
2223 (w,h) <- display_bounds $ output_iface vty
2324 let images = return $ (image_0, image_1)
2425 image_0 = char_fill def_attr 'X' w h
test/BenchRenderChar.hs+4−2
@@ -9,8 +9,10 @@ import Verify
99
1010import Control.Monad ( forM_ )
1111
12+import Data.Default (def)
13+
1214bench_0 = do
13− vty <- mkVty
15+ vty <- mkVty def
1416 (w,h) <- display_bounds $ output_iface vty
1517 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
1618 bench d = do
@@ -26,7 +28,7 @@ test_image_using_char c w h
2628 $ horiz_cat $ map (char def_attr) (replicate (fromIntegral w) c)
2729
2830bench_1 = do
29− vty <- mkVty
31+ vty <- mkVty def
3032 (w,h) <- display_bounds $ output_iface vty
3133 let test_chars = return $ take 500 $ cycle $ [ c | c <- ['a'..'z']]
3234 bench d = do
test/BenchVerticalScroll.hs+2−1
@@ -6,6 +6,7 @@ import Verify
66import Control.Concurrent( threadDelay )
77import Control.Monad( liftM2 )
88
9+import Data.Default (def)
910import Data.List
1011import Data.Word
1112
@@ -16,7 +17,7 @@ import System.Random
1617bench_0 = do
1718 let fixed_gen = mkStdGen 0
1819 setStdGen fixed_gen
19− return $ Bench (return ()) (\() -> mkVty >>= liftM2 (>>) run shutdown)
20+ return $ Bench (return ()) (\() -> mkVty def >>= liftM2 (>>) run shutdown)
2021
2122run vt = mapM_ (\p -> update vt p) . benchgen =<< display_bounds (output_iface vt)
2223
test/EventEcho.hs+2−1
@@ -6,6 +6,7 @@ import Control.Applicative
66import Control.Arrow
77import Control.Monad.RWS
88
9+import Data.Default (def)
910import Data.Sequence (Seq, (<|) )
1011import qualified Data.Sequence as Seq
1112import Data.Foldable
@@ -15,7 +16,7 @@ event_buffer_size = 1000
1516type App = RWST Vty () (Seq String) IO
1617
1718main = do
18− vty <- mkVty
19+ vty <- mkVty def
1920 _ <- execRWST vty_interact vty Seq.empty
2021 shutdown vty
2122
test/Rouge.hs+2−1
@@ -5,6 +5,7 @@ import Graphics.Vty
55
66import Data.Array
77import qualified Data.ByteString as B
8+import Data.Default (def)
89import Data.Word
910
1011import Control.Applicative
@@ -45,7 +46,7 @@ data LevelPiece
4546type Game = RWST Vty () World IO
4647
4748main = do
48− vty <- mkVty
49+ vty <- mkVty def
4950 level_0 <- mkLevel 1
5051 let world_0 = World (Dude (fst $ start level_0) (snd $ start level_0)) level_0
5152 (_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+
14no unclipped opt 5.0
25on 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)]
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)]
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)]
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)]
58
69on ooyala, no screen, iTerm:
710
@@ -12,5 +15,6 @@ on ooyala, no screen, iTerm:
1215 * [("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)]
1316 * [("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)]
1417
15−release 4.7 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)]
18+release 4.7
19+on toast
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)
1111import Control.Exception
1212import Control.Monad
1313
14+import Data.Default (def)
1415import Data.List ( lookup )
1516import Data.Maybe ( isJust, fromJust )
1617import Data.Monoid
@@ -937,7 +938,7 @@ cursor_hide_test_0 = Test
937938 { test_name = "Verify the cursor is hid and re-shown. issue #7"
938939 , test_ID = "cursor_hide_test_0"
939940 , test_action = do
940− vty <- mkVty
941+ vty <- mkVty def
941942 show_cursor $ output_iface vty
942943 set_cursor_pos (output_iface vty) 5 5
943944 next_event vty
test/vty-examples.cabal+4
@@ -31,6 +31,7 @@ executable vty-interactive-terminal-test
3131 base >= 4 && < 5,
3232 bytestring,
3333 containers,
34+ data-default >= 0.5.3,
3435 deepseq >= 1.1 && < 1.4,
3536 ghc-prim,
3637 lens,
@@ -56,6 +57,7 @@ executable vty-event-echo
5657 array >= 0.4 && < 2.0,
5758 bytestring,
5859 containers,
60+ data-default >= 0.5.3,
5961 lens,
6062 mtl >= 1.1.1.0 && < 2.2,
6163 parallel >= 2.2 && < 3.3,
@@ -75,6 +77,7 @@ executable vty-rouge
7577 array >= 0.4 && < 2.0,
7678 bytestring,
7779 containers,
80+ data-default >= 0.5.3,
7881 lens,
7982 mtl >= 1.1.1.0 && < 2.2,
8083 parallel >= 2.2 && < 3.3,
@@ -95,6 +98,7 @@ executable vty-benchmark
9598 bytestring,
9699 Cabal == 1.18.*,
97100 containers,
101+ data-default >= 0.5.3,
98102 deepseq >= 1.1 && < 1.4,
99103 ghc-prim,
100104 lens,