| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `test.mk` would try to determine whether the dynamic,
profiling, and vanilla library ways are available by searching for
`PrimOpWrappers.{,dyn_,p_}hi` in directory reported by `ghc-pkg field
ghc-prim library-dirs`. However, this is extremely fragile as
there is no guarantee that there is only one library directory. To
handle the case of multiple `library-dirs` correct we would
have to carry out the delicate task of tokenising the directory list (in
shell, no less).
Since this isn't a task that I am eager to solve, I have rather moved
the detection logic into the testsuite driver and instead perform a test
compilation in each of the ways. This should be more robust than the
previous approach.
I stumbled upon this while fixing #20579.
(cherry picked from commit cd3f420f5cb028328364ad8b741a876f1a76beb6)
|
|
|
|
| |
Bumps text and exceptions submodules due to bounds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ef0135934fe32da5b5bb730dbce74262e23e72e8.
See ticket #21229
-------------------------
Metric Decrease:
T15164
Metric Increase:
T13056
-------------------------
(cherry picked from commit a8b47caddb41a970e9ac4c358127523daa1ff101)
|
|
|
|
|
|
|
| |
The lack of INLNE arity was exposed by #21531. The fix is
simple enough, if a bit clumsy.
(cherry picked from commit cebf31ff2af7647805d05ffa99cb99a7761f3831)
|
| |
|
|
|
|
| |
Darwin requires the `-r` flag to be compatible with GNU sed.
|
|
|
|
| |
To 0.9.0 and 4.17.0 respectively.
|
|
|
|
|
|
|
|
|
| |
This module exports unsafe pointer equality operations,
so we accordingly mark it as Unsafe.
Fixes #21433
(cherry picked from commit 81cf52bb301592ff3d043d03eb9a0d547891a3e1)
|
|
|
|
|
|
|
| |
Metric Decrease:
T5631
Metric Increase:
T18223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the unification of concrete type variables.
The subtlety was that unifying concrete metavariables is more subtle
than other metavariables, as decomposition is possible. See the Note
[Unifying concrete metavariables], which explains how we unify a
concrete type variable with a type 'ty' by concretising 'ty', using
the function 'GHC.Tc.Utils.Concrete.concretise'.
This can be used to perform an eager syntactic check for concreteness,
allowing us to remove the IsRefl# special predicate. Instead of emitting
two constraints `rr ~# concrete_tv` and `IsRefl# rr concrete_tv`, we
instead concretise 'rr'. If this succeeds we can fill 'concrete_tv',
and otherwise we directly emit an error message to the typechecker
environment instead of deferring. We still need the error message
to be passed on (instead of directly thrown), as we might benefit from
further unification in which case we will need to zonk the stored types.
To achieve this, we change the 'wc_holes' field of 'WantedConstraints'
to 'wc_errors', which stores general delayed errors. For the moement,
a delayed error is either a hole, or a syntactic equality error.
hasFixedRuntimeRep_MustBeRefl is now hasFixedRuntimeRep_syntactic, and
hasFixedRuntimeRep has been refactored to directly return the most
useful coercion for PHASE 2 of FixedRuntimeRep.
This patch also adds a field ir_frr to the InferResult datatype,
holding a value of type Maybe FRROrigin. When this value is not
Nothing, this means that we must fill the ir_ref field with a type
which has a fixed RuntimeRep.
When it comes time to fill such an ExpType, we ensure that the type
has a fixed RuntimeRep by performing a representation-polymorphism
check with the given FRROrigin
This is similar to what we already do to ensure we fill an Infer
ExpType with a type of the correct TcLevel.
This allows us to properly perform representation-polymorphism checks
on 'Infer' 'ExpTypes'.
The fillInferResult function had to be moved to GHC.Tc.Utils.Unify
to avoid a cyclic import now that it calls hasFixedRuntimeRep.
This patch also changes the code in matchExpectedFunTys to make use
of the coercions, which is now possible thanks to the previous change.
This implements PHASE 2 of FixedRuntimeRep in some situations.
For example, the test cases T13105 and T17536b are now both accepted.
Fixes #21239 and #21325
-------------------------
Metric Decrease:
T18223
T5631
-------------------------
(cherry picked from commit 47ccaa0d17e8150ef09770e3b774e43ee63d3983)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "candidates" passed to decideMonoTyVars can contain coercion holes.
This is because we might well decide to quantify over some unsolved
equality constraints, as long as they are not definitely insoluble.
In that situation, decideMonoTyVars was passing a set of type variables
that was not closed over kinds to closeWrtFunDeps, which was tripping
up an assertion failure.
Fixes #21404
(cherry picked from commit 1e4dcf230a50b00350e084ca43e9d098ff865b22)
|
|
|
|
| |
(cherry picked from commit 575454d08680801f927fe571c2a6f21600b258f1)
|
|
|
|
| |
(cherry picked from commit 06690e1bece1115d83d8ffe11c2bb1db45f4ab52)
|
|
|
|
|
| |
This was added by 5e822e2608c790f335035c904859dcfb93e0639b but the patch
introducing `traceEventWith` has not been backported.
|
|
|
|
| |
(cherry picked from commit 47d18b0b387fbfe07e1b4fbda578a81a74ab0eeb)
|
|
|
|
| |
(cherry picked from commit 8fafacf7bae432fe20a46265af497b8fb42cbd1c)
|
|
|
|
| |
This reverts commit 02279a9c37deb34556834f706dbedc09258df753.
|
|
|
|
| |
This reverts commit 3415981c36631115bc1d7fb5b51abfcc2932a12f.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code was misusing isLexCon, which was never meant for validation.
In fact, its documentation states the following:
Use these functions to figure what kind of name a 'FastString'
represents; these functions do /not/ check that the identifier
is valid.
Ha! This sign can't stop me because I can't read.
The fix is to use okConOcc instead. The other checks (isTcOcc or
isDataOcc) seem superfluous, so I also removed those.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing notes weren't very clear on how the eta-expansion of
data constructors that occurs in tcInferDataCon/dsConLike interacts
with the representation polymorphism invariants. So we explain with
a few more details how we ensure that the representation-polymorphic
lambdas introduced by tcInferDataCon/dsConLike don't end up causing
problems, by checking they are properly instantiated and then relying
on the simple optimiser to perform beta reduction.
A few additional changes:
- ConLikeTc just take type variables instead of binders, as we
never actually used the binders.
- Removed the FRRApp constructor of FRROrigin; it was no longer used
now that we use ExpectedFunTyOrigin.
- Adds a bit of documentation to the constructors
of ExpectedFunTyOrigin.
|
|
|
|
|
|
| |
One more step towards the new design of EPA.
Updates the haddock submodule.
|
|
|
|
|
|
|
| |
This allows disabling of manual control centres in code a user doesn't control like
libraries.
Fixes #18867
|
|\ |
|
| |
| |
| |
| |
| |
| | |
* Non-fatal (i.e. recoverable) parse error
* Checking infix constructors
* Extended the regression test
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We were accidentally dropping the source location information in
certain circumstances when reporting redundant constraints. This patch
makes sure that we set the TcLclEnv correctly before reporting the
warning.
Fixes #21315
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Verifies two important properties of #includes in the RTS:
* That system headers don't appear inside of a `<BeginPrivate.h>` block
as this can hide system library symbols, resulting in very
hard-to-diagnose linker errors
* That no headers precede `Rts.h`, ensuring that __USE_MINGW_ANSI_STDIO
is set correctly before system headers are included.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This no-skolem-info bug was fixed by the no-skolem-info patch
that will be part of GHC 9.4. This patch adds a regression test for
the issue reported in issue #21338.
Fixes #21338.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The free-var test (now documented as (VD3)) was too narrow,
affecting only class predicates. #21302 demonstrated that
this wasn't enough!
Fixes #21302.
Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch implements a small part of GHC Proposal #475.
The key change is in GHC.Types:
- data [] a = [] | a : [a]
+ data List a = [] | a : List a
And the rest of the patch makes sure that List is pretty-printed as []
in various contexts.
Updates the haddock submodule.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As #21144 showed, tryCastWorkerWrapper was calling prepareRhs, and
then unconditionally floating the bindings, without the checks of
doFloatFromRhs. That led to floating an unlifted binding into
a Rec group.
This patch refactors prepareBinding to make these checks,
and do them uniformly across all calls. A nice improvement.
Other changes
* Instead of passing around a RecFlag and a TopLevelFlag; and sometimes
a (Maybe SimplCont) for join points, define a new Simplifier-specific
data type BindContext:
data BindContext = BC_Let TopLevelFlag RecFlag
| BC_Join SimplCont
and use it consistently.
* Kill off completeNonRecX by inlining it. It was only called in
one place.
* Add a wrapper simplImpRules for simplRules.
Compile time on T9630 drops by 4.7%; little else changes.
Metric Decrease:
T9630
|
| |
| |
| |
| |
| |
| | |
Get rid of unnnecessary case clause that always matched.
Closes #20558
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| |_|_|/
|/| | |
| | | | |
'wip/windows-clang-2' and 'wip/lint-rts-includes' into wip/windows-clang-join
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Verifies two important properties of #includes in the RTS:
* That system headers don't appear inside of a `<BeginPrivate.h>` block
as this can hide system library symbols, resulting in very
hard-to-diagnose linker errors
* That no headers precede `Rts.h`, ensuring that __USE_MINGW_ANSI_STDIO
is set correctly before system headers are included.
|
| | |
| | |
| | |
| | | |
Due to #21361.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Due to #20354.
We will need to investigate this prior the release.
|
| | |
| | |
| | |
| | | |
Our toolchain on Windows doesn't currently have Windows support.
|
| | |
| | |
| | |
| | |
| | | |
I'll admit, I don't currently see *why* this output is reordered
but it is a fairly benign difference and I'm out of time to investigate.
|
| | |
| | |
| | |
| | | |
`abort` exits with 255, not 134, on Windows.
|
| | |
| | |
| | |
| | | |
Due to #21322.
|