{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigeb4x4gm6yb7bqgdo3pfchtpiwocnvt5fnxva6neytlgll7bbchu",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mnwzfd2mc2k2"
  },
  "path": "/t/final-call-for-ghc-string-interpolation-proposal/14234#post_3",
  "publishedAt": "2026-06-10T14:19:05.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "I strongly agree that we should avoid unsafe interpolations. The current proposal lacks a way to have the interpolation produce compile-time errors, besides checking just the types of the interpolated values. Haskell’s type system is generally not strong enough to enforce the kinds of guarantees you’d want (e.g. this string that represents a name should not contain any newlines).\n\nI would say the solution to that is to use quasiquotes so that you can check the grammar at compile-time with a user-defined parser. What we do really need then for better tooling support is a standardized way to interpolate Haskell values into quasiquoters.\n\nJust standardized syntax could be enough but it can be a bit annoying if people could break tooling by writing a non-conforming quasiquoter. So perhaps the standard should be enforced the compiler but that would require some more design work.\n\nAnd I don’t think quasiquotes should be dismissed so easily as in the proposal, because Template Haskell has improved a lot recently and quasiquoters in particular avoid (or could in the near future avoid) most of the important issues with TH. I guess the proof is in the pudding so I should see for myself if I can write a nicer string interpolation library with quasiquotes.",
  "title": "Final call for GHC String Interpolation proposal!"
}