Open TimWSpence opened 2 years ago
What is the precise implicit argument that should be inferred? Have you tried supplying it manually?
Closing this. Please re-open if we find the implicit argument that should be inferred/
Sorry for the slow reply @odersky. The implicit argument that I was hoping should be inferred was Functor.nested[[x] =>> x => Unit, [x] =>> x => Unit]
Thanks! I believe the failure here has to do with an inability to infer polymorphic function types.
Thanks @odersky! This came up in the context of trying to get a scala 3 release of Kittens out. I don't suppose you're aware of any workarounds or alternative approaches that we could try in the meantime?
Compiler version
3.1.2
Minimized code
In scala-cli:
Output
Expectation
My hope was that we should resolve the
Functor
instance for the nested type constructors here. From my experimentation this doesn't seem to work in scala 2 either so it possibly isn't a bug. Is this intended behaviour? (I can see that there's ambiguity at least in the case where there are more than 2 nested type constructors) If it is intended then are you able to suggest any workarounds? Thanks!