| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 wrong as we are only moving the case and its binders. This
resulted in #16978, where the disrepancy caused us to
unnecessarily abstract over some free variables of the case body,
resulting in shadowing and consequently Core Lint failures.
(cherry picked from commit a2a0e6f3bb2d02a9347dec4c7c4f6d4480bc2421)
|
|
|
|
|
| |
This took a bit of trial-and-error to get working so it seems worth
having in the tree.
|
| |
|
|
|
|
|
| |
Some tests depend on the RTS linker. Introduce a modifier to skip such
tests, in case the RTS linker is not available.
|
|
|
|
| |
Otherwise this fails on Windows.
|
|
|
|
|
| |
The Windows build seems to be stricter about not providing threading
primitives in the non-threaded RTS.
|
| |
|
|
|
|
|
| |
I have no idea why I marked this as inline originally but clearly it
shouldn't be inlined.
|
|
|
|
|
|
|
|
|
|
| |
In general this is the convention that we use in the RTS. On Windows
things actually fail if we break it. For instance, you see things like:
includes\stg\Types.h:26:9: error:
warning: #warning "Mismatch between __USE_MINGW_ANSI_STDIO
definitions. If using Rts.h make sure it is the first header
included." [-Wcpp]
|
|
|
|
|
| |
An inconsistency in the name of m32_allocator_flush caused the build to
fail with a missing prototype error.
|
| |
|
|
|
|
|
| |
This should fix the #17108 and #17249 with the fix from
https://github.com/haskell/process/pull/159.
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, Hadrian didn't care about the TEST_ENV and
METRICS_FILE environment variables, that the performance testing
infrastructure uses to record perf tests results from CI jobs.
It now looks them up right before running the testsuite driver,
and passes suitable --test-env/--metrics-file arguments when
these environment variables are set.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If sphinx's python version check failed, many people prefer to build
without documents instead of stopping on the error.
So this commit fixes the following:
* Modify AC_MSG_ERROR to AC_MSG_WARN
* Add clearing of SPHINXBUILD variable when check fails
See also !2016.
|
| |
|
|
|
|
| |
These affect output and therefore should be part of the flag hash.
|
|
|
|
|
| |
For s390x the GHC calling convention is only supported since LLVM
version 10. Issue a warning in case an older version of LLVM is used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
!1906 left some loose ends in regards to Template Haskell's treatment
of unary tuples. This patch ends to tie up those loose ends:
* In addition to having `TupleT 1` produce unary tuples, `TupE [exp]`
and `TupP [pat]` also now produce unary tuples.
* I have added various special cases in GHC's pretty-printers to
ensure that explicit 1-tuples are printed using the `Unit` type.
See `testsuite/tests/th/T17380`.
* The GHC 8.10.1 release notes entry has been tidied up a little.
Fixes #16881. Fixes #17371. Fixes #17380.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This checks the configuration about python3-sphinx.
We need python3-sphinx instead of python2-sphinx to build documentation.
The approach is as follows:
* Check python3 version with custom `conf.py` invoked from
sphinx-build` executable
* Place custom `conf.py` into new `utils/check-sphinx` directory
If sphinx is for python2 not python3, it's treated as config ERROR
instead of WARN.
See also #17346 and #17356.
|
|
|
|
| |
Fixing #17255.
|
|
|
|
| |
These are now handled in the cabal file's include-dirs field.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can handle non-void constraints since !1733, so we can now express
the strictness of `-XEmptyCase` just by adding a non-void constraint
to the initial Uncovered set.
For `case x of {}` we thus check that the Uncovered set `{ x | x /~ ⊥ }`
is non-empty. This is conceptually simpler than the plan outlined in
#17376, because it talks to the oracle directly.
In order for this patch to pass the testsuite, I had to fix handling of
newtypes in the pattern-match checker (#17248).
Since we use a different code path (well, the main code path) for
`-XEmptyCase` now, we apparently also handle #13717 correctly.
There's also some dead code that we can get rid off now.
`provideEvidence` has been updated to provide output more in line with
the old logic, which used `inhabitationCandidates` under the hood.
A consequence of the shift away from the `UncoveredPatterns` type is
that we don't report reduced type families for empty case matches,
because the pretty printer is pure and only knows the match variable's
type.
Fixes #13717, #17248, #17386
|
|
|
|
|
|
|
|
|
|
| |
The RTS linker is not available on 64-bit PowerPC. Instead of
marking tests that require the RTS linker as broken on PowerPC
64-bit skip the respective tests on all platforms where the
RTS linker or a statically linked external interpreter is not
available.
Fixes #11259
|
|
|
|
|
| |
This was previously unnoticed as this code-path is hit on very few
platforms (e.g. OpenBSD).
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the description of CPP extension is given in the section of
command-line options.
Therefore, it is a little difficult to understand that it is a language
extension.
This commit explicitly adds a description for it.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For many years the linker would simply map all of its memory with
PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been
becoming increasingly reluctant to accept this practice (e.g. #17353
and #12657) and for good reason: writable code is ripe for exploitation.
Consequently mmapForLinker now maps its memory with
PROT_READ|PROT_WRITE. After the linker has finished filling/relocating
the mapping it must then call mmapForLinkerMarkExecutable on the
sections of the mapping which contain executable code.
Moreover, to make all of this possible it was necessary to redesign the
m32 allocator. First, we gave (in an earlier commit) each ObjectCode its
own m32_allocator. This was necessary since code loading and symbol
resolution/relocation are currently interleaved, meaning that it is not
possible to enforce W^X when symbols from different objects reside in
the same page.
We then redesigned the m32 allocator to take advantage of the fact that
all of the pages allocated with the allocator die at the same time
(namely, when the owning ObjectCode is unloaded). This makes a number of
things simpler (e.g. no more page reference counting; the interface
provided by the allocator for freeing is simpler). See
Note [M32 Allocator] for details.
|
| |
|
|
|
|
|
|
|
|
|
| |
Issue #1110 was apparently due to a bug in Vista which prevented GCC
from finding its binaries unless we explicitly added it to PATH.
However, this workaround was incorrectly applied on non-Windows
platforms as well, resulting in ill-formed PATHs (#17266).
Fixes #17266.
|
|
|
|
| |
Follow-on from !2041.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the Trees That Grow effort started, we had `type LPat = Pat`.
This is so that `SrcLoc`s would only be annotated in GHC's AST, which is
the reason why all GHC passes use the extension constructor `XPat` to
attach source locations. See #15495 for the design discussion behind
that.
But now suddenly there are `XPat`s everywhere!
There are several functions which dont't cope with `XPat`s by either
crashing (`hsPatType`) or simply returning incorrect results
(`collectEvVarsPat`).
This issue was raised in #17330. I also came up with a rather clean and
type-safe solution to the problem: We define
```haskell
type family XRec p (f :: * -> *) = r | r -> p f
type instance XRec (GhcPass p) f = Located (f (GhcPass p))
type instance XRec TH f = f p
type LPat p = XRec p Pat
```
This is a rather modular embedding of the old "ping-pong" style, while
we only pay for the `Located` wrapper within GHC. No ping-ponging in
a potential Template Haskell AST, for example. Yet, we miss no case
where we should've handled a `SrcLoc`: `hsPatType` and
`collectEvVarsPat` are not callable at an `LPat`.
Also, this gets rid of one indirection in `Located` variants:
Previously, we'd have to go through `XPat` and `Located` to get from
`LPat` to the wrapped `Pat`. Now it's just `Located` again.
Thus we fix #17330.
|
|
|
|
|
|
| |
Sets `MiscFlags.disableDelayedOsMemoryReturn`.
See the added `Note [MADV_FREE and MADV_DONTNEED]` for details.
|
| |
|
|
|
|
|
|
|
|
|
| |
CSE delays inlining a little bit, to avoid losing vital
specialisations; see Note [Delay inlining after CSE] in CSE.
But it was being over-enthusiastic. This patch makes the
delay only apply to Ids with specialisation rules, which
avoids unnecessary delay (#17409).
|
| |
|
|
|
|
|
| |
Use True/False instead of 0/1. This shouldn't be a functional change but
we should be consistent.
|
| |
|
|
|
|
| |
As described in #16588.
|
|
|
|
| |
Previously the test relied on `id` not inlining. Fix this.
|
|
|
|
|
|
|
|
|
| |
failIO has useful information in its demand signature (specifically that
it bottoms) which is hidden if it is SOURCE imported, as noted
in #16588. Rejigger things such that we don't SOURCE import it.
Metric Increase:
T13701
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes #17395, a very subtle and hard-to-trigger
bug in tcMatchTy. It's all explained in
Note [Matching in the presence of casts (2)]
I have not added a regression test because it is very hard
to trigger it, until we have the upcoming mkAppTyM patch,
after which lacking this patch means you can't even compile
the libraries.
|
|
|
|
| |
This one came in a comment from James Payor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I found in #17415 that Lint was printing out truly gigantic
warnings, unmanageably huge, with repeated copies of the
same thing.
This patch makes Lint less chatty, especially for warnings:
* For **warnings**, I don't print details of the location,
unless you add `-dppr-debug`.
* For **errors**, I still print all the info. They are fatal
and stop exection, whereas warnings appear repeatedly.
* I've made much less use of `AnExpr` in `LintLocInfo`;
the expression can be gigantic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacOS Catalina is finally going to force our hand in forbidden writable
exeutable mappings. Unfortunately, this is quite incompatible with the
current global m32 allocator, which mixes symbols from various objects
in a single page. The problem here is that some of these symbols may not
yet be resolved (e.g. had relocations performed) as this happens lazily
(and therefore we can't yet make the section read-only and therefore
executable).
The easiest way around this is to simply create one m32 allocator per
ObjectCode. This may slightly increase fragmentation for short-running
programs but I suspect will actually improve fragmentation for programs
doing lots of loading/unloading since we can always free all of the
pages allocated to an object when it is unloaded (although this ability
will only be implemented in a later patch).
|
| |
|
| |
|