Shapeless 2.3.5+ can't provide implicit for Generic.Aux
See original GitHub issueAfter updating to Shapeless 2.3.5+ some code that used to work with 2.3.3 stopped compiling. A minimal example is:
import shapeless._
trait A
trait B[+A1 <: A]
case class C[T]()
case class D[A1 <: A, B1 <: B[A1]](c: C[B1]) {
def bind() = D.bind(this)
}
object D {
def bind[T, L <: HList](t: T)(implicit gen: Generic.Aux[T, L]) = ???
}
It fails to compile with the following error:
shapeless.this.Generic.materialize is not a valid implicit value for shapeless.Generic.Aux[D[A1,B1],L] because:
hasMatchingSymbol reported error: inferred type arguments [Nothing,B1] do not conform to method apply's type parameter bounds [A1 <: A,B1 <: B[A1]]
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Shapeless 2.3.5+ can't provide implicit for Generic.Aux
After updating to Shapeless 2.3.5+ code that used to work stopped compiling. I boiled it down to a minimal, yet still somewhat complicated ......
Read more >Generic in shapeless 2.3.5+ not working for classes with context ...
It compiles with shapeless 2.3.5+ only if the instance is commented out. ... Fix Generic instance for case classes with implicit arguments #1191....
Read more >The Type Astronaut's Guide to Shapeless - Books
Shapeless provides two sets of tools to this end: a set of generic data types that can be inspected, traversed, and manipulated at...
Read more >Fluent – A deep dive into Shapeless and implicit resolution
As promised in my previous post we're going to explore to internal of Fluent and how it uses Shapeless and implicit resolution to...
Read more >milessabin/shapeless - Gitter
:point_up: Edit: Hi there, I've got some code that isn't working (I assume due to some compiler implicit search depth limitations) and was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just released https://github.com/milessabin/shapeless/releases/tag/v2.3.8
Sorry, I didn’t manage - personal life got in the way 😄