(Responding to Simon's post here, because that's the thread that tracks the String Interpolation proposal.)

> We have a proposal in the committee's inbox about interpolated strings.  Very few of you have contributed to a debate about it, but it's our obligation as members of the GHC Steering Committee to give it our serious attention.
> I have dived into it, and emerged with This framing of the proposalThis articulation of the design choices
> Now it's your turn.  I suggest you respond mainly on the discussion thread of the proposal.
> Sebastian is our shepherd and will doubtless guide our discussion

I felt like the design space spiraled out of control, so in https://github.com/ghc-proposals/ghc-proposals/pull/570#discussion_r3225951448 I cut it down. Let me know what you think.

Am So., 19. Apr. 2026 um 15:53 Uhr schrieb Sebastian Graf <sgraf1337@gmail.com>:
Dear committee,

In #570, Brandon Chinn proposes adding native string interpolation syntax to GHC, along the lines of s"a ${x + 1} b", catching up with and even exceeding similar features in popular programming languages.

The desugaring of s"a ${x + 1} b" is:
```
Data.String.Interpolate.Experimental.interpolateString
  ( \convert raw append empty ->
               raw "a "
      `append` convert (x + 1)
      `append` raw " b"
      `append` empty
  )
  :: String
```
where the following definitions are added to ghc-experimental:
```
class Interpolate a where
  interpolate :: a -> String

type SimpleStringInterpolator s =
  ( forall ss.
    (forall a. Interpolate a => a -> s)
    -> (s -> s)
    -> (s -> ss -> ss)
    -> ss
    -> ss
  )
  -> s

interpolateString :: (IsString s, Monoid s) => SimpleStringInterpolator s
interpolateString f = mconcat $ f (fromString . interpolate) id (:) []
```
With -XQualifiedStrings, the string interpolation function may be rebound as well:
```
SQL.s"select * from users where name = ${Text.toUpper name} and age = ${age}"
-- desugars to
SQL.interpolateString $ \convert raw append empty ->
           raw "select * from users where name = "
  `append` convert (Text.toUpper name)
  `append` raw " and age = "
  `append` convert age
  `append` empty
```

I think this is an important proposal and I would emphatically accept one form or anothter. 
It is a useful feature with a long history of continued refinement by Brandon.

I'm torn however on the particular expansion to a second-order function. See this thread: https://github.com/ghc-proposals/ghc-proposals/pull/570/changes#r3040723908
I would sacrifice generality and implement a simpler expansion instead, such as
```
mconcat
    [ fromString "a "
    , interpolate (x + 1)
    , fromString "b"
    ]
    :: String
```
So I abstain from voting for the particular version of the proposal.

Cheers,
Sebastian