Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverse of Forget #97

Open
robrix opened this issue Jul 8, 2021 · 0 comments
Open

Inverse of Forget #97

robrix opened this issue Jul 8, 2021 · 0 comments

Comments

@robrix
Copy link

robrix commented Jul 8, 2021

optics uses Forget for view and Tagged (the flip of Const, if anyone is curious) for review, but one can also define review using a profunctor that’s more clearly related to Forget:

newtype Forget r a b = Forget { runForget :: a -> r }
newtype Recall s a b = Recall { runRecall :: s -> b }

I have defined such a creature for reasons, and, happily, it admits instances of (at least) Costrong, Choice, Closed, Cosieve and Sieve, but only Corepresentable; and at a lower rank, Distributive, Representable, and so on.

If there’d be any interest in it living here I will be happy to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant