profunctors-5.1.2: Profunctors

Data.Profunctor.Tambara

Description

Synopsis

# Documentation

newtype Tambara p a b Source

Constructors

 Tambara FieldsrunTambara :: forall c. p (a, c) (b, c)

Instances

 Source Source Source Category * p => Category * (Tambara p) Source Arrow p => Arrow (Tambara p) Source ArrowZero p => ArrowZero (Tambara p) Source ArrowPlus p => ArrowPlus (Tambara p) Source Source ArrowApply p => ArrowApply (Tambara p) Source ArrowLoop p => ArrowLoop (Tambara p) Source Profunctor p => Profunctor (Tambara p) Source Choice p => Choice (Tambara p) Source Profunctor p => Strong (Tambara p) Source Profunctor p => Functor (Tambara p a) Source (Profunctor p, Arrow p) => Applicative (Tambara p a) Source (Profunctor p, ArrowPlus p) => Alternative (Tambara p a) Source (Profunctor p, ArrowPlus p) => Monoid (Tambara p a b) Source

tambara :: Strong p => (p :-> q) -> p :-> Tambara q Source

````tambara` `.` `untambara` ≡ `id`
`untambara` `.` `tambara` ≡ `id`
```

untambara :: Profunctor q => (p :-> Tambara q) -> p :-> q Source

````tambara` `.` `untambara` ≡ `id`
`untambara` `.` `tambara` ≡ `id`
```

data Pastro p a b where Source

Pastro -| Tambara

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

Constructors

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

newtype Cotambara p a b Source

Cotambara is freely adjoins respect for cocartesian structure to a profunctor

Note: this is not dual to `Tambara`. It is `Tambara` with respect to a different tensor.

Constructors

 Cotambara FieldsrunCotambara :: forall c. p (Either a c) (Either b c)

Instances

 Source Source Source Category * p => Category * (Cotambara p) Source Source Profunctor p => Choice (Cotambara p) Source Profunctor p => Functor (Cotambara p a) Source

cotambara :: Choice p => (p :-> q) -> p :-> Cotambara q Source

````cotambara` `.` `uncotambara` ≡ `id`
`uncotambara` `.` `cotambara` ≡ `id`
```

uncotambara :: Profunctor q => (p :-> Cotambara q) -> p :-> q Source

````cotambara` `.` `uncotambara` ≡ `id`
`uncotambara` `.` `cotambara` ≡ `id`
```

data Copastro p a b where Source

Copastro -| Cotambara

Constructors

 Copastro :: (Either y z -> b) -> p x y -> (a -> Either x z) -> Copastro p a b