abstract-par-0.3.3: Type classes generalizing the functionality of the 'monad-par' library.

Safe HaskellSafe-Inferred



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.



class ParUnsafe iv p | p -> iv whereSource

The class of Par monads that provide unsafe functionality.


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

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

unsafeTryPut :: iv a -> a -> p aSource

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 aSource

Lift an IO operation into the Par monad.