@hackage ascii-progress0.1.0.2
A simple progress bar for the console.
Installation
Dependencies (6)
- MissingH
- ansi-terminal
- async >=2.0.1.5
- base >=4.7 && <4.8
- data-default >=0.5.3
- time >=1.4.2 Show all…
Dependents (8)
@hackage/WordAlignment, @hackage/git-annex, @hackage/codex, @hackage/mltool, @hackage/acme-everything, @hackage/cachix, Show all…
A simple Haskell progress bar for the console. Heavily borrows from TJ
Holowaychuk's Node.JS project progress
@@
import Control.Concurrent (threadDelay)
import Control.Monad (unless)
import System.Console.AsciiProgress (Options(..), isComplete, def,
newProgressBar, tick)
main :: IO ()
main = do
pg <- newProgressBar def { pgWidth = 50 }
loop pg
where
loop pg = do
b <- isComplete pg
unless b $ do
threadDelay $ 200 * 1000
tick pg
loop pg
@@
github