kan-extensions-5.2.5: Kan extensions, Kan lifts, the Yoneda lemma, and (co)density (co)monads
Copyright (C) 2018 Brian Mckenna
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability provisional
Portability portable
Safe Haskell None
Language Haskell2010

Data.Functor.Invariant.Day

Description

The Day convolution of two invariant functors is an invariant functor.

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

Synopsis

Documentation

data Day f g a Source #

The Day convolution of two invariant functors.

Constructors

forall b c. Day (f b) (g c) (b -> c -> a) (a -> (b, c))

Instances

Instances details
Invariant ( Day f g) Source #
Instance details

Defined in Data.Functor.Invariant.Day

Methods

invmap :: (a -> b) -> (b -> a) -> Day f g a -> Day f g b Source #

day :: f a -> g b -> Day f g (a, b) Source #

Construct the Day convolution

assoc :: Day f ( Day g h) a -> Day ( Day f g) h a Source #

Day convolution provides a monoidal product. The associativity of this monoid is witnessed by assoc and disassoc .

assoc . disassoc = id
disassoc . assoc = id
invmap f g . assoc = assoc . invmap f g

disassoc :: Day ( Day f g) h a -> Day f ( Day g h) a Source #

Day convolution provides a monoidal product. The associativity of this monoid is witnessed by assoc and disassoc .

assoc . disassoc = id
disassoc . assoc = id
invmap f g . disassoc = disassoc . invmap f g

swapped :: Day f g a -> Day g f a Source #

The monoid for Day convolution on the cartesian monoidal structure is symmetric.

invmap f g . swapped = swapped . invmap f g

trans1 :: ( forall x. f x -> g x) -> Day f h a -> Day g h a Source #

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

This respects the naturality of the natural transformation you supplied:

invmap f g . trans1 fg = trans1 fg . invmap f g

trans2 :: ( forall x. g x -> h x) -> Day f g a -> Day f h a Source #

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

This respects the naturality of the natural transformation you supplied:

invmap f g . trans2 fg = trans2 fg . invmap f g

toContravariant :: Day f g a -> Day f g a Source #

Drop the covariant part of the Day convolution.

toCovariant :: Day f g a -> Day f g a Source #

Drop the contravariant part of the Day convolution.