Reputation: 16136
Given type parameters of F[_]
and A[_]
how do I turn the following type lambda into the more pleasant Kind-Projector syntax?
({type λ[α] = F[A[α]]})#λ
I would have imagined it would be something like F[A[?_]]
, but the compiler complains about wanting type parameters in this case.
Upvotes: 3
Views: 297
Reputation: 464
You should use Inline Syntax where possible but in this case you have to use Function Syntax with nested parametrized types.
Also, Intellij IDEA 15 has an inspection to convert type lambdas to kind projector syntax if kind projector is enabled for the project.
So this is what the inspection converted your type lambda to: Lambda[α => F[A[α]]]
Upvotes: 0