| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Polysemy.Conc.Effect.Mask
Description
Synopsis
- data RestoreMask :: Effect where
- Restore :: m a -> RestoreMask m a
- restore :: forall r a. Member RestoreMask r => Sem r a -> Sem r a
- newtype Restoration = Restoration {
- unRestoration :: forall a. IO a -> IO a
- type Mask = Scoped_ RestoreMask
- type UninterruptibleMask = Scoped_ RestoreMask
- mask :: Member Mask r => InterpreterFor RestoreMask r
- uninterruptibleMask :: Member UninterruptibleMask r => InterpreterFor RestoreMask r
Documentation
data RestoreMask :: Effect where Source #
Part of an effect abstracting mask.
Constructors
| Restore :: m a -> RestoreMask m a |
restore :: forall r a. Member RestoreMask r => Sem r a -> Sem r a Source #
Restore the previous masking state.
Can only be called inside of an action passed to mask or uninterruptibleMask.
newtype Restoration Source #
Constructors
| Restoration | |
Fields
| |
type Mask = Scoped_ RestoreMask Source #
The scoped masking effect.
type UninterruptibleMask = Scoped_ RestoreMask Source #
The scoped uninterruptible masking effect.
mask :: Member Mask r => InterpreterFor RestoreMask r Source #
Mark a region as masked.
Uses the Scoped_ pattern.
uninterruptibleMask :: Member UninterruptibleMask r => InterpreterFor RestoreMask r Source #
Mark a region as uninterruptibly masked.
Uses the Scoped_ pattern.