| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This changes the bytecode return convention for unlifted
algebraic datatypes to be the same as for lifted
types, i.e. ENTER/PUSH_ALTS instead of
RETURN_UNLIFTED/PUSH_ALTS_UNLIFTED
Fixes #20849
(cherry picked from commit fcc964ad5cf7141449ad487102b7c19f0798e73f)
|
|
|
|
| |
(cherry picked from commit 9811dafb9436e9a8ccc19b78ea41baea71adfaa3)
|
|
|
|
| |
(cherry picked from commit a4ca19aba198fdbed4b1ec4215411a3fc7cee14e)
|
|
|
|
|
|
|
|
|
| |
RtlDeleteFunctionTable expects a pointer to the .pdata section
yet we passed it the .xdata section.
Happily, this fixes #21354.
(cherry picked from commit 8ad577ddad66f2a7a9bb334b6ee7f0837e0c19be)
|
|
|
|
| |
(cherry picked from commit 3480b973833ac2826f2aa175a155bb76dc67c008)
|
|
|
|
|
|
|
|
| |
This implements #20494 for the PEi386 linker.
Happily, this also appears to fix `T9405`, resolving #21361.
(cherry picked from commit aa3de0cfbc74671f9f22970aead9c430548dd05e)
|
|
|
|
| |
(cherry picked from commit 65eab273f8b22f7548f12bdcaad718ac395ce891)
|
|
|
|
|
|
|
| |
This is useful for hie files to reconstruct the evidence that default methods
depend on.
(cherry picked from commit c4989131563efca8692c341e7b08096ac9a3b53b)
|
|
|
|
| |
(cherry picked from commit e9d9f0784e8670c6b85f1bf80e26b571b08519b5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I did the shallow-subusmptuion patch
commit 2b792facab46f7cdd09d12e79499f4e0dcd4293f
Date: Sun Feb 2 18:23:11 2020 +0000
Simple subsumption
I changed tcSplitNestedSigmaTys to not look through function arrows
any more. But that was actually an un-forced change. This function
is used only in
* Improving error messages in GHC.Tc.Gen.Head.addFunResCtxt
* Validity checking for default methods: GHC.Tc.TyCl.checkValidClass
* A couple of calls in the GHCi debugger: GHC.Runtime.Heap.Inspect
all to do with validity checking and error messages. Acutally its
fine to look under function arrows here, and quite useful a test
DeepSubsumption05 (a test motivated by a build failure in the
`lens` package) shows.
The fix is easy. I added Note [tcSplitNestedSigmaTys].
(cherry picked from commit 936fe7435d9da63f78c032b027179e1f1f22a482)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR adds the language extension -XDeepSubsumption, implementing
GHC proposal #511. This change mitigates the impact of GHC proposal
The changes are highly localised, by design. See Note [Deep subsumption]
in GHC.Tc.Utils.Unify.
The main changes are:
* Add -XDeepSubsumption, which is on by default in Haskell98 and Haskell2010,
but off in Haskell2021.
-XDeepSubsumption largely restores the behaviour before the "simple subsumption" change.
-XDeepSubsumpition has a similar flavour as -XNoMonoLocalBinds:
it makes type inference more complicated and less predictable, but it
may be convenient in practice.
* The main changes are in:
* GHC.Tc.Utils.Unify.tcSubType, which does deep susumption and eta-expanansion
* GHC.Tc.Utils.Unify.tcSkolemiseET, which does deep skolemisation
* In GHC.Tc.Gen.App.tcApp we call tcSubTypeNC to match the result
type. Without deep subsumption, unifyExpectedType would be sufficent.
See Note [Deep subsumption] in GHC.Tc.Utils.Unify.
* There are no changes to Quick Look at all.
* The type of `withDict` becomes ambiguous; so add -XAllowAmbiguousTypes to
GHC.Magic.Dict
* I fixed a small but egregious bug in GHC.Core.FVs.varTypeTyCoFVs, where
we'd forgotten to take the free vars of the multiplicity of an Id.
(cherry picked from commit 7b9be6c8b94b3c2eb3441febb4a8005a03fa34a5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding filepath as a dependency of template-haskell means that it can't
be reinstalled if any build-plan depends on template-haskell.
This is a temporary solution for the 9.4 release.
A longer term solution is to split-up the template-haskell package into
the wired-in part and a non-wired-in part which can be reinstalled. This
was deemed quite risky on the 9.4 release timescale.
Fixes #21738
(cherry picked from commit b151b65ec469405dcf25f9358e7e99bcc8c2b3ac)
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were attempting to rehydrate all dependencies of a particular module,
but we actually only needed to rehydrate those of the current package
(as those are the ones participating in the loop).
This fixes loading GHC into a multi-unit session.
Fixes #21814
(cherry picked from commit 665fa5a73e385bdfce13180048701a179ec3f36a)
|
|
|
|
|
|
|
| |
This fixes the initialisation functions when using -prof or
-finfo-table-map.
Fixes #21370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former behaviour of adding cost centres after optimization but
before unfoldings are created is not available via the flag
`prof-late-inline` instead.
I also reduced the overhead of -fprof-late* by pushing the cost centres
into lambdas. This means the cost centres will only account for
execution of functions and not their partial application.
Further I made LATE_CC cost centres it's own CC flavour so they now
won't clash with user defined ones if a user uses the same string for
a custom scc.
LateCC: Don't put cost centres inside constructor workers.
With -fprof-late they are rarely useful as the worker is usually
inlined. Even if the worker is not inlined or we use -fprof-late-linline
they are generally not helpful but bloat compile and run time
significantly. So we just don't add sccs inside constructor workers.
-------------------------
Metric Decrease:
T13701
-------------------------
|
|
|
|
|
|
|
|
|
| |
This adds supports for various :set commands apart from `:set <FLAG>` in
multi repl, this includes `:set prompt` and so-on.
Fixes #21796
(cherry picked from commit 620ee7edc931dc5273dd04880059cc9ec8d41528)
|
|
|
|
| |
(cherry picked from commit c006ac0d1454119f0b456a00ff2416831c955e99)
|
|
|
|
|
|
|
|
|
|
| |
Previously -ddump-llvm would change the backend used, which contrasts
with all other dump flags. This is quite surprising and cost me quite
a bit of time. Dump flags should not change compiler behavior.
Fixes #21776.
(cherry picked from commit df762ae9e2d5263fb71f6df38323ac3ca400cc47)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was some confusion about whether FUN/TYPE/One/Many should be
BuiltInSyntax or UserSyntax. The answer is certainly UserSyntax as
BuiltInSyntax is for things which are directly constructed by the parser
rather than going through normal renaming channels.
I fixed all the obviously wrong places I could find and added a test for
the original bug which was caused by this (#21752)
Fixes #21752 #20695 #18302
(cherry picked from commit 251471e7706ea3029b4a0c086035c16e7b67a081)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to put OtherCon unfoldings on lambda binders of workers
and sometimes also join points/specializations with with the
assumption that since the wrapper would force these arguments
once we execute the RHS they would indeed be in WHNF.
This was wrong for reasons detailed in #21472. So now we purge
evaluated unfoldings from *all* lambda binders.
This fixes #21472, but at the cost of sometimes not using as efficient a
calling convention. It can also change inlining behaviour as some
occurances will no longer look like value arguments when they did
before.
As consequence we also change how we compute CBV information for
arguments slightly. We now *always* determine the CBV convention
for arguments during tidy. Earlier in the pipeline we merely mark
functions as candidates for having their arguments treated as CBV.
As before the process is described in the relevant notes:
Note [CBV Function Ids]
Note [Attaching CBV Marks to ids]
Note [Never put `OtherCon` unfoldigns on lambda binders]
(cherry picked from commit ac7a7fc88b51f9fb4e84499397e12eb0081ba79e)
-------------------------
Metric Decrease:
T12425
T13035
T18223
T18223
T18923
MultiLayerModulesTH_OneShot
Metric Increase:
T18223
WWRec
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When combining the ArityType of two case branches we need to make the
conservative decision to
Before this patch `\1. T` when combined with `T` would result in `\1.
T`, the result being that we would then eta-expand the branch of type
`T` (even though we concluded it wasn't necessarily safe to do so).
In particular, this goes wrong when the branch contains a call to a join point, if
we decide to eta-expand it anyway then the join-point gets oversatured.
This is a bit of latent bug which was only triggered quite indirectly by
inserting cost-centres but seems like it could have happened in other
scenarios.
Therefore the correct result of combining `\1. T` and `T` is the
conservative `T`. This patch corrects the logic in `andArityType` to
produce that result.
Fixes #21694
-------------------------
Metric Increase:
ManyAlternatives
ManyConstructors
MultiComponentModules
MultiComponentModulesRecomp
MultiLayerModules
MultiLayerModulesRecomp
T10421
T12425
T12707
T13035
T13379
T13701
T14683
T15703
T16875
T1969
T3064
T3294
T4801
T5321FD
T5321Fun
T5631
T783
T9020
T9198
T9233
T9961
-------------------------
|
|
|
|
| |
This reverts commit 4512ad2d6a8e65ea43c86c816411cb13b822f674.
|
|
|
|
|
|
|
|
|
|
| |
Previously we would flag the symbol as weak but failed
to set its address, which must be computed from an "auxiliary"
symbol entry the follows the weak symbol.
Fixes #21556.
(cherry picked from commit 53b3fa1c782b251076707a024f55276d4ccb0a6c)
|
| |
|
|
|
|
|
|
|
|
|
| |
Test that we can successfully link against C++ code both in GHCi and
batch compilation.
See #20010
(cherry picked from commit 03efe28317c5e037eab4d47790a6a1fb74d38c3d)
|
|
|
|
| |
(cherry picked from commit 43628ed44b063e25e6d1394314ed89f07f026503)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we introduce proper support for compilation of C++ objects. This
includes:
* logic in `configure` to detect the C++ toolchain and propagating this
information into the `settings` file
* logic in the driver to use the C++ toolchain when compiling C++
sources
(cherry picked from commit fb579e15c56994bc6c4cc266535024f20a81f830)
|
|
|
|
|
|
| |
Fixes #21682
(cherry picked from commit 1fbba97b17d7bbfada0d9620d126f84b8d57be2d)
|
|
|
|
|
|
|
|
| |
This is now fixed on master and 9.2 branch.
Closes #21558
(cherry picked from commit 0e2d16eb76037152c96226f0f65a5ebdee64f7b6)
|
|
|
|
|
|
| |
for better disambiguation (#17420)
(cherry picked from commit 5f6527e05beb628c5015ab9f8a7f4012ee8d14a1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function breakTyVarCycle_maybe has been installed
in a dark corner of GHC to catch some gremlins (a.k.a.
occurs-check failures) who lurk
there. But it previously only caught gremlins of the
form (a ~ ... F a ...), where some of our intrepid users
have spawned gremlins of the form (G a ~ ... F (G a) ...).
This commit improves breakTyVarCycle_maybe (and renames
it to breakTyEqCycle_maybe) to catch the new gremlins.
Happily, the change is remarkably small.
The gory details are in Note [Type equality cycles].
Test cases: typecheck/should_compile/{T21515,T21473}.
(cherry picked from commit d87530bbf497d21edb4a1dd5cb834fb42a49d1d8)
|
|
|
|
|
|
| |
This missing guard gave rise to #21519.
(cherry picked from commit 32cdf62dc1537f572f2d044851e316ca37d8e012)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit acb188e0 introduced a regression in the computation of free
variables in mdo statements, as the logic in
GHC.Rename.Expr.segmentRecStmts was slightly different depending on
whether the recursive do block corresponded to an mdo statement or
a rec statment.
This patch restores the previous computation for mdo blocks.
Fixes #21654
(cherry picked from commit b54f6c4fefaca8ca043cccbf474fb0da3d1c66b5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves handling of the magic 'withDict' function from the desugarer
to the typechecker. Details in Note [withDict].
I've extracted a part of T16646Fail to a separate file T16646Fail2,
because the new error in 'reify' hides the errors from 'f' and 'g'.
WithDict now works with casts, this fixes #21328.
Part of #19915
(cherry picked from commit 3bd7d5d668b316f517a66c72fcf9bc7a36cc6ba4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR fixes a bad bug, where the withDict was inlined too
vigorously, which in turn made the type-class Specialiser generate
a bogus specialisation, because it saw the same overloaded function
applied to two /different/ dictionaries.
Solution: inline `withDict` later. See (WD8) of Note [withDict]
in GHC.HsToCore.Expr
See #21575, which is fixed by this change.
(cherry picked from commit d2284c4c9dd484a4b459366956c4aedc72336b04)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This firstly caused spurious output to be emitted (as evidenced by
#21555) but even worse caused a massive coercion to be attempted to be
printed (> 200k terms) which would invariably eats up all the memory of
your computer.
The good news is that removing this trace allows the program to compile
to completion, the bad news is that the program exhibits a core lint
error (on 9.0.2) but not any other releases it seems.
Fixes #21577 and #21555
(cherry picked from commit c1e24e610ae572b77bc1507674431a84563af759)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were considering all Typeable evidence to be "BuiltinInstance"s which
meant the stage restriction was going unchecked. In-fact, typeable has
evidence and so we need to apply the stage restriction.
This is
complicated by the fact we don't generate typeable evidence and the
corresponding DFunIds until after typechecking is concluded so we
introcue a new `InstanceWhat` constructor, BuiltinTypeableInstance which
records whether the evidence is going to be local or not.
Fixes #21547
(cherry picked from commit ea895b94afeecb111f8001fbd60f5d4c8828213c)
|
|
|
|
|
|
|
|
|
| |
We assumed the wrapper for an unlifted binding is the identity,
but as #21516 showed, that is no always true.
Solution is simple: use it.
(cherry picked from commit 322537e3c3469090de16aeffe3fdf6fb98b68c34)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes #21479
See Note [Unquantified tyvars in a pattern synonym]
While doing this, I found that some error messages pointed at the
pattern synonym /name/, rather than the /declaration/ so I widened the
SrcSpan to encompass the declaration.
(cherry picked from commit bdc99cc22c903d15eb7f4cd8da4b37d307179808)
|
|
|
|
|
|
| |
it is still re-exported from GHC.Exts
(cherry picked from commit 0092c67cffb707611b2684df24a1a77e40c01cb7)
|
|
|
|
|
|
|
|
|
| |
Make sure comments captured in the exact print annotations are in
order of increasing location
Closes #20718
(cherry picked from commit e2520df3fffa0cf22fb19c5fb872832d11c07d35)
|
|
|
|
|
|
|
|
|
|
|
| |
This provides a way to set the Opt_KeepRawTokenStream from the command
line, allowing exact print annotation users to see exactly what is
produced for a given parsed file, when used in conjunction with
-ddump-parsed-ast
Discussed in #19706, but this commit does not close the issue.
(cherry picked from commit 83c67f766be615d4db6f71f8af0cbb9b4c4917bb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code
data instance Method PGMigration = MigrationQuery Query
-- ^ Run a query against the database
| MigrationCode (Connection -> IO (Either String ()))
-- ^ Run any arbitrary IO code
Resulted in two instances of the "-- ^ Run a query against the database"
comment appearing in the Exact Print Annotations when it was parsed.
Ensure only one is kept.
Closes #20239
(cherry picked from commit e9fff12b34bb9770491d24eff5c280f44dc8cfc1)
|
|
|
|
|
|
|
|
|
|
| |
There is a mis-match between the TH representation of OPAQUE pragmas and
GHC's internal representation due to how OPAQUE pragmas disallow phase
annotations. It seemed most in keeping to just fix the wired in name
issue by adding a special case to the desugaring of INLINE pragmas
rather than making TH/GHC agree with how the representation should look.
Fixes #21463
|
|
|
|
| |
(cherry picked from commit 73b22ff196160036ac10b762bf3a363fa8a451ad)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we deprecate the eventlogging RTS ways and instead enable eventlog
support in the remaining ways. This simplifies packaging and reduces GHC
compilation times (as we can eliminate two whole compilations of the RTS)
while simplifying the end-user story. The trade-off is a small increase
in binary sizes in the case that the user does not want eventlogging
support, but we think that this is a fine trade-off.
This also revealed a latent RTS bug: some files which included `Cmm.h`
also assumed that it defined various macros which were in fact defined
by `Config.h`, which `Cmm.h` did not include. Fixing this in turn
revealed that `StgMiscClosures.cmm` failed to import various spinlock
statistics counters, as evidenced by the failed unregisterised build.
Closes #18948.
(cherry picked from commit ee11d04363ed8aa1d73a0cda16076a39e668d163)
|
|
|
|
|
| |
Since the previous commit bumping `base` isn't in `master` due to a
rebase-merge.
|
|
|
|
| |
(cherry picked from commit 26e16e611ccfdbe8450f4b3ffac3182e698e1351)
|
|
|
|
| |
(cherry picked from commit 376088dd91123b64947eb376f9c3db23117f293d)
|
|
|
|
|
|
|
|
|
| |
To ensure that the build benefits from Hadrian's usual logic for building
packages, avoiding #21409.
Closes #21409.
(cherry picked from commit 4d189db9da47b15b1ef354c1febe3dd9ee442927)
|