Module
Control.Monad.Aff.AVar
- Package
- purescript-aff
- Repository
- slamdata/purescript-aff
#makeEmptyVar Source
makeEmptyVar :: forall a eff. Aff (avar :: AVAR | eff) (AVar a)Creates a fresh AVar.
#status Source
status :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) (AVarStatus a)Synchronously checks the status of an AVar.
#isEmptyVar Source
isEmptyVar :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) BooleanSynchronously checks whether an AVar currently is empty.
#isFilledVar Source
isFilledVar :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) BooleanSynchronously checks whether an AVar currently has a value.
#isKilledVar Source
isKilledVar :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) BooleanSynchronously checks whether an AVar has been killed.
#tryTakeVar Source
tryTakeVar :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) (Maybe a)Attempts to synchronously take an AVar value, leaving it empty. If the
AVar is empty, this will return Nothing.
#tryReadVar Source
tryReadVar :: forall a eff. AVar a -> Aff (avar :: AVAR | eff) (Maybe a)Attempts to synchronously read an AVar. If the AVar is empty, this will
return Nothing.
Re-exports from Control.Monad.Eff.AVar
#AVarStatus
data AVarStatus aConstructors
Killed ErrorFilled aEmpty
#AVar
data AVar :: Type -> Type#AVAR
data AVAR :: Effect#isKilled
isKilled :: forall a. AVarStatus a -> Boolean#isFilled
isFilled :: forall a. AVarStatus a -> Boolean#isEmpty
isEmpty :: forall a. AVarStatus a -> Boolean