How to rewrite context parameters to the new modularity syntax?
//some type class
trait TC[X]:
def doSth(sth: X): X
given [T]: TC[List[T]] with
def doSth(sth: List[T]): List[T] = sth
//can be rewritten to:
given [T] => TC[List[T]]:
def doSth(sth: List[T]): List[T] = sth
// but what if we have
given [T](using DummyImplicit): TC[List[T]] with
def doSth(sth: List[T]): List[T] = sth
//???
It can be hacked via
type Dummy[X] = DummyImplicit
given [T: Dummy] => TC[List[T]]:
def doSth(sth: List[T]): List[T] = sth