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

The example use of Bound.Name is needed. #83

Open
Heimdell opened this issue Jul 2, 2021 · 0 comments
Open

The example use of Bound.Name is needed. #83

Heimdell opened this issue Jul 2, 2021 · 0 comments

Comments

@Heimdell
Copy link

Heimdell commented Jul 2, 2021

The problem is, GHC can't figure out how to fmap the first a out of Scope (Name a ()) Program a.

The >>>= operator will leave the Name a () intact as well.

I can make it Name MyName (), but this kinda defeats the purpose of the Name wrapper.

If the Scope' (bound :: *) (f :: * -> * -> *) (name :: *) (a :: *) is a Bifunctor instead, thus preserving the names by default, this would allow us to keep the oldest names, erase them with lmap (const ()) or do any possible mapping separately from the current name set.

The Monad instance in that case would allow to only work with "latest" names.

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