on master help sign in
Get rid of Reporting.Progress.Bar
319db32Evan Czaplicki
builder/src/Reporting/Progress/Bar.hsdeleted−43
@@ -1,43 +0,0 @@
1−{-# OPTIONS_GHC -Wall #-}
2−module Reporting.Progress.Bar
3− ( render
4− , clear
5− )
6− where
7−
8−
9−
10−-- PROGRESS BAR
11−
12−
13−width :: Float
14−width =
15− 50.0
16−
17−
18−render :: Int -> Int -> Int -> String
19−render successes failures total =
20− let
21− numDone =
22− successes + failures
23−
24− fraction =
25− fromIntegral numDone / fromIntegral total
26−
27− unitsDone =
28− truncate (fraction * width)
29−
30− unitsLeft =
31− truncate width - unitsDone
32− in
33− "\r["
34− ++ replicate unitsDone '='
35− ++ replicate unitsLeft ' '
36− ++ "] - "
37− ++ show numDone ++ " / " ++ show total
38−
39−
40−clear :: String
41−clear =
42− '\r' : replicate (length (render 49999 50000 99999)) ' ' ++ "\r"
43−