liblawless-0.25.0: Prelude based on protolude for GHC 8 and beyond.

Copyright© 2017 All rights reserved.
LicenseGPL-3
MaintainerEvan Cofsky <evan@theunixman.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

STM.Hub

Description

 

Synopsis

Documentation

data HubLength Source #

The length of a Hub, guaranteed to be positive.

Instances

Bounded HubLength Source # 
Enum HubLength Source # 
Eq HubLength Source # 
Integral HubLength Source # 
Num HubLength Source # 
Ord HubLength Source # 
Real HubLength Source # 
Show HubLength Source # 

data Hub a Source #

The Hub receives the messages from various Sources.

hub :: MonadBase IO m => HubLength -> m (Hub a) Source #

hubMsg :: MonadBase IO m => Hub a -> m a Source #

data Source a Source #

A Source attached to a Hub that can send messages to it.

source :: Getter (Hub a) (Source a) Source #

Create a Source attached to a Hub.

sourceMsg :: MonadBase IO m => Source a -> a -> m () Source #

Send a message to a Hub through a Source.