summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in docs [skip ci]Sebastian Graf2021-03-031-1/+1
|
* Pmc: Implement `considerAccessible` (#18610)Sebastian Graf2021-03-012-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Consider (`T18610`): ```hs f :: Bool -> Int f x = case (x, x) of (True, True) -> 1 (False, False) -> 2 (True, False) -> 3 -- Warning: Redundant ``` The third clause will be flagged as redundant. Nevertheless, the programmer might intend to keep the clause in order to avoid bitrot. After this patch, the programmer can write ```hs g :: Bool -> Int g x = case (x, x) of (True, True) -> 1 (False, False) -> 2 (True, False) | GHC.Exts.considerAccessible -> 3 -- No warning ``` And won't be bothered any longer. See also `Note [considerAccessible]` and the updated entries in the user's guide. Fixes #18610 and #19228.
* Infer multiplicity in case expressionsKrzysztof Gogolewski2021-03-011-4/+5
| | | | This is a first step towards #18738.
* users guide: Update mathjax CDN URLBen Gamari2021-02-281-2/+2
| | | | | | Fixes #19423. [skip ci]
* Remove the -xt heap profiling optionMatthew Pickering2021-02-272-18/+4
| | | | | | | It should be left to tooling to perform the filtering to remove these specific closure types from the profile if desired. Fixes #16795
* rts: Introduce --eventlog-flush-interval flagBen Gamari2021-02-271-0/+9
| | | | | | | This introduces a flag, --eventlog-flush-interval, which can be used to set an upper bound on the amount of time for which an eventlog event will remain enqueued. This can be useful in real-time monitoring settings.
* Implement -Wambiguous-fieldsAdam Gundry2021-02-262-5/+39
| | | | | | Fixes #18966. Adds a new warning -Wambiguous-fields for uses of field selectors or record updates that will be rejected in the future, when the DuplicateRecordFields extension is simplified per https://github.com/ghc-proposals/ghc-proposals/pull/366.
* Update MonoLocalBinds documentationSimon Peyton Jones2021-02-262-11/+28
| | | | | | | | | Update the documentation to specify that MonoLocalBinds is lifted by a partial type signature. This came up in #19396. [skip ci]
* Minor fix to QualifiedDo docs about the ApplicativeDo desugaringUtku Demir2021-02-251-3/+3
| | | | | | | | | When desugaring ApplicativeDo, GHC looks up the name `fmap`, not `<$>` (see 'GHC.Builtin.Names.fmapName'). This commit fixes the misleading documentation; since exporting the name `<$>` instead of `fmap` causes a "not in scope" error when `QualifiedDo` and `ApplicativeDo` is combined. [skip ci]
* Prefer -Wmissing-signatures over -Wmissing-exported-signatures (#14794)Michiel de Bruijne2021-02-221-3/+4
|
* Make openFile exception safeDavid Feuer2021-02-221-0/+3
| | | | | | | | | | | | | | | | | | | * `openFile` could sometimes leak file descriptors if it received an asynchronous exception (#19114, #19115). Fix this on POSIX. * `openFile` and more importantly `openFileBlocking` could not be interrupted effectively during the `open` system call (#17912). Fix this on POSIX. * Implement `readFile'` using `withFile` to ensure the file is closed promptly on exception. * Avoid `bracket` in `withFile`, reducing the duration of masking. Closes #19130. Addresses #17912, #19114, and #19115 on POSIX systems, but not on Windows.
* users guide: Mention that -e can be given multiple timesBen Gamari2021-02-181-2/+3
| | | | Fixes #19122.
* directory: ensure xdg compliance (Fix #6077)Gauvain 'GovanifY' Roussel-Tarbouriech2021-02-183-8/+12
|
* Implement NoFieldSelectors extension (ghc-proposals 160)Adam Gundry2021-02-167-5/+149
| | | | | | | | | | | | | | | | | | | | | Fixes #5972. This adds an extension NoFieldSelectors to disable the generation of selector functions corresponding to record fields. When this extension is enabled, record field selectors are not accessible as functions, but users are still able to use them for record construction, pattern matching and updates. See Note [NoFieldSelectors] in GHC.Rename.Env for details. Defining the same field multiple times requires the DuplicateRecordFields extension to be enabled, even when NoFieldSelectors is in use. Along the way, this fixes the use of non-imported DuplicateRecordFields in GHCi with -fimplicit-import-qualified (fixes #18729). Moreover, it extends DisambiguateRecordFields to ignore non-fields when looking up fields in record updates (fixes #18999), as described by Note [DisambiguateRecordFields for updates]. Co-authored-by: Simon Hafner <hafnersimon@gmail.com> Co-authored-by: Fumiaki Kinoshita <fumiexcel@gmail.com>
* Introduce keepAlive primopBen Gamari2021-02-141-0/+17
|
* Fix example code in Deriving via. songzh2021-02-131-1/+1
|
* Remove deprecated -XGenerics and -XMonoPatBindsKrzysztof Gogolewski2021-02-131-3/+0
| | | | | They have no effect since 2011 (GHC 7.2/7.4), commits cb698570b2b and 49dbe60558.
* Add -Wsafe to flags not enabled by -WallFendor2021-02-101-0/+1
|
* Fix example code of "Making a Haskell library that can be called from ↵Masahiro Sakai2021-02-101-2/+2
| | | | | | | foreign code" section "+RTS" in argv[0] is interpreted as a program name and does not work as an indicator of RTS options.
* Reduce inlining in deeply-nested casesSimon Peyton Jones2021-02-092-0/+136
| | | | | | | | | | | | This adds a new heuristic, controllable via two new flags to better tune inlining behaviour. The new flags are -funfolding-case-threshold and -funfolding-case-scaling which are document both in the user guide and in Note [Avoid inlining into deeply nested cases]. Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
* Fix typosBrian Wignall2021-02-064-6/+6
|
* The Char kind (#11342)Daniel Rogozin2021-02-062-6/+17
| | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Rinat Stryungis <rinat.stryungis@serokell.io> Implement GHC Proposal #387 * Parse char literals 'x' at the type level * New built-in type families CmpChar, ConsSymbol, UnconsSymbol * New KnownChar class (cf. KnownSymbol and KnownNat) * New SomeChar type (cf. SomeSymbol and SomeNat) * CharTyLit support in template-haskell Updated submodules: binary, haddock. Metric Decrease: T5205 haddock.base Metric Increase: Naperian T13035
* Fix typo in qualified_do.rstBasile Henry2021-02-051-1/+1
|
* Documentation fixesKrzysztof Gogolewski2021-01-3015-60/+40
| | | | | | | | | | | | | | | - Add missing :since: for NondecreasingIndentation and OverlappingInstances - Remove duplicated descriptions for Safe Haskell flags and UndecidableInstances. Instead, the sections contain a link. - compare-flags: Also check for options supported by ghci. This uncovered two more that are not documented. The flag -smp was removed. - Formatting fixes - Remove the warning about -XNoImplicitPrelude - it was written in 1996, the extension is no longer dangerous. - Fix misspelled :reverse: flags Fixes #18958.
* Fix description of -fregs-graph (not implied by -O2, linked issue was closed)Benjamin Maurer2021-01-301-4/+1
|
* compare-flags: Strip whitespace from flags read from --show-optionsGHC GitLab CI2021-01-301-2/+2
| | | | Otherwise we end up with terminating \r characters on Windows.
* ghci: Take editor from VISUAL environment variableBen Gamari2021-01-302-3/+19
| | | | | | Following the example of `git`, as noted in #19030. Fixes #19030.
* Fix parsing of -fstg-lift-lams-non-recKrzysztof Gogolewski2021-01-292-4/+2
| | | | | | | | -fstg-lift-lams-rec-* and -fstg-lift-lams-non-rec-* were setting the same field. Fix manual: -fstg-lift-lams-non-rec-args is disabled by -fstg-lift-lams-non-rec-args-any, there's no -fno-stg-lift-*.
* Fix code formatting in `HasCallStack` sectionDenis Frezzato2021-01-281-1/+1
|
* Remove some redundant validity checks.Richard Eisenberg2021-01-278-144/+30
| | | | | | | | | | | | This commit also consolidates documentation in the user manual around UndecidableSuperClasses, UndecidableInstances, and FlexibleContexts. Close #19186. Close #19187. Test case: typecheck/should_compile/T19186, typecheck/should_fail/T19187{,a}
* Add a section about failable patterns in the GHC user's guideHécate2021-01-271-0/+31
|
* Remove -XMonadFailDesugaring referencesHécate2021-01-272-24/+0
|
* Deprecate -h flagMatthew Pickering2021-01-272-2/+6
| | | | | | | | | | It is confusing that it defaults to two different things depending on whether we are in the profiling way or not. Use -hc if you have a profiling build Use -hT if you have a normal build Fixes #19031
* Separate AST from GhcPass (#18936)John Ericson2021-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------- What: There are two splits. The first spit is: - `Language.Haskell.Syntax.Extension` - `GHC.Hs.Extension` where the former now just contains helpers like `NoExtCon` and all the families, and the latter is everything having to do with `GhcPass`. The second split is: - `Language.Haskell.Syntax.<mod>` - `GHC.Hs.<mod>` Where the former contains all the data definitions, and the few helpers that don't use `GhcPass`, and the latter contains everything else. The second modules also reexport the former. ---------------- Why: See the issue for more details, but in short answer is we're trying to grasp at the modularity TTG is supposed to offer, after a long time of mainly just getting the safety benefits of more complete pattern matching on the AST. Now, we have an AST datatype which, without `GhcPass` is decently stripped of GHC-specific concerns. Whereas before, not was it GHC-specific, it was aware of all the GHC phases despite the parameterization, with the instances and parametric data structure side-by-side. For what it's worth there are also some smaller, imminent benefits: - The latter change also splits a strongly connected component in two, since none of the `Language.Haskell.Syntax.*` modules import the older ones. - A few TTG violations (Using GhcPass directly in the AST) in `Expr` are now more explicitly accounted for with new type families to provide the necessary indirection. ----------------- Future work: - I don't see why all the type families should live in `Language.Haskell.Syntax.Extension`. That seems anti-modular for little benefit. All the ones used just once can be moved next to the AST type they serve as an extension point for. - Decide what to do with the `Outputable` instances. Some of these are no orphans because they referred to `GhcPass`, and had to be moved. I think the types could be generalized so they don't refer to `GhcPass` and therefore can be moved back, but having gotten flak for increasing the size and complexity types when generalizing before, I did *not* want to do this. - We should triage the remaining contents of `GHC.Hs.<mod>`. The renaming helpers are somewhat odd for needing `GhcPass`. We might consider if they are a) in fact only needed by one phase b) can be generalized to be non-GhcPass-specific (e.g. take a callback rather than GADT-match with `IsPass`) and then they can live in `Language.Haskell.Syntax.<mod>`. For more details, see https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow Bumps Haddock submodule
* Fix error recovery in solveEqualitiesSimon Peyton Jones2021-01-221-4/+11
| | | | | | | | | | | | | | | | | | | As #19142 showed, with -fdefer-type-errors we were allowing compilation to proceed despite a fatal kind error. This patch fixes it, as described in the new note in GHC.Tc.Solver, Note [Wrapping failing kind equalities] Also fixes #19158 Also when checking default( ty1, ty2, ... ) only consider a possible default (C ty2) if ty2 is kind-compatible with C. Previously we could form kind-incompatible constraints, with who knows what kind of chaos resulting. (Actually, no chaos results, but that's only by accident. It's plain wrong to form the constraint (Num Either) for example.) I just happened to notice this during fixing #19142.
* rts/eventlog: Reset ticky counters after dumping sampleBen Gamari2021-01-171-1/+1
|
* rts/eventlog: Introduce event to demarcate new ticky sampleBen Gamari2021-01-171-0/+7
|
* Update expected-undocumented-flags.txtBenjamin Maurer2021-01-101-1/+0
|
* Document flag -dasm-lint in debugging.rstBenjamin Maurer2021-01-101-0/+7
|
* gone_wrong.rst: remove duplicate termGreg Steuck2021-01-091-1/+1
|
* intro.rst: remove duplication of release references and fix a linkGreg Steuck2021-01-091-6/+1
|
* docs: Various release notes changesBen Gamari2021-01-071-9/+20
| | | | | | * Mention changed in profiler's treatment of PINNED closures * Fix formatting * Move plugins-relevant changes to GHC API section
* users-guide: Remove space from -ol documentationBen Gamari2021-01-071-2/+2
| | | | This flag requires that there be no space between the filename and the argument.
* rts: Enforce that mark-region isn't used with -hBen Gamari2021-01-071-0/+11
| | | | | | | As noted in #9666, the mark-region GC is not compatible with heap profiling. Also add documentation for this flag. Closes #9666.
* Docs: Remove reference to `type_applications` in `exts/patterns.rst`Joachim Breitner2021-01-021-1/+0
| | | | | it is unclear why it is there, and it is _also_ linked from `exts/types.rst`.
* base: add Numeric.{readBin, showBin} (fix #19036)Artem Pelenitsyn2021-01-021-0/+3
|
* INLINE pragma for patterns (#12178)Cale Gibbard2020-12-311-0/+34
| | | | | Allow INLINE and NOINLINE pragmas to be used for patterns. Those are applied to both the builder and matcher (where applicable).
* Document scoping of named wildcard type variablesSimon Peyton Jones2020-12-231-0/+14
| | | | | | See `Note [Scoping of named wildcards]` in GHC.Hs.Type This lack of documentation came up in #19051.
* Increase -A default to 4MB.Andreas Klebinger2020-12-221-4/+11
| | | | | | | | | | | This gives a small increase in performance under most circumstances. For single threaded GC the improvement is on the order of 1-2%. For multi threaded GC the results are quite noisy but seem to fall into the same ballpark. Fixes #16499
* rts: enable thread label table in all RTS flavours #17972Adam Sandberg Ericsson2020-12-201-1/+1
|