Closed japgolly closed 1 year ago
Hey @nicolasstucki , would you happen to know an alternative way of doing this? I'm a bit stuck looking for a workaround :(
Found workaround thanks to @smarter : use TypeRepr.of
to get to tasty
The root of the issue is that we have no way to infer or tell the kind of the type variable.
The alternative is to use a pattern on expressions. I tried it but hit some bug or limitation. I need to dig into it. Nevertheless, the idea is to do
'{ ??? : A } match
case '{ type f[X] ; ??? : `f`[t] } =>
Using 3.0.0-RC1, I'm trying to test whether a type is in the shape of
F[A]
.The tuple case works, no problem. The
f[a]
case doesn't compile and instead fails with: