Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RestoreMask :: Effect where
- Restore :: m a -> RestoreMask m a
- restore :: forall r a. Member RestoreMask r => Sem r a -> Sem r a
- type Mask resource = Scoped (MaskResource resource) RestoreMask
- type UninterruptipleMask resource = Scoped (UninterruptipleMaskResource resource) RestoreMask
- mask :: forall resource r. Member (Mask resource) r => InterpreterFor RestoreMask r
- uninterruptibleMask :: forall resource r. Member (UninterruptipleMask resource) r => InterpreterFor RestoreMask r
Documentation
data RestoreMask :: Effect where Source #
Part of an effect abstracting mask
.
Restore :: m a -> RestoreMask m a |
Instances
type DefiningModule RestoreMask Source # | |
Defined in Polysemy.Conc.Effect.Mask |
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
.
type Mask resource = Scoped (MaskResource resource) RestoreMask Source #
The scoped masking effect.
type UninterruptipleMask resource = Scoped (UninterruptipleMaskResource resource) RestoreMask Source #
The scoped uninterruptible masking effect.
mask :: forall resource r. Member (Mask resource) r => InterpreterFor RestoreMask r Source #
Mark a region as masked.
Uses the Scoped
pattern.
uninterruptibleMask :: forall resource r. Member (UninterruptipleMask resource) r => InterpreterFor RestoreMask r Source #
Mark a region as uninterruptibly masked.
Uses the Scoped
pattern.