[m-users.] Proposal: Haskell-style string literals
Volker Wysk
post at volker-wysk.de
Mon Nov 3 21:08:38 AEDT 2025
Hi!
Haskell has a neat syntax for strings that span mulitple lines. It looks
like this:
foo = "This is a long string \
\literal that doesn't \
\fit on one line."
Maybe this could be provided by Mercury, too?
Of course, I'm aware that in Mercury, a string can span multiple lines, by
just not terminating it at the end of the line. So the above example could
also be parsed as an ordinary Mercury string, with the newline character
being quoted by the "\". But I don't think this would be a problem. Nobody
does that, it would be pointless to do so (so it seems to me).
Cheers,
Volker
More information about the users
mailing list