| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic reason is that is the modular thing to do: where there is one
canonical predecessor stage, there are be many possible successor
stages. It would be arbitrary to just name the newly built GHC after one
of them.
That means we have:
- distdirs decremented: `stage0`, `stage1`, and `stage2`
- prog names decremented: `ghc-stage0`, `ghc-stage1`, `ghc-stage2`
- `Stage1Only` -> `Stage0Only`
- in the test suite, `STAGE<N+>` to `STAGE<N>`
However, `GHC_STAGE0` already meant the GHC used for stage1 -- there was
no missing 0 so we could decrement losslessly. We instead named
`GHC_STAGE<N>` `HC_STAGE<N>` to match `CC_STAGE<N>` and friends (which
are similarly abstractly named) because they are all morally parameters,
not results, and added a comment explaining.
This is very hard to review, but one thing that might help is the fish
one-liner:
```fish
git diff (for x in HEAD^ HEAD; git grep 'stage[0123]' $x | sed -E 's/^HEAD\^?://' | psub; end)
```
|
|
|
|
|
| |
As GHC has become target agnostic, we've left behind some now-useless
logic in both build systems.
|
|
|
|
|
|
| |
These dirs should not be included in all stages. Instead make the
per-stage `BUILD_*_INCLUDE_DIR` "plural" to insert `rts/include` in the
right place.
|
|
|
|
| |
This allows us to clean up the rts include dirs in the package conf.
|
| |
|
|
|
|
|
|
|
| |
Before we were violating the convention of every other package. This
fixes that. It matches the changes made in
d5de970dafd5876ef30601697576167f56b9c132 to the location of the files in
the repo.
|
|
|
|
|
| |
This shouldn't be here. It wasn't causing a problem because this header
was only used from Haskell, but still.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is, rather unintuitively, part of the goal of making the packages
that make of the GHC distribution more freestanding. `ghcversion.h` is
very simple, so we easily can move it out of the main build systems
(make and Hadrian). By doing so, the RTS becomes less of a special case
to those build systems as the header, already existing in the source
tree, appears like any other.
We could do this with the upcomming RTS configure, but it hardly matters
because there is nothing platform-specific here, it is just versioning
information like the other files the top-level configure can be
responsible for.
|
|
|
|
|
|
|
| |
This was accidentally added back in
28334b475a109bdeb8d53d58c48adb1690e2c9b4 after it is was no longer
needed by the compiler proper in
20956e5784fe43781d156dd7ab02f0bff4ab41fb.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Addresses #20623 by allowing draft MRs to fail linting jobs.
|
|
|
|
|
| |
This was a simple (but long standing) error in simplArg,
revealed by #20639
|
|
|
|
| |
/usr/bin/env doesn't work within a nix build.
|
|
|
|
|
|
|
|
|
|
| |
In accordance with GHC Proposal #281 "Visible forall in types of terms":
For three releases before this change takes place, include a new
warning -Wforall-identifier in -Wdefault. This warning will be triggered
at definition sites (but not use sites) of forall as an identifier.
Updates the haddock submodule.
|
|
|
|
|
|
|
|
|
|
| |
See new Note [Use only the best local instance] in
GHC.Tc.Solver.Interact.
This commit also refactors the InstSC/OtherSC mechanism
slightly.
Close #20582.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we reported things wrong with
f :: (Eq a, Ord a) => a -> Bool
f x = x == x
saying that Eq a was redundant. This is fixed now, along with
some simplification in Note [Replacement vs keeping]. There's
a tiny bit of extra complexity in setImplicationStatus, but
it's explained in Note [Tracking redundant constraints].
Close #20602
|
|
|
|
|
| |
GHC should get everything it needs from the RTS, which for stage0 is the
"old" RTS that comes from the bootstrap compiler.
|
| |
|
|
|
|
| |
Fixes #20598, which is mostly a duplicate of #18824 but for GHC 9.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, these flags were passed when both compiling and linking
code. However, `-pie` and `-no-pie` are link-time-only options. Usually,
this does not cause issues, but when using Clang with `-Werror` set
results in errors:
clang: error: argument unused during compilation: '-nopie' [-Werror,-Wunused-command-line-argument]
This is unused by Clang because this flag has no effect at compile time
(it’s called `-nopie` internally by Clang but called `-no-pie` in GHC
for compatibility with GCC). Just passing these flags at linking time
resolves this.
Additionally, update #15319 hack to look for `-pgml` instead.
Because of the main change, the value of `-pgmc` does not matter when
checking for the workaround of #15319. However, `-pgml` *does* still
matter as not all `-pgml` values support `-no-pie`.
To cover all potential values, we assume that no custom `-pgml` values
support `-no-pie`. This means that we run the risk of not using
`-no-pie` when it is otherwise necessary for in auto-hardened
toolchains! This could be a problem at some point, but this workaround
was already introduced in 8d008b71 and we might as well continue
supporting it.
Likewise, mark `-pgmc-supports-no-pie` as deprecated and create a new
`-pgml-supports-no-pie`.
|
|
|
|
|
|
|
|
|
|
| |
This saves a lot of repeated work on big dependency graphs.
-------------------------
Metric Decrease:
MultiLayerModules
T13719
-------------------------
|
|
|
|
|
|
|
|
| |
Two reasons for this change:
1. Avoid computing the transitive dependencies when compiling each
module, this can save a lot of repeated work.
2. More robust to forthcoming changes to support multiple home units.
|
|
|
|
| |
Fixes #20621
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user guide wrongly stated that default methods should not
be included in hs-boot files. In fact, if the class is not left
abstract (no methods, no superclass constraints, ...) then the
defaults must be provided and match with those given in the .hs
file.
We add some tests for this, as there were no tests in the testsuite
that gave rise to the "missing default methods" error.
Fixes #20588
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename the function f4 to h1 for consistency with
the naming convention
- be more explicit about the difference between
`Int -> (forall a. a -> a)`
and
`forall a. Int -> (a -> a)`
- reorder the section to make it flow better
Fixes #20585
|
|
|
|
| |
Close #19938.
|
|
|
|
|
|
|
|
| |
- Fix cut/paste error by adding missing `c` pattern in `Vec3`
traversable instance.
- Add a bit of contextual prose above the Vec2/Vec3 instance
sample code.
|
| |
|
|
|
|
|
|
| |
`Note [The stupid context]` in `GHC.Core.DataCon` talks about stupid contexts
from `DatatypeContexts`, but prior to this commit, it was rather outdated.
This commit spruces it up and references it from places where it is relevant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, derived instances that use `deriving` clauses would infer
`DatatypeContexts` by using `tyConStupidTheta`. But this sometimes causes
redundant constraints to be included in the derived instance contexts, as the
constraints that appear in the `tyConStupidTheta` may not actually appear in
the types of the data constructors (i.e., the `dataConStupidTheta`s). For
instance, in `data Show a => T a = MkT deriving Eq`, the type of `MkT` does
not require `Show`, so the derived `Eq` instance should not require `Show`
either. This patch makes it so with some small tweaks to
`inferConstraintsStock`.
Fixes #20501.
|
| |
|
|
|
|
|
|
|
| |
GHC is bignum backend agnostic and shouldn't report this information as
in the future ghc-bignum will be reinstallable potentially with a
different backend that GHC is unaware of. Moreover as #20495 shows the
returned information may be wrong currently.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should still default kind variables in type families
in the presence of -XNoPolyKinds, to avoid suggesting enabling
-XPolyKinds just because the function arrow introduced kind variables,
e.g.
type family F (t :: Type) :: Type where
F (a -> b) = b
With -XNoPolyKinds, we should still default `r :: RuntimeRep`
in `a :: TYPE r`.
Fixes #20584
|
|
|
|
|
|
|
|
|
|
|
| |
Although I thought we were already set to handle unlifted datatypes correctly,
it appears we weren't. #20631 showed that it's wrong to assume
`vi_bot=IsNotBot` for `VarInfo`s of unlifted types from their inception if we
don't follow up with an inhabitation test to see if there are any habitable
constructors left. We can't trigger the test from `emptyVarInfo`, so now we
instead fail early in `addBotCt` for variables of unlifted types.
Fixed #20631.
|
|
|
|
| |
These will be useful for upcoming RTS configure script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Type kind is printed unqualified:
ghci> :set -XNoStarIsType
ghci> :k (->)
(->) :: Type -> Type -> Type
This is the desired behavior unless the user has defined
their own Type:
ghci> data Type
Then we want to resolve the ambiguity by qualification:
ghci> :k (->)
(->) :: GHC.Types.Type -> GHC.Types.Type -> GHC.Types.Type
|
|
|
|
|
|
|
|
| |
In #20599 I ran into an issue where the unfolding for a join point was
eta-reduced removing the required lambdas.
This patch adds guards that should prevent this from happening going
forward.
|
|
|
|
|
|
| |
* No more need for InlineHdkM, mkHdkM
* unHdkM is now just a record selector
* Update comments
|
|
|
|
| |
GHC produced broken executables with rebindable if and -fhpc if `ifThenElse` expected non-Bool condition until GHC 9.0. This adds a simple regression test.
|
|
|
|
|
|
|
|
| |
Performance improvement:
T15185(normal) run/alloc 51112.0 41032.0 -19.7% GOOD
Metric Decrease:
T15185
|