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

stop importing cats.Functor in gen lens macros #793

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

enzief
Copy link
Contributor

@enzief enzief commented Jan 9, 2020

fix #792

@enzief enzief force-pushed the fix/genlens-functor branch from 47ce0db to bc1f323 Compare January 9, 2020 04:04
@julien-truffaut
Copy link
Member

Nice, I haven't thought about this issue at all. Do you want us to make a bug release?

@julien-truffaut julien-truffaut merged commit eb9f386 into optics-dev:master Jan 9, 2020
@enzief
Copy link
Contributor Author

enzief commented Jan 9, 2020

Yes please, I'm kinda blocked by this. Thank you!

@julien-truffaut
Copy link
Member

We are having some issues regarding binary compatibility (see #795)

Once we fix it, we will cut 2.0.1. I will let you know when it is ready.

override def modifyF[$F[_]: Functor](f: $aTpe => $F[$bTpe])(s: $sTpe): $F[$tTpe] =
Functor[$F].map(f(s.$fieldMethod))(a => s.copy($field = a))
override def modifyF[$F[_]: cats.Functor](f: $aTpe => $F[$bTpe])(s: $sTpe): $F[$tTpe] =
cats.Functor[$F].map(f(s.$fieldMethod))(a => s.copy($field = a))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For macro hygiene wouldn't it be better if this were fully qualified, i.e. _root_.cats.Functor? I guess the same applies to the import of monocle.PLens which should probably be import _root_.monocle.PLens.

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

Successfully merging this pull request may close these issues.

reference to Functor is ambiguous in GenLens macros
3 participants