Copyright | (C) 2013-2016 Edward Kmett Gershom Bazerman and Derek Elkins |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
The Day convolution of two contravariant functors is a contravariant functor.
Synopsis
- data Day f g a = forall b c. Day (f b) (g c) (a -> (b, c))
- day :: f a -> g b -> Day f g (a, b)
- runDay :: (Contravariant f, Contravariant g) => Day f g a -> (f a, g 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 Proxy f a
- intro2 :: f a -> Day f Proxy a
- day1 :: Contravariant f => Day f g a -> f a
- day2 :: Contravariant g => Day f g a -> g a
- diag :: f a -> Day f 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
Documentation
The Day convolution of two contravariant functors.
forall b c. Day (f b) (g c) (a -> (b, c)) |
Instances
Contravariant (Day f g) Source # | |
(Representable f, Representable g) => Representable (Day f g) Source # | |
type Rep (Day f g) Source # | |
Defined in Data.Functor.Contravariant.Day |
runDay :: (Contravariant f, Contravariant g) => Day f g a -> (f a, g a) Source #
Break apart the Day convolution of two contravariant functors.
day1 :: Contravariant f => Day f g a -> f a Source #
day2 :: Contravariant g => Day f g a -> g a Source #