Safe Haskell | None |
---|
- type :~> f g = forall i o. f i o -> g i o
- type :~~> f g = forall i o. (i -> o) -> f i o -> g i o
- type Along f input output i o = f (input, i) (output, o)
- class AlMonad m where
- (~>>=) :: (AlMonad m, Arrow b, Arrow c) => m b i1 o1 -> (Along b i1 o1 :~> Along (m c) i2 o2) -> m c i2 o2
- class AlFunctor f where
- newtype (f :$~ a) input output = Apply {
- runApply :: a input output `Strike` f a input output
Documentation
type Along f input output i o = f (input, i) (output, o)Source
Sometimes we need to refine our morphism a bit; therefore, we use Along f i o
instead of just f
.
Something like a monad - but for arrows
(~>>=) :: (AlMonad m, Arrow b, Arrow c) => m b i1 o1 -> (Along b i1 o1 :~> Along (m c) i2 o2) -> m c i2 o2Source
Most of time we don't need refined morphisms. That's why we would want a simpler combinator.
Something like a functor - again, for arrows