Comments (9)
Hmm, I guess that means the linter is wrong after all because the import is used.
Ok, best to report this in Dotty, I don't think we can do anything here.
from kittens.
I wonder if this was foreshadowed by #582
But there was no explanation really.
from kittens.
With kittens 3.3.0 I get some:
[error] 4 |import cats.derived.auto.semigroup.given
[error] | ^^^^^
[error] | unused import
Even on Scala 3.3.3
And if I don't given them, it fails to find the semigroups
from kittens.
But the following works fine lol:
import cats.derived.auto.semigroup.given_Semigroup_A
But not:
import cats.derived.auto.semigroup.given Semigroup[?]
from kittens.
Can you post a full example? That sounds like a bug in the linter because you are using the import.
from kittens.
Ah I was trying to reproduce unsuccessfully but I forgot the scalacOptions.
Here is the reproduction: https://scastie.scala-lang.org/Po0uhQLgSjyzEdnffZLi1g
from kittens.
I think it's kinda right because you also import monoid.given
which takes priority
from kittens.
But having just import cats.derived.auto.monoid.given
does not work either.
So is there a way to make this work without importing by name the given?
Something like:
import cats.derived.auto.monoid.given
import cats.derived.auto.semigroup.given
Or:
import cats.derived.auto.monoid.given Monoid[?]
import cats.derived.auto.semigroup.given Semigroup[?]
?
from kittens.
What do you mean by "does not work" though?
If I import cats.derived.auto.monoid.given
then Monoid[Rebuffers]
works.
If I import cats.derived.auto.semigroup.given
then Semigroup[Rebuffers]
works.
The only issue I can see is that if I import import cats.derived.auto.monoid.given
then Semigroup[Rebuffers]
doesn't work. I don't know why, but that's the same behaviour as Kittens 3.2:
No given instance of type cats.kernel.Semigroup[Playground.Rebuffers] was found for parameter ev of method apply in object Semigroup.
I found:
cats.derived.auto.monoid.given_Monoid_A[Playground.Rebuffers](
/* missing */
summon[scala.util.NotGiven[cats.kernel.Monoid[Playground.Rebuffers]]]
)
But no implicit values were found that match type scala.util.NotGiven[cats.kernel.Monoid[Playground.Rebuffers]].
from kittens.
Related Issues (20)
- [Scala 3] Derivation for deeply nested types HOT 2
- Usage of implicit keyword in scala 3 tests HOT 1
- [Scala 3] derived instances are not stack-safe
- [Scala 3] Consistency on requiring `Or` instances for givens
- [Scala 3] Extra instances for `Covariant`, `Invariant` HOT 1
- [Scala 3] Roadmap to Scala 3 release HOT 4
- [Scala 3] Sequence support
- [Scala 3] Missing derivations HOT 3
- [Scala 3] Derive ShowPretty
- [Scala 3] Derive ConsK
- [Scala 3] Test with enum-based adts HOT 3
- [Scala 3] Make instances `Serializable` HOT 1
- [Scala 2.12] Hash[A] Fails On 2.12 HOT 3
- `Monoid` derivation applies requires `Monoid` for type parameter even when unnecessary HOT 4
- Type argument does not have the same kind as its bound HOT 2
- Typeclass derivation doesn't work for type literals HOT 8
- [Scala 2] Semiauto derivation should not auto-derive instances for `case class` fields HOT 8
- ADT derivation limits HOT 2
- Scala 3 regression: derivation error for value classes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kittens.