IOSpec-0.3.1.2: A pure specification of the IO monad.

Safe Haskell | Safe-Inferred
Language | Haskell98

Test.IOSpec.Fork

Description

A pure specification of `forkIO`.

Synopsis

- data ForkS a
- forkIO :: forall (f :: Type -> Type) (g :: Type -> Type) a. (Executable f, ForkS :<: g) => IOSpec f a -> IOSpec g ThreadId

# Documentation

data ForkS a Source #

An expression of type `IOSpec ForkS a` corresponds to an `IO` computation that uses `forkIO` and returns a value of type `a`.

By itself, `ForkS` is not terribly useful. You will probably want to use `IOSpec (ForkS :+: MVarS)` or `IOSpec (ForkS :+: STMS)`.

#### Instances

Instances details

Executable ForkS Source # |
Instance details Defined in Test.IOSpec.Fork Methods step :: ForkS a -> VM (Step a) Source #
Functor ForkS Source # |
Instance details Defined in Test.IOSpec.Fork Methods fmap :: (a -> b) -> ForkS a -> ForkS b Source # (<$) :: a -> ForkS b -> ForkS a Source #

forkIO :: forall (f :: Type -> Type) (g :: Type -> Type) a. (Executable f, ForkS :<: g) => IOSpec f a -> IOSpec g ThreadId Source #

The `forkIO` function forks off a new thread.