[Git][ghc/ghc][wip/clc216] 4 commits: Implement MultilineStrings (#24390)
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Wed Aug 7 13:07:57 UTC 2024
Rodrigo Mesquita pushed to branch wip/clc216 at Glasgow Haskell Compiler / GHC
Commits:
66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00
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.
- - - - -
cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00
hi: Stable sort avails
Sorting the Avails in DocStructures is required to produce fully
deterministic interface files in presence of re-exported modules.
Fixes #25104
- - - - -
482c8f33 by Rodrigo Mesquita at 2024-08-07T14:07:50+01:00
ghc-internal: Derive version from ghc's version
Fixes #25005
- - - - -
62208107 by Ben Gamari at 2024-08-07T14:07:50+01:00
base: Deprecate GHC.Desugar
See https://github.com/haskell/core-libraries-committee/issues/216.
This will be removed in GHC 9.14.
- - - - -
30 changed files:
- .gitignore
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/CharClass.hs
- compiler/GHC/Parser/Lexer.x
- + compiler/GHC/Parser/String.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Types/Avail.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/Lit.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.12.1-notes.rst
- docs/users_guide/exts/literals.rst
- + docs/users_guide/exts/multiline_strings.rst
- hadrian/src/Rules/Generate.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/src/GHC/Desugar.hs
- libraries/ghc-internal/ghc-internal.cabal → libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- libraries/ghci/GHCi/TH.hs
- libraries/ghci/ghci.cabal.in
- testsuite/tests/count-deps/CountDepsParser.stdout
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e681b9ba0c5f0f28c9092cd9c2974a85822be73...622081070d0496aa1d1159974ceeac77e6722bd8
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e681b9ba0c5f0f28c9092cd9c2974a85822be73...622081070d0496aa1d1159974ceeac77e6722bd8
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240807/0eeb4a25/attachment.html>
More information about the ghc-commits
mailing list