[Git][ghc/ghc][ghc-9.8] 27 commits: JS: fix JS stack printing (#23565)
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Fri Jul 21 02:26:03 UTC 2023
Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC
Commits:
fb4ecd83 by Sylvain Henry at 2023-07-20T14:33:08-04:00
JS: fix JS stack printing (#23565)
(cherry picked from commit 78b2f3ccb1d7603e11b3f364646240e361512cbc)
- - - - -
77117e5f by Dave Barton at 2023-07-20T14:33:15-04:00
Fix some broken links and typos
(cherry picked from commit 4457da2a7dba97ab2cd2f64bb338c904bb614244)
- - - - -
7cec29d8 by Matthew Pickering at 2023-07-20T14:34:13-04:00
Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)
Polymorphic specialisation has led to a number of hard to diagnose
incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so
this commit introduces a flag `-fpolymorhphic-specialisation` which
allows users to turn on this experimental optimisation if they are
willing to buy into things going very wrong.
Ticket #23469
(cherry picked from commit 9f01d14b5bc1c73828b2b061206c45b84353620e)
- - - - -
e5215256 by Mario Blažević at 2023-07-20T14:34:45-04:00
Fixed ticket #23571, TH.Ppr.pprLit hanging on large numeric literals
(cherry picked from commit 4af7eac2a00e86c29509c119aacc7511a9c7747d)
- - - - -
d33581c5 by sheaf at 2023-07-20T14:34:56-04:00
Reinstate untouchable variable error messages
This extra bit of information was accidentally being discarded after
a refactoring of the way we reported problems when unifying a type
variable with another type. This patch rectifies that.
(cherry picked from commit 2b55cb5f33666a71eaac7968c59e483860112e5c)
- - - - -
0c877166 by Matthew Pickering at 2023-07-20T14:35:33-04:00
driver: Fix -S with .cmm files
There was an oversight in the driver which assumed that you would always
produce a `.o` file when compiling a .cmm file.
Fixes #23610
(cherry picked from commit 76983a0dca64dfb7e94aea0c4f494921f8513b41)
- - - - -
30830523 by Bodigrim at 2023-07-20T14:35:40-04:00
Add since annotations for Data.Foldable1
(cherry picked from commit 054261dd319b505392458da7745e768847015887)
- - - - -
fd3fcfe5 by sheaf at 2023-07-20T14:35:50-04:00
tyThingLocalGREs: include all DataCons for RecFlds
The GREInfo for a record field should include the collection of all
the data constructors of the parent TyCon that have this record field.
This information was being incorrectly computed in the tyThingLocalGREs
function for a DataCon, as we were not taking into account other
DataCons with the same parent TyCon.
Fixes #23546
(cherry picked from commit 61b1932eb7d529263330dcab404909997610dd43)
- - - - -
90846d43 by Sylvain Henry at 2023-07-20T14:35:56-04:00
JS: support -this-unit-id for programs in the linker (#23613)
(cherry picked from commit 550af50559931b7681fe24fddafd6e3467de077c)
- - - - -
b9c2aa3f by sheaf at 2023-07-20T14:36:44-04:00
Valid hole fits: don't panic on a Given
The function GHC.Tc.Errors.validHoleFits would end up panicking when
encountering a Given constraint. To fix this, it suffices to filter out
the Givens before continuing.
Fixes #22684
(cherry picked from commit 630e302617a4a3e00d86d0650cb86fa9e6913e44)
- - - - -
e5ed9c58 by Matthew Pickering at 2023-07-20T14:54:03-04:00
Use deb10 for i386 bindists
deb9 is now EOL so it's time to upgrade the i386 bindist to use deb10
Fixes #23585
(cherry picked from commit c39f279b7a23e7c3259dff9ad660b7f417d4fdcd)
- - - - -
ba2f9f34 by Krzysztof Gogolewski at 2023-07-20T14:54:23-04:00
Fix #23567, a specializer bug
Found by Simon in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507834
The testcase isn't ideal because it doesn't detect the bug in master,
unless doNotUnbox is removed as in
https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507692.
But I have confirmed that with that modification, it fails before
and passes afterwards.
(cherry picked from commit bf9b9de0685e23c191722dfdb78d28b44f1cba05)
- - - - -
e0fbb1d4 by Vladislav Zavialov at 2023-07-20T14:54:29-04:00
List and Tuple<n>: update documentation
Add the missing changelog.md entries and @since-annotations.
(cherry picked from commit 7f13acbf187d7a0810f42705b95d593b1e2e5611)
- - - - -
27df38c2 by Sylvain Henry at 2023-07-20T15:04:52-04:00
JS: better implementation for plusWord64 (#23597)
(cherry picked from commit b55a8ea70424032c19ef85ef95c5eee8b50d55c3)
- - - - -
8f77107f by Krzysztof Gogolewski at 2023-07-20T15:06:18-04:00
Use extended literals when deriving Show
This implements GHC proposal
https://github.com/ghc-proposals/ghc-proposals/pull/596
Also add support for Int64# and Word64#; see testcase ShowPrim.
(cherry picked from commit 787bae96f77562e603b6e9ebb86139cc5d120b8d)
- - - - -
6e044db1 by Ryan Scott at 2023-07-20T15:24:43-04:00
Fix typechecking of promoted empty lists
The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of
`'[]` (see the newly added `T23543` test case for an example), but the `'[]`
case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to
invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type
checker]`.
There are some benign changes to test cases' expected output due to the new
code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`.
Fixes #23543.
(cherry picked from commit c335fb7c44a8447b3e73e7f18d9d0dcb18cea8dd)
- - - - -
3d913cbe by sheaf at 2023-07-20T15:29:21-04:00
Fix deprecation of record fields
Commit 3f374399 inadvertently broke the deprecation/warning mechanism
for record fields due to its introduction of record field namespaces.
This patch ensures that, when a top-level deprecation is applied to
an identifier, it applies to all the record fields as well.
This is achieved by refactoring GHC.Rename.Env.lookupLocalTcNames, and
GHC.Rename.Env.lookupBindGroupOcc, to not look up a fixed number of
NameSpaces but to look up all NameSpaces and filter out the irrelevant
ones.
(cherry picked from commit 6143838a5985ee3af1e8c2af4166d35bb4de12d8)
- - - - -
45ab7560 by sheaf at 2023-07-20T15:29:24-04:00
Introduce greInfo, greParent
These are simple helper functions that wrap the internal
field names gre_info, gre_par.
(cherry picked from commit 6fd8f566c691b936b0b65e21700b224312611f4d)
- - - - -
c5533204 by sheaf at 2023-07-20T15:29:25-04:00
Refactor lookupGRE_... functions
This commit consolidates all the logic for looking up something in
the Global Reader Environment into the single function lookupGRE.
This allows us to declaratively specify all the different modes of
looking up in the GlobalRdrEnv, and avoids manually passing around
filtering functions as was the case in e.g. the function
GHC.Rename.Env.lookupSubBndrOcc_helper.
-------------------------
Metric Decrease:
T8095
-------------------------
-------------------------
Metric Increase:
T8095
-------------------------
(cherry picked from commit 7f0a86edeeda674f27c80e81be592d325447a897)
- - - - -
ff06b820 by sheaf at 2023-07-20T15:30:07-04:00
rnImports: var shouldn't import NoFldSelectors
In an import declaration such as
import M ( var )
the import of the variable "var" should **not** bring into scope record
fields named "var" which are defined with NoFieldSelectors.
Doing so can cause spurious "unused import" warnings, as reported in
ticket #23557.
Fixes #23557
(cherry picked from commit c7bbad9a0aab2d7b4336ae411e13d9450d8483a7)
- - - - -
2734d370 by sheaf at 2023-07-20T15:34:20-04:00
Suggest similar names in imports
This commit adds similar name suggestions when importing. For example
module A where { spelling = 'o' }
module B where { import B ( speling ) }
will give rise to the error message:
Module ‘A’ does not export ‘speling’.
Suggested fix: Perhaps use ‘spelling’
This also provides hints when users try to import record fields defined
with NoFieldSelectors.
(cherry picked from commit 1af2e7735283251c686bdb1154afab6df5e45053)
- - - - -
84e6df59 by sheaf at 2023-07-20T15:34:20-04:00
Prioritise Parent when looking up class sub-binder
When we look up children GlobalRdrElts of a given Parent, we sometimes
would rather prioritise those GlobalRdrElts which have the right Parent,
and sometimes prioritise those that have the right NameSpace:
- in export lists, we should prioritise NameSpace
- for class/instance binders, we should prioritise Parent
See Note [childGREPriority] in GHC.Types.Name.Reader.
fixes #23664
(cherry picked from commit 3bd4d5b5482fd44914f22492877b3f3ca27299e0)
- - - - -
fa084def by sheaf at 2023-07-20T15:34:33-04:00
base: add COMPLETE pragma to BufferCodec PatSyn
This implements CLC proposal #178, rectifying an oversight in the
implementation of CLC proposal #134 which could lead to spurious
pattern match warnings.
https://github.com/haskell/core-libraries-committee/issues/178
https://github.com/haskell/core-libraries-committee/issues/134
(cherry picked from commit 22565506515313c928d13a43b2946e0106110353)
- - - - -
f9f4714e by sheaf at 2023-07-20T15:34:34-04:00
exactprint: silence incomplete record update warnings
(cherry picked from commit 860f6269bc016e11400b7e3176a5ea6dfe291a46)
- - - - -
071dd8ca by sheaf at 2023-07-20T15:35:45-04:00
Re-instate -Wincomplete-record-updates
Commit e74fc066 refactored the handling of record updates to use
the HsExpanded mechanism. This meant that the pattern matching inherent
to a record update was considered to be "generated code", and thus we
stopped emitting "incomplete record update" warnings entirely.
This commit changes the "data Origin = Source | Generated" datatype,
adding a field to the Generated constructor to indicate whether we
still want to perform pattern-match checking. We also have to do a bit
of plumbing with HsCase, to record that the HsCase arose from an
HsExpansion of a RecUpd, so that the error message continues to mention
record updates as opposed to a generic "incomplete pattern matches in case"
error.
Finally, this patch also changes the way we handle inaccessible code
warnings. Commit e74fc066 was also a regression in this regard, as we
were emitting "inaccessible code" warnings for case statements spuriously
generated when desugaring a record update (remember: the desugaring mechanism
happens before typechecking; it thus can't take into account e.g. GADT information
in order to decide which constructors to include in the RHS of the desugaring
of the record update).
We fix this by changing the mechanism through which we disable inaccessible
code warnings: we now check whether we are in generated code in
GHC.Tc.Utils.TcMType.newImplication in order to determine whether to
emit inaccessible code warnings.
Fixes #23520
Updates haddock submodule, to avoid incomplete record update warnings
(cherry picked from commit df706de378e3415a3972ddd14863f54fc7162dc7)
- - - - -
c7688443 by sheaf at 2023-07-20T15:35:55-04:00
Propagate long-distance information in do-notation
The preceding commit re-enabled pattern-match checking inside record
updates. This revealed that #21360 was in fact NOT fixed by e74fc066.
This commit makes sure we correctly propagate long-distance information
in do blocks, e.g. in
```haskell
data T = A { fld :: Int } | B
f :: T -> Maybe T
f r = do
a at A{} <- Just r
Just $ case a of { A _ -> A 9 }
```
we need to propagate the fact that "a" is headed by the constructor "A"
to see that the case expression "case a of { A _ -> A 9 }" cannot fail.
Fixes #21360
(cherry picked from commit 1d05971e24f6cb1120789d1e1ab4f086eebd504a)
- - - - -
ae88ed9a by sheaf at 2023-07-20T15:35:56-04:00
Skip PMC for boring patterns
Some patterns introduce no new information to the pattern-match
checker (such as plain variable or wildcard patterns). We can thus
skip doing any pattern-match checking on them when the sole purpose
for doing so was introducing new long-distance information.
See Note [Boring patterns] in GHC.Hs.Pat.
Doing this avoids regressing in performance now that we do additional
pattern-match checking inside do notation.
(cherry picked from commit bea0e323c09e9e4b841a37aacd6b67e87a85e7cb)
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Data/FastString.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
- compiler/GHC/HsToCore/Errors/Types.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/GuardedRHSs.hs
- compiler/GHC/HsToCore/ListComp.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match.hs-boot
- compiler/GHC/HsToCore/Match/Constructor.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Rename/Doc.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b95c0e822c39bec2153289d6e17ab24d024df0d...ae88ed9a73d52ab103df491ef2e43c483f1d548d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b95c0e822c39bec2153289d6e17ab24d024df0d...ae88ed9a73d52ab103df491ef2e43c483f1d548d
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/20230720/ac3865ec/attachment-0001.html>
More information about the ghc-commits
mailing list