| Copyright | (C) 2014-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | Rank2Types |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Profunctor.Strong
Contents
Description
Synopsis
- class Profunctor p => Strong (p :: Type -> Type -> Type) where
- uncurry' :: Strong p => p a (b -> c) -> p (a, b) c
- strong :: Strong p => (a -> b -> c) -> p a b -> p a c
- newtype Tambara (p :: Type -> Type -> Type) a b = Tambara {
- runTambara :: forall c. p (a, c) (b, c)
- tambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Strong p => (p :-> q) -> p :-> Tambara q
- untambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Tambara q) -> p :-> q
- data Pastro (p :: Type -> Type -> Type) a b where
- pastro :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Strong q => (p :-> q) -> Pastro p :-> q
- unpastro :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). (Pastro p :-> q) -> p :-> q
- class Profunctor p => Costrong (p :: Type -> Type -> Type) where
- data Cotambara (q :: Type -> Type -> Type) a b where
- cotambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Costrong p => (p :-> q) -> p :-> Cotambara q
- uncotambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Cotambara q) -> p :-> q
- newtype Copastro (p :: Type -> Type -> Type) a b = Copastro {
- runCopastro :: forall (r :: Type -> Type -> Type). Costrong r => (forall x y. p x y -> r x y) -> r a b
Strength
class Profunctor p => Strong (p :: Type -> Type -> Type) where Source #
Generalizing Star of a strong Functor
Note: Every Functor in Haskell is strong with respect to (,).
This describes profunctor strength with respect to the product structure of Hask.
Methods
Instances
newtype Tambara (p :: Type -> Type -> Type) a b Source #
Tambara cofreely makes any Profunctor Strong.
Constructors
| Tambara | |
Fields
| |
Instances
tambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Strong p => (p :-> q) -> p :-> Tambara q Source #
untambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Tambara q) -> p :-> q Source #
data Pastro (p :: Type -> Type -> Type) a b where Source #
Pastro -| Tambara
Pastro p ~ exists z. Costar ((,)z)ProcomposepProcomposeStar ((,)z)
Pastro freely makes any Profunctor Strong.
Constructors
| Pastro :: forall y z b (p :: Type -> Type -> Type) x a. ((y, z) -> b) -> p x y -> (a -> (x, z)) -> Pastro p a b |
Instances
| ProfunctorMonad Pastro Source # | |
| ProfunctorAdjunction Pastro Tambara Source # | |
| ProfunctorFunctor Pastro Source # | |
| Strong (Pastro p) Source # | |
| Profunctor (Pastro p) Source # | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Pastro p b c -> Pastro p a d Source # lmap :: (a -> b) -> Pastro p b c -> Pastro p a c Source # rmap :: (b -> c) -> Pastro p a b -> Pastro p a c Source # (#.) :: forall a b c q. Coercible c b => q b c -> Pastro p a b -> Pastro p a c Source # (.#) :: forall a b c q. Coercible b a => Pastro p b c -> q a b -> Pastro p a c Source # | |
| Functor (Pastro p a) Source # | |
pastro :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Strong q => (p :-> q) -> Pastro p :-> q Source #
unpastro :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). (Pastro p :-> q) -> p :-> q Source #
Costrength
class Profunctor p => Costrong (p :: Type -> Type -> Type) where Source #
Methods
Instances
data Cotambara (q :: Type -> Type -> Type) a b where Source #
Cotambara cofreely constructs costrength
Constructors
| Cotambara :: forall (r :: Type -> Type -> Type) (q :: Type -> Type -> Type) a b. Costrong r => (r :-> q) -> r a b -> Cotambara q a b |
Instances
| ProfunctorComonad Cotambara Source # | |
Defined in Data.Profunctor.Strong Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> Cotambara (Cotambara p) Source # | |
| ProfunctorAdjunction Copastro Cotambara Source # | |
| ProfunctorFunctor Cotambara Source # | |
| Costrong (Cotambara p) Source # | |
| Profunctor (Cotambara p) Source # | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Cotambara p b c -> Cotambara p a d Source # lmap :: (a -> b) -> Cotambara p b c -> Cotambara p a c Source # rmap :: (b -> c) -> Cotambara p a b -> Cotambara p a c Source # (#.) :: forall a b c q. Coercible c b => q b c -> Cotambara p a b -> Cotambara p a c Source # (.#) :: forall a b c q. Coercible b a => Cotambara p b c -> q a b -> Cotambara p a c Source # | |
| Functor (Cotambara p a) Source # | |
cotambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Costrong p => (p :-> q) -> p :-> Cotambara q Source #
uncotambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Cotambara q) -> p :-> q Source #
newtype Copastro (p :: Type -> Type -> Type) a b Source #
Copastro -| Cotambara
Copastro freely constructs costrength
Constructors
| Copastro | |
Fields
| |
Instances
| ProfunctorMonad Copastro Source # | |
| ProfunctorAdjunction Copastro Cotambara Source # | |
| ProfunctorFunctor Copastro Source # | |
| Costrong (Copastro p) Source # | |
| Profunctor (Copastro p) Source # | |
Defined in Data.Profunctor.Strong Methods dimap :: (a -> b) -> (c -> d) -> Copastro p b c -> Copastro p a d Source # lmap :: (a -> b) -> Copastro p b c -> Copastro p a c Source # rmap :: (b -> c) -> Copastro p a b -> Copastro p a c Source # (#.) :: forall a b c q. Coercible c b => q b c -> Copastro p a b -> Copastro p a c Source # (.#) :: forall a b c q. Coercible b a => Copastro p b c -> q a b -> Copastro p a c Source # | |
| Functor (Copastro p a) Source # | |