machinecell-1.3.0: Arrow based stream transducers

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Arrow.Machine.ArrowUtil

Contents

Description

Arrow utilities not related to machinecell library.

Synopsis

Arrow construction helper

ary0 :: (forall p q. (p -> m q) -> a p q) -> m b -> a () b Source

ary1 :: (forall p q. (p -> m q) -> a p q) -> (a1 -> m b) -> a a1 b Source

ary2 :: (forall p q. (p -> m q) -> a p q) -> (a1 -> a2 -> m b) -> a (a1, a2) b Source

ary3 :: (forall p q. (p -> m q) -> a p q) -> (a1 -> a2 -> a3 -> m b) -> a (a1, a2, a3) b Source

ary4 :: (forall p q. (p -> m q) -> a p q) -> (a1 -> a2 -> a3 -> a4 -> m b) -> a (a1, a2, a3, a4) b Source

ary5 :: (forall p q. (p -> m q) -> a p q) -> (a1 -> a2 -> a3 -> a4 -> a5 -> m b) -> a (a1, a2, a3, a4, a5) b Source

kleisli :: Monad m => (a -> m b) -> Kleisli m a b Source

kleisli0 :: Monad m => m b -> Kleisli m () b Source

kleisli2 :: Monad m => (a1 -> a2 -> m b) -> Kleisli m (a1, a2) b Source

kleisli3 :: Monad m => (a1 -> a2 -> a3 -> m b) -> Kleisli m (a1, a2, a3) b Source

kleisli4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> m b) -> Kleisli m (a1, a2, a3, a4) b Source

kleisli5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> m b) -> Kleisli m (a1, a2, a3, a4, a5) b Source

unArrowMonad :: ArrowApply a => (p -> ArrowMonad a q) -> a p q Source

arrowMonad :: ArrowApply a => a p q -> p -> ArrowMonad a q Source

reading :: (Monad m, Arrow a) => (forall p q. (p -> m q) -> a p q) -> (b -> ReaderT r m c) -> ReaderArrow r a b c Source

statefully :: (Monad m, Arrow a) => (forall p q. (p -> m q) -> a p q) -> (b -> StateT s m c) -> StateArrow s a b c Source

To absorve arrow stack signature difference bettween ghc 7.8 and older.

type AS e = (e, ()) Source

toAS :: e -> AS e Source

fromAS :: AS e -> e Source

elimR :: ArrowAddReader r a a' => a (AS e) b -> a' (e, AS r) b Source

Alternate for elimReader that can be used with both ghc 7.8 and older.