profunctors-5.2: Profunctors

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

Data.Profunctor.Strong

Contents

Description

 

Synopsis

Strength

class Profunctor p => Strong p 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.

http://www-kb.is.s.u-tokyo.ac.jp/~asada/papers/arrStrMnd.pdf

Minimal complete definition

first' | second'

Methods

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

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

uncurry' :: Strong p => p a (b -> c) -> p (a, b) c Source

data Pastro p a b where Source

Pastro -| Tambara

Pastro p ~ exists z. Costar ((,)z) Procompose p Procompose Star ((,)z)

Pastro freely makes any Profunctor Strong.

Constructors

Pastro :: ((y, z) -> b) -> p x y -> (a -> (x, z)) -> Pastro p a b 

Costrength

class Profunctor p => Costrong p where Source

Analogous to ArrowLoop, loop = unfirst

Minimal complete definition

unfirst | unsecond

Methods

unfirst :: p (a, d) (b, d) -> p a b Source

unsecond :: p (d, a) (d, b) -> p a b Source

data Cotambara q a b where Source

Cotambara cofreely constructs costrength

Constructors

Cotambara :: Costrong r => (r :-> q) -> r a b -> Cotambara q a b 

newtype Copastro p a b Source

Copastro -| Cotambara

Copastro freely constructs costrength

Constructors

Copastro 

Fields

runCopastro :: forall r. Costrong r => (forall x y. p x y -> r x y) -> r a b