Module

Data.Functor.Day

Package
purescript-day
Repository
paf31/purescript-day

The Day convolution of covariant functors.

Based on https://hackage.haskell.org/package/kan-extensions/docs/Data-Functor-Day.html

#Day Source

newtype Day f g a

Day convolution of two covariant functors

Instances

#type (⊗) Source

Operator alias for Data.Functor.Day.Day (left-associative / precedence 6)

#runDay Source

runDay :: forall r a g f. (forall y x. (x -> y -> a) -> f x -> g y -> r) -> Day f g a -> r

Unpack a value of type Day f g a.

#day Source

day :: forall y x a g f. (x -> y -> a) -> f x -> g y -> Day f g a

Construct a value of type Day f g a.

#dap Source

dap :: forall f. Apply f => f  f ~> f

f ⊗ f whenever f is Applicative.

#elimPair Source

elimPair :: forall a g f. f  g -> Day f g a -> a

Eliminate a Day convolution of two paired functors.

#pairDay Source

pairDay :: forall g2 g1 f2 f1. f1  f2 -> g1  g2 -> f1  g1  f2  g2

Pair two Day convolutions when their components pair.

#hoistDay1 Source

hoistDay1 :: forall h g f. (f ~> g) -> f  h ~> g  h

Hoist a natural transformation over the left hand side of a 'Day' convolution.

#hoistDay2 Source

hoistDay2 :: forall h g f. (f ~> g) -> h  f ~> h  g

Hoist a natural transformation over the left hand side of a 'Day' convolution.

#introDay1 Source

introDay1 :: forall f. f ~> Identity  f

#introDay2 Source

introDay2 :: forall f. f ~> f  Identity

#elimDay1 Source

elimDay1 :: forall f. Functor f => Identity  f ~> f

#elimDay2 Source

elimDay2 :: forall f. Functor f => f  Identity ~> f

#symmDay Source

symmDay :: forall g f. f  g ~> g  f

#assoclDay Source

assoclDay :: forall h g f. f  (g  h) ~> (f  g)  h

#assocrDay Source

assocrDay :: forall h g f. (f  g)  h ~> f  (g  h)