HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulescheduler-2.0.1.0Haskell2010

Control.Scheduler.Computation

  • 1 type
  • 1 value
  • Packagescheduler-2.0.1.0
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceComputation.hs
datadata Comp
#

Computation strategy to use when scheduling work.

Constructors

  • Seq

    Sequential computation

  • ParOn ![Int]

    Schedule workers to run on specific capabilities. Specifying an empty list ParOn [] or using Par will result in utilization of all available capabilities.

  • ParN !Word16

    Specify the number of workers that will be handling all the jobs. Difference from ParOn is that workers can jump between cores. Using ParN 0 will result in using all available capabilities.

Instances5Eq, Show, Semigroup, Monoid, NFData
  • Eq CompDefined in scheduler-2.0.1.0 · Control.Scheduler.Computation
  • Show CompDefined in scheduler-2.0.1.0 · Control.Scheduler.Computation
  • Semigroup CompDefined in scheduler-2.0.1.0 · Control.Scheduler.Computation
  • Monoid CompDefined in scheduler-2.0.1.0 · Control.Scheduler.Computation
  • NFData CompDefined in scheduler-2.0.1.0 · Control.Scheduler.Computation
patternpattern Par :: Comp
#

Parallel computation using all available cores. Same as ParOn []

patternpattern Par' :: Comp
#

Parallel computation using all available cores. Same as ParN 0

valuegetCompWorkers :: MonadIO m => Comp -> m Int
#

Figure out how many workers will this computation strategy create.

Note - If at any point during program execution global number of capabilities gets changed with setNumCapabilities, it will have no affect on this function, unless it hasn't yet been called with Par or Par' arguments.