Portability | portable |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | None |
Eitan Chatav first introduced me to this construction
The Day convolution of two covariant functors is a covariant functor.
Day convolution is usually defined in terms of contravariant functors, however, it just needs a monoidal category, and Hask^op is also monoidal.
Day convolution can be used to nicely describe monoidal functors as monoid objects w.r.t this product.
- data Day f g a = forall b c . Day (f b) (g c) (b -> c -> a)
- day :: f (a -> b) -> g a -> Day f g b
- dap :: Applicative f => Day f f a -> f a
- assoc :: Day f (Day g h) a -> Day (Day f g) h a
- disassoc :: Day (Day f g) h a -> Day f (Day g h) a
- swapped :: Day f g a -> Day g f a
- intro1 :: f a -> Day Identity f a
- intro2 :: f a -> Day f Identity a
- elim1 :: Functor f => Day Identity f a -> f a
- elim2 :: Functor f => Day f Identity a -> f a
- trans1 :: (forall x. f x -> g x) -> Day f h a -> Day g h a
- trans2 :: (forall x. g x -> h x) -> Day f g a -> Day f h a