External Publication
Visit Post

Final call for GHC String Interpolation proposal!

Haskell Community [Unofficial] June 10, 2026
Source

BurningWitness:

Also I don’t see a naive find-replace solution (as in “replace every ${foo} in string with value at foo”) in the “Motivation” section.

Thanks, added!

BurningWitness:

Data.ByteString.Builder does manual interpolation better, the only reason it’s not a proper replacement is poor typing. If Builder could be UTF8 on the type level, you’d get a perfect chain of

"string" <> encoder value <> "string" <> encoder' value' <> "string" <> ..

Still a bit verbose/unergonomic. Compare with the proposal (adding spaces for visibility):

"string " <> encoder value <> " string " <> encoder' value' <> " string"

B.s"string ${encoder value} string ${encoder' value} string"

Discussion in the ATmosphere

Loading comments...