<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<h3 style="margin-top: 20px; margin-bottom: 10px;">
Marge Bot pushed to branch master at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/66e7f57d0fa2fdc87f7ab8b14d530eda7111ac19">66e7f57d</a></strong>
<div>
<span> by Brandon Chinn </span> <i> at 2024-08-01T21:50:58-07:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Implement MultilineStrings (#24390)

This commit adds support for multiline strings, proposed at
https://github.com/ghc-proposals/ghc-proposals/pull/569.
Multiline strings can now be written as:

    myString =
      """
      this is a
      multiline string
      """

The multiline string will have leading indentation stripped away.
Full details of this post-processing may be found at the new
GHC.Parser.String module.

In order to cleanly implement this and maximize reusability, I
broke out the lexing logic for strings out of Lexer.x into a
new GHC.Parser.String module, which lexes strings with any
provided "get next character" function. This also gave us the
opportunity to clean up this logic, and even optimize it a bit.
With this change, parsing string literals now takes 25% less
time and 25% less space.
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c">
compiler/GHC/Driver/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#6fd95917308bec0dc8f4ae2a0b62cb5fe33f38c4">
compiler/GHC/Hs/Lit.hs
</a>
</li>
<li class="file-stats">
<a href="#f5160f63851d2edcbf12e12247c1b078cf40f20a">
compiler/GHC/Hs/Syn/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#f017e4c978a9ff341ce5a7b838787fd2a4758b59">
compiler/GHC/HsToCore/Match/Literal.hs
</a>
</li>
<li class="file-stats">
<a href="#bf951467d4a9aa443cb109cb4c84a2891945649b">
compiler/GHC/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#0832d128b612ce92b26012a359ef0e5fd124ffc2">
compiler/GHC/Parser/CharClass.hs
</a>
</li>
<li class="file-stats">
<a href="#a1ae0a1be35c859d90b0756920a7198075fb91e1">
compiler/GHC/Parser/Lexer.x
</a>
</li>
<li class="file-stats">
<a href="#2d927b15feeb94a2556774ef2af632542c2e972e">
<span class="new-file">
+
compiler/GHC/Parser/String.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#b47ece2bbb8303a5792c2fdc52394c8ed336e8a2">
compiler/GHC/Rename/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#55fd4da29695073f23c02f21476e753eb7c467b4">
compiler/Language/Haskell/Syntax/Extension.hs
</a>
</li>
<li class="file-stats">
<a href="#cf1d0bdae2a24d959f2ccd4be049cbc563749e38">
compiler/Language/Haskell/Syntax/Lit.hs
</a>
</li>
<li class="file-stats">
<a href="#0f33fd88c617246c7f89c4477d2d1d24f942df23">
compiler/ghc.cabal.in
</a>
</li>
<li class="file-stats">
<a href="#f595baeef5a4f6e40ab0d654fa17c31a4f4aec73">
docs/users_guide/9.12.1-notes.rst
</a>
</li>
<li class="file-stats">
<a href="#c14db403ef3b7eec6d47eda09d5221e9b95e79c6">
docs/users_guide/exts/literals.rst
</a>
</li>
<li class="file-stats">
<a href="#23ba9fd1513983f09ecf91e6c150cfcd33d51f90">
<span class="new-file">
+
docs/users_guide/exts/multiline_strings.rst
</span>
</a>
</li>
<li class="file-stats">
<a href="#7efae136aa18890c5b6388c8b727c408d2befd09">
libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
</a>
</li>
<li class="file-stats">
<a href="#2dcdf7aadcff5b41822596f22b49b2851374d0cd">
testsuite/tests/count-deps/CountDepsParser.stdout
</a>
</li>
<li class="file-stats">
<a href="#9f7a74d3512ab004425ec39cbbcb9737e2ecaa82">
testsuite/tests/driver/T4437.hs
</a>
</li>
<li class="file-stats">
<a href="#2576d273556f3c6af6a44c20f26fdce3e3bbc9ec">
testsuite/tests/interface-stability/template-haskell-exports.stdout
</a>
</li>
<li class="file-stats">
<a href="#72ab8d4e2b7f94fa65ca5648aa68594f5a49a2da">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsError.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#108660b5539eec5cd1218667c5cbe36bc8ce590b">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsError.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#a6bf9a54459efbce90104f490cefcfe91a6d641d">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsInnerTab.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#b9676b9e0b5c2a7fed3eb21ea91b7f6eb3568ff7">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsInnerTab.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#8c6b11abdddabcbd5c49eddb906273ed6156cb7b">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsSmartQuotes.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#4af0426499ccf48635ef91d9ae54713e605c9f81">
<span class="new-file">
+
testsuite/tests/parser/should_fail/MultilineStringsSmartQuotes.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#3577fc796b73fe1f96c77f05fcdd73a8d4bc6f66">
testsuite/tests/parser/should_fail/all.T
</a>
</li>
<li class="file-stats">
<a href="#f1f4756dc4783bd97998db30391b34924035884c">
<span class="new-file">
+
testsuite/tests/parser/should_run/MultilineStrings.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#1704ef7e3fc40945c5640b594cad824507eb5c83">
<span class="new-file">
+
testsuite/tests/parser/should_run/MultilineStrings.stdout
</span>
</a>
</li>
<li class="file-stats">
<a href="#9fadc2b79a1a5ae218993d13e4da244caccf4618">
<span class="new-file">
+
testsuite/tests/parser/should_run/MultilineStringsOverloaded.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#f0c4c6030e7a3b0f25527163c1371cf9893d8fff">
<span class="new-file">
+
testsuite/tests/parser/should_run/MultilineStringsOverloaded.stdout
</span>
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: .875rem;">
The diff was not included because it is too large.
</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/66e7f57d0fa2fdc87f7ab8b14d530eda7111ac19">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/-/commit/66e7f57d0fa2fdc87f7ab8b14d530eda7111ac19"}}</script>


</p>
</div>
</body>
</html>