This file is indexed.

/usr/share/doc/libghc-terminal-progress-bar-doc/html/terminal-progress-bar.txt is in libghc-terminal-progress-bar-doc 0.0.1.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A simple progress bar in the terminal
--   
--   A progress bar is used to convey the progress of a task. This package
--   implements a very simple textual progress bar.
--   
--   See the module <a>System.ProgressBar</a> on how to use the progress
--   bar or build the package with the -fexample flag for a small example
--   program.
--   
--   The animated progress bar depends entirely on the interpretation of
--   the carriage return character ('\r'). If your terminal interprets it
--   as something else then "move cursor to beginning of line", the
--   animation won't work.
--   
--   Note: Due to a bug in "cabal haddock" you will have to manually
--   uncomment the example section in the cabal file. But uncommenting that
--   section will result in "cabal haddock" failing.
@package terminal-progress-bar
@version 0.0.1.4

module System.ProgressBar

-- | Print a progress bar
--   
--   Erases the current line! (by outputting '\r') Does not print a newline
--   '\n'. Subsequent invocations will overwrite the previous output.
--   
--   Remember to set the correct buffering mode for stdout:
--   
--   <pre>
--   import System.IO ( hSetBuffering, BufferMode(NoBuffering), stdout )
--   hSetBuffering stdout NoBuffering
--   </pre>
progressBar :: Label -> Label -> ℤ -> ℤ -> ℤ -> IO ()

-- | Renders a progress bar
--   
--   <pre>
--   &gt;&gt;&gt; mkProgressBar (msg "Working") percentage 40 30 100
--   "Working [=======&gt;.................]  30%"
--   </pre>
mkProgressBar :: Label -> Label -> ℤ -> ℤ -> ℤ -> String

-- | A label that can be pre- or postfixed to a progress bar.
type Label = ℤ -> ℤ -> String

-- | The empty label.
--   
--   <pre>
--   &gt;&gt;&gt; noLabel 30 100
--   ""
--   </pre>
noLabel :: Label

-- | A label consisting of a static string.
--   
--   <pre>
--   &gt;&gt;&gt; msg "foo" 30 100
--   "foo"
--   </pre>
msg :: String -> Label

-- | A label which displays the progress as a percentage.
--   
--   Constant width property: ∀ d t : ℕ. d ≤ t → length (percentage d t) ≡
--   4
--   
--   <pre>
--   &gt;&gt;&gt; percentage 30 100
--   " 30%"
--   </pre>
percentage :: Label

-- | A label which displays the progress as a fraction of the total amount
--   of work.
--   
--   Equal width property: ∀ d₁ d₂ t : ℕ. d₁ ≤ d₂ ≤ t → length (exact d₁ t)
--   ≡ length (exact d₂ t)
--   
--   <pre>
--   &gt;&gt;&gt; exact 30 100
--   " 30/100"
--   </pre>
exact :: Label
data ProgressRef

-- | Start a thread to automatically display progress. Use incProgress to
--   step the progress bar.
startProgress :: Label -> Label -> ℤ -> ℤ -> IO (ProgressRef, ThreadId)

-- | Increment the progress bar. Negative values will reverse the progress.
--   Progress will never be negative and will silently stop taking data
--   when it completes.
incProgress :: ProgressRef -> ℤ -> IO ()