Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- (@.$) :: (Comonad w, Monad m) => Tape w m s -> PlayerT w s m a -> m a
- (@-$) :: (Comonad w, Monad m) => Tape w m s -> PlayerT w s m a -> m ([s], Tape w m s, a)
- type Boombox v w m a = Tape w (PlayerT v a m)
- (@->) :: (Comonad v, Functor w, Monad m) => Tape v m a -> Boombox v w m a b -> Tape w m b
- (>->) :: (Comonad u, Comonad v, Functor w, Monad m) => Boombox u v m a b -> Boombox v w m b c -> Boombox u w m a c
- (>-$) :: (Comonad w, Monad m) => Boombox v w m a b -> PlayerT w b m r -> PlayerT v a m r
- composeWith :: (Comonad v, Functor w, Monad m, Functor n) => (forall x. n x -> m x) -> Tape v m a -> Boombox v w n a b -> Tape w m b
- connectDrive :: (Comonad w, Monad m) => (forall x. n x -> m x) -> ([s] -> Tape w m s -> a -> m r) -> [s] -> Tape w m s -> Drive w s n a -> m r
Documentation
(@.$) :: (Comonad w, Monad m) => Tape w m s -> PlayerT w s m a -> m a infix 6 Source
Feed a tape to a player and extract the final result.
(@-$) :: (Comonad w, Monad m) => Tape w m s -> PlayerT w s m a -> m ([s], Tape w m s, a) infix 6 Source
Feed a tape to a player. It returns the leftover input, the remainder of the tape, and the result from the player.
type Boombox v w m a = Tape w (PlayerT v a m) Source
is a transducer from Boombox
v w m a ba
to b
with monadic effect m
, a comonadic control v
(outgoing) and w
(incoming).
(@->) :: (Comonad v, Functor w, Monad m) => Tape v m a -> Boombox v w m a b -> Tape w m b infixl 7 Source
Combine a tape with a boombox. The result will be synchronized with the boombox.
(>->) :: (Comonad u, Comonad v, Functor w, Monad m) => Boombox u v m a b -> Boombox v w m b c -> Boombox u w m a c infixl 8 Source
Connect two boomboxes.
(>-$) :: (Comonad w, Monad m) => Boombox v w m a b -> PlayerT w b m r -> PlayerT v a m r infixr 7 Source
Connect a boombox to a player.