summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Correct documentation around -XTypeOperatorsRichard Eisenberg2020-12-201-18/+25
| | | | Close #19064
* Add two warnings to -WallTom Ellis2020-12-191-2/+0
| | | | | | | * -Wincomplete-uni-patterns * -Wincomplete-record-updates See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
* Reject dodgy scoping in associated family instance RHSesRyan Scott2020-12-171-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e63518f5d6a93be111f9108c0990a1162f88d615 tried to push all of the logic of detecting out-of-scope type variables on the RHSes of associated type family instances to `GHC.Tc.Validity` by deleting a similar check in the renamer. Unfortunately, this commit went a little too far, as there are some corner cases that `GHC.Tc.Validity` doesn't detect. Consider this example: ```hs class C a where data D a instance forall a. C Int where data instance D Int = MkD a ``` If this program isn't rejected by the time it reaches the typechecker, then GHC will believe the `a` in `MkD a` is existentially quantified and accept it. This is almost surely not what the user wants! The simplest way to reject programs like this is to restore the old validity check in the renamer (search for `improperly_scoped` in `rnFamEqn`). Note that this is technically a breaking change, since the program in the `polykinds/T9574` test case (which previously compiled) will now be rejected: ```hs instance Funct ('KProxy :: KProxy o) where type Codomain 'KProxy = NatTr (Proxy :: o -> *) ``` This is because the `o` on the RHS will now be rejected for being out of scope. Luckily, this is simple to repair: ```hs instance Funct ('KProxy :: KProxy o) where type Codomain ('KProxy @o) = NatTr (Proxy :: o -> *) ``` All of the discussion is now a part of the revamped `Note [Renaming associated types]` in `GHC.Rename.Module`. A different design would be to make associated type family instances have completely separate scoping from the parent instance declaration, much like how associated type family default declarations work today. See the discussion beginning at https://gitlab.haskell.org/ghc/ghc/-/issues/18021#note_265729 for more on this point. This, however, would break even more programs that are accepted today and likely warrants a GHC proposal before going forward. In the meantime, this patch fixes the issue described in #18021 in the least invasive way possible. There are programs that are accepted today that will no longer be accepted after this patch, but they are arguably pathological programs, and they are simple to repair. Fixes #18021.
* User guide minor typoDavid Eichmann2020-12-171-1/+1
| | | | [ci skip]
* Revert "Implement BoxedRep proposal"Ben Gamari2020-12-153-19/+9
| | | | | | This was inadvertently merged. This reverts commit 6c2eb2232b39ff4720fda0a4a009fb6afbc9dcea.
* Implement BoxedRep proposalAndrew Martin2020-12-143-9/+19
| | | | | | | | | | | | | | | | | | This implements the BoxedRep proposal, refacoring the `RuntimeRep` hierarchy from: ```haskell data RuntimeRep = LiftedPtrRep | UnliftedPtrRep | ... ``` to ```haskell data RuntimeRep = BoxedRep Levity | ... data Levity = Lifted | Unlifted ``` Closes #17526.
* Implement type applications in patternsCale Gibbard2020-12-142-1/+83
| | | | | The haddock submodule is also updated so that it understands the changes to patterns.
* users guide: Describe GC lifecycle eventsBen Gamari2020-12-112-4/+100
| | | | | | Every time I am asked about how to interpret these events I need to figure it out from scratch. It's well past time that the users guide properly documents these.
* users guide: Fix syntax errorsBen Gamari2020-12-111-23/+21
| | | | Fixes errors introduced by 3a55b3a2574f913d046f3a6f82db48d7f6df32e3.
* doc: Extra-clarify -fomit-yieldsKirill Elagin2020-12-101-1/+1
| | | | Be more clear on what this optimisation being on by default means in terms of yields.
* doc: Clarify the default for -fomit-yieldsKirill Elagin2020-12-101-1/+1
| | | | | | “Yield points enabled” is confusing (and probably wrong? I am not 100% sure what it means). Change it to a simple “on”. Undo this change from 2c23fff2e03e77187dc4d01f325f5f43a0e7cad2.