monad-par-0.3.6: A library for parallel programming based on a monad

Safe Haskell | Safe-Inferred
Language | Haskell98

Control.Monad.Par

Contents

- The Par Monad
- Communication: IVars
- Operations

Description

The `monad-par` package provides a family of `Par` monads, for speeding up pure computations using parallel processors. (for a similar programming model for use with `IO`, see Control.Monad.Par.IO.)

The result of a given `Par` computation is always the same - i.e. it is deterministic, but the computation may be performed more quickly if there are processors available to share the work.

For example, the following program fragment computes the values of `(f x)` and `(g x)` in parallel, and returns a pair of their results:

     runPar $ do
         fx <- spawnP (f x)  -- start evaluating (f x)
         gx <- spawnP (g x)  -- start evaluating (g x)
         a  <- get fx        -- wait for fx
         b  <- get gx        -- wait for gx
         return (a,b)        -- return results

`Par` can be used for specifying pure parallel computations in which the order of the computation is not known beforehand. The programmer specifies how information flows from one part of the computation to another, but not the order in which computations will be evaluated at runtime. Information flow is described using "variables" called `IVar`s, which support `put` and `get` operations. For example, suppose you have a problem that can be expressed as a network with four nodes, where `b` and `c` require the value of `a`, and `d` requires the value of `b` and `c`:

                          a
                         / \
                        b   c
                         \ /
                          d

Then you could express this in the `Par` monad like this:

      runPar $ do
          [a,b,c,d] <- sequence [new,new,new,new]
          fork $ do x <- get a; put b (x+1)
          fork $ do x <- get a; put c (x+2)
          fork $ do x <- get b; y <- get c; put d (x+y)
          fork $ do put a (3 :: Int)
          get d

The result of the above computation is always 9. The `get` operation waits until its input is available; multiple `put`s to the same `IVar` are not allowed, and result in a runtime error. Values stored in `IVar`s are usually fully evaluated (although there are ways provided to pass lazy values if necessary).

In the above example, `b` and `c` will be evaluated in parallel. In practice the work involved at each node is too small here to see the benefits of parallelism though: typically each node should involve much more work. The granularity is completely under your control - too small and the overhead of the `Par` monad will outweigh any parallelism benefits, whereas if the nodes are too large then there might not be enough parallelism to use all the available processors.

Unlike `Control.Parallel`, in `Control.Monad.Par` parallelism is not combined with laziness, so sharing and granularity are completely under the control of the programmer. New units of parallel work are only created by `fork` and a few other combinators.

The default implementation is based on a work-stealing scheduler that divides the work as evenly as possible between the available processors at runtime. Other schedulers are available that are based on different policies and have different performance characteristics. To use one of these other schedulers, just import its module instead of Control.Monad.Par:

- Control.Monad.Par.Scheds.Trace
- Control.Monad.Par.Scheds.Sparks

For more information on the programming model, please see these sources:

- The wiki/tutorial (http://www.haskell.org/haskellwiki/Par_Monad:_A_Parallelism_Tutorial)
- The original paper (http://www.cs.indiana.edu/~rrnewton/papers/haskell2011_monad-par.pdf)
- Tutorial slides (http://community.haskell.org/~simonmar/slides/CUFP.pdf)
- Other slides: (http://www.cs.ox.ac.uk/ralf.hinze/WG2.8/28/slides/simon.pdf, http://www.cs.indiana.edu/~rrnewton/talks/2011_HaskellSymposium_ParMonad.pdf)

Synopsis

- data Par a
- runPar :: Par a -> a
- runParIO :: Par a -> IO a
- fork :: Par () -> Par ()
- data IVar a
- new :: Par (IVar a)
- newFull :: NFData a => a -> Par (IVar a)
- newFull_ :: a -> Par (IVar a)
- get :: IVar a -> Par a
- put :: NFData a => IVar a -> a -> Par ()
- put_ :: IVar a -> a -> Par ()
- spawn :: NFData a => Par a -> Par (IVar a)
- spawn_ :: Par a -> Par (IVar a)
- spawnP :: NFData a => a -> Par (IVar a)
- module Control.Monad.Par.Combinator
- class NFData a

# The Par Monad

data Par a Source #

#### Instances

Instances details

MonadFix Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods mfix :: (a -> Par a) -> Par a Source #
Applicative Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods pure :: a -> Par a Source # (<*>) :: Par (a -> b) -> Par a -> Par b Source # liftA2 :: (a -> b -> c) -> Par a -> Par b -> Par c Source # (*>) :: Par a -> Par b -> Par b Source # (<*) :: Par a -> Par b -> Par a Source #
Functor Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods fmap :: (a -> b) -> Par a -> Par b Source # (<$) :: a -> Par b -> Par a Source #
Monad Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods (>>=) :: Par a -> (a -> Par b) -> Par b Source # (>>) :: Par a -> Par b -> Par b Source # return :: a -> Par a Source #
ParFuture IVar Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.Trace Methods spawn :: NFData a => Par a -> Par (IVar a) Source # spawn_ :: Par a -> Par (IVar a) Source # get :: IVar a -> Par a Source # spawnP :: NFData a => a -> Par (IVar a) Source #
ParIVar IVar Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.Trace Methods fork :: Par () -> Par () Source # new :: Par (IVar a) Source # put :: NFData a => IVar a -> a -> Par () Source # put_ :: IVar a -> a -> Par () Source # newFull :: NFData a => a -> Par (IVar a) Source # newFull_ :: a -> Par (IVar a) Source #

runPar :: Par a -> a Source #

Run a parallel, deterministic computation and return its result.

Note: you must NOT return an IVar in the output of the parallel computation. This is unfortunately not enforced, as it is with `runST` or with newer libraries that export a Par monad, such as `lvish`.

runParIO :: Par a -> IO a Source #

A version that avoids an internal `unsafePerformIO` for calling contexts that are already in the `IO` monad.

Returning any value containing IVar is still disallowed, as it can compromise type safety.

fork :: Par () -> Par () Source #

Forks a computation to happen in parallel. The forked computation may exchange values with other computations using `IVar`s.

# Communication: IVars

data IVar a Source #

#### Instances

Instances details

ParFuture IVar ParIO Source # |
Instance details Defined in Control.Monad.Par.IO Methods spawn :: NFData a => ParIO a -> ParIO (IVar a) Source # spawn_ :: ParIO a -> ParIO (IVar a) Source # get :: IVar a -> ParIO a Source # spawnP :: NFData a => a -> ParIO (IVar a) Source #
ParFuture IVar Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.Trace Methods spawn :: NFData a => Par a -> Par (IVar a) Source # spawn_ :: Par a -> Par (IVar a) Source # get :: IVar a -> Par a Source # spawnP :: NFData a => a -> Par (IVar a) Source #
ParIVar IVar ParIO Source # |
Instance details Defined in Control.Monad.Par.IO Methods fork :: ParIO () -> ParIO () Source # new :: ParIO (IVar a) Source # put :: NFData a => IVar a -> a -> ParIO () Source # put_ :: IVar a -> a -> ParIO () Source # newFull :: NFData a => a -> ParIO (IVar a) Source # newFull_ :: a -> ParIO (IVar a) Source #
ParIVar IVar Par Source # |
Instance details Defined in Control.Monad.Par.Scheds.Trace Methods fork :: Par () -> Par () Source # new :: Par (IVar a) Source # put :: NFData a => IVar a -> a -> Par () Source # put_ :: IVar a -> a -> Par () Source # newFull :: NFData a => a -> Par (IVar a) Source # newFull_ :: a -> Par (IVar a) Source #
NFData (IVar a) Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods rnf :: IVar a -> () Source #
Eq (IVar a) Source # | Equality for IVars is physical equality, as with other reference types.
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods (==) :: IVar a -> IVar a -> Bool Source # (/=) :: IVar a -> IVar a -> Bool Source #

new :: Par (IVar a) Source #

Creates a new `IVar`

newFull :: NFData a => a -> Par (IVar a) Source #

Creates a new `IVar` that contains a value

newFull_ :: a -> Par (IVar a) Source #

Creates a new `IVar` that contains a value (head-strict only)

get :: IVar a -> Par a Source #

Read the value in an `IVar`. The `get` operation can only return when the value has been written by a prior or parallel `put` to the same `IVar`.

put :: NFData a => IVar a -> a -> Par () Source #

Put a value into an `IVar`. Multiple `put`s to the same `IVar` are not allowed, and result in a runtime error.

`put` fully evaluates its argument, which therefore must be an instance of `NFData`. The idea is that this forces the work to happen when we expect it, rather than being passed to the consumer of the `IVar` and performed later, which often results in less parallelism than expected.

Sometimes partial strictness is more appropriate: see `put_`.

put_ :: IVar a -> a -> Par () Source #

Like `put`, but only head-strict rather than fully-strict.

# Operations

spawn :: NFData a => Par a -> Par (IVar a) Source #

Like `fork`, but returns an `IVar` that can be used to query the result of the forked computataion. Therefore `spawn` provides futures or promises.

     spawn p = do
       r <- new
       fork (p >>= put r)
       return r

spawn_ :: Par a -> Par (IVar a) Source #

Like `spawn`, but the result is only head-strict, not fully-strict.

spawnP :: NFData a => a -> Par (IVar a) Source #

Spawn a pure (rather than monadic) computation. Fully-strict.

     spawnP = spawn . return

module Control.Monad.Par.Combinator

This module also reexports the Combinator library for backwards compatibility with version 0.1.

class NFData a Source #

A class of types that can be fully evaluated.

Since: deepseq-1.1.0.0

#### Instances

Instances details

NFData ByteArray | Since: deepseq-1.4.7.0
Instance details Defined in Control.DeepSeq Methods rnf :: ByteArray -> () Source #
NFData All | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: All -> () Source #
NFData Any | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Any -> () Source #
NFData TypeRep | NOTE: Prior to `deepseq-1.4.4.0` this instance was only defined for `base-4.8.0.0` and later. Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: TypeRep -> () Source #
NFData Unique | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Unique -> () Source #
NFData Version | Since: deepseq-1.3.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Version -> () Source #
NFData CBool | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: CBool -> () Source #
NFData CChar | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CChar -> () Source #
NFData CClock | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CClock -> () Source #
NFData CDouble | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CDouble -> () Source #
NFData CFile | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CFile -> () Source #
NFData CFloat | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CFloat -> () Source #
NFData CFpos | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CFpos -> () Source #
NFData CInt | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CInt -> () Source #
NFData CIntMax | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CIntMax -> () Source #
NFData CIntPtr | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CIntPtr -> () Source #
NFData CJmpBuf | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CJmpBuf -> () Source #
NFData CLLong | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CLLong -> () Source #
NFData CLong | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CLong -> () Source #
NFData CPtrdiff | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CPtrdiff -> () Source #
NFData CSChar | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CSChar -> () Source #
NFData CSUSeconds | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CSUSeconds -> () Source #
NFData CShort | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CShort -> () Source #
NFData CSigAtomic | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CSigAtomic -> () Source #
NFData CSize | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CSize -> () Source #
NFData CTime | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CTime -> () Source #
NFData CUChar | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUChar -> () Source #
NFData CUInt | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUInt -> () Source #
NFData CUIntMax | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUIntMax -> () Source #
NFData CUIntPtr | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUIntPtr -> () Source #
NFData CULLong | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CULLong -> () Source #
NFData CULong | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CULong -> () Source #
NFData CUSeconds | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUSeconds -> () Source #
NFData CUShort | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CUShort -> () Source #
NFData CWchar | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: CWchar -> () Source #
NFData Void | Defined as ``rnf` = `absurd``. Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Void -> () Source #
NFData ThreadId | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: ThreadId -> () Source #
NFData Fingerprint | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Fingerprint -> () Source #
NFData MaskingState | Since: deepseq-1.4.4.0
Instance details Defined in Control.DeepSeq Methods rnf :: MaskingState -> () Source #
NFData ExitCode | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: ExitCode -> () Source #
NFData Int16 |
Instance details Defined in Control.DeepSeq Methods rnf :: Int16 -> () Source #
NFData Int32 |
Instance details Defined in Control.DeepSeq Methods rnf :: Int32 -> () Source #
NFData Int64 |
Instance details Defined in Control.DeepSeq Methods rnf :: Int64 -> () Source #
NFData Int8 |
Instance details Defined in Control.DeepSeq Methods rnf :: Int8 -> () Source #
NFData CallStack | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: CallStack -> () Source #
NFData SrcLoc | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: SrcLoc -> () Source #
NFData Word16 |
Instance details Defined in Control.DeepSeq Methods rnf :: Word16 -> () Source #
NFData Word32 |
Instance details Defined in Control.DeepSeq Methods rnf :: Word32 -> () Source #
NFData Word64 |
Instance details Defined in Control.DeepSeq Methods rnf :: Word64 -> () Source #
NFData Word8 |
Instance details Defined in Control.DeepSeq Methods rnf :: Word8 -> () Source #
NFData ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods rnf :: ByteString -> () Source #
NFData ByteString |
Instance details Defined in Data.ByteString.Lazy.Internal Methods rnf :: ByteString -> () Source #
NFData ShortByteString |
Instance details Defined in Data.ByteString.Short.Internal Methods rnf :: ShortByteString -> () Source #
NFData Module | Since: deepseq-1.4.8.0
Instance details Defined in Control.DeepSeq Methods rnf :: Module -> () Source #
NFData Ordering |
Instance details Defined in Control.DeepSeq Methods rnf :: Ordering -> () Source #
NFData TyCon | NOTE: Prior to `deepseq-1.4.4.0` this instance was only defined for `base-4.8.0.0` and later. Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: TyCon -> () Source #
NFData TextDetails |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods rnf :: TextDetails -> () Source #
NFData Doc |
Instance details Defined in Text.PrettyPrint.HughesPJ Methods rnf :: Doc -> () Source #
NFData StdGen |
Instance details Defined in System.Random.Internal Methods rnf :: StdGen -> () Source #
NFData Integer |
Instance details Defined in Control.DeepSeq Methods rnf :: Integer -> () Source #
NFData Natural | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Natural -> () Source #
NFData () |
Instance details Defined in Control.DeepSeq Methods rnf :: () -> () Source #
NFData Bool |
Instance details Defined in Control.DeepSeq Methods rnf :: Bool -> () Source #
NFData Char |
Instance details Defined in Control.DeepSeq Methods rnf :: Char -> () Source #
NFData Double |
Instance details Defined in Control.DeepSeq Methods rnf :: Double -> () Source #
NFData Float |
Instance details Defined in Control.DeepSeq Methods rnf :: Float -> () Source #
NFData Int |
Instance details Defined in Control.DeepSeq Methods rnf :: Int -> () Source #
NFData Word |
Instance details Defined in Control.DeepSeq Methods rnf :: Word -> () Source #
NFData a => NFData (ZipList a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: ZipList a -> () Source #
NFData (MutableByteArray s) | Since: deepseq-1.4.8.0
Instance details Defined in Control.DeepSeq Methods rnf :: MutableByteArray s -> () Source #
NFData a => NFData (Complex a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Complex a -> () Source #
NFData a => NFData (Identity a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Identity a -> () Source #
NFData a => NFData (First a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: First a -> () Source #
NFData a => NFData (Last a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Last a -> () Source #
NFData a => NFData (Down a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Down a -> () Source #
NFData a => NFData (First a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: First a -> () Source #
NFData a => NFData (Last a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Last a -> () Source #
NFData a => NFData (Max a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Max a -> () Source #
NFData a => NFData (Min a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Min a -> () Source #
NFData m => NFData (WrappedMonoid m) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: WrappedMonoid m -> () Source #
NFData a => NFData (Dual a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Dual a -> () Source #
NFData a => NFData (Product a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Product a -> () Source #
NFData a => NFData (Sum a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Sum a -> () Source #
NFData a => NFData (NonEmpty a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: NonEmpty a -> () Source #
NFData (IORef a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: IORef a -> () Source #
NFData (MVar a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: MVar a -> () Source #
NFData (FunPtr a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: FunPtr a -> () Source #
NFData (Ptr a) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Ptr a -> () Source #
NFData a => NFData (Ratio a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Ratio a -> () Source #
NFData (StableName a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: StableName a -> () Source #
NFData a => NFData (Digit a) |
Instance details Defined in Data.Sequence.Internal Methods rnf :: Digit a -> () Source #
NFData a => NFData (Elem a) |
Instance details Defined in Data.Sequence.Internal Methods rnf :: Elem a -> () Source #
NFData a => NFData (FingerTree a) |
Instance details Defined in Data.Sequence.Internal Methods rnf :: FingerTree a -> () Source #
NFData a => NFData (Node a) |
Instance details Defined in Data.Sequence.Internal Methods rnf :: Node a -> () Source #
NFData a => NFData (Seq a) |
Instance details Defined in Data.Sequence.Internal Methods rnf :: Seq a -> () Source #
NFData a => NFData (Set a) |
Instance details Defined in Data.Set.Internal Methods rnf :: Set a -> () Source #
NFData (IVar a) Source # |
Instance details Defined in Control.Monad.Par.Scheds.Direct Methods rnf :: IVar a -> () Source #
NFData (IVar a) Source # |
Instance details Defined in Control.Monad.Par.Scheds.TraceInternal Methods rnf :: IVar a -> () Source #
NFData a => NFData (AnnotDetails a) |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods rnf :: AnnotDetails a -> () Source #
NFData a => NFData (Doc a) |
Instance details Defined in Text.PrettyPrint.Annotated.HughesPJ Methods rnf :: Doc a -> () Source #
NFData a => NFData (Array a) |
Instance details Defined in Data.Primitive.Array Methods rnf :: Array a -> () Source #
NFData (PrimArray a) |
Instance details Defined in Data.Primitive.PrimArray Methods rnf :: PrimArray a -> () Source #
NFData a => NFData (SmallArray a) |
Instance details Defined in Data.Primitive.SmallArray Methods rnf :: SmallArray a -> () Source #
NFData g => NFData (StateGen g) |
Instance details Defined in System.Random.Internal Methods rnf :: StateGen g -> () Source #
NFData g => NFData (AtomicGen g) |
Instance details Defined in System.Random.Stateful Methods rnf :: AtomicGen g -> () Source #
NFData g => NFData (IOGen g) |
Instance details Defined in System.Random.Stateful Methods rnf :: IOGen g -> () Source #
NFData g => NFData (STGen g) |
Instance details Defined in System.Random.Stateful Methods rnf :: STGen g -> () Source #
NFData g => NFData (TGen g) |
Instance details Defined in System.Random.Stateful Methods rnf :: TGen g -> () Source #
NFData (Vector a) |
Instance details Defined in Data.Vector.Primitive Methods rnf :: Vector a -> () Source #
NFData (Vector a) |
Instance details Defined in Data.Vector.Unboxed.Base Methods rnf :: Vector a -> () Source #
NFData a => NFData (Maybe a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Maybe a -> () Source #
NFData a => NFData (a) | Since: deepseq-1.4.6.0
Instance details Defined in Control.DeepSeq Methods rnf :: (a) -> () Source #
NFData a => NFData [a] |
Instance details Defined in Control.DeepSeq Methods rnf :: [a] -> () Source #
(NFData a, NFData b) => NFData (Either a b) |
Instance details Defined in Control.DeepSeq Methods rnf :: Either a b -> () Source #
NFData (Fixed a) | Since: deepseq-1.3.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Fixed a -> () Source #
NFData (Proxy a) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Proxy a -> () Source #
(NFData a, NFData b) => NFData (Arg a b) | Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: Arg a b -> () Source #
NFData (TypeRep a) | Since: deepseq-1.4.8.0
Instance details Defined in Control.DeepSeq Methods rnf :: TypeRep a -> () Source #
(NFData a, NFData b) => NFData (Array a b) |
Instance details Defined in Control.DeepSeq Methods rnf :: Array a b -> () Source #
NFData (STRef s a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0
Instance details Defined in Control.DeepSeq Methods rnf :: STRef s a -> () Source #
NFData (MutablePrimArray s a) |
Instance details Defined in Data.Primitive.PrimArray Methods rnf :: MutablePrimArray s a -> () Source #
NFData (MVector s a) |
Instance details Defined in Data.Vector.Unboxed.Base Methods rnf :: MVector s a -> () Source #
(NFData a, NFData b) => NFData (a, b) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a, b) -> () Source #
NFData (a -> b) | This instance is for convenience and consistency with `seq`. This assumes that WHNF is equivalent to NF for functions. Since: deepseq-1.3.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: (a -> b) -> () Source #
NFData a => NFData (Const a b) | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Const a b -> () Source #
NFData (a :~: b) | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: (a :~: b) -> () Source #
(NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3) -> () Source #
(NFData1 f, NFData1 g, NFData a) => NFData (Product f g a) | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: Product f g a -> () Source #
(NFData1 f, NFData1 g, NFData a) => NFData (Sum f g a) | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: Sum f g a -> () Source #
NFData (a :~~: b) | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: (a :~~: b) -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4) => NFData (a1, a2, a3, a4) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4) -> () Source #
(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a) | Since: deepseq-1.4.3.0
Instance details Defined in Control.DeepSeq Methods rnf :: Compose f g a -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4, a5) -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4, a5, a6) -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4, a5, a6, a7) -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4, a5, a6, a7, a8) -> () Source #
(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9) |
Instance details Defined in Control.DeepSeq Methods rnf :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> () Source #

(0.3) Reexport `NFData` for fully-strict operators.