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 f g a r. (forall x y. (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 f g a x y. (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 f g a. f  g -> Day f g a -> a

Eliminate a Day convolution of two paired functors.

#pairDay Source

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

Pair two Day convolutions when their components pair.

#hoistDay1 Source

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

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

#hoistDay2 Source

hoistDay2 :: forall f g h. (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 f g. f  g ~> g  f

#assoclDay Source

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

#assocrDay Source

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