Safe Haskell | None |
---|---|
Language | Haskell2010 |
Unagi-Chan Bounded Transport Instance.
This makes use of a KnownNat parameter to specify the size of the buffer.
Synopsis
- data UnagiBounded n a
- type ChurroUnagiBounded a n = Churro a (UnagiBounded n)
- runWaitUnagi :: KnownNat n => ChurroUnagiBounded a n Void Void -> IO a
- runWaitListUnagi :: KnownNat n => ChurroUnagiBounded () n Void o -> IO [o]
- processesUnagi :: (Traversable f, Transport t, Monoid a) => f (ChurroUnagiBounded a 1 i o) -> Churro a t i o
Documentation
Test Setup
>>>
:set -XDataKinds
>>>
import Control.Churro
data UnagiBounded n a Source #
Instances
KnownNat n => Transport (UnagiBounded n :: Type -> Type) Source # | |
Defined in Control.Churro.Transport.Unagi.Bounded flex :: IO (In (UnagiBounded n) a, Out (UnagiBounded n) a) Source # | |
data In (UnagiBounded n :: Type -> Type) a Source # | |
Defined in Control.Churro.Transport.Unagi.Bounded | |
data Out (UnagiBounded n :: Type -> Type) a Source # | |
Defined in Control.Churro.Transport.Unagi.Bounded |
type ChurroUnagiBounded a n = Churro a (UnagiBounded n) Source #
runWaitUnagi :: KnownNat n => ChurroUnagiBounded a n Void Void -> IO a Source #
Convenience function for running a Churro with a Bounded Unagi-Chan Transport.
runWaitListUnagi :: KnownNat n => ChurroUnagiBounded () n Void o -> IO [o] Source #
Convenience function for running a Churro into a List with a Bounded Unagi-Chan Transport.
>>>
runWaitListUnagi @10 $ sourceList [1,2,3] >>> arr succ
[2,3,4]
processesUnagi :: (Traversable f, Transport t, Monoid a) => f (ChurroUnagiBounded a 1 i o) -> Churro a t i o Source #