summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump unix submodulewip/test-nonmovingBen Gamari2019-11-071-0/+0
| | | | Marks executeFile001 as broken in all concurrent ways.
* rts/nonmoving: Catch failure of createOSThreadBen Gamari2019-11-071-2/+4
|
* testsuite: Run tests in nonmoving_thr in speed==slowBen Gamari2019-11-061-0/+2
|
* 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
|
* Add tests for rounding ratiostaylorfausak2019-11-012-0/+42
|
* Fix rounding around 0taylorfausak2019-11-011-6/+9
|
* Implement `round` for `Ratio` that doesn't explode with `Natural`staylorfausak2019-11-011-0/+7
|
* base: Various haddock fixesBen Gamari2019-10-312-5/+5
| | | | Just a few things I found while looking at #17383.
* testsuite: Add test for #17414Ben Gamari2019-10-312-0/+20
|
* base: Clamp IO operation size to 2GB on DarwinBen Gamari2019-10-311-4/+17
| | | | | As reported in #17414, Darwin throws EINVAL in response to large writes.
* Remove redundant 0s in ghc-heap pointer stringsÖmer Sinan Ağacan2019-10-311-3/+1
| | | | | | | | | Before: 0x0000004200c86888 After: 0x42000224f8 This is more concise and consistent with the RTS's printer (which uses %p formatter, and at least on Linux gcc prints the short form) and gdb's pointer formatter.
* gitlab-ci: Fix the ARMv7 tripleBen Gamari2019-10-301-1/+1
| | | | | | | | | | Previously we were configuring the ARMv7 builds with a host/target triple of arm-linux-gnueabihf, which caused us to target ARMv6 and consequently rely on the old CP15 memory barrier implementation. This barrier has to be emulated on ARMv8 machines which is glacially slow. Hopefully this should fix the ARMv7 builds which currently consistently time out.
* Whitespace forward compatibility for proposal #229Vladislav Zavialov2019-10-3016-47/+27
| | | | | | | | GHC Proposal #229 changes the lexical rules of Haskell, which may require slight whitespace adjustments in certain cases. This patch changes formatting in a few places in GHC and its testsuite in a way that enables it to compile under the proposed rules.
* rts: More aarch64 header fixesBen Gamari2019-10-305-7/+10
|
* Interpreter: initialize arity fields of AP_NOUPDsÖmer Sinan Ağacan2019-10-291-4/+4
| | | | | | AP_NOUPD entry code doesn't use the arity field, but not initializing this field confuses printers/debuggers, and also makes testing harder as the field's value changes randomly.
* gitlab-ci: Fix binary distribution testingBen Gamari2019-10-291-20/+20
|
* Don't include settings file in binary distributionBen Gamari2019-10-291-1/+1
| | | | | | | | The configuration in the installation environment (as determined by `autoconf`) may differ from the build environment and therefore we need to be sure to rebuild the settings file. Fixes #17374.
* gitlab-ci: Use pxz to compress binary distributionsBen Gamari2019-10-292-1/+2
|
* distrib: Fix binary distribution installationBen Gamari2019-10-293-4/+6
| | | | | This had silently regressed due to 81860281 and the variable renaming performed in b55ee979, as noted in #17374.
* Revert "Replace freebsd-gnueabihf with freebsd"Ben Gamari2019-10-293-4/+8
| | | | | This reverts commit aa31ceaf7568802590f73a740ffbc8b800096342 as suggested in #17392.