Safe Haskell | None |
---|
Documentation
The MonadFork
type class, for monads which support a fork operation.
The instance for IO
is simply forkIO
, while several very overlapping
instances are provided for composite monads, using the monad-control
package.
An example of a monad which has a MonadFork
instance that is not simply
a lifted form of forkIO
is the ResourceT
monad from the conduit
package, which defines the operation resourceForkIO
. The instances
defined here, using the OverlappingInstances extension, will correctly
handle the case of monads transformed on top of ResourceT
(assuming a
definition exists for ResourceT
).
MonadFork IO | |
(MonadFork b, MonadBaseControl b m) => MonadFork m | |
(MonadTransControl t, MonadFork m, Monad m) => MonadFork (t m) |