HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulekan-extensions-5.2.7Haskell2010

Data.Functor.Contravariant.Day

The Day convolution of two contravariant functors is a contravariant functor.

http://ncatlab.org/nlab/show/Day+convolution

  • 1 type
  • 12 values
datadata Day (f :: Type -> Type) (g :: Type -> Type) a
#

The Day convolution of two contravariant functors.

Constructors

  • forall b c. Day (f b) (g c) (a -> (b, c))
Instances5Contravariant, Divisible, Representable, Adjunction, Rep
valueday :: f a -> g b -> Day f g (a, b)
#

Construct the Day convolution

day1 (day f g) = f
day2 (day f g) = g
valuetrans1 :: (forall x. f x -> g x) -> Day f h a -> Day g h a
#

Apply a natural transformation to the left-hand side of a Day convolution.

This respects the naturality of the natural transformation you supplied:

contramap f . trans1 fg = trans1 fg . contramap f
valuetrans2 :: (forall x. g x -> h x) -> Day f g a -> Day f h a
#

Apply a natural transformation to the right-hand side of a Day convolution.

This respects the naturality of the natural transformation you supplied:

contramap f . trans2 fg = trans2 fg . contramap f