ForkableT-0.1.0.0: Forkable monad transformers

Safe HaskellSafe

Control.Concurrent.ForkableT

Description

This module defines two classes. Forkable m n means a monad n may be forked in m. ForkableT t means that applying the transformer to n and m will mean you can still fork t n in t m.

The reason we need a separate class for monad transformers is because often times the "forkability" of a transformed monad does not depend on the underlying monad, only it's forkability. This is the case for example for most standard monad transformers.

Synopsis

Documentation

class ForkableT t whereSource

ForkableT. The default instance uses MonadTransControl to lift the underlying fork

Methods

forkT :: Forkable m n => t n () -> t m ThreadIdSource

Instances

ForkableT (ReaderT r) 
ForkableT (StateT s) 
Error e => ForkableT (ErrorT e) 
Monoid w => ForkableT (WriterT w) 

class (MonadIO m, MonadIO n) => Forkable m n whereSource

Forkable. The default instance uses ForkableT and simply calls forkT

Methods

fork :: n () -> m ThreadIdSource

Instances

Forkable IO IO 
(MonadBaseControl IO m, MonadIO m) => Forkable (ResourceT m) (ResourceT m) 
Forkable m n => Forkable (ReaderT s m) (StateT s n) 
Forkable m n => Forkable (ReaderT r m) (ReaderT r n) 
Forkable m n => Forkable (StateT s m) (ReaderT s n) 
Forkable m n => Forkable (StateT s m) (StateT s n) 
(Forkable m n, Error e) => Forkable (ErrorT e m) (ErrorT e n)