summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* testsuite: Run tests in nonmoving_thr in speed==slowBen Gamari2019-11-081-0/+2
|
* SetLevels: Don't set context level when floating casesBen Gamari2019-11-084-5/+53
| | | | | | | | | | | 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)
* hadrian: Add enableTickyGhc helperBen Gamari2019-11-081-1/+12
| | | | | This took a bit of trial-and-error to get working so it seems worth having in the tree.
* Set correct length of DWARF .debug_aranges section (fixes #17428)Szymon Nowicki-Korgol2019-11-081-1/+2
|
* Testsuite: Introduce req_rts_linkerStefan Schulze Frielinghaus2019-11-0816-37/+38
| | | | | Some tests depend on the RTS linker. Introduce a modifier to skip such tests, in case the RTS linker is not available.
* users_guide: Set flags list file encodingBen Gamari2019-11-071-1/+1
| | | | Otherwise this fails on Windows.
* rts/NonMoving: Fix various Windows build issuesBen Gamari2019-11-072-5/+6
| | | | | The Windows build seems to be stricter about not providing threading primitives in the non-threaded RTS.
* base: Add missing imports in Windows locking implementationBen Gamari2019-11-071-0/+3
|
* rts: Remove undesireable inline specifierBen Gamari2019-11-071-1/+1
| | | | | I have no idea why I marked this as inline originally but clearly it shouldn't be inlined.
* rts: Ensure that Rts.h is always included firstBen Gamari2019-11-077-6/+18
| | | | | | | | | | 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]
* rts: Fix m32 allocator build on WindowsBen Gamari2019-11-073-5/+9
| | | | | An inconsistency in the name of m32_allocator_flush caused the build to fail with a missing prototype error.
* Bump hsc2hs submoduleBen Gamari2019-11-071-0/+0
|
* Bump the process submoduleBen Gamari2019-11-071-0/+0
| | | | | This should fix the #17108 and #17249 with the fix from https://github.com/haskell/process/pull/159.
* hadrian: fix support for the recording of perf test resultsAlp Mestanogullari2019-11-072-3/+19
| | | | | | | | | | 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.
* configure: Modify ERROR to WARN for sphinx's python checkTakenobu Tani2019-11-071-1/+2
| | | | | | | | | | | | 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.
* Bump libffi-tarballs submoduleStefan Schulze Frielinghaus2019-11-071-0/+0
|
* FlagChecker: Add ticky flags to hashed flagsBen Gamari2019-11-071-1/+5
| | | | These affect output and therefore should be part of the flag hash.
* For s390x issue a warning if LLVM 9 or older is usedStefan Schulze Frielinghaus2019-11-071-0/+6
| | | | | 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.
* Clean up TH's treatment of unary tuples (or, #16881 part two)Ryan Scott2019-11-0720-76/+210
| | | | | | | | | | | | | | !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.
* Adding examples to Semigroup/monoidDan Brooks2019-11-062-0/+21
|
* configure: Add checking python3-sphinxTakenobu Tani2019-11-064-0/+37
| | | | | | | | | | | | | | | 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.
* configure: Add --with-libdw-{includes,libraries} flagsBen Gamari2019-11-0610-4/+62
| | | | Fixing #17255.
* rts: Drop redundant flags for libffiBen Gamari2019-11-061-8/+3
| | | | These are now handled in the cabal file's include-dirs field.
* Hadrian: enable interpreter for s390xStefan Schulze Frielinghaus2019-11-051-1/+1
|
* CoreTidy: hide tidyRuleÖmer Sinan Ağacan2019-11-051-1/+1
|
* TidyPgm: replace an explicit loop with mapAccumLÖmer Sinan Ağacan2019-11-051-7/+2
|
* Check EmptyCase by simply adding a non-void constraintSebastian Graf2019-11-0530-334/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* testsuite: skip test requiring RTS linker on PowerPCPeter Trommler2019-11-0513-31/+21
| | | | | | | | | | 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
* rts: Add missing const in HEAP_ALLOCED_GCBen Gamari2019-11-051-1/+1
| | | | | This was previously unnoticed as this code-path is hit on very few platforms (e.g. OpenBSD).
* users-guide: Improve documentaion of CPP extensionTakenobu Tani2019-11-051-2/+15
| | | | | | | | | | | 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]
* rts/linker: Ensure that code isn't writableBen Gamari2019-11-049-289/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Rephrase note on full-lazinessLeif Metcalf2019-11-041-7/+6
|
* SysTools: Only apply Windows-specific workaround on WindowsBen Gamari2019-11-041-1/+7
| | | | | | | | | 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.
* Update Note references -- comments onlyRichard Eisenberg2019-11-021-2/+2
| | | | Follow-on from !2041.
* Separate `LPat` from `Pat` on the type-levelSebastian Graf2019-11-0212-77/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add +RTS --disable-delayed-os-memory-return. Fixes #17411.Niklas Hambüchen2019-11-015-13/+74
| | | | | | Sets `MiscFlags.disableDelayedOsMemoryReturn`. See the added `Note [MADV_FREE and MADV_DONTNEED]` for details.
* doc: Fix backticksNiklas Hambüchen2019-11-011-1/+1
|
* Make CSE delay inlining lessSimon Peyton Jones2019-11-018-12/+72
| | | | | | | | | 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).
* testsuite: Add test for #17423Ben Gamari2019-11-012-0/+38
|
* hadrian: Make runtest invocation consistency with MakeBen Gamari2019-11-011-8/+9
| | | | | Use True/False instead of 0/1. This shouldn't be a functional change but we should be consistent.
* template-haskell: require at least 1 GADT constructor name (#17379)Adam Sandberg Eriksson2019-11-016-0/+32
|
* Describe optimisation of demand analysis of noinlineBen Gamari2019-11-011-0/+8
| | | | As described in #16588.
* testsuite: Make ExplicitForAllRules1 more robustBen Gamari2019-11-012-11/+15
| | | | Previously the test relied on `id` not inlining. Fix this.
* base: Ensure that failIO isn't SOURCE importedBen Gamari2019-11-014-9/+18
| | | | | | | | | 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
* Fix a bad error in tcMatchTySimon Peyton Jones2019-11-011-4/+28
| | | | | | | | | | | 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.
* Add another test for #17267Simon Peyton Jones2019-11-013-0/+41
| | | | This one came in a comment from James Payor
* Makes Lint less chatty:Simon Peyton Jones2019-11-011-11/+13
| | | | | | | | | | | | | | | | | 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.
* rts: Make m32 allocator per-ObjectCodeBen Gamari2019-11-017-53/+83
| | | | | | | | | | | | | | | | | 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).
* mmap: Factor out protection flagsBen Gamari2019-11-011-4/+3
|
* Fix running of ratio test casetaylorfausak2019-11-011-1/+1
|