summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* users-guide: Fix "invalid file" failureBen Gamari2020-02-141-1/+1
| | | | I have no idea how this worked previously. Different Python version?
* docs/compare-flags: Don't use python f-stringsBen Gamari2020-02-141-4/+4
|
* users-guide: Fix unknown link targetsBen Gamari2020-02-142-6/+17
|
* Fix flag documentation (#17826)Sylvain Henry2020-02-131-2/+4
|
* Always display inferred variables using bracesKrzysztof Gogolewski2020-02-123-8/+4
| | | | | | | | | | | | | We now always show "forall {a}. T" for inferred variables, previously this was controlled by -fprint-explicit-foralls. This implements part 1 of https://github.com/ghc-proposals/ghc-proposals/pull/179. Part of GHC ticket #16320. Furthermore, when printing a levity restriction error, we now display the HsWrap of the expression. This lets users see the full elaboration with -fprint-typechecker-elaboration (see also #17670)
* Separate CPR analysis from the Demand analyserwip/sep-cprSebastian Graf2020-02-121-0/+12
| | | | | | | | | | | | | | | | | | | The reasons for that can be found in the wiki: https://gitlab.haskell.org/ghc/ghc/wikis/nested-cpr/split-off-cpr We now run CPR after demand analysis (except for after the final demand analysis run just before code gen). CPR got its own dump flags (`-ddump-cpr-anal`, `-ddump-cpr-signatures`), but not its own flag to activate/deactivate. It will run with `-fstrictness`/`-fworker-wrapper`. As explained on the wiki page, this step is necessary for a sane Nested CPR analysis. And it has quite positive impact on compiler performance: Metric Decrease: T9233 T9675 T9961 T15263
* TemplateHaskellQuotes: Allow nested splicesMatthew Pickering2020-02-112-1/+4
| | | | | | There is no issue with nested splices as they do not require any compile time code execution. All execution is delayed until the top-level splice.
* 8.10 Release notes for improvements to the pattern-match checker [skip ci]Sebastian Graf2020-02-091-0/+14
| | | | A little late to the game, but better late than never.
* users-guide: Clarify that bundled patsyns were introduced in GHC 8.0Ben Gamari2020-02-081-3/+5
| | | | Closes #17094.
* Introduce -Wcompat-unqualified-importsBen Gamari2020-02-081-3/+22
| | | | | | | | | | | | | This implements the warning proposed in option (B) of the Data.List.singleton CLC [discussion][]. This warning, which is included in `-Wcompat` is intended to help users identify imports of modules that will change incompatibly in future GHC releases. This currently only includes `Data.List` due to the expected specialisation and addition of `Data.List.singleton`. Fixes #17244. [discussion]: https://groups.google.com/d/msg/haskell-core-libraries/q3zHLmzBa5E/PmlAs_kYAQAJ
* Improve/fix -fcatch-bottoms documentationÖmer Sinan Ağacan2020-02-011-6/+13
| | | | | | | | | | | | | | | Old documentation suggests that -fcatch-bottoms only adds a default alternative to bottoming case expression, but that's not true. We use a very simplistic "is exhaustive" check and add default alternatives to any case expression that does not cover all constructors of the type. In case of GADTs this simple check assumes all constructors should be covered, even the ones ruled out by the type of the scrutinee. Update the documentation to reflect this. (Originally noticed in #17648) [ci skip]
* Split glasgow_exts into several files (#17316)Sylvain Henry2020-01-25122-17042/+17295
|
* Handle local fixity declarations in DsMeta properlyRyan Scott2020-01-251-0/+18
| | | | | | | | | | | | | | | | | | | | | `DsMeta.rep_sig` used to skip over `FixSig` entirely, which had the effect of causing local fixity declarations to be dropped when quoted in Template Haskell. But there is no good reason for this state of affairs, as the code in `DsMeta.repFixD` (which handles top-level fixity declarations) handles local fixity declarations just fine. This patch factors out the necessary parts of `repFixD` so that they can be used in `rep_sig` as well. There was one minor complication: the fixity signatures for class methods in each `HsGroup` were stored both in `FixSig`s _and_ the list of `LFixitySig`s for top-level fixity signatures, so I needed to take action to prevent fixity signatures for class methods being converted to `Dec`s twice. I tweaked `RnSource.add` to avoid putting these fixity signatures in two places and added `Note [Top-level fixity signatures in an HsGroup]` in `GHC.Hs.Decls` to explain the new design. Fixes #17608. Bumps the Haddock submodule.
* PmCheck: Formulate as translation between Clause TreesSebastian Graf2020-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to check `GrdVec`s arising from multiple clauses and guards in isolation. That resulted in a split between `pmCheck` and `pmCheckGuards`, the implementations of which were similar, but subtly different in detail. Also the throttling mechanism described in `Note [Countering exponential blowup]` ultimately got quite complicated because it had to cater for both checking functions. This patch realises that pattern match checking doesn't just consider single guarded RHSs, but that it's always a whole set of clauses, each of which can have multiple guarded RHSs in turn. We do so by translating a list of `Match`es to a `GrdTree`: ```haskell data GrdTree = Rhs !RhsInfo | Guard !PmGrd !GrdTree -- captures lef-to-right match semantics | Sequence !GrdTree !GrdTree -- captures top-to-bottom match semantics | Empty -- For -XEmptyCase, neutral element of Sequence ``` Then we have a function `checkGrdTree` that matches a given `GrdTree` against an incoming set of values, represented by `Deltas`: ```haskell checkGrdTree :: GrdTree -> Deltas -> CheckResult ... ``` Throttling is isolated to the `Sequence` case and becomes as easy as one would expect: When the union of uncovered values becomes too big, just return the original incoming `Deltas` instead (which is always a superset of the union, thus a sound approximation). The returned `CheckResult` contains two things: 1. The set of values that were not covered by any of the clauses, for exhaustivity warnings. 2. The `AnnotatedTree` that enriches the syntactic structure of the input program with divergence and inaccessibility information. This is `AnnotatedTree`: ```haskell data AnnotatedTree = AccessibleRhs !RhsInfo | InaccessibleRhs !RhsInfo | MayDiverge !AnnotatedTree | SequenceAnn !AnnotatedTree !AnnotatedTree | EmptyAnn ``` Crucially, `MayDiverge` asserts that the tree may force diverging values, so not all of its wrapped clauses can be redundant. While the set of uncovered values can be used to generate the missing equations for warning messages, redundant and proper inaccessible equations can be extracted from `AnnotatedTree` by `redundantAndInaccessibleRhss`. For this to work properly, the interface to the Oracle had to change. There's only `addPmCts` now, which takes a bag of `PmCt`s. There's a whole bunch of `PmCt` variants to replace the different oracle functions from before. The new `AnnotatedTree` structure allows for more accurate warning reporting (as evidenced by a number of changes spread throughout GHC's code base), thus we fix #17465. Fixes #17646 on the go. Metric Decrease: T11822 T9233 PmSeriesS haddock.compiler
* Put the docs for :instances in alphabetical positionXavier Denis2020-01-201-33/+33
|
* Fix +RTS -Z flag documentationÖmer Sinan Ağacan2020-01-201-1/+1
| | | | | | | | | Stack squeezing is done on context switch, not on GC or stack overflow. Fix the documentation. Fixes #17685 [ci skip]
* users-guide/debug-info: typo “behivior”Jean-Baptiste Mazon2020-01-121-1/+1
|
* Fix more typos, via an improved Levenshtein-style correctorBrian Wignall2020-01-127-18/+18
|
* Don't zap to Any; error insteadRichard Eisenberg2020-01-121-0/+6
| | | | | | | | | This changes GHC's treatment of so-called Naughty Quantification Candidates to issue errors, instead of zapping to Any. Close #16775. No new test cases, because existing ones cover this well.
* Overloaded Quotation Brackets (#246)Matthew Pickering2020-01-122-15/+58
| | | | | | | | | | | | | | | | | | This patch implements overloaded quotation brackets which generalise the desugaring of all quotation forms in terms of a new minimal interface. The main change is that a quotation, for example, [e| 5 |], will now have type `Quote m => m Exp` rather than `Q Exp`. The `Quote` typeclass contains a single method for generating new names which is used when desugaring binding structures. The return type of functions from the `Lift` type class, `lift` and `liftTyped` have been restricted to `forall m . Quote m => m Exp` rather than returning a result in a Q monad. More details about the feature can be read in the GHC proposal. https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0246-overloaded-bracket.rst
* Fix typos, via a Levenshtein-style correctorBrian Wignall2020-01-049-9/+9
|
* Add "-Iw" RTS flag for minimum wait between idle GCs (#11134)Kevin Buhr2019-12-311-0/+20
|
* rts: Ensure that nonmoving gc isn't used with profilingBen Gamari2019-12-301-2/+2
|
* while at it rename XCode to the official XcodeGabor Greif2019-12-271-1/+1
|
* Switch to ReadTheDocs theme for the user-guideSylvain Henry2019-12-2527-53/+3291
|
* rts: Add a long form flag to enable the non-moving GCBen Gamari2019-12-101-6/+14
| | | | | The old flag, `-xn`, was quite cryptic. Here we add `--nonmoving-gc` in addition.
* users guide: Motivation of DefaultSignaturesMicha Wiedenmann2019-12-101-5/+8
|
* users guide: Try to silence underfull \hbox warningsBen Gamari2019-12-051-0/+4
| | | | | | | We use two tricks, as suggested here [1]: * Use microtype to try to reduce the incidence of underfull boxes * Bump up \hbadness to eliminate the warnings
* Meaning-preserving SCC annotations (#15730)Vladislav Zavialov2019-12-051-6/+18
| | | | | | | | | | | | | | | This patch implements GHC Proposal #176: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0176-scc-parsing.rst Before the change: 1 / 2 / 2 = 0.25 1 / {-# SCC "name" #-} 2 / 2 = 1.0 After the change: 1 / 2 / 2 = 0.25 1 / {-# SCC "name" #-} 2 / 2 = parse error
* Drop Uniquable constraint for AnnTargetBen Gamari2019-12-031-0/+8
| | | | | | This relied on deriveUnique, which was far too subtle to be safely applied. Thankfully the instance doesn't appear to be used so let's just drop it.
* users-guide: Add 8.12.1 release notesBen Gamari2019-12-032-0/+91
|
* Document RTS behaviour upon encountering '--'.Athas2019-12-031-1/+2
|
* Fix more typosBrian Wignall2019-12-024-4/+4
|
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-286-8/+8
|
* Whitespace-sensitive bang patterns (#1087, #17162)wip/whitespace-and-lookaheadVladislav Zavialov2019-11-273-20/+60
| | | | | | | | | | | | | | | | | | This patch implements a part of GHC Proposal #229 that covers five operators: * the bang operator (!) * the tilde operator (~) * the at operator (@) * the dollar operator ($) * the double dollar operator ($$) Based on surrounding whitespace, these operators are disambiguated into bang patterns, lazy patterns, strictness annotations, type applications, splices, and typed splices. This patch doesn't cover the (-) operator or the -Woperator-whitespace warning, which are left as future work.
* Make warnings for TH splices opt-inSebastian Graf2019-11-272-1/+23
| | | | | | | | | | | | | | | | | | | | | | | In #17270 we have the pattern-match checker emit incorrect warnings. The reason for that behavior is ultimately an inconsistency in whether we treat TH splices as written by the user (`FromSource :: Origin`) or as generated code (`Generated`). This was first reported in #14838. The current solution is to TH splices as `Generated` by default and only treat them as `FromSource` when the user requests so (-fenable-th-splice-warnings). There are multiple reasons for opt-in rather than opt-out: * It's not clear that the user that compiles a splice is the author of the code that produces the warning. Think of the situation where she just splices in code from a third-party library that produces incomplete pattern matches. In this scenario, the user isn't even able to fix that warning. * Gathering information for producing the warnings (pattern-match check warnings in particular) is costly. There's no point in doing so if the user is not interested in those warnings. Fixes #17270, but not #14838, because the proper solution needs a GHC proposal extending the TH AST syntax.
* Fix typosBrian Wignall2019-11-234-16/+16
|
* rts: Expose interface for configuring EventLogWritersBen Gamari2019-11-232-1/+25
| | | | | | This exposes a set of interfaces from the GHC API for configuring EventLogWriters. These can be used by consumers like [ghc-eventlog-socket](https://github.com/bgamari/ghc-eventlog-socket).
* 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
|