I agree, this feels like an admission that the compiler cannot do any better, so the solution to this must be bolting a convenience extension onto GHC.
It should be possible to do something like the following in the language already, right?
sqlquery
"""
SELECT ${x}
FROM ${y}
WHERE ${z};
"""
[ "x" := (_ :: SqlBuilder)
, "y" := _
, "z" := _
]
(and, yes, I would love it if I could move the overhead and error reporting in any such function to compilation time without the ugliness of Template Haskell, but this extension would never solve that either)