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

Moduleabstract-par-0.3.3Haskell98

Control.Monad.Par.Unsafe

Unsafe operations. NOT part of "Safe Haskell".

These are "unsafe" (in the normal, Haskell sense) when used with a "runPar" of type `Par a -> a`. If used with a runParIO that stays in the IO monad, then they are simply dangerous.

For the purposes of Safe Haskell, any module that imports this module becomes untrustworthy.

  • 1 class
classclass ParUnsafe (iv :: Type -> Type) (p :: Type -> Type) | p -> iv where
#

The class of Par monads that provide unsafe functionality.

Methods

  • unsafePeek :: iv a -> p (Maybe a)

    Peek at the current contents of an IVar in a nonblocking way.

  • unsafeTryPut :: iv a -> a -> p a

    Attempt to put a value into an IVar. If successful, return the value put. If something is already there, return it instead.

  • unsafeParIO :: IO a -> p a

    Lift an IO operation into the Par monad.