profunctors-5.0.0.1: Profunctors

Safe HaskellTrustworthy
LanguageHaskell2010

Data.Profunctor.Closed

Synopsis

Documentation

class Profunctor p => Closed p where Source

A strong profunctor allows the monoidal structure to pass through.

A closed profunctor allows the closed structure to pass through.

Methods

closed :: p a b -> p (x -> a) (x -> b) Source

Instances

Closed (->) 
(Distributive f, Monad f) => Closed (Kleisli f) 
Closed (Tagged *) 
Functor f => Closed (Cokleisli f) 
Functor f => Closed (Costar f) 
Distributive f => Closed (Star f) 
Profunctor p => Closed (Closure p) 
(Closed p, Closed q) => Closed (Procompose p q) 

newtype Closure p a b Source

Closure adjoins a Closed structure to any Profunctor.

Analogous to Tambara for Strong.

Constructors

Closure 

Fields

runClosure :: forall x. p (x -> a) (x -> b)
 

close :: Closed p => (p :-> q) -> p :-> Closure q Source

data Environment p a b where Source

Constructors

Environment :: ((z -> y) -> b) -> p x y -> (a -> z -> x) -> Environment p a b