summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Types (#13009)Sylvain Henry2020-03-291-1/+1
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Update core spec to reflect changes to Core.Richard Eisenberg2020-03-205-20/+68
| | | | | | | | | | | | Key changes: * Adds a new rule for forall-coercions over coercion variables, which was implemented but conspicuously missing from the spec. * Adds treatment for FunCo. * Adds treatment for ForAllTy over coercion variables. * Improves commentary (including restoring a Note lost in 03d4852658e1b7407abb4da84b1b03bfa6f6db3b) in the source. No changes to running code.
* Update "GHC differences to the FFI Chapter" in user guide.Andreas Klebinger2020-03-191-15/+35
| | | | | | | | | The old entry had a heavy focus on how things had been. Which is not what I generally look for in a user guide. I also added a small section on behaviour of nested safe ffi calls. [skip-ci]
* Add release note about fix to #16502.Richard Eisenberg2020-03-181-0/+17
| | | | | | We thought we needed to update the manual, but the fix for #16502 actually brings the implementation in line with the manual. So we just alert users of how to update their code.
* Fix #17021 by checking more return kindsRichard Eisenberg2020-03-171-0/+71
| | | | | | | | | | All the details are in new Note [Datatype return kinds] in TcTyClsDecls. Test case: typecheck/should_fail/T17021{,b} typecheck/should_compile/T17021a Updates haddock submodule
* Document the units of -ddump-timingsMaximilian Tagher2020-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Right now, in the output of -ddump-timings to a file, you can't tell what the units are: ``` CodeGen [TemplateTestImports]: alloc=22454880 time=14.597 ``` I believe bytes/milliseconds are the correct units, but confirmation would be appreciated. I'm basing it off of this snippet from `withTiming'`: ``` when (verbosity dflags >= 2 && prtimings == PrintTimings) $ liftIO $ logInfo dflags (defaultUserStyle dflags) (text "!!!" <+> what <> colon <+> text "finished in" <+> doublePrec 2 time <+> text "milliseconds" <> comma <+> text "allocated" <+> doublePrec 3 (realToFrac alloc / 1024 / 1024) <+> text "megabytes") ``` which implies time is in milliseconds, and allocations in bytes (which divided by 1024 would be KB, and again would be MB)
* Add a -no-haddock flag.Judah Jacobson2020-03-152-1/+20
| | | | | | | | This flag undoes the effect of a previous "-haddock" flag. Having both flags makes it easier for build systems to enable Haddock parsing in a set of global flags, but then disable it locally for specific targets (e.g., third-party packages whose comments don't pass the validation in the latest GHC). I added the flag to expected-undocumented-flags.txt since `-haddock` was alreadyin that list.
* Document restriction on SCC pragma syntaxKrzysztof Gogolewski2020-03-151-1/+1
| | | | | | | Currently, the names of cost centres must be quoted or be lowercase identifiers. Fixes #17916.
* Use correct option name (-opti) (fix #17314)Sylvain Henry2020-03-142-8/+4
| | | | s/pgmo/opti
* Fixed a minor typo in codegen.rstGreg Steuck2020-03-111-1/+1
|
* docs: correct link to th haddocks from users guideAdam Sandberg Ericsson2020-02-291-1/+1
|
* docs: correct relative links to haddocks from users guide (fixes #17866)Adam Sandberg Ericsson2020-02-291-2/+29
|
* users-guide: Drop old release notesBen Gamari2020-02-243-663/+0
|
* users-guide: Shuffle textBen Gamari2020-02-241-18/+16
|
* Modules: Driver (#13009)Sylvain Henry2020-02-211-14/+14
| | | | submodule updates: nofib, haddock
* users-guide: Mention dependency on `exceptions` in release notesBen Gamari2020-02-202-0/+2
| | | | Fixes #17845.
* Enable -Wstar-is-type in -WallBen Gamari2020-02-201-1/+0
| | | | | | | | | | As noted in [proposal 0143][proposal] this is supposed to happen in 8.12. Also fix an incorrect claim in the users guide that -Wstar-is-type is enabled by default. [proposal]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0143-remove-star-kind.rst
* 8.10 Release notes for --disable-delayed-os-memory-return [skip ci]Niklas Hambüchen2020-02-201-0/+15
|
* 8.10 Release notes for atomic .o writes [skip ci]Niklas Hambüchen2020-02-201-0/+15
|
* Revert "users-guide: Document -ddump-srts"Ömer Sinan Ağacan2020-02-161-6/+0
| | | | | | | | This reverts commit 8cf646d36b02b8ea1c289cb52781c9171853b514. The flag was removed by 16d643cf. [ci skip]
* users-guide: Fix broken referenceBen Gamari2020-02-141-1/+1
|
* users-guide: Document -ddump-srtsBen Gamari2020-02-141-0/+6
|
* compare-flags: Fix outputBen Gamari2020-02-141-6/+9
|
* compare-flags: Don't rely on encoding flag of subprocess.check_outputBen Gamari2020-02-141-3/+2
| | | | Apparently it isn't supported by some slightly older Python versions.
* 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.