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

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)

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

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

data Pastro p a b where

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

Analogous to ArrowLoop, loop = unfirst

Minimal complete definition

unfirst | unsecond

Methods

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

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

data Cotambara q a b where

Cotambara cofreely constructs costrength

Constructors

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

newtype Copastro p a b

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