summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the constraint solver pipelinewip/T23070Simon Peyton Jones2023-03-2214-4162/+4302
| | | | | | | | | | | | | | | | The big change is to put the entire type-equality solver into GHC.Tc.Solver.Equality, rather than scattering it over Canonical and Interact. Other changes * EqCt becomes its own data type, a bit like QCInst. This is great because EqualCtList is then just [EqCt] * New module GHC.Tc.Solver.Dict has come of the class-contraint solver. In due course it will be all. One step at a time. This MR is intended to have zero change in behaviour: it is a pure refactor. It opens the way to subsequent tidying up, we believe.
* Testsuite: use req_interp predicate for T20214Sylvain Henry2023-03-221-1/+1
|
* Testsuite: use req_interp predicate for T16318 (#22370)Sylvain Henry2023-03-221-1/+1
|
* fix: Incorrect @since annotations in GHC.TypeErrorromes2023-03-222-5/+5
| | | | Fixes #23128
* Testsuite: use appropriate predicate for ManyUbxSums test (#22576)Sylvain Henry2023-03-221-1/+1
|
* Be more careful about quantificationSimon Peyton Jones2023-03-2227-195/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This MR is driven by #23051. It does several things: * It is guided by the generalisation plan described in #20686. But it is still far from a complete implementation of that plan. * Add Note [Inferred type with escaping kind] to GHC.Tc.Gen.Bind. This explains that we don't (yet, pending #20686) directly prevent generalising over escaping kinds. * In `GHC.Tc.Utils.TcMType.defaultTyVar` we default RuntimeRep and Multiplicity variables, beause we don't want to quantify over them. We want to do the same for a Concrete tyvar, but there is nothing sensible to default it to (unless it has kind RuntimeRep, in which case it'll be caught by an earlier case). So we promote instead. * Pure refactoring in GHC.Tc.Solver: * Rename decideMonoTyVars to decidePromotedTyVars, since that's what it does. * Move the actual promotion of the tyvars-to-promote from `defaultTyVarsAndSimplify` to `decidePromotedTyVars`. This is a no-op; just tidies up the code. E.g then we don't need to return the promoted tyvars from `decidePromotedTyVars`. * A little refactoring in `defaultTyVarsAndSimplify`, but no change in behaviour. * When making a TauTv unification variable into a ConcreteTv (in GHC.Tc.Utils.Concrete.makeTypeConcrete), preserve the occ-name of the type variable. This just improves error messages. * Kill off dead code: GHC.Tc.Utils.TcMType.newConcreteHole
* Compute LambdaFormInfo when using JavaScript backend.Luite Stegeman2023-03-215-8/+21
| | | | | | | | | | | CmmCgInfos is needed to write interface files, but the JavaScript backend does not generate it, causing "Name without LFInfo" warnings. This patch adds a conservative but always correct CmmCgInfos when the JavaScript backend is used. Fixes #23053
* Allow LLVM backend to use HDoc for faster file generation.Alex Mason2023-03-218-348/+524
| | | | | | Also remove the MetaStmt constructor from LlvmStatement and places the annotations into the Store statement. Includes “Implement a workaround for -no-asm-shortcutting bug“ (https://gitlab.haskell.org/ghc/ghc/-/commit/2fda9e0df886cc551e2cd6b9c2a384192bdc3045)
* Document pdep / pext primopsBodigrim2023-03-211-10/+59
|
* Add structured error messages for GHC.Tc.Utils.EnvTorsten Schmits2023-03-2129-115/+270
| | | | | | | | | Tracking ticket: #20119 MR: !10129 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`.
* docs: add WALL_CLOCK_TIME event in eventlog encodingsAdam Sandberg Ericsson2023-03-211-0/+12
|
* docs: add TASK_DELETE event in eventlog encodingsAdam Sandberg Ericsson2023-03-211-0/+9
|
* docs: add BlockedOnMVarRead thread status in eventlog encodingsAdam Sandberg Ericsson2023-03-211-0/+1
|
* docs: explain the BLOCK_MARKER eventAdam Sandberg Ericsson2023-03-211-3/+4
|
* docs: fix some wrongs in the eventlog format documentationAdam Sandberg Ericsson2023-03-211-4/+7
|
* Rename () into Unit, (,,...,,) into Tuple<n> (#21294)Andrei Borzenkov2023-03-2126-157/+295
| | | | | | | | | | | | | | | | | | | | | This patch implements a part of GHC Proposal #475. The key change is in GHC.Tuple.Prim: - data () = () - data (a,b) = (a,b) - data (a,b,c) = (a,b,c) ... + data Unit = () + data Tuple2 a b = (a,b) + data Tuple3 a b c = (a,b,c) ... And the rest of the patch makes sure that Unit and Tuple<n> are pretty-printed as () and (,,...,,) in various contexts. Updates the haddock submodule. Co-authored-by: Vladislav Zavialov <vlad.z.4096@gmail.com>
* Add structured error messages for GHC.Tc.Utils.BackpackTorsten Schmits2023-03-1715-49/+121
| | | | | | | | | | | | Tracking ticket: #20119 MR: !10127 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. One occurrence, when handing a nested error from the interface loading machinery, was omitted. It will be handled by a subsequent changeset that addresses interface errors.
* ghci: only keep the GlobalRdrEnv in ModInfosheaf2023-03-164-16/+49
| | | | | | | | | The datatype GHC.UI.Info.ModInfo used to store a ModuleInfo, which includes a TypeEnv. This can easily cause space leaks as we have no way of forcing everything in a type environment. In GHC, we only use the GlobalRdrEnv, which we can force completely. So we only store that instead of a fully-fledged ModuleInfo.
* configure: Fix FIND_CXX_STD_LIB test on DarwinBen Gamari2023-03-161-0/+11
| | | | | | | | Annoyingly, Darwin's <cstddef> includes <version> and APFS is case-insensitive. Consequently, it will end up #including the `VERSION` file generated by the `configure` script on the second and subsequent runs of the `configure` script. See #23116.
* Add changelog entry for #23049Teo Camarasu2023-03-161-0/+3
|
* Fix BCO creation setting caps when -j > -NTeo Camarasu2023-03-163-49/+13
| | | | | | | | | | | | | | * Remove calls to 'setNumCapabilities' in 'createBCOs' These calls exist to ensure that 'createBCOs' can benefit from parallelism. But this is not the right place to call `setNumCapabilities`. Furthermore the logic differs from that in the driver causing the capability count to be raised and lowered at each TH call if -j > -N. * Remove 'BCOOpts' No longer needed as it was only used to thread the job count down to `createBCOs` Resolves #23049
* ghc-bignum: Drop redundant include-dirs fieldBen Gamari2023-03-131-2/+0
|
* Bump Win32 to 2.13.4.0wip/bump-w32Matthew Pickering2023-03-131-0/+0
| | | | Updates Win32 submodule
* Simplifier: `countValArgs` should not count Type args (#23102)Sebastian Graf2023-03-131-1/+1
| | | | | | | | | I observed miscompilations while working on !10088 caused by this. Fixes #23102. Metric Decrease: T10421
* JS: fix implementation of forceBool to use JS backend syntaxwip/js-forceBoolJosh Meredith2023-03-134-1/+37
|
* Simplify: Move `wantEtaExpansion` before expensive `do_eta_expand` checkSebastian Graf2023-03-101-5/+6
| | | | | | | | There is no need to run arity analysis and what not if we are not in a Simplifier phase that eta-expands or if we don't want to eta-expand the expression in the first place. Purely a refactoring with the goal of improving compiler perf.
* JS: Fix implementation of MK_JSVALJosh Meredith2023-03-101-2/+2
|
* JS: remove dead code for old integer-gmpSylvain Henry2023-03-101-16/+2
|
* DmdAnal: Fix a panic on OPAQUE and trivial/PAP RHS (#22997)Sebastian Graf2023-03-103-10/+23
| | | | | | | We should not panic in `add_demands` (now `set_lam_dmds`), because that code path is legimitely taken for OPAQUE PAP bindings, as in T22997. Fixes #22997.
* Fixes #19627.Apoorv Ingle2023-03-094-2/+156
| | | | | | | | | Previously the solver failed with an unhelpful "solver reached too may iterations" error. With the fix for #21909 in place we no longer have the possibility of generating such an error if we have `-fconstraint-solver-iteration` > `-fgivens-fuel > `-fwanteds-fuel`. This is true by default, and the said fix also gives programmers a knob to control how hard the solver should try before giving up. This commit adds: * Reference to ticket #19627 in the Note [Expanding Recursive Superclasses and ExpansionFuel] * Test `typecheck/should_fail/T19627.hs` for regression purposes
* Delete created temporary subdirectories at end of session.Luite Stegeman2023-03-092-71/+117
| | | | | | | | This patch adds temporary subdirectories to the list of paths do clean up at the end of the GHC session. This fixes warnings about non-empty temporary directories. Fixes #22952
* hadrian: Fix flavour compiler stage options off-by-one errorAlexis King2023-03-089-33/+61
| | | | | | | | | | | | | | | !9193 pointed out that ghcDebugAssertions was supposed to be a predicate on the stage of the built compiler, but in practice it was a predicate on the stage of the compiler used to build. Unfortunately, while it fixed that issue for ghcDebugAssertions, it documented every other similar option as behaving the same way when in fact they all used the old behavior. The new behavior of ghcDebugAssertions seems more intuitive, so this commit changes the interpretation of every other option to match. It also improves the enableProfiledGhc and debugGhc flavour transformers by making them more selective about which stages in which they build additional library/RTS ways.
* nonmoving: Non-concurrent collectionBen Gamari2023-03-088-83/+133
|
* rts: Capture GC configuration in a structBen Gamari2023-03-083-19/+34
| | | | | The number of distinct arguments passed to GarbageCollect was getting a bit out of hand.
* testsuite: Skip T7160 in the nonmoving wayBen Gamari2023-03-081-2/+2
| | | | Finalization order is different under the nonmoving collector.
* testsuite: Mark ffi023 as broken due to #23089Ben Gamari2023-03-081-0/+1
|
* rts: Fix incorrect STATIC_INLINEBen Gamari2023-03-081-1/+1
| | | | This should be INLINE_HEADER lest we get unused declaration warnings.
* rts: Rename clear_segment(_free_blocks)?Ben Gamari2023-03-083-9/+9
| | | | | To reflect the fact that these are to do with the nonmoving collector, now since they are exposed no longer static.
* testsuite: Only run T22795* in the normal wayBen Gamari2023-03-081-3/+3
| | | | | It doesn't make sense to run these in multiple ways as they merely test whether `-threaded`/`-single-threaded` flags.
* nonmoving: Split out nonmovingAllocateGCBen Gamari2023-03-084-15/+55
|
* nonmoving: Move allocator into new source fileBen Gamari2023-03-087-198/+237
|
* gitlab-ci: Add job bootstrapping with nonmoving GCBen Gamari2023-03-082-72/+267
|
* hadrian: Add +boot_nonmoving_gc flavour transformerBen Gamari2023-03-081-0/+8
| | | | For using GHC bootstrapping to validate the non-moving GC.
* nonmoving: Ensure that sanity checker accounts for saved_filled segmentsBen Gamari2023-03-081-0/+1
|
* nonmoving: Fix unregisterised buildBen Gamari2023-03-081-0/+4
|
* testsuite: Skip some tests when sanity checking is enabledBen Gamari2023-03-084-6/+12
|
* rts: Encapsulate block allocator spinlockBen Gamari2023-03-087-21/+28
| | | | | This makes it a bit easier to add instrumentation on this spinlock while debugging.
* nonmoving: Don't call prepareUnloadCheckBen Gamari2023-03-081-1/+2
| | | | | | When the nonmoving GC is in use we do not call `checkUnload` (since we don't unload code) and therefore should not call `prepareUnloadCheck`, lest we run into assertions.
* rts/Sanity: Fix block count assertion with non-moving collectorBen Gamari2023-03-081-3/+13
| | | | | | | The nonmoving collector does not use `oldest_gen->blocks` to track its block list. However, it nevertheless updates `oldest_gen->n_blocks` to ensure that its size is accounted for by the storage manager. Consequently, we must not attempt to assert consistency between the two.
* nonmoving: Fix Note referencesBen Gamari2023-03-087-8/+8
| | | | | Some references to Note [Deadlock detection under the non-moving collector] were missing an article.