SIP: name based XML literals

summonFrom is a language feature. searchImplicits is some lower-level functionality in the compiler that may or may not be exposed to macros. It probably won’t be exposed, since summonFrom can do the job already.

It’s fine to remove searchImplicits as long as dotc is robust enough to support macro generated inline functions like summonFrom. However, currently I experienced dotc halted when producing a white box inline macro from another inline function. I have not yet reported the bug because I did not minimize it.

There’s been some renaming so I’m not sure if searchImplicits is the same as searchImplicitExpr / summonExpr. Can you clarify? This is important primarily because it serves a use case that summonFrom doesn’t appear to handle - situations where the type is a parameter, rather than known ahead of time by the macro writer (example here)

1 Like

No, they are not the same. searchImplicits is strictly compiler internal.

1 Like

searchImplicitExpr was renamed to summonExpr. It is the equivalent of searching one implicit with summonFrom on the Expr level. There is a searchImplicit in the reflection API that does the same as the searchImplicit in the compiler. summonExpr is implemented on top of searchImplicit.

2 Likes