[Git][ghc/ghc][wip/T21909] 15 commits: Don't suppress *all* Wanteds
Apoorv Ingle (@ani)
gitlab at gitlab.haskell.org
Sat Mar 4 23:27:40 UTC 2023
Apoorv Ingle pushed to branch wip/T21909 at Glasgow Haskell Compiler / GHC
Commits:
1ed573a5 by Richard Eisenberg at 2023-03-02T22:42:06-05:00
Don't suppress *all* Wanteds
Code in GHC.Tc.Errors.reportWanteds suppresses a Wanted if its
rewriters have unfilled coercion holes; see
Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint.
But if we thereby suppress *all* errors that's really confusing,
and as #22707 shows, GHC goes on without even realising that the
program is broken. Disaster.
This MR arranges to un-suppress them all if they all get suppressed.
Close #22707
- - - - -
8919f341 by Luite Stegeman at 2023-03-02T22:42:45-05:00
Check for platform support for JavaScript foreign imports
GHC was accepting `foreign import javascript` declarations
on non-JavaScript platforms. This adds a check so that these
are only supported on an platform that supports the JavaScript
calling convention.
Fixes #22774
- - - - -
db83f8bb by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Statically assert alignment of Capability
In #22965 we noticed that changes in the size of `Capability` can result
in unsound behavior due to the `align` pragma claiming an alignment
which we don't in practice observe. Avoid this by statically asserting
that the size is a multiple of the alignment.
- - - - -
5f7a4a6d by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Introduce stgMallocAlignedBytes
- - - - -
8a6f745d by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Correctly align Capability allocations
Previously we failed to tell the C allocator that `Capability`s needed
to be aligned, resulting in #22965.
Fixes #22965.
Fixes #22975.
- - - - -
5464c73f by Ben Gamari at 2023-03-02T22:43:22-05:00
rts: Drop no-alignment special case for Windows
For reasons that aren't clear, we were previously not giving Capability
the same favorable alignment on Windows that we provided on other
platforms. Fix this.
- - - - -
a86aae8b by Matthew Pickering at 2023-03-02T22:43:59-05:00
constant folding: Correct type of decodeDouble_Int64 rule
The first argument is Int64# unconditionally, so we better produce
something of that type. This fixes a core lint error found in the ad
package.
Fixes #23019
- - - - -
68dd64ff by Zubin Duggal at 2023-03-02T22:44:35-05:00
ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTs
Commit 7566fd9de38c67360c090f828923d41587af519c with the fix for #22798 was
incomplete as it failed to handle MULTILINE_COMMENT pseudo-instructions, and
didn't completly fix the compiler panics when compiling with `-fregs-graph`.
Fixes #23002
- - - - -
2f97c861 by Simon Peyton Jones at 2023-03-02T22:45:11-05:00
Get the right in-scope set in etaBodyForJoinPoint
Fixes #23026
- - - - -
45af8482 by David Feuer at 2023-03-03T11:40:47-05:00
Export getSolo from Data.Tuple
Proposed in
[CLC proposal #113](https://github.com/haskell/core-libraries-committee/issues/113)
and
[approved by the CLC](https://github.com/haskell/core-libraries-committee/issues/113#issuecomment-1452452191)
- - - - -
0c694895 by David Feuer at 2023-03-03T11:40:47-05:00
Document getSolo
- - - - -
bd0536af by Simon Peyton Jones at 2023-03-03T11:41:23-05:00
More fixes for `type data` declarations
This MR fixes #23022 and #23023. Specifically
* Beef up Note [Type data declarations] in GHC.Rename.Module,
to make invariant (I1) explicit, and to name the several
wrinkles.
And add references to these specific wrinkles.
* Add a Lint check for invariant (I1) above.
See GHC.Core.Lint.checkTypeDataConOcc
* Disable the `caseRules` for dataToTag# for `type data` values.
See Wrinkle (W2c) in the Note above. Fixes #23023.
* Refine the assertion in dataConRepArgTys, so that it does not
complain about the absence of a wrapper for a `type data` constructor
Fixes #23022.
Acked-by: Simon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
858f34d5 by Oleg Grenrus at 2023-03-04T01:13:55+02:00
Add decideSymbol, decideChar, decideNat, decTypeRep, decT and hdecT
These all type-level equality decision procedures.
Implementes a CLC proposal https://github.com/haskell/core-libraries-committee/issues/98
- - - - -
bf43ba92 by Simon Peyton Jones at 2023-03-04T01:18:23-05:00
Add test for T22793
- - - - -
f2245299 by Apoorv Ingle at 2023-03-04T17:27:24-06:00
Constraint simplification loop now depends on `ExpansionFuel`
instead of a boolean flag for `CDictCan.cc_pend_sc`.
Pending givens get a fuel of 3 while Wanted and quantified constraints get a fuel of 1.
This helps pending given constraints to keep up with pending wanted constraints in case of
`UndecidableSuperClasses` and superclass expansions while simplifying the infered type.
Adds 3 dynamic flags for controlling the fuels for each type of constraints
`-fgivens-expansion-fuel` for givens `-fwanteds-expansion-fuel` for wanteds and `-fqcs-expansion-fuel` for quantified constraints
Fixes #21909
Added Tests T21909, T21909b
Added Note [SimplifyInfer and UndecidableSuperClasses]
- - - - -
30 changed files:
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Canonical.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Types/Constraint.hs
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/expected-undocumented-flags.txt
- libraries/base/Data/Tuple.hs
- libraries/base/Data/Typeable.hs
- libraries/base/Data/Typeable/Internal.hs
- libraries/base/GHC/TypeLits.hs
- libraries/base/GHC/TypeNats.hs
- libraries/base/Type/Reflection.hs
- libraries/base/changelog.md
- libraries/ghc-prim/GHC/Tuple/Prim.hs
- rts/Capability.c
- rts/Capability.h
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f89fefc53ff33f9d478889552bbdbc2bd6fb5b3a...f22452995787f8605c22de7b9dcdcbf2768b1e22
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f89fefc53ff33f9d478889552bbdbc2bd6fb5b3a...f22452995787f8605c22de7b9dcdcbf2768b1e22
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/20230304/fe54d1ed/attachment-0001.html>
More information about the ghc-commits
mailing list