[Git][ghc/ghc][wip/az/T21355-exactprint-update] 6 commits: Add standard Unicode case predicates isUpperCase and isLowerCase.

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Oct 16 18:35:20 UTC 2022



Alan Zimmerman pushed to branch wip/az/T21355-exactprint-update at Glasgow Haskell Compiler / GHC


Commits:
43ab435a by Pierre Le Marre at 2022-10-14T07:45:43-04:00
Add standard Unicode case predicates isUpperCase and isLowerCase.

These predicates use the standard Unicode case properties and are more intuitive than isUpper and isLower.

Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/90#issuecomment-1276649403.

Fixes #14589

- - - - -
aec5a443 by Bodigrim at 2022-10-14T07:46:21-04:00
Add type signatures in where-clause of Data.List.permutations

The type of interleave' is very much revealing, otherwise it's extremely tough to decipher.

- - - - -
ee0deb80 by Ben Gamari at 2022-10-14T18:29:20-04:00
rts: Use pthread_setname_np correctly on Darwin

As noted in #22206, pthread_setname_np on Darwin only supports
setting the name of the calling thread. Consequently we must introduce
a trampoline which first sets the thread name before entering the thread
entrypoint.
- - - - -
8eff62a4 by Ben Gamari at 2022-10-14T18:29:57-04:00
testsuite: Add test for #22282

This will complement mpickering's more general port of foundation's
numerical testsuite, providing a test for the specific case found
in #22282.

- - - - -
62a55001 by Ben Gamari at 2022-10-14T18:29:57-04:00
ncg/aarch64: Fix sub-word sign extension yet again

In adc7f108141a973b6dcb02a7836eed65d61230e8 we fixed a number of issues
to do with sign extension in the AArch64 NCG found by ghc/test-primops>.
However, this patch made a critical error, assuming that getSomeReg
would allocate a fresh register for the result of its evaluation.
However, this is not the case as `getSomeReg (CmmReg r) == r`.
Consequently, any mutation of the register returned by `getSomeReg` may
have unwanted side-effects on other expressions also mentioning `r`. In
the fix listed above, this manifested as the registers containing the
operands of binary arithmetic operations being incorrectly
sign-extended. This resulted in #22282.

Sadly, the rather simple structure of the tests generated
by `test-primops` meant that this particular case was not exercised.
Even more surprisingly, none of our testsuite caught this case.

Here we fix this by ensuring that intermediate sign extension is
performed in a fresh register.

Fixes #22282.

- - - - -
e020fdec by Alan Zimmerman at 2022-10-16T19:35:07+01:00
Update the check-exact infrastructure to match ghc-exactprint

GHC tests the exact print annotations using the contents of
utils/check-exact.

The same functionality is provided via
https://github.com/alanz/ghc-exactprint

The latter was updated to ensure it works with all of the files on
hackage when 9.2 was released, as well as updated to ensure users of
the library could work properly (apply-refact, retrie, etc).

This commit brings the changes from ghc-exactprint into
GHC/utils/check-exact, adapting for the changes to master.

Once it lands, it will form the basis for the 9.4 version of
ghc-exactprint.

See also discussion around this process at #21355

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- docs/users_guide/9.6.1-notes.rst
- libraries/base/Data/Char.hs
- libraries/base/Data/OldList.hs
- libraries/base/GHC/Unicode.hs
- + libraries/base/GHC/Unicode/Internal/Char/DerivedCoreProperties.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/tests/unicode001.hs
- libraries/base/tests/unicode001.stdout
- libraries/base/tools/ucd2haskell/exe/Parser/Text.hs
- libraries/base/tools/ucd2haskell/tests/check_all_chars.py
- libraries/base/tools/ucd2haskell/tests/export_all_chars.hs
- libraries/base/tools/ucd2haskell/ucd.sh
- rts/posix/OSThreads.c
- testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs
- testsuite/tests/ghc-api/exactprint/RmDecl7.expected.hs
- testsuite/tests/ghc-api/exactprint/RmDecl7.hs
- + testsuite/tests/numeric/should_run/T22282.hs
- + testsuite/tests/numeric/should_run/T22282.stdout
- + testsuite/tests/numeric/should_run/T22282A.hs
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/printer/Makefile
- + testsuite/tests/printer/Test21355.hs
- testsuite/tests/printer/all.T
- utils/check-exact/.ghci
- utils/check-exact/ExactPrint.hs
- utils/check-exact/Lookup.hs
- utils/check-exact/Main.hs
- + utils/check-exact/Orphans.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5baa2b4c8d2c2fde3c5e2693e3e7711d7e94d480...e020fdec3b70bd107e1bf97b721f97d720d7273a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5baa2b4c8d2c2fde3c5e2693e3e7711d7e94d480...e020fdec3b70bd107e1bf97b721f97d720d7273a
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/20221016/bef9b53e/attachment.html>


More information about the ghc-commits mailing list