| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This patch is a first step towards a simpler design for exact printing.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a space leak related to the use of
Maybe in RealSrcSpan by introducing a strict variant
of Maybe.
In addition to that, it also introduces a strict pair
and uses the newly introduced strict data types in a few
other places (e.g. the lexer/parser state) to reduce
allocations.
Includes a regression test.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the exact print annotations accurately record the `@` for
code like
tyApp :: Con k a -> Proxy a
tyApp (Con @kx @ax (x :: Proxy ax)) = x :: Proxy (ax :: kx)
Closes #19850
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Change the names of the fields in in `data FieldOcc`
- Renames `HsRecFld` to `HsRecSel`
- Replace `AmbiguousFieldOcc p` in `HsRecSel` with `FieldOcc p`
- Contains a haddock submodule update
The primary motivation of this change is to remove
`AmbiguousFieldOcc`. This is one of a suite of changes improving how
record syntax (most notably record update syntax) is represented in
the AST.
|
| |
|
|
|
|
| |
Only adding "aarch64-unknown-netbsd" to gen-data-layout.sh was sufficient to get it working. No other changes were strictly required.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the `devel2+werror` build combo as stage1 does not have TH
enabled.
```
utils/check-exact/Preprocess.hs:51:1: error: [-Werror]
Ignoring ANN annotations, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi
|
51 | {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
|
|
|
|
| |
This transformer builds stage2 GHC with -fomit-interface-pragmas which
can greatly reduce the amount of rebuilding but still allows most the
tests to pass.
|
| |
|
|
|
|
|
|
| |
Updates haddock submodule
Closes #19845
|
|
|
|
|
| |
Closes #19839
Closes #19840
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the testsuite failed before it would print a big exception which
gave you the very long command line which was used to invoke the
testsuite. By capturing the exit code and rethrowing the exception, the
error is must less verbose:
```
Error when running Shake build system:
at want, called at src/Main.hs:104:30 in main:Main
* Depends on: test
* Raised the exception:
user error (tests failed)
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't show suggestions for similar variables when a data constructor
in a pattern is not in scope.
* Only suggest record fields when a record field for record creation or
updating is not in scope.
* Suggest similar record fields when a record field is not in scope with
-XOverloadedRecordDot.
* Show suggestions for data constructors if a type constructor or type
is not in scope, but only if -XDataKinds is enabled.
Fixes #19843.
|
| |
|
| |
|
|
|
|
| |
module compilation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit extends the GHC diagnostic hierarchy with a `GhcHint` type,
modelling helpful suggestions emitted by GHC which can be used to deal
with a particular warning or error.
As a direct consequence of this, the `Diagnostic` typeclass has been extended
with a `diagnosticHints` method, which returns a `[GhcHint]`. This means
that now we can clearly separate out the printing of the diagnostic
message with the suggested fixes.
This is done by extending the `printMessages` function in
`GHC.Driver.Errors`.
On top of that, the old `PsHint` type has been superseded by the new `GhcHint`
type, which de-duplicates some hints in favour of a general `SuggestExtension`
constructor that takes a `GHC.LanguageExtensions.Extension`.
|
|
|
|
|
|
|
|
| |
In the GHCi debugger use the function `pprSigmaType` to print out
Suspension Terms. The function `pprSigmaType` respect the flag
`-f(no-)print-explicit-foralls` and so it fixes #19355.
Switch back output of existing tests to default mode (no explicit foralls).
|
|
|
|
| |
As requested by Michael Snoyman.
|
| |
|
|
|
|
| |
The check bypass is no longer necessary and the check would have avoided #19638.
|
|
|
|
| |
Fixes #19851
|
|
|
|
|
|
| |
Fixes #19849
Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
|
|
|
|
| |
Fixes #19852 and #19609
|
|
|
|
|
|
|
| |
arguments (#19827)
Previously we assumed that the assembler was the same as the c compiler,
but we allow setting them to different programs with -pgmc and -pgma.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppose a safe call: myCall(x,y,z)
It is lowered into three unsafe calls in Cmm:
r = suspendThread(...);
myCall(x,y,z);
resumeThread(r);
Consider the following situation for myCall arguments:
x = Sp[..] -- stack
y = Hp[..] -- heap
z = R1 -- global register
r = suspendThread(...);
myCall(x,y,z);
resumeThread(r);
The sink pass assumes that unsafe calls clobber memory (heap and stack),
hence x and y assignments are not sunk after `suspendThread`. The sink
pass also correctly handles global register clobbering for all unsafe
calls, except `suspendThread`!
`suspendThread` is special because it releases the capability the thread
is running on. Hence the sink pass must also take into account global
registers that are mapped into memory (in the capability).
In the example above, we could get:
r = suspendThread(...);
z = R1
myCall(x,y,z);
resumeThread(r);
But this transformation isn't valid if R1 is (BaseReg->rR1) as BaseReg
is invalid between suspendThread and resumeThread. This caused argument
corruption at least with the C backend ("unregisterised") in #19237.
Fix #19237
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #19822, we realised that the Simplifier's new habit of floating cases into
`runRW#` continuations inhibits CPR analysis from giving key functions of `text`
the CPR property, such as `singleton`.
This patch fixes that by anticipating part of !5667 (Nested CPR) to give
`runRW#` the proper CPR transformer it now deserves: Namely, `runRW# (\s -> e)`
should have the CPR property iff `e` has it.
The details are in `Note [Simplification of runRW#]` in GHC.CoreToStg.Prep.
The output of T18086 changed a bit: `panic` (which calls `runRW#`) now has
`botCpr`. As outlined in Note [Bottom CPR iff Dead-Ending Divergence], that's
OK.
Fixes #19822.
Metric Decrease:
T9872d
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
They are repeated in the surrounding DataDecl and FamEqn.
Updates haddock submodule
Closes #19834
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, the RHS of a rule would expose additional definitions, despite
the fact that the rule wouldn't get exposed so it wouldn't be possible
to ever use these definitions.
The net-result is slightly less recompilation when specialisation
introduces rules.
Related to #19836
|
|
|
|
| |
This fixes #19824
|
|
|
|
| |
Fixes #19606 #19607
|
|
|
|
|
| |
Previously it only worked if the two files you were trying to symlink
were already in the same directory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit modifies interface files so that *only* direct information
about modules and packages is stored in the interface file.
* Only direct module and direct package dependencies are stored in the
interface files.
* Trusted packages are now stored separately as they need to be checked
transitively.
* hs-boot files below the compiled module in the home module are stored
so that eps_is_boot can be calculated in one-shot mode without loading
all interface files in the home package.
* The transitive closure of signatures is stored separately
This is important for two reasons
* Less recompilation is needed, as motivated by #16885, a lot of
redundant compilation was triggered when adding new imports deep in the
module tree as all the parent interface files had to be redundantly
updated.
* Checking an interface file is cheaper because you don't have to
perform a transitive traversal to check the dependencies are up-to-date.
In the code, places where we would have used the transitive closure, we
instead compute the necessary transitive closure. The closure is not
computed very often, was already happening in checkDependencies, and
was already happening in getLinkDeps.
Fixes #16885
-------------------------
Metric Decrease:
MultiLayerModules
T13701
T13719
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit converts some TcRn diagnostic into proper structured
errors.
Ported by this commit:
* Add TcRnImplicitLift
This commit adds the TcRnImplicitLift diagnostic message and a prototype
API to be able to log messages which requires additional err info.
* Add TcRnUnusedPatternBinds
* Add TcRnDodgyExports
* Add TcRnDodgyImports message
* Add TcRnMissingImportList
|
| |
|
|
|
|
|
| |
They are taking over 4 hours to complete which is stalling the rest of
the merge pipeline.
|
|
|
|
|
| |
* Fix for unqualified Data.List import
* Fix monad instance
|
|
|
|
| |
Progress towards #19026
|
|
|
|
| |
Fixes #19831
|
|
|
|
|
|
|
| |
The SrcSpan for a type family declaration did not include the family
equations.
Closes #19821
|