Module

Data.Functor.Day.Profunctor

Package
purescript-day
Repository
paf31/purescript-day

#Profunctor Source

class Profunctor p  where

A profunctor in the category of functors and natural transformations.

Members

  • dimap :: forall s t a b. (s ~> a) -> (b ~> t) -> p a b -> p s t

Instances

#Strong Source

class (Profunctor p) <= Strong p  where

A strong profunctor with respect to Day convolution.

Members

Instances

#NT Source

newtype NT f g

Natural transformations form a Strong profunctor.

Constructors

Instances

#runNT Source

runNT :: forall f g. NT f g -> f ~> g

#Optic Source

type Optic p (s :: Type -> Type) (t :: Type -> Type) a b = p a b -> p s t

A general type for profunctor optics in the functor category.

#Iso Source

type Iso s t a b = forall p. Profunctor p => Optic p s t a b

An isomorphism of functors.

#Lens Source

type Lens s t a b = forall p. Strong p => Optic p s t a b

A lens with respect to Day convolution, which identifies one functor as a Day convolution of another with a third, unknown functor.

#lens Source

lens :: forall s t a b. Functor b => (s ~> a  (Hom b t)) -> Lens s t a b

Create a profunctor lens from a getter-setter pair.

#hoistOf Source

hoistOf :: forall s t a b. Optic NT s t a b -> (a ~> b) -> s ~> t

Hoist a natural transformation over the specified optic.