object LowerCased:
private def fromImpl(s: Expr[String])(using Quotes): Expr[LowerCased] =
import quotes.reflect.*
s.asTerm match
case Inlined(_, _, Literal(StringConstant(str))) =>
if LowerCased(str) == str then s
else report.errorAndAbort(
s"got a string which is not all lower case: $str")
case _ => report.errorAndAbort(
s"got a value which is not a constant string: ${s.show}")