[Git][ghc/ghc][wip/T25046_impl] 3 commits: Implement MultilineStrings (#24390)
Serge S. Gulin (@gulin.serge)
gitlab at gitlab.haskell.org
Mon Aug 5 14:30:36 UTC 2024
Serge S. Gulin pushed to branch wip/T25046_impl 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
- - - - -
bf3ef4f4 by Serge S. Gulin at 2024-08-05T18:30:19+04:00
testsuite: extend size performance tests with gzip (fixes #25046)
The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric.
Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case.
2 groups of tests are added:
1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler).
2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used.
- - - - -
30 changed files:
- 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/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
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- testsuite/driver/testlib.py
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/driver/T4437.hs
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- + testsuite/tests/parser/should_fail/MultilineStringsError.hs
- + testsuite/tests/parser/should_fail/MultilineStringsError.stderr
- + testsuite/tests/parser/should_fail/MultilineStringsInnerTab.hs
- + testsuite/tests/parser/should_fail/MultilineStringsInnerTab.stderr
- + testsuite/tests/parser/should_fail/MultilineStringsSmartQuotes.hs
- + testsuite/tests/parser/should_fail/MultilineStringsSmartQuotes.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73991a7caa52ef498a2d318e2b4feec6e6499760...bf3ef4f4afd5157a6b3bce9771713b9f9a08b9b5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73991a7caa52ef498a2d318e2b4feec6e6499760...bf3ef4f4afd5157a6b3bce9771713b9f9a08b9b5
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/20240805/e955d520/attachment.html>
More information about the ghc-commits
mailing list