ekmett / ekmett/adjunctions

New Representable methods feel cramped

Open
#60 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
45
Forks
26
PR merge metrics
No merged PRs in 30d

Description

We now have

```haskell
collect1 :: Functor1 w => (forall x. g x -> f x) -> w g -> f (w Identity)
```

We can generalize this immediately:

```haskell
coll2 :: (Applicative h, Functor1 w) => (forall x. g x -> f x) -> w g -> f (w h)
coll2 f = cotraverse1 (map1 (pure . runIdentity)) . map1 f
```

I don't know if it's possible to weaken the `Applicative` constraint.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.