futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | None
Language | GHC2021

Futhark.Util.ProgressBar

Description

Facilities for generating and otherwise handling pretty-based progress bars.

Synopsis

- progressBar :: ProgressBar -> Text
- data ProgressBar = ProgressBar {
  - progressBarSteps :: Int
  - progressBarBound :: Double
  - progressBarElapsed :: Double
  }
- progressSpinner :: Int -> Text

# Documentation

progressBar :: ProgressBar -> Text Source #

Render the progress bar.

data ProgressBar Source #

Information about a progress bar to render. The "progress space" spans from 0 and up to the `progressBarBound`, but can be visualised in any number of steps.

Constructors

ProgressBar |

Fields

- progressBarSteps :: Int

  Number of steps in the visualisation.

- progressBarBound :: Double

  The logical upper bound.

- progressBarElapsed :: Double

  The current position in the progress bar, relative to the upper bound.

progressSpinner :: Int -> Text Source #

Render a spinner - a kind of progress bar where there is no upper bound because we don't know how long it'll take. You certainly know these from THE INTERNET. The non-negative integer is how many "steps" have been taken. The spinner looks best if this is incremented by one for every call.