profunctors-5.6.2: Profunctors
Copyright(C) 2014-2018 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Profunctor.Closed

Description

 
Synopsis

Documentation

class Profunctor p => Closed (p :: Type -> Type -> Type) 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

Instances details
(Distributive f, Monad f) => Closed (Kleisli f) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Kleisli f a b -> Kleisli f (x -> a) (x -> b) Source #

Profunctor p => Closed (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

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

Closed (Environment p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

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

Profunctor p => Closed (CofreeMapping p) Source # 
Instance details

Defined in Data.Profunctor.Mapping

Methods

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

Closed (FreeMapping p) Source # 
Instance details

Defined in Data.Profunctor.Mapping

Methods

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

Closed p => Closed (Coyoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

Closed p => Closed (Yoneda p) Source # 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

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

Closed (Tagged :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Tagged a b -> Tagged (x -> a) (x -> b) Source #

Functor f => Closed (Cokleisli f) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Cokleisli f a b -> Cokleisli f (x -> a) (x -> b) Source #

Functor f => Closed (Costar f) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Costar f a b -> Costar f (x -> a) (x -> b) Source #

Distributive f => Closed (Star f) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Star f a b -> Star f (x -> a) (x -> b) Source #

Closed (->) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

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

(Closed p, Closed q) => Closed (Product p q) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Product p q a b -> Product p q (x -> a) (x -> b) Source #

(Closed p, Closed q) => Closed (Sum p q) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Sum p q a b -> Sum p q (x -> a) (x -> b) Source #

(Functor f, Closed p) => Closed (Tannen f p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Tannen f p a b -> Tannen f p (x -> a) (x -> b) Source #

(Functor f, Closed p) => Closed (Cayley f p) Source # 
Instance details

Defined in Data.Profunctor.Cayley

Methods

closed :: Cayley f p a b -> Cayley f p (x -> a) (x -> b) Source #

(Closed p, Closed q) => Closed (Procompose p q) Source # 
Instance details

Defined in Data.Profunctor.Composition

Methods

closed :: Procompose p q a b -> Procompose p q (x -> a) (x -> b) Source #

newtype Closure (p :: Type -> Type -> Type) a b Source #

Closure adjoins a Closed structure to any Profunctor.

Analogous to Tambara for Strong.

Constructors

Closure 

Fields

Instances

Instances details
ProfunctorComonad Closure Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> p Source #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> Closure (Closure p) Source #

ProfunctorAdjunction Environment Closure Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Closure (Environment p) Source #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Closure p) :-> p Source #

ProfunctorFunctor Closure Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Closure p :-> Closure q Source #

Category p => Category (Closure p :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

id :: Closure p a a #

(.) :: Closure p b c -> Closure p a b -> Closure p a c #

Arrow p => Arrow (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

arr :: (b -> c) -> Closure p b c #

first :: Closure p b c -> Closure p (b, d) (c, d) #

second :: Closure p b c -> Closure p (d, b) (d, c) #

(***) :: Closure p b c -> Closure p b' c' -> Closure p (b, b') (c, c') #

(&&&) :: Closure p b c -> Closure p b c' -> Closure p b (c, c') #

ArrowLoop p => ArrowLoop (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

loop :: Closure p (b, d) (c, d) -> Closure p b c #

ArrowPlus p => ArrowPlus (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<+>) :: Closure p b c -> Closure p b c -> Closure p b c #

ArrowZero p => ArrowZero (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

zeroArrow :: Closure p b c #

Profunctor p => Closed (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

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

Strong p => Strong (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

first' :: Closure p a b -> Closure p (a, c) (b, c) Source #

second' :: Closure p a b -> Closure p (c, a) (c, b) Source #

Profunctor p => Profunctor (Closure p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Closure p b c -> Closure p a d Source #

lmap :: (a -> b) -> Closure p b c -> Closure p a c Source #

rmap :: (b -> c) -> Closure p a b -> Closure p a c Source #

(#.) :: forall a b c q. Coercible c b => q b c -> Closure p a b -> Closure p a c Source #

(.#) :: forall a b c q. Coercible b a => Closure p b c -> q a b -> Closure p a c Source #

(Profunctor p, ArrowPlus p) => Alternative (Closure p a) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

empty :: Closure p a a0 #

(<|>) :: Closure p a a0 -> Closure p a a0 -> Closure p a a0 #

some :: Closure p a a0 -> Closure p a [a0] #

many :: Closure p a a0 -> Closure p a [a0] #

(Profunctor p, Arrow p) => Applicative (Closure p a) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

pure :: a0 -> Closure p a a0 #

(<*>) :: Closure p a (a0 -> b) -> Closure p a a0 -> Closure p a b #

liftA2 :: (a0 -> b -> c) -> Closure p a a0 -> Closure p a b -> Closure p a c #

(*>) :: Closure p a a0 -> Closure p a b -> Closure p a b #

(<*) :: Closure p a a0 -> Closure p a b -> Closure p a a0 #

Profunctor p => Functor (Closure p a) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Closure p a a0 -> Closure p a b #

(<$) :: a0 -> Closure p a b -> Closure p a a0 #

(Profunctor p, Arrow p, Semigroup b, Monoid b) => Monoid (Closure p a b) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

mempty :: Closure p a b #

mappend :: Closure p a b -> Closure p a b -> Closure p a b #

mconcat :: [Closure p a b] -> Closure p a b #

(Profunctor p, Arrow p, Semigroup b) => Semigroup (Closure p a b) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<>) :: Closure p a b -> Closure p a b -> Closure p a b #

sconcat :: NonEmpty (Closure p a b) -> Closure p a b #

stimes :: Integral b0 => b0 -> Closure p a b -> Closure p a b #

close :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Closed p => (p :-> q) -> p :-> Closure q Source #

unclose :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Closure q) -> p :-> q Source #

data Environment (p :: Type -> Type -> Type) a b where Source #

Constructors

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

Instances

Instances details
ProfunctorMonad Environment Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Environment p Source #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Environment p) :-> Environment p Source #

ProfunctorAdjunction Environment Closure Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Closure (Environment p) Source #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Closure p) :-> p Source #

ProfunctorFunctor Environment Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Environment p :-> Environment q Source #

Closed (Environment p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

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

Profunctor (Environment p) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Environment p b c -> Environment p a d Source #

lmap :: (a -> b) -> Environment p b c -> Environment p a c Source #

rmap :: (b -> c) -> Environment p a b -> Environment p a c Source #

(#.) :: forall a b c q. Coercible c b => q b c -> Environment p a b -> Environment p a c Source #

(.#) :: forall a b c q. Coercible b a => Environment p b c -> q a b -> Environment p a c Source #

Functor (Environment p a) Source # 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Environment p a a0 -> Environment p a b #

(<$) :: a0 -> Environment p a b -> Environment p a a0 #

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