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

Remove local type classes instances and explicit type class arguments #1628

jbgi opened this issue Jan 24, 2018 · 3 comments


Copy link

commented Jan 24, 2018

If a local type class instance is lawful and coherent then it need to be a global implicit. Otherwise it should not exist and alternative implementation must be used.

Explicit type class arguments are sometimes used to work around bad type inference. In this cases it is preferable to explicit the necessary type arguments so that the right type class instance is resolved implicitly.


This comment has been minimized.

Copy link

commented Apr 9, 2018

@jbgi did you have any explicitly in mind as an example?


This comment has been minimized.

Copy link
Member Author

commented Apr 10, 2018

@emilypi The ones that triggered this issue are the locally defined Monoid and Reducer at

implicit val MM: Monoid[Throwable \/ M] = Monoid.liftMonoid[Throwable \/ ?, M]
implicit val RR: Reducer[Throwable \/ A, Throwable \/ M] =


This comment has been minimized.

Copy link

commented Feb 10, 2019

Task has been removed in #2037. We either need a different example of local type class instance in our code base, or close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.