| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Else build fails with:
In file included from ExecutablePath.hsc:42:
/usr/include/sys/sysctl.h:1062:25: error: unknown type name 'u_int'; did you mean 'int'?
int sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
^~~~~
int
compiling libraries/base/dist-install/build/System/Environment/ExecutablePath_hsc_make.c failed (exit code 1)
Perhaps also also other FreeBSD releases, but additional include
will no harm even if not needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #16418 showed that we were carrying on too eagerly after a bogus
type signature was identified (a bad telescope in fact), leading to a
subsequent crash.
This led me in to a maze of twisty little passages in the typechecker's
error recovery, and I ended up doing some refactoring in TcRnMonad.
Some specfifics
* TcRnMonad.try_m is now called attemptM.
* I switched the order of the result pair in tryTc,
to make it consistent with other similar functions.
* The actual exception used in the Tc monad is irrelevant so,
to avoid polluting type signatures, I made tcTryM, a simple
wrapper around tryM, and used it.
The more important changes are in
* TcSimplify.captureTopConstraints, where we should have been calling
simplifyTop rather than reportUnsolved, so that levity defaulting
takes place properly.
* TcUnify.emitResidualTvConstraint, where we need to set the correct
status for a new implication constraint. (Previously we ended up
with an Insoluble constraint wrapped in an Unsolved implication,
which meant that insolubleWC gave the wrong answer.
(cherry picked from commit 4927117cd6166a97455d788dbf7433c95441b57a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `mkOneConFull` function of the pattern match checker used to try to
guess the type arguments of the data type's type constructor by looking
at the ambient type of the match. This doesn't work well for Pattern
Synonyms, where the result type isn't even necessarily a TyCon
application, and it shows in #11336 and #17112.
Also the effort seems futile; why try to try hard when the type checker
has already done the hard lifting? After this patch, we instead supply
the type constructors arguments as an argument to the function and
lean on the type-annotated AST.
(cherry picked from commit a308b435afed0f2416f4e5a153cafebe8d3cf3c6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch disables the binder-swap transformation in the
(relatively rare) case when the scrutinee is a GlobalId.
Reason: we are getting Lint errors so that GHC doesn't
even validate. Trac #16346.
This is NOT the final solution -- it's just a stop-gap
to get us running again.
The final solution is in Trac #16296
(cherry picked from commit 0eb7cf03da3783ca887d5de44d312cf6f3a4113c)
|
|
|
|
|
|
|
| |
We were using `pprIfaceAppArgs` instead of `pprParendIfaceAppArgs`
in `pprIfaceConDecl`. Oops.
Fixes #17384.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`TcSplice` was not properly handling oversaturated data family
instances, such as the example in #17296, as it dropped arguments due
to carelessly zipping data family instance arguments with
`tyConTyVars`. For data families, the number of `tyConTyVars` can
sometimes be less than the number of arguments it can accept in a
data family instance due to the fact that data family instances can
be oversaturated.
To account for this, `TcSplice.mkIsPolyTvs` has now been renamed to
`tyConArgsPolyKinded` and now factors in `tyConResKind` in addition
to `tyConTyVars`. I've also added
`Note [Reified instances and explicit kind signatures]` which
explains the various subtleties in play here.
Fixes #17296.
(cherry picked from commit e3636a688fe11a9a171c55416a507e7c520299ef)
|
|
|
|
| |
(cherry picked from commit e88e083d62389d5c8d082a25395a3d933ab2f03b)
|
|
|
|
|
|
|
|
|
| |
Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both
are found.
Fixes #16990.
(cherry picked from commit 90bf11c6519783a7d686d02e1fc6f6f50298b850)
|
|
|
|
| |
(cherry picked from commit f1d0e49f8a9a9175c83442430fac76ae225e52ae)
|
|
|
|
| |
(cherry picked from commit 993804bf40dea77c36f50ff772d112ec69c8a222)
|
|
|
|
|
|
|
|
|
|
| |
The old test was wrong at least for gcc and the value -2287728808L.
It also relied on implementation defined behaviour (right shift
on a negative value), which might or might not be ok.
Either way it's now a simple comparison which will always work.
(cherry picked from commit abfbdff2b1d8c8baecb457cbf8bf6e2016c276ec)
|
|
|
|
|
|
|
|
| |
This fixes #16860 by verifying that the generated sources don't already
exist before asserting that the `alex` executable was found. This
replicates the logic already used for `happy` in the case of `alex`.
(cherry picked from commit 68dc96a00cc1f4d4d0d5f6520b0ce8f5c240b752)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocateForCompact() is called when nursery of a compact region is
full, to add new blocks to the compact. New blocks added to an existing
region needs a StgCompactNFDataBlock header, not a StgCompactNFData.
This fixes allocateForCompact() so that it now correctly allocates space
for StgCompactNFDataBlock instead of StgCompactNFData as before.
Fixes #17044.
A regression test T17044 added.
(cherry picked from commit 981d3b9ecf0397744df9e1cbfdc805d1f9c29ef0)
|
|
|
|
|
|
|
|
|
| |
This modifies both the Hadrian and make build systems to avoid included
the rts.cabal generated by autoconf in the source distribution.
Fixes #17265.
(cherry picked from commit e81d4bc7d1cea52b81f20d8eef6b5d1b14570230)
|
|
|
|
|
|
|
| |
It may not exist if the source tarball was extracted yet not the
testsuite tarball.
(cherry picked from commit 624eb0fca63e49694e93df37a616d2162b8ded13)
|
|
|
|
|
|
|
|
|
|
| |
Previously due to a silly implementation bug CNFs would never have their
dirty flag set, resulting in their being added again and again to the
`mut_list`. Fix this.
Fixes #17297.
(cherry picked from commit ba27fe740d4b141d2a2fa209f98a0946cb80f379)
|
|
|
|
|
|
|
|
|
| |
Function createIOThread expects its second argument to be of size word.
The natural size of the second parameter is 32bits. Thus for some 64bit
architectures, where a write of the lower half of a register does not
clear the upper half, the value must be zero extended.
(cherry picked from commit d0924b153b093a925c9e721f2540f3dfd6c278ae)
|
|
|
|
|
|
| |
These are needed by the user guide documentation. Fixes #17260.
(cherry picked from commit 0c53d0aa87d884707f77beea4f42b59d056116ea)
|
|
|
|
|
|
|
| |
If a main module doesn't contain a header, we omit the check whether the main module is exported.
With this patch GHC, GHCi and runghc use the same code.
(cherry picked from commit 93f02b6223b8fc4d85ece389ac0520ee9cc20f2f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #17355 occurred because the control flow for
`TcValidity.check_valid_inst_head` was structured in such a way that
whenever it checked a special, built-in class (like `Generic` or
`HasField`), it would skip the most important check of all:
`checkValidTypePats`, which rejects nonsense like this:
```hs
instance Generic (forall a. a)
```
This fixes the issue by carving out `checkValidTypePats` from
`check_valid_inst_head` so that `checkValidTypePats` is always
invoked. `check_valid_inst_head` has also been renamed to
`check_special_inst_head` to reflect its new purpose of _only_
checking for instances headed by special classes.
Fixes #17355.
(cherry picked from commit f375e3fb060653beb12b05b48ac0fd3f88eb2f45)
|
|
|
|
| |
(cherry picked from commit 8b578e72949f1a3fa398be2f1d37977b3747fa62)
|
|
|
|
|
|
|
|
|
|
| |
Previously partial roll back of a branch of an `orElse` was attempted
if validation failure was observed. Validation here, however, does
not account for what part of the transaction observed inconsistent
state. This commit fixes this by fully aborting and restarting the
transaction.
(cherry picked from commit 998f2e18ec1a23c987142551f751b3e0f8431970)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the make build system would pass things like
`-optl-optl-Wl,-x -optl-optl-Wl,noexecstack` to GHC. This would
naturally result in mass confusion as GHC would pass `-optl-Wl,-x` to
GCC. GCC would in turn interpret this as `-o ptl-Wl,-x`, setting the
output pass of the invocation.
The problem that `-optl` was added to the command-line in two places in
the build system. Fix this.
Fixes #17385.
(cherry picked from commit 2d12d59ec989d0f174f5f15e0a92cb1a9cc017e4)
|
|
|
|
|
|
|
|
| |
Unfortunately this was introduced in base-4.11.0 (GHC 8.4.1)
whereas the other locking primitives were added in base-4.10.0 (GHC
8.2.1).
(cherry picked from commit 3ad35f766e6869087c97a5c8129ab06ddf1856d4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`:steplocal` enables only breakpoints in the current top-level binding.
When a normal breakpoint is hit, then the module name and the break id from the `BRK_FUN` byte code
allow us to access the corresponding entry in a ModBreak table. From this entry we then get the SrcSpan
(see compiler/main/InteractiveEval.hs:bindLocalsAtBreakpoint).
With this source-span we can then determine the current top-level binding, needed for the steplocal command.
However, if we break at an exception or at an error, we don't have an BRK_FUN byte-code, so we don't have any source information.
The function `bindLocalsAtBreakpoint` creates an `UnhelpfulSpan`, which doesn't allow us to determine the current top-level binding.
To avoid a `panic`, we have to check for `UnhelpfulSpan` in the function `ghc/GHCi/UI.hs:stepLocalCmd`.
Hence a :steplocal command after a break-on-exception or a break-on-error is not possible.
(cherry picked from commit 1be9c35c940e9a1edbb44a0e7dd51b48529ffb9b)
|
|
|
|
| |
(cherry picked from commit 1ce3d98213902ccb483d5c5f426484e0d7be0245)
|
|
|
|
|
|
|
| |
As reported in #17414, Darwin throws EINVAL in response to large
writes.
(cherry picked from commit 08810f123eb3b49bcfb3dd1d46284ec9d53d2612)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two problems with LLVM version checking:
- The parser would only parse x and x.y formatted versions. E.g. 1.2.3
would be rejected.
- The version check was too strict and would reject x.y formatted
versions. E.g. when we support version 7 it'd reject 7.0 ("LLVM
version 7.0") and only accept 7 ("LLVM version 7").
We now parse versions with arbitrarily deep minor numbering (x.y.z.t...)
and accept versions as long as the major version matches the supported
version (e.g. 7.1, 7.1.2, 7.1.2.3 ...).
(cherry picked from commit bf9dfe1ca32270f5e946e0f8ac1bb97184de6e4c)
|
|
|
|
| |
(cherry picked from commit 68ddb43c44065d0d3a8a6893f7f8e87f15ee9c1e)
|
|
|
|
|
|
|
|
| |
As described in #16387, this is already defined by mingw and
consequently defining it in the RTS as well leads to multiple definition
errors from the RTS linker at runtime.
(cherry picked from commit ae382245ea65bf8824db7f4dbab5ade78e6ed9dd)
|
|
|
|
|
|
|
| |
This was inadvertently referring to the cabal-install-latest/ directory
which is volatile.
(cherry picked from commit fc746e98d8ee7ac22224ba7d7fd1c38e16dfad30)
|
| |
|
|
|
|
| |
This was inadvertently reverted in 0bce423c016a02a0e384378eb729ffeb79df005b
|
| |
|
|
|
|
| |
Ensures that #15934 doesn't break the 32-bit Windows release build.
|
| |
|
|
|
|
|
|
|
| |
For reasons I don't understand sphinx seems to fail to produce a .idx
file for makeindex.
(cherry picked from commit 9721b40db9b87c0135613649f9f1e129eb49795b)
|
| |
|
|
|
|
|
|
| |
When floating a single-alternative case we previously would set the
context level to the level where we were floating the case. However,
this is not what FloatOut did: it rather left
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is important that `heapCensus` and `LdvCensusForDead` traverse the
same areas.
`heapCensus` increases the `not_used` counter which tracks how many
closures are live but haven't been used yet.
`LdvCensusForDead` increases the `void_total` counter which tracks how
many dead closures there are.
The `LAG` is then calculated by substracting the `void_total` from
`not_used` and so it is essential that `not_used >= void_total`. This
fact is checked by quite a few assertions.
However, if a program has low maximum residency but allocates a lot in
the nursery then these assertions were failing (see #16753 and #15903)
because `LdvCensusForDead` was observing dead closures from the nursery
which totalled more than the `not_used`. The same closures were not
counted by `heapCensus`.
Therefore, it seems that the correct fix is to make `LdvCensusForDead`
agree with `heapCensus` and not traverse the nursery for dead closures.
Fixes #16100 #16753 #15903 #8982
(cherry picked from commit 1dc61c1ae7b80822612844d760eaebe6eb1f0ed4)
|
|
|
|
|
|
|
| |
It is possible that void_total is exactly equal to not_used and the
other assertions for this check for <= rather than <.
(cherry picked from commit a196d9c391aa488d58fb3d787637c6c0402958cb)
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the correct fix for #11627 by skipping over the slop
(which is zeroed) rather than adding special case logic for LARGE
ARR_WORDS which runs the risk of not performing a correct census by
ignoring any subsequent blocks.
This approach implements similar logic to that in Sanity.c
(cherry picked from commit 808a87ff9be4d92d3124c7d70104f6a339880021)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The simple optimiser was making an invalid transformation
to join points -- yikes. The fix is easy.
I also added some documentation about the fact that GHC uses
a slightly more restrictive version of join points than does
the paper.
Fix #16918
(cherry picked from commit d2e290d3280841647354ddf5ca9abdd974bce0d5)
|
|
|
|
|
|
|
|
| |
When `join_ids` is empty `extendVarSetList existing_joins join_ids` is
already no-op, so no need to check whether `join_ids` is empty or not
before extending the joins set.
(cherry picked from commit 897a59a5c0a08985ddccf00a4961cc2d080324e8)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
For some reason configure seems unable to find it on its own. Let's try
giving it a hint.
Addresses #16398.
(cherry picked from commit 7e404afd7c923bf275093c7fa1b278d484cfdd82)
|