HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulemonad-par-0.3.6Haskell98

Control.Monad.Par.IO

This module is an alternative version of Control.Monad.Par in which the Par type provides IO operations, by means of liftIO. The price paid is that only runParIO is available, not the pure runPar.

This module uses the same default scheduler as Control.Monad.Par.

  • 2 types
  • 1 value
  • Packagemonad-par-0.3.6
  • Exports3
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceIO.hs
newtypenewtype ParIO a
#

A wrapper around an underlying Par type which allows IO.

Instances7Monad, Functor, MonadFix, Applicative, MonadIO, ParFuture, …
newtypenewtype IVar a
#
Instances6ParFuture, ParIVar, Eq, NFData
  • ParFuture IVar ParIODefined in monad-par-0.3.6 · Control.Monad.Par.IO
  • ParFuture IVar ParDefined in monad-par-0.3.6 · Control.Monad.Par.Scheds.Trace · orphan
  • ParIVar IVar ParIODefined in monad-par-0.3.6 · Control.Monad.Par.IO
  • ParIVar IVar ParDefined in monad-par-0.3.6 · Control.Monad.Par.Scheds.Trace · orphan
  • Eq (IVar a)Defined in monad-par-0.3.6 · Control.Monad.Par.Scheds.TraceInternal

    Equality for IVars is physical equality, as with other reference types.

  • NFData (IVar a)Defined in monad-par-0.3.6 · Control.Monad.Par.Scheds.TraceInternal
valuerunParIO :: ParIO a -> IO a
#

A run method which allows actual IO to occur on top of the Par monad. Of course this means that all the normal problems of parallel IO computations are present, including nondeterminism.

A simple example program:

 runParIO (liftIO $ putStrLn "hi" :: ParIO ())