Pattern matching higher-kinded types in macros

Pattern matching a Type[T] on classes and traits with type parameters works just fine using an existential, but when I try to pattern match a higher-kinded type I get the compiler error unreducible application of higher-kinded type Foo to wildcard arguments, which seems to indicate the compiler is looking for a concrete type and it cannot construct one with the wildcard argument. Is there a way to pattern match without a concrete type?

The example below demonstrates the problem:

import scala.quoted.*

type Foo[X]
class Bar[X]
trait Baz[X]

inline def writeType[T]: String = ${writeTypeImpl[T]}

def writeTypeImpl[T](using t: Type[T])(using Quotes): Expr[String] =
  import quotes.reflect.*
  val s = t match
    case '[Foo[?]] => "FooSuccess" //compiler error, but other two successfully match
    case '[Bar[?]] => "BarSuccess"
    case '[Baz[?]] => "BazSuccess"
    case _ => "Fail"

  Expr(s)

It seems this is the relevant part of the docs: Other Changed Features | Scala 3 Migration Guide | Scala Documentation

The suggestion of wrapping the type would end up being fairly complex, so I think I will match such types on TypeRepr.of[T].typeSymbol.fullName.