profunctors-5.2: Profunctors

Copyright(C) 2014-2015 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Profunctor.Closed

Description

 

Synopsis

Documentation

class Profunctor p => Closed p where

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)

Instances

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

newtype Closure p a b

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

unclose :: Profunctor q => (p :-> Closure q) -> p :-> q

data Environment p a b where

Constructors

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

curry' :: Closed p => p (a, b) c -> p a (b -> c)