HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecabal-install-solver-3.12.1.0Haskell2010

Distribution.Solver.Types.Progress

  • 1 type
  • 1 value
datadata Progress step fail done
#

A type to represent the unfolding of an expensive long running calculation that may fail. We may get intermediate steps before the final result which may be used to indicate progress and/or logging messages.

Constructors

Instances4Monad, Functor, Applicative, Alternative
  • Monad (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
  • Functor (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
  • Applicative (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
  • Monoid fail => Alternative (Progress step fail)Defined in cabal-install-solver-3.12.1.0 · Distribution.Solver.Types.Progress
valuefoldProgress
  1. :: step -> a -> a
  2. -> fail -> a
  3. -> done -> a
  4. -> Progress step fail done
  5. -> a
#

Consume a Progress calculation. Much like foldr for lists but with two base cases, one for a final result and one for failure.

Eg to convert into a simple Either result use:

foldProgress (flip const) Left Right