| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
- Mention -Wforall-identifier
- Improve description of withDict
- Fix formatting
|
|
|
|
|
|
|
|
|
|
|
| |
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 fixes various violations of the newly-added RTS includes linter.
|
|
|
|
| |
It's easier to ensure that this is included first than Rts.h
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Previously, the use of size[D]VarSet would involve a traversal of the
entire underlying IntMap. Since IntMaps are already spine-strict,
this is unnecessary.
|
|
|
|
| |
Fixes #20676
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC merge request !963 improved warnings in the presence of
COMPLETE annotations. This allows the removal of the Fun pattern
from the complete set.
Doing so expectedly causes some redundant pattern match warnings,
in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class
from the binary library; this commit addresses that.
Updates binary submodule
Fixes #20230
|
|
|
|
|
| |
The matching on GhcPass introduced by 95275a5f25a is not necessary.
This patch reverts it to make the code simpler.
|
|
|
|
| |
Addresses #21295.
|
|
|
|
|
|
| |
This is necessary to build recent `text` commits.
Bumps Hackage index state for a hashable which builds with GHC 9.2.
|
|
|
|
|
| |
-Wuni-incomplete-patterns and apparent improvements in the pattern match
checker surfaced these.
|
|
|
|
| |
This makes it a bit easier to bump them.
|
| |
|
|
|
|
|
| |
Previously the `ipe` and `omit_pragmas` transformers were hackily
defined using the textual key-value syntax. Fix this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In !7511 (closed) I introduced a new allocator for adjustors,
AdjustorPool, which eliminates the address space fragmentation issues
which adjustors can introduce. In that work I focused on amd64 since
that was the platform where I observed issues.
However, in #21132 we noted that the size of adjustors is also a cause
of CI fragility on i386. In this MR I port i386 to use AdjustorPool.
Sadly the complexity of the i386 adjustor code does cause require a bit
of generalization which makes the code a bit more opaque but such is the
world.
Closes #21132.
|
|
|
|
| |
Unfortunately the i386 adjustor logic needs this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#20385)
Once we are done parsing the header of a module to obtain the options, we
look through the rest of the tokens in order to determine if they contain any
misplaced file header pragmas that would usually be ignored, potentially
resulting in bad error messages.
The warnings are reported immediately so that later errors don't shadow
over potentially helpful warnings.
Metric Increase:
T13719
|
|
|
|
| |
Since there may be .o files which are in fact archives.
|
|
|
|
| |
See #21068.
|
|
|
|
|
|
|
|
| |
Since object files may in fact be archive files, we must ensure that
their contents are merged rather than constructing an
archive-of-an-archive.
See #21068.
|
|
|
|
|
| |
Previously the setup was quite fragile as it had to assume which
arguments were file arguments and which were flags.
|
|
|
|
|
|
|
| |
On Windows we don't have a linker which supports object joining (i.e.
the `-r` flag). Consequently, `-pgmlm` is now a `Maybe`.
See #21068.
|
|
|
|
|
|
|
| |
Check the file's header to catch static archive bearing the `.o`
extension, as may happen on Windows after the Clang refactoring.
See #21068
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, `lld`'s COFF backend does not currently support object
merging. With ld.bfd having broken support for high image-load base
addresses, it's necessary to find an alternative. Here I introduce
support in the driver for generating static archives, which we use on
Windows instead of object merging.
Closes #21068.
|
|
|
|
|
|
| |
Fixes #21335.
[ci skip]
|
|
|
|
|
|
|
| |
For reasons that remain a mystery, cabal-install seems to consistently
corrupt its cache on Windows. Disable caching for now.
Works around #21347.
|
|
|
|
|
|
|
|
| |
`tcExpr` typechecked implicit parameters by introducing a metavariable
of kind `TYPE kappa`, without enforcing that `kappa ~ LiftedRep`.
This patch instead creates a metavariable of kind `Type`.
Fixes #21327
|
| |
|
|
|
|
|
|
|
|
|
| |
It was previously not possible to use -XEmptyCase in Arrow notation,
since GHC would print "Exception: foldb of empty list".
This is now fixed.
Closes #21301
|
|
|
|
|
| |
This bug was fixed at some point between GHC 9.0 and GHC 9.2;
this patch simply adds a regression test.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements proposal 302: \cases - Multi-way lambda
expressions.
This adds a new expression heralded by \cases, which works exactly like
\case, but can match multiple apats instead of a single pat.
Updates submodule haddock to support the ITlcases token.
Closes #20768
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a PromotionFlag field to HsOpTy, which is used
in pretty-printing and when determining whether to emit warnings
with -fwarn-unticked-promoted-constructors.
This allows us to correctly report tick-related warnings for things
like:
type A = Int : '[]
type B = [Int, Bool]
Updates haddock submodule
Fixes #19984
|
|
|
|
|
|
|
|
|
| |
As noted in #20569 the documentation for search path was wrong because
it seemed to indicate that `-i` dirs were important when looking for
interface files in `-c` mode, but they are not important if `-hidir` is
set.
Fixes #20569
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
How things should work:
* -i is the search path for source files
* -hidir explicitly sets the search path for interface files and the output location for interface files.
* -odir sets the search path and output location for object files.
Before in one shot mode we would look for the interface file in the
search locations given by `-i`, but then set the path to be in the
`hidir`, so in unusual situations the finder could find an interface
file in the `-i` dir but later fail because it tried to read the
interface file from the `-hidir`.
A bug identified by #20569
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the past I improved the part of -Wunused-packages which found which
packages were used. Now I improve the part which detects which ones were
specified. The key innovation is to use the explicitUnits field from
UnitState which has the result of resolving the package flags, so we
don't need to mess about with the flag arguments from DynFlags anymore.
The output now always includes the package name and version (and the
flag which exposed it).
```
The following packages were specified via -package or -package-id flags,
but were not needed for compilation:
- bytestring-0.11.2.0 (exposed by flag -package bytestring)
- ghc-9.3 (exposed by flag -package ghc)
- process-1.6.13.2 (exposed by flag -package process)
```
Fixes #21307
|
|
|
|
|
| |
Users are supposed to import GHC.Exts rather than GHC.Prim.
Part of #18749.
|
|
|
|
|
|
|
|
| |
With the make build system this file ends up in the compiler/
subdirectory so is linted. With hadrian, the file ends up in _build so
it's not linted.
Fixes #21313
|
|
|
|
|
|
|
|
| |
There have been a few instances where this calculation was incorrect, so
we add a non-terminal assertion when now checks they the two
computations indeed compute the same thing.
Fixes #21285
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a small chance of a race occuring between the small window of
1. The first package (.conf) file get written into the database
2. hadrian calling "ghc-pkg recache" to refresh the package.conf file
In this window the package database would contain rts.conf but not a
package.cache file, and therefore if ghc was invoked it would error
because it was missing.
To solve this we call "ghc-pkg recache" at when the database is created
by shake by writing the stamp file into the database folder. This also
creates the package.cache file and so avoids the possibility of this
race.
|
|
|
|
| |
This has been dead code since 400ead81e80f66ad7b1260b11b2a92f25ccc3e5a.
|
|
|
|
|
|
|
| |
When pretty printing a HsCmdLam with more than one argument, GHC
panicked because of a missing case. This fixes that.
Closes #21300
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zubin observed that the bindists contains the utility library
linters-common. There are two options:
1. Make sure only the right files are added into the bindist.. a bit
tricky due to the non-trivial structure of the lib directory.
2. Remove the bad files once they get copied in.. a bit easier
So I went for option 2 but we perhaps should go for option 1 in the
future.
Fixes #21203
|