VirtusLab / Inkuire

Hoogle-like searches for Scala 3 and Kotlin
https://dotty.epfl.ch/api/index.html
Apache License 2.0
91 stars 3 forks source link

Support contextual parameters in scala3 #191

Open prolativ opened 3 years ago

prolativ commented 3 years ago

A method like

def foo(using Foo): Bar

should be searchable as Foo ?=> Bar

KacperFKorban commented 3 years ago

In my opinion, this is a tricky one and that's why I'll probably leave it for a future release. In this case Foo ?=> Bar seems like the correct signature, but let's take another example >>= in cats. For a query List[A] => (A => List[B]) => List[B] one should expect for >>= to be a valid result, but in order to achieve that some sort of implicit instances lookup would be neccessary.

KacperFKorban commented 3 years ago

New idea: The true/false matching phase should not check context parameters. There are too many cases to distinguish from and could affect performance too much. The new sorting phase should group searches based on: