summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* EPA: Add annotation for 'type' in DataDeclAlan Zimmerman2023-01-166-11/+84
| | | | Closes #22765
* Bump submodule parsec to 3.1.16.1Bodigrim2023-01-161-0/+0
|
* Add scripts to generate ghcup metadata on nightly and release pipelinesMatthew Pickering2023-01-1610-25/+614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. A python script in .gitlab/rel_eng/mk-ghcup-metadata which generates suitable metadata for consumption by GHCUp for the relevant pipelines. - The script generates the metadata just as the ghcup maintainers want, without taking into account platform/library combinations. It is updated manually when the mapping changes. - The script downloads the bindists which ghcup wants to distribute, calculates the hash and generates the yaml in the correct structure. - The script is documented in the .gitlab/rel_eng/mk-ghcup-metadata/README.mk file 1a. The script requires us to understand the mapping from platform -> job. To choose the preferred bindist for each platform the .gitlab/gen_ci.hs script is modified to allow outputting a metadata file which answers the question about which job produces the bindist which we want to distribute to users for a specific platform. 2. Pipelines to run on nightly and release jobs to generate metadata - ghcup-metadata-nightly: Generates metadata which points directly to artifacts in the nightly job. - ghcup-metadata-release: Generates metadata suitable for inclusion directly in ghcup by pointing to the downloads folder where the bindist will be uploaded to. 2a. Trigger jobs which test the generated metadata in the downstream `ghccup-ci` repo. See that repo for documentation about what is tested and how but essentially we test in a variety of clean images that ghcup can download and install the bindists we say exist in our metadata.
* ci: Don't use complicated image or clone in not-interruptible jobMatthew Pickering2023-01-161-1/+3
| | | | | | This job exists only for the meta-reason of not allowing nightly pipelines to be cancelled. It was taking two minutes to run as in order to run "true" we would also clone the whole GHC repo.
* rel_eng: Add release engineering scripts into ghc treeMatthew Pickering2023-01-1611-1/+765
| | | | | | | | | | It is better to keep these scripts in the tree as they depend on the CI configuration and so on. By keeping them in tree we can keep them up-to-date as the CI config changes and also makes it easier to backport changes to the release script between release branches in future. The final motivation is that it makes generating GHCUp metadata possible.
* ci: Change owner of files in test-bootstrap jobMatthew Pickering2023-01-161-0/+1
|
* ci: Don't build aarch64-deb10-llvm job on release pipelinesMatthew Pickering2023-01-162-61/+1
| | | | Closes #22721
* ci: Change owner of files in source-tarball jobMatthew Pickering2023-01-161-0/+1
| | | | | | | | | | | | | | This fixes errors of the form: ``` fatal: detected dubious ownership in repository at '/builds/ghc/ghc' To add an exception for this directory, call: git config --global --add safe.directory /builds/ghc/ghc inferred 9.7.20230113 checking for GHC Git commit id... fatal: detected dubious ownership in repository at '/builds/ghc/ghc' To add an exception for this directory, call: git config --global --add safe.directory /builds/ghc/ghc ```
* ci: Bump CACHE_REV so that ghc-9.6 branch and HEAD have different cachesMatthew Pickering2023-01-161-1/+1
| | | | | | | | Having the same CACHE_REV on both branches leads to issues where the darwin toolchain is different on ghc-9.6 and HEAD which leads to long darwin build times. In general we should ensure that each branch has a different CACHE_REV.
* Mark maximumBy/minimumBy as INLINE.Andreas Klebinger2023-01-162-2/+34
| | | | | | | | | The RHS was too large to inline which often prevented the overhead of the Maybe from being optimized away. By marking it as INLINE we can eliminate the overhead of both the maybe and are able to unpack the accumulator when possible. Fixes #22609
* Add regression test for #22611.Andreas Klebinger2023-01-163-0/+310
| | | | A case were a function used to fail to specialize, but now does.
* Hadrian: generalise &%> to avoid warningssheaf2023-01-167-21/+91
| | | | | | | | | | This patch introduces a more general version of &%> that works with general traversable shapes, instead of lists. This allows us to pass along the information that the length of the list of filepaths passed to the function exactly matches the length of the input list of filepath patterns, avoiding pattern match warnings. Fixes #22430
* Separate core inlining logic from `Unfolding` type.Andreas Klebinger2023-01-169-572/+604
| | | | | This seems like a good idea either way, but is mostly motivated by a patch where this avoids a module loop.
* Add a missing checkEscapingKindSimon Peyton Jones2023-01-137-49/+74
| | | | | | | | Ticket #22743 pointed out that there is a missing check, for type-inferred bindings, that the inferred type doesn't have an escaping kind. The fix is easy.
* wasm ci: Remove wasm release jobsMatthew Pickering2023-01-132-191/+3
| | | | | This removes the wasm release jobs, as we do not yet intend to distribute these binaries.
* ci: add wasm ci jobs via gen_ci.hsCheng Shao2023-01-133-605/+418
| | | | | | | - There is one regular wasm job run in validate pipelines - Additionally, int-native/unreg wasm jobs run in nightly/release pipelines Also, remove the legacy handwritten wasm ci jobs in .gitlab-ci.yml.
* ci: source the toolchain env file in wasm jobsCheng Shao2023-01-131-0/+4
|
* ci: improve nix-shell for gen_ci.hs and fix some ghc/hlint warningsCheng Shao2023-01-135-34/+53
| | | | | | | | | | | - Add a ghc environment including prebuilt dependencies to the nix-shell. Get rid of the ad hoc cabal cache and all dependencies are now downloaded from the nixos binary cache. - Make gen_ci.hs a cabal package with HLS integration, to make future hacking of gen_ci.hs easier. - Fix some ghc/hlint warnings after I got HLS to work. - For the lint-ci-config job, do a shallow clone to save a few minutes of unnecessary git checkout time.
* ci: use in-image emsdk for js jobsCheng Shao2023-01-131-15/+2
|
* ci: enable xz parallel compression for x64 jobsCheng Shao2023-01-131-0/+7
|
* ci: Bump DOCKER_REVCheng Shao2023-01-131-1/+1
|
* Bump process submoduleCheng Shao2023-01-131-0/+0
|
* Bump hsc2hs submoduleCheng Shao2023-01-131-0/+0
|
* gitlab-ci: Pass -w to cabal updateBen Gamari2023-01-131-1/+3
| | | | Due to cabal#8447, cabal-install 3.8.1.0 requires a compiler to run `cabal update`.
* gitlab-ci: Bump Darwin bootstrap toolchainBen Gamari2023-01-132-8/+8
| | | | | This updates the bootstrap compiler on Darwin from 8.10.7 to 9.2.5, ensuring that we have the fix for #21964.
* Bump submodule bytestring to 0.11.4.0Bodigrim2023-01-133-11/+13
| | | | | | Metric Decrease: T21839c T21839r
* Don't run hadrian-multi on fast-ci labelMatthew Pickering2023-01-121-0/+2
| | | | Fixes #22667
* Fix #22728: Not all diagnostics in safe check are fatalOleg Grenrus2023-01-129-13/+52
| | | | Also add tests for the issue and -Winferred-safe-imports in general
* Make `GHC.Tc.Errors.Reporter` take `NonEmpty ErrorItem` rather than ↵M Farkas-Dyck2023-01-121-62/+54
| | | | | | `[ErrorItem]`, which lets us drop some panics. Also use the `BasicMismatch` constructor rather than `mkBasicMismatchMsg`, which lets us drop the "-Wno-incomplete-record-updates" flag.
* Change MSYSTEM to CLANG64 uniformlyCheng Shao2023-01-125-20/+14
|
* Only gc sparks locally when we can ensure marking is done.Andreas Klebinger2023-01-123-14/+46
| | | | | | | | When performing GC without work stealing there was no guarantee that spark pruning was happening after marking of the sparks. This could cause us to GC live sparks under certain circumstances. Fixes #22528.
* Fix contification with stable unfoldings (#22428)Sebastian Graf2023-01-127-244/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many functions now return a `TailUsageDetails` that adorns a `UsageDetails` with a `JoinArity` that reflects the number of join point binders around the body for which the `UsageDetails` was computed. `TailUsageDetails` is now returned by `occAnalLamTail` as well as `occAnalUnfolding` and `occAnalRules`. I adjusted `Note [Join points and unfoldings/rules]` and `Note [Adjusting right-hand sides]` to account for the new machinery. I also wrote a new `Note [Join arity prediction based on joinRhsArity]` and refer to it when we combine `TailUsageDetails` for a recursive RHS. I also renamed * `occAnalLam` to `occAnalLamTail` * `adjustRhsUsage` to `adjustTailUsage` * a few other less important functions and properly documented the that each call of `occAnalLamTail` must pair up with `adjustTailUsage`. I removed `Note [Unfoldings and join points]` because it was redundant with `Note [Occurrences in stable unfoldings]`. While in town, I refactored `mkLoopBreakerNodes` so that it returns a condensed `NodeDetails` called `SimpleNodeDetails`. Fixes #22428. The refactoring seems to have quite beneficial effect on ghc/alloc performance: ``` CoOpt_Read(normal) ghc/alloc 784,778,420 768,091,176 -2.1% GOOD T12150(optasm) ghc/alloc 77,762,270 75,986,720 -2.3% GOOD T12425(optasm) ghc/alloc 85,740,186 84,641,712 -1.3% GOOD T13056(optasm) ghc/alloc 306,104,656 299,811,632 -2.1% GOOD T13253(normal) ghc/alloc 350,233,952 346,004,008 -1.2% T14683(normal) ghc/alloc 2,800,514,792 2,754,651,360 -1.6% T15304(normal) ghc/alloc 1,230,883,318 1,215,978,336 -1.2% T15630(normal) ghc/alloc 153,379,590 151,796,488 -1.0% T16577(normal) ghc/alloc 7,356,797,056 7,244,194,416 -1.5% T17516(normal) ghc/alloc 1,718,941,448 1,692,157,288 -1.6% T19695(normal) ghc/alloc 1,485,794,632 1,458,022,112 -1.9% T21839c(normal) ghc/alloc 437,562,314 431,295,896 -1.4% GOOD T21839r(normal) ghc/alloc 446,927,580 440,615,776 -1.4% GOOD geo. mean -0.6% minimum -2.4% maximum -0.0% ``` Metric Decrease: CoOpt_Read T10421 T12150 T12425 T13056 T18698a T18698b T21839c T21839r T9961
* configure: Fix escaping of `$tooldir`Ben Gamari2023-01-121-4/+4
| | | | | | | | | In !9547 I introduced `$tooldir` directories into GHC's default link and compilation flags to ensure that our C toolchain finds its own headers and libraries before others on the system. However, the patch was subtly wrong in the escaping of `$tooldir`. Fix this. Fixes #22561.
* rts: Drop racy assertionBen Gamari2023-01-121-0/+3
| | | | | | | 0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in `dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean. However, this isn't necessarily the case since another thread may have raced us to dirty the object.
* Revert "rts: Drop racy assertion"Ben Gamari2023-01-121-3/+0
| | | | | | | The logic here was inverted. Reverting the commit to avoid confusion when examining the commit history. This reverts commit b3eacd64fb36724ed6c5d2d24a81211a161abef1.
* Fix finaliseArgBoxities for OPAQUE functionSimon Peyton Jones2023-01-113-22/+53
| | | | | | | We never do worker wrapper for OPAQUE functions, so we must zap the unboxing info during strictness analysis. This patch fixes #22502
* Add 'docWithStyle' to improve codegenKrzysztof Gogolewski2023-01-115-68/+78
| | | | | | | | | | | | | | This new combinator docWithStyle :: IsOutput doc => doc -> (PprStyle -> SDoc) -> doc let us remove the need for code to be polymorphic in HDoc when not used in code style. Metric Decrease: ManyConstructors T13035 T1969
* Fix void-arg-adding mechanism for worker/wrapperSimon Peyton Jones2023-01-118-135/+209
| | | | | | | | | | | | | As #22725 shows, in worker/wrapper we must add the void argument /last/, not first. See GHC.Core.Opt.WorkWrap.Utils Note [Worker/wrapper needs to add void arg last]. That led me to to study GHC.Core.Opt.SpecConstr Note [SpecConstr needs to add void args first] which suggests the opposite! And indeed I think it's the other way round for SpecConstr -- or more precisely the void arg must precede the "extra_bndrs". That led me to some refactoring of GHC.Core.Opt.SpecConstr.calcSpecInfo.
* Parse qualified terms in type signaturesHaskellMouse2023-01-1116-10/+142
| | | | | | | | This commit allows qualified terms in type signatures to pass the parser and to be cathced by renamer with more informative error message. Adds a few tests. Fixes #21605
* Refactor the treatment of loopy superclass dictswip/T20666Richard Eisenberg2023-01-1154-794/+1293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completely re-engineers how we deal with loopy superclass dictionaries in instance declarations. It fixes #20666 and #19690 The highlights are * Recognise that the loopy-superclass business should use precisely the Paterson conditions. This is much much nicer. See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance * With that in mind, define "Paterson-smaller" in Note [Paterson conditions] in GHC.Tc.Validity, and the new data type `PatersonSize` in GHC.Tc.Utils.TcType, along with functions to compute and compare PatsonSizes * Use the new PatersonSize stuff when solving superclass constraints See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance * In GHC.Tc.Solver.Monad.lookupInInerts, add a missing call to prohibitedSuperClassSolve. This was the original cause of #20666. * Treat (TypeError "stuff") as having PatersonSize zero. See Note [Paterson size for type family applications] in GHC.Tc.Utils.TcType. * Treat the head of a Wanted quantified constraint in the same way as the superclass of an instance decl; this is what fixes #19690. See GHC.Tc.Solver.Canonical Note [Solving a Wanted forall-constraint] (Thanks to Matthew Craven for this insight.) This entailed refactoring the GivenSc constructor of CtOrigin a bit, to say whether it comes from an instance decl or quantified constraint. * Some refactoring way in which redundant constraints are reported; we don't want to complain about the extra, apparently-redundant constraints that we must add to an instance decl because of the loopy-superclass thing. I moved some work from GHC.Tc.Errors to GHC.Tc.Solver. * Add a new section to the user manual to describe the loopy superclass issue and what rules it follows.
* Misc cleanupKrzysztof Gogolewski2023-01-1112-37/+24
| | | | | | | | - Remove unused mkWildEvBinder - Use typeTypeOrConstraint - more symmetric and asserts that that the type is Type or Constraint - Fix escape sequences in Python; they raise a deprecation warning with -Wdefault
* Introduce the TypeAbstractions language flagVladislav Zavialov2023-01-1118-88/+119
| | | | | | | | | | | | | | | | | | | | | | | | | GHC Proposals #448 "Modern scoped type variables" and #425 "Invisible binders in type declarations" introduce a new language extension flag: TypeAbstractions. Part of the functionality guarded by this flag has already been implemented, namely type abstractions in constructor patterns, but it was guarded by a combination of TypeApplications and ScopedTypeVariables instead of a dedicated language extension flag. This patch does the following: * introduces a new language extension flag TypeAbstractions * requires TypeAbstractions for @a-syntax in constructor patterns instead of TypeApplications and ScopedTypeVariables * creates a User's Guide page for TypeAbstractions and moves the "Type Applications in Patterns" section there To avoid a breaking change, the new flag is implied by ScopedTypeVariables and is retroactively added to GHC2021. Metric Decrease: MultiLayerModulesTH_OneShot
* testsuite: Drop testheapalloced.cBen Gamari2023-01-111-100/+0
| | | | | | | As noted in #22414, this file (which appears to be a benchmark for characterising the one-step allocator's MBlock cache) is currently unreferenced. Remove it. Closes #22414.
* Added a new warning about compatibility with RequiredTypeArgumentsHaskellMouse2023-01-1132-4/+239
| | | | | | | | | This commit introduces a new warning that indicates code incompatible with future extension: RequiredTypeArguments. Enabling this extension may break some code and the warning will help to make it compatible in advance.
* m4/fp_leading_underscore.m4: Avoid implicit exit function declarationFlorian Weimer2023-01-111-6/+4
| | | | | | | And switch to a new-style function definition. Fixes build issues with compilers that do not accept implicit function declarations.
* fix missing haddock pipeJade Lovelace2023-01-111-1/+1
|
* Fix tcPluginRewrite exampleJade Lovelace2023-01-111-1/+1
|
* Revert "NCG(x86): Compile add+shift as lea if possible."Matthew Pickering2023-01-094-95/+0
| | | | | | This reverts commit 20457d775885d6c3df020d204da9a7acfb3c2e5a. See #22666 and #21777
* Fix outdated link to Happy section on sequencesGeorgi Lyubenov2023-01-091-2/+3
|
* Check for FP_LD_NO_FIXUP_CHAINS in installation configure scriptMatthew Pickering2023-01-091-0/+5
| | | | | | | Otherwise, when installing from a bindist the C flag isn't passed to the C compiler. This completes the fix for #22429