Module

IxQueue

Package
purescript-queue
Repository
athanclark/purescript-queue

#IxQueue Source

newtype IxQueue (rw :: Row SCOPE) (eff :: Row Effect) a

Constructors

Instances

#newIxQueue Source

newIxQueue :: forall a eff. Eff (ref :: REF | eff) (IxQueue (read :: READ, write :: WRITE) (ref :: REF | eff) a)

#putIxQueue Source

putIxQueue :: forall rw a eff. IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> String -> a -> Eff (ref :: REF | eff) Unit

#putManyIxQueue Source

putManyIxQueue :: forall rw t a eff. Traversable t => IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> String -> NonEmpty t a -> Eff (ref :: REF | eff) Unit

Application policy is such that the inputs are stored in the named handler's "pending" values, if a handler isn't registered.

#broadcastIxQueue Source

broadcastIxQueue :: forall rw a eff. IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> a -> Eff (ref :: REF | eff) Unit

#broadcastManyIxQueue Source

broadcastManyIxQueue :: forall rw t a eff. Traversable t => IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> NonEmpty t a -> Eff (ref :: REF | eff) Unit

#broadcastExceptIxQueue Source

broadcastExceptIxQueue :: forall rw a eff. IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> Array String -> a -> Eff (ref :: REF | eff) Unit

#broadcastManyExceptIxQueue Source

broadcastManyExceptIxQueue :: forall rw t a eff. Traversable t => IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> Array String -> NonEmpty t a -> Eff (ref :: REF | eff) Unit

Application policy is such that the inputs will be applied uniformly to all handlers, sorted by their keyed ordering, per input - directed by t's Traversable instance.

#onIxQueue Source

onIxQueue :: forall rw a eff. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> String -> (Handler (ref :: REF | eff) a) -> Eff (ref :: REF | eff) Unit

Application policy is such that the globally pending inputs will be extracted and applied to the handler, if they exist, and likewise to the locally pending inputs,

#onceIxQueue Source

onceIxQueue :: forall rw a eff. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> String -> (Handler (ref :: REF | eff) a) -> Eff (ref :: REF | eff) Unit

#drawIxQueue Source

drawIxQueue :: forall a eff rw. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> String -> Aff (ref :: REF | eff) a

#readBroadcastIxQueue Source

readBroadcastIxQueue :: forall rw a eff. IxQueue rw (ref :: REF | eff) a -> Eff (ref :: REF | eff) (Array a)

#readIxQueue Source

readIxQueue :: forall rw a eff. IxQueue rw (ref :: REF | eff) a -> String -> Eff (ref :: REF | eff) (Array a)

#takeBroadcastIxQueue Source

takeBroadcastIxQueue :: forall rw a eff. IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> Eff (ref :: REF | eff) (Array a)

Removes only the globally pending inputs

#takeIxQueue Source

takeIxQueue :: forall rw a eff. IxQueue (write :: WRITE | rw) (ref :: REF | eff) a -> String -> Eff (ref :: REF | eff) (Array a)

Removes locally pending inputs for a specific key

#delIxQueue Source

delIxQueue :: forall rw a eff. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> String -> Eff (ref :: REF | eff) Boolean

Unregisters a handler, returns whether one existed

#clearIxQueue Source

clearIxQueue :: forall rw a eff. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> Eff (ref :: REF | eff) Unit

Removes all handlers, but preserves pending data

#drainIxQueue Source

drainIxQueue :: forall rw a eff. IxQueue (read :: READ | rw) (ref :: REF | eff) a -> String -> Eff (ref :: REF | eff) Unit

Applies a nullary named handler, to remove any globally pending data

Re-exports from Queue.Types

#WRITE Source

data WRITE :: SCOPE

#READ Source

data READ :: SCOPE

#Handler Source

type Handler eff a = a -> Eff eff Unit

#QueueScope Source

class QueueScope (q :: Row SCOPE -> Row Effect -> Type -> Type) 

#SCOPE Source

data SCOPE :: Type