uni-events-2.2.2.1: uni events
Safe HaskellNone
LanguageHaskell98

Events.GuardedChannels

Description

GuardedEvents implements guarded events for channels.

Documentation

data GuardedChannel guard value Source #

Instances

Instances details
HasListen GuardedChannel Source # 
Instance details

Defined in Events.GuardedChannels

Methods

listen :: Guard guard => GuardedChannel guard a -> GuardedEvent guard a Source #

Guard guard => HasReceive (GuardedChannel guard) Source # 
Instance details

Defined in Events.GuardedChannels

Methods

receive :: GuardedChannel guard a -> Event a Source #

HasSend (GuardedChannel guard) Source # 
Instance details

Defined in Events.GuardedChannels

Methods

send :: GuardedChannel guard a -> a -> Event () Source #

type GQ guardQueue value = guardQueue (GuardInfo value) Source #

type VQ valueQueue = valueQueue ValueInfo Source #

newGuardedChannel :: HasGuardedChannel guardQueue valueQueue guard value => GQ guardQueue value -> VQ valueQueue -> IO (GuardedChannel guard value) Source #

sneak :: Guard guard => GuardedChannel guard value -> GuardedEvent guard (Maybe value) Source #

replace :: Guard guard => GuardedChannel guard value -> value -> GuardedEvent guard (Maybe value) Source #

class HasEmpty xQueue where Source #

Methods

newEmpty :: IO (xQueue xData) Source #

class HasRemove yQueue x y where Source #

Methods

remove :: yQueue yData -> x -> IO (Maybe (y, yData, IO (yQueue yData)), yQueue yData) Source #

class HasAdd xQueue x where Source #

Methods

add :: xQueue xData -> x -> xData -> IO (xQueue xData, IO ()) Source #

class (HasRemove yQueue x y, HasAdd xQueue x) => CanSendX xQueue yQueue x y Source #

Instances

Instances details
(HasRemove yQueue x y, HasAdd xQueue x) => CanSendX xQueue yQueue x y Source # 
Instance details

Defined in Events.GuardedChannels

class (Guard guard, HasEmpty guardQueue, HasEmpty valueQueue, CanSendX guardQueue valueQueue guard value, CanSendX valueQueue guardQueue value guard) => HasGuardedChannel guardQueue valueQueue guard value Source #

Instances

Instances details
(Guard guard, HasEmpty guardQueue, HasEmpty valueQueue, CanSendX guardQueue valueQueue guard value, CanSendX valueQueue guardQueue value guard) => HasGuardedChannel guardQueue valueQueue guard value Source # 
Instance details

Defined in Events.GuardedChannels