in-other-words-0.1.0.0: A higher-order effect system where the sky's the limit

Contents

Synopsis

# Effects

data Mask m a where Source #

An effect for masking asynchronous exceptions.

Mask is typically used as a primitive effect. If you define a Carrier that relies on a novel non-trivial monad transformer t, then you need to make a ThreadsEff t Mask instance (if possible). threadMaskViaClass can help you with that.

The following threading constraints accept Mask:

• ReaderThreads
• StateThreads
• StateLazyThreads
• ErrorThreads
• WriterThreads
• WriterLazyThreads

Constructors

 Mask :: MaskMode -> ((forall x. m x -> m x) -> m a) -> Mask m a

#### Instances

Instances details

A valid definition of threadEff for a ThreadsEff t Mask instance, given that t lifts MonadMask.
BEWARE: threadMaskViaClass is only safe if the implementation of mask and uninterruptibleMask for t m only makes use of mask and uninterruptibleMask for m, and no other methods of MonadThrow, MonadCatch, and MonadMask.