summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* users-guide: Address #17329Ben Gamari2019-11-171-7/+7
| | | | Adopts the language suggested by @JakobBruenker.
* users-guide: Drop 8.6.1 release notesBen Gamari2019-11-152-293/+0
|
* users guide: Fix broken linkBen Gamari2019-11-131-1/+5
|
* Update release notes about #16512 / #17405.Richard Eisenberg2019-11-101-0/+12
|
* template-haskell: Document assembler foreign file supportBen Gamari2019-11-091-0/+2
| | | | See #16180.
* users_guide: Set flags list file encodingBen Gamari2019-11-071-1/+1
| | | | Otherwise this fails on Windows.
* Clean up TH's treatment of unary tuples (or, #16881 part two)Ryan Scott2019-11-071-3/+6
| | | | | | | | | | | | | | !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.
* 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-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* Add +RTS --disable-delayed-os-memory-return. Fixes #17411.Niklas Hambüchen2019-11-011-0/+22
| | | | | | Sets `MiscFlags.disableDelayedOsMemoryReturn`. See the added `Note [MADV_FREE and MADV_DONTNEED]` for details.
* doc: Fix backticksNiklas Hambüchen2019-11-011-1/+1
|
* users-guide: Add some new features and fix warnings for GHC 8.10Takenobu Tani2019-10-292-9/+17
| | | | | | | | | | This updates the following: * Add description for ImportQualifiedPost extension * Add description for ghci command name resolution * Fix markdown warnings [skip ci]
* users-guide: Fix :since: for -xn flagTakenobu Tani2019-10-291-1/+1
| | | | [skip ci]
* Remove documented flags from expected-undocumented-flags.txtLuke Lau2019-10-271-10/+0
|
* Add back documentation for deprecated -Whi-shadowingLuke Lau2019-10-271-0/+17
| | | | | | This was removed in b538476be3706264620c072e6e436debf9e0d3e4, but without it the compare-flags.py script fails. This adds it back and marks it as deprecated, with a notice that it is slated for removal.
* Fix RankNTypes :ghc-flag: in users guideLuke Lau2019-10-271-2/+2
| | | | This fixes a hadrian `build docs` failure
* Fix #14690 - :steplocal panics after break-on-errorRoland Senn2019-10-261-1/+4
| | | | | | | | | | | | | | `: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.
* Merge non-moving garbage collectorBen Gamari2019-10-231-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a concurrent mark & sweep garbage collector to manage the old generation. The concurrent nature of this collector typically results in significantly reduced maximum and mean pause times in applications with large working sets. Due to the large and intricate nature of the change I have opted to preserve the fully-buildable history, including merge commits, which is described in the "Branch overview" section below. Collector design ================ The full design of the collector implemented here is described in detail in a technical note > B. Gamari. "A Concurrent Garbage Collector For the Glasgow Haskell > Compiler" (2018) This document can be requested from @bgamari. The basic heap structure used in this design is heavily inspired by > K. Ueno & A. Ohori. "A fully concurrent garbage collector for > functional programs on multicore processors." /ACM SIGPLAN Notices/ > Vol. 51. No. 9 (presented at ICFP 2016) This design is intended to allow both marking and sweeping concurrent to execution of a multi-core mutator. Unlike the Ueno design, which requires no global synchronization pauses, the collector introduced here requires a stop-the-world pause at the beginning and end of the mark phase. To avoid heap fragmentation, the allocator consists of a number of fixed-size /sub-allocators/. Each of these sub-allocators allocators into its own set of /segments/, themselves allocated from the block allocator. Each segment is broken into a set of fixed-size allocation blocks (which back allocations) in addition to a bitmap (used to track the liveness of blocks) and some additional metadata (used also used to track liveness). This heap structure enables collection via mark-and-sweep, which can be performed concurrently via a snapshot-at-the-beginning scheme (although concurrent collection is not implemented in this patch). Implementation structure ======================== The majority of the collector is implemented in a handful of files: * `rts/Nonmoving.c` is the heart of the beast. It implements the entry-point to the nonmoving collector (`nonmoving_collect`), as well as the allocator (`nonmoving_allocate`) and a number of utilities for manipulating the heap. * `rts/NonmovingMark.c` implements the mark queue functionality, update remembered set, and mark loop. * `rts/NonmovingSweep.c` implements the sweep loop. * `rts/NonmovingScav.c` implements the logic necessary to scavenge the nonmoving heap. Branch overview =============== ``` * wip/gc/opt-pause: | A variety of small optimisations to further reduce pause times. | * wip/gc/compact-nfdata: | Introduce support for compact regions into the non-moving |\ collector | \ | \ | | * wip/gc/segment-header-to-bdescr: | | | Another optimization that we are considering, pushing | | | some segment metadata into the segment descriptor for | | | the sake of locality during mark | | | | * | wip/gc/shortcutting: | | | Support for indirection shortcutting and the selector optimization | | | in the non-moving heap. | | | * | | wip/gc/docs: | |/ Work on implementation documentation. | / |/ * wip/gc/everything: | A roll-up of everything below. |\ | \ | |\ | | \ | | * wip/gc/optimize: | | | A variety of optimizations, primarily to the mark loop. | | | Some of these are microoptimizations but a few are quite | | | significant. In particular, the prefetch patches have | | | produced a nontrivial improvement in mark performance. | | | | | * wip/gc/aging: | | | Enable support for aging in major collections. | | | | * | wip/gc/test: | | | Fix up the testsuite to more or less pass. | | | * | | wip/gc/instrumentation: | | | A variety of runtime instrumentation including statistics | | / support, the nonmoving census, and eventlog support. | |/ | / |/ * wip/gc/nonmoving-concurrent: | The concurrent write barriers. | * wip/gc/nonmoving-nonconcurrent: | The nonmoving collector without the write barriers necessary | for concurrent collection. | * wip/gc/preparation: | A merge of the various preparatory patches that aren't directly | implementing the GC. | | * GHC HEAD . . . ```
| * rts: Introduce flag to enable the nonmoving old generationBen Gamari2019-10-201-0/+18
| | | | | | | | This flag will enable the use of a non-moving oldest generation.
* | Add new flag for unarised STG dumpsÖmer Sinan Ağacan2019-10-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously -ddump-stg would dump pre and post-unarise STGs. Now we have a new flag for post-unarise STG and -ddump-stg only dumps coreToStg output. STG dump flags after this commit: - -ddump-stg: Dumps CoreToStg output - -ddump-stg-unarised: Unarise output - -ddump-stg-final: STG right before code gen (includes CSE and lambda lifting)
* | users-guide: Fix :since: for -Wunused-packagesBen Gamari2019-10-231-1/+1
| | | | | | | | Fixes #17382.
* | eventlog: Dump cost centre stack on each sampleMatthew Pickering2019-10-232-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change it is possible to reconstruct the timing portion of a `.prof` file after the fact. By logging the stacks at each time point a more precise executation trace of the program can be observed rather than all identical cost centres being identified in the report. There are two new events: 1. `EVENT_PROF_BEGIN` - emitted at the start of profiling to communicate the tick interval 2. `EVENT_PROF_SAMPLE_COST_CENTRE` - emitted on each tick to communicate the current call stack. Fixes #17322
* | compiler: introduce DynFlags pluginsAlp Mestanogullari2019-10-232-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They have type '[CommandLineOpts] -> Maybe (DynFlags -> IO DynFlags)'. All plugins that supply a non-Nothing 'dynflagsPlugin' will see their updates applied to the current DynFlags right after the plugins are loaded. One use case for this is to superseede !1580 for registering hooks from a plugin. Frontend/parser plugins were considered to achieve this but they respectively conflict with how this plugin is going to be used and don't allow overriding/modifying the DynFlags, which is how hooks have to be registered. This commit comes with a test, 'test-hook-plugin', that registers a "fake" meta hook that replaces TH expressions with the 0 integer literal.
* | Implement a coverage checker for injectivityRichard Eisenberg2019-10-231-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes #16512. There are lots of parts of this patch: * The main payload is in FamInst. See Note [Coverage condition for injective type families] there for the overview. But it doesn't fix the bug. * We now bump the reduction depth every time we discharge a CFunEqCan. See Note [Flatten when discharging CFunEqCan] in TcInteract. * Exploration of this revealed a new, easy to maintain invariant for CTyEqCans. See Note [Almost function-free] in TcRnTypes. * We also realized that type inference for injectivity was a bit incomplete. This means we exchanged lookupFlattenTyVar for rewriteTyVar. See Note [rewriteTyVar] in TcFlatten. The new function is monadic while the previous one was pure, necessitating some faff in TcInteract. Nothing too bad. * zonkCt did not maintain invariants on CTyEqCan. It's not worth the bother doing so, so we just transmute CTyEqCans to CNonCanonicals. * The pure unifier was finding the fixpoint of the returned substitution, even when doing one-way matching (in tcUnifyTysWithTFs). Fixed now. Test cases: typecheck/should_fail/T16512{a,b}
* | Windows: Update tarballs to GCC 9.2 and remove MAX_PATH limit.Tamar Christina2019-10-201-0/+4
|/
* Add hyperlinks to PDF/HTML documentation; closes #17342Brian Wignall2019-10-161-1/+1
|
* Mention changes from #16980, #17213 in 8.10.1 release notesRyan Scott2019-10-141-5/+59
| | | | | | | | The fixes for these issues both have user-facing consequences, so it would be good to mention them in the release notes for GHC 8.10.1. While I'm in town, also mention `UnboxedSums` in the release notes entry related to `-fobject-code`.
* users-guide: Add GHCi's ::<builtin-command> formTakenobu Tani2019-10-131-0/+9
| | | | | | | This commit explicitly adds description about double colon command of GHCi. [skip ci]
* Template Haskell: make unary tuples legal (#16881)nineonine2019-10-131-0/+4
|
* [skip ci] clarify what unsound meansAndrew Martin2019-10-081-18/+24
|
* [skip ci] can not -> may notAndrew Martin2019-10-081-1/+1
|
* [skip ci] make the table betterAndrew Martin2019-10-081-10/+20
|
* [skip ci] link to foreign cmm callAndrew Martin2019-10-081-6/+6
|
* Rephrase a bunch of things in the unlifted ffi types documentation. Add a ↵Andrew Martin2019-10-081-43/+71
| | | | section on pinned byte arrays.
* Document the UnliftedFFITypes extension.Andrew Martin2019-10-082-6/+98
|
* gitlab-ci: Check coverage of GHC flags in users guideBen Gamari2019-10-082-0/+276
| | | | | | | This ensures that all GHC flags are documented during the documentation build. Fixes #17315.
* doc: Write out documented flag listBen Gamari2019-10-081-1/+11
|
* users-guide: Run sphinx in nit-picky modeBen Gamari2019-10-081-0/+23
| | | | This ensure that it blurts an error on missing references.
* users-guide: Rework pragma key generationBen Gamari2019-10-081-6/+8
| | | | | | Previously we had a hack to handle the case of multi-token SPECIALISE pragmas. Now we use a slightly more general rule of using a prefix of tokens containing only alphabetical characters.
* users-guide: Document -fworker-wrapperBen Gamari2019-10-081-0/+11
|
* users-guide: Document NondecreasingIndentationBen Gamari2019-10-081-1/+8
|
* users-guide: Fix various warningsBen Gamari2019-10-0811-82/+109
|
* users-guide: Document -XHaskell98 and -XHaskell2010Ben Gamari2019-10-081-0/+39
|
* users-guide: Make reverse flags addressable via :ghc-flag:Ben Gamari2019-10-081-2/+15
| | | | | Previously one could not easily link to the :reverse: flag of a ghc-flag.
* users-guide: Refer to language extension flags via :extension:Ben Gamari2019-10-086-29/+29
| | | | Previously several were referred to via :ghc-flag:`-X...`.
* base: Document the fact that Typeable is automatically "derived"Ben Gamari2019-10-081-1/+1
| | | | This fixes #17060.
* configure: Determine library versions of template-haskell, et al.Ben Gamari2019-10-071-0/+3
| | | | These are needed by the user guide documentation. Fixes #17260.
* Deprecate -fwarn-hi-shadowing, because it was never implemented and isDaroc Alden2019-10-042-13/+4
| | | | | | not used. This fixes #10913.
* Add new debug flag -DZTobias Guggenmos2019-10-031-0/+1
| | | | Zeros heap memory after gc freed it.