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 :: Type -> Type) (g :: Type -> Type) a = 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 :: forall (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) a. Day f (Day g h) a -> Day (Day f g) h a
- disassoc :: forall (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) a. Day (Day f g) h a -> Day f (Day g h) a
- swapped :: forall (f :: Type -> Type) (g :: Type -> Type) a. Day f g a -> Day g f a
- intro1 :: f a -> Day (Proxy :: Type -> Type) f a
- intro2 :: f a -> Day f (Proxy :: Type -> Type) a
- day1 :: forall f (g :: Type -> Type) a. Contravariant f => Day f g a -> f a
- day2 :: forall g (f :: Type -> Type) a. Contravariant g => Day f g a -> g a
- diag :: f a -> Day f f a
- trans1 :: forall f g (h :: Type -> Type) a. (forall x. f x -> g x) -> Day f h a -> Day g h a
- trans2 :: forall g h (f :: Type -> Type) a. (forall x. g x -> h x) -> Day f g a -> Day f h a
Documentation
data Day (f :: Type -> Type) (g :: Type -> Type) a Source #
The Day convolution of two contravariant functors.
Day (f b) (g c) (a -> (b, c)) |
Instances
(Representable f, Representable g) => Representable (Day f g) Source # | |
Defined in Data.Functor.Contravariant.Day | |
Contravariant (Day f g) Source # | |
(Divisible f, Divisible g) => Divisible (Day f g) Source # | |
(Adjunction f u, Adjunction f' u') => Adjunction (Day f f') (Day u u') 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.
assoc :: forall (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) a. Day f (Day g h) a -> Day (Day f g) h a Source #
disassoc :: forall (f :: Type -> Type) (g :: Type -> Type) (h :: Type -> Type) a. Day (Day f g) h a -> Day f (Day g h) a Source #