Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class ChanScoped (c :: Scope -> * -> *) where
- type DiffNanosec = Int
- class ChanExtra (inputC :: * -> *) (outputC :: * -> *) | inputC -> outputC, outputC -> inputC where
- debounceStatic :: DiffNanosec -> outputC a -> IO (inputC a, Async ())
- throttleStatic :: DiffNanosec -> outputC a -> IO (inputC a, Async ())
- intersperseStatic :: DiffNanosec -> IO a -> outputC a -> IO (inputC a, Async (), Async ())
Documentation
class ChanScoped (c :: Scope -> * -> *) where Source #
Class for changing the access of a typed channel
readOnly :: Readable scope => c scope a -> c Read a Source #
writeOnly :: Writable scope => c scope a -> c Write a Source #
allowReading :: Writable scope => c scope a -> c ReadWrite a Source #
allowWriting :: Readable scope => c scope a -> c ReadWrite a Source #
Instances
ChanScoped ChanRW Source # | |
Defined in Control.Concurrent.Chan.Extra readOnly :: Readable scope => ChanRW scope a -> ChanRW Read a Source # writeOnly :: Writable scope => ChanRW scope a -> ChanRW Write a Source # allowReading :: Writable scope => ChanRW scope a -> ChanRW ReadWrite a Source # allowWriting :: Readable scope => ChanRW scope a -> ChanRW ReadWrite a Source # | |
ChanScoped TChanRW Source # | |
Defined in Control.Concurrent.Chan.Extra readOnly :: Readable scope => TChanRW scope a -> TChanRW Read a Source # writeOnly :: Writable scope => TChanRW scope a -> TChanRW Write a Source # allowReading :: Writable scope => TChanRW scope a -> TChanRW ReadWrite a Source # allowWriting :: Readable scope => TChanRW scope a -> TChanRW ReadWrite a Source # |
type DiffNanosec = Int Source #
class ChanExtra (inputC :: * -> *) (outputC :: * -> *) | inputC -> outputC, outputC -> inputC where Source #
Class for extra channel techniques
:: DiffNanosec | Time to wait before attempting to send the message |
-> outputC a | |
-> IO (inputC a, Async ()) |
Throw away messages that meet the threshold
:: DiffNanosec | Time to wait before sending the message, for every message |
-> outputC a | |
-> IO (inputC a, Async ()) |
Refrain from relaying messages that meet the threshold
:: DiffNanosec | Time to at-least wait to intersperse messages |
-> IO a | Get a message to intersperse |
-> outputC a | |
-> IO (inputC a, Async (), Async ()) |
Intercalate messages while threshold is met
Instances
ChanExtra Chan Chan Source # | |
Defined in Control.Concurrent.Chan.Extra debounceStatic :: DiffNanosec -> Chan a -> IO (Chan a, Async ()) Source # throttleStatic :: DiffNanosec -> Chan a -> IO (Chan a, Async ()) Source # intersperseStatic :: DiffNanosec -> IO a -> Chan a -> IO (Chan a, Async (), Async ()) Source # | |
ChanExtra TChan TChan Source # | |
Defined in Control.Concurrent.Chan.Extra debounceStatic :: DiffNanosec -> TChan a -> IO (TChan a, Async ()) Source # throttleStatic :: DiffNanosec -> TChan a -> IO (TChan a, Async ()) Source # intersperseStatic :: DiffNanosec -> IO a -> TChan a -> IO (TChan a, Async (), Async ()) Source # | |
ChanExtra (ChanRW Write) (ChanRW Read) Source # | |
Defined in Control.Concurrent.Chan.Extra | |
ChanExtra (TChanRW Write) (TChanRW Read) Source # | |
Defined in Control.Concurrent.Chan.Extra |