polysemy-conc-0.14.1.1: Polysemy effects for concurrency
Safe HaskellNone
LanguageGHC2021

Polysemy.Conc.Effect.Mask

Description

 
Synopsis

Documentation

data RestoreMask (a :: Type -> Type) b where Source #

Part of an effect abstracting mask.

Constructors

Restore :: forall (a :: Type -> Type) b. a b -> RestoreMask a b 

restore :: forall (r :: EffectRow) 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 #

Resource type for the scoped Mask effect, wrapping the restore callback passed in by mask.

Constructors

Restoration 

Fields

type Mask = Scoped_ RestoreMask Source #

The scoped masking effect.

type UninterruptibleMask = Scoped_ RestoreMask Source #

The scoped uninterruptible masking effect.

mask :: forall (r :: EffectRow). Member Mask r => InterpreterFor RestoreMask r Source #

Mark a region as masked. Uses the Scoped_ pattern.

uninterruptibleMask :: forall (r :: EffectRow). Member UninterruptibleMask r => InterpreterFor RestoreMask r Source #

Mark a region as uninterruptibly masked. Uses the Scoped_ pattern.