Control.Monad.Par.Unsafe

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

Safe Haskell | Safe
Language | Haskell98

Control.Monad.Par.Unsafe

Description

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.

Synopsis

- class ParUnsafe iv p | p -> iv where

# Documentation

class ParUnsafe iv p | p -> iv where #

The class of Par monads that provide unsafe functionality.

Minimal complete definition

unsafePeek, unsafeTryPut, unsafeParIO

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.