summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP: Punned nameswip/int-index/pun-namesVladislav Zavialov2023-01-206-12/+54
|
* Fix printing of promoted MkSolo datacon (#22785)Andrei Borzenkov2023-01-1811-19/+39
| | | | | | | | | | | | Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo, and Solo was turned into a pattern synonym for backwards compatibility. Since pattern synonyms can not be promoted, the old code that pretty-printed promoted single-element tuples started producing ill-typed code: t :: Proxy ('Solo Int) This fails with "Pattern synonym ‘Solo’ used as a type" The solution is to track the distinction between type constructors and data constructors more carefully when printing single-element tuples.
* Add regression test for #22151Ryan Scott2023-01-182-0/+17
| | | | | | | | | Issue #22151 was coincidentally fixed in commit aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy superclass dicts`). This adds a regression test to ensure that the issue remains fixed. Fixes #22151.
* nativeGen/X86: MFENCE is unnecessary for release semanticsBen Gamari2023-01-181-1/+1
| | | | | | | | | | | In #22764 a user noticed that a program implementing a simple atomic counter via an STRef regressed significantly due to the introduction of necessary atomic operations in the MutVar# primops (#22468). This regression was caused by a bug in the NCG, which emitted an unnecessary MFENCE instruction for a release-ordered atomic write. MFENCE is rather only needed to achieve sequentially consistent ordering. Fixes #22764.
* ghc-pkg does not have to depend on terminfoBodigrim2023-01-182-45/+17
|
* ghc package does not have to depend on terminfoBodigrim2023-01-185-32/+9
|
* Give the RTS it's own configure scriptJohn Ericson2023-01-1811-43/+92
| | | | | | | | | | | | | Currently it doesn't do much anything, we are just trying to introduce it without breaking the build. Later, we will move functionality from the top-level configure script over to it. We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to facilitate and existing hack of skipping some configure checks for the RTS we now need to skip just *part* not *all* of the "post configure" hook, as running the configure script (which we definitely want to do) is also implemented as part of the "post configure" hook. But doing this requires exposing functionality that wasn't exposed before.
* Move documentation of deferred type error flags out of warnings sectionAdam Gundry2023-01-182-62/+63
|
* Revise warnings documentation in user's guideAdam Gundry2023-01-182-34/+60
|
* Minor corrections to commentsAdam Gundry2023-01-181-4/+4
|
* Refactor warning flag parsing to add missing flagsAdam Gundry2023-01-186-92/+126
| | | | | | | | This adds `-Werror=<group>` and `-fwarn-<group>` flags for warning groups as well as individual warnings. Previously these were defined on an ad hoc basis so for example we had `-Werror=compat` but not `-Werror=unused-binds`, whereas we had `-fwarn-unused-binds` but not `-fwarn-compat`. Fixes #22182.
* Add PrimCallConv support to GHCiLuite Stegeman2023-01-1821-145/+1043
| | | | | | | | | | | | | This adds support for calling Cmm code from bytecode using the native calling convention, allowing modules that use `foreign import prim` to be loaded and debugged in GHCi. This patch introduces a new `PRIMCALL` bytecode instruction and a helper stack frame `stg_primcall`. The code is based on the existing functionality for dealing with unboxed tuples in bytecode, which has been generalised to handle arbitrary calls. Fixes #22051
* Fix typo in recent darwin tests fixCheng Shao2023-01-181-1/+1
| | | | | Corrects a typo in !9647. Otherwise T18623 will still fail on darwin and stall other people's work.
* Bump gmp-tarballs submoduleBen Gamari2023-01-181-0/+0
| | | | This backports the upstream fix for CVE-2021-43618, fixing #22789.
* Bump ghc-tarballs to fix #22497Ben Gamari2023-01-181-0/+0
| | | | | | | | | | | It turns out that gmp 6.2.1 uses the platform-reserved `x18` register on AArch64/Darwin. This was fixed in upstream changeset 18164:5f32dbc41afc, which was merged in 2020. Here I backport this patch although I do hope that a new release is forthcoming soon. Bumps gmp-tarballs submodule. Fixes #22497.
* Add missing parenthesizeHsType in cvtSigTypeKindRyan Scott2023-01-184-2/+16
| | | | | | | | We need to ensure that the output of `cvtSigTypeKind` is parenthesized (at precedence `sigPrec`) so that any type signatures with an outermost, explicit kind signature can parse correctly. Fixes #22784.
* Enable -Wstar-is-type by default (#22759)Vladislav Zavialov2023-01-1816-53/+38
| | | | | | | | | | | | | Following the plan in GHC Proposal #143 "Remove the * kind syntax", which states: In the next release (or 3 years in), enable -fwarn-star-is-type by default. The "next release" happens to be 9.6.1 I also moved the T21583 test case from should_fail to should_compile, because the only reason it was failing was -Werror=compat in our test suite configuration.
* Use -Wdefault when running Python testdriver (#22727)Krzysztof Gogolewski2023-01-184-7/+9
|
* testsuite: req_smp --> req_target_smp, req_ghc_smpSylvain Henry2023-01-1816-44/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #22630 and !9552 This commit: - splits req_smp into req_target_smp and req_ghc_smp - changes the testsuite driver to calculate req_ghc_smp - changes a handful of tests to use req_target_smp instead of req_smp - changes a handful of tests to use req_host_smp when needed The problem: - the problem this solves is the ambiguity surrounding req_smp - on master req_smp was used to express the constraint that the program being compiled supports smp _and_ that the host RTS (i.e., the RTS used to compile the program) supported smp. Normally that is fine, but in cross compilation this is not always the case as was discovered in #22630. The solution: - Differentiate the two constraints: - use req_target_smp to say the RTS the compiled program is linked with (and the platform) supports smp - use req_host_smp to say the RTS the host is linked with supports smp WIP: fix req_smp (target vs ghc) add flag to separate bootstrapper split req_smp -> req_target_smp and req_ghc_smp update tests smp flags cleanup and add some docstrings only set ghc_with_smp to bootstrapper on S1 or CC Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1 and cross compiling test the RTS in config/ghc not hadrian re-add ghc_with_smp fix and align req names fix T11760 to use req_host_smp test the rts directly, avoid python 3.5 limitation test the compiler in a try block align out of tree and in tree withSMP flags mark failing tests as host req smp testsuite: req_host_smp --> req_ghc_smp Fix ghc vs host, fix ghc_with_smp leftover
* Hadrian: fix warnings (#22783)Vladislav Zavialov2023-01-173-5/+3
| | | | | | | | | This change fixes the following warnings when building Hadrian: src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints] src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators] src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators] src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]
* Document the semantics of pattern bindings a bit betterSimon Peyton Jones2023-01-177-96/+295
| | | | This MR is in response to the discussion on #22719
* Avoid unnecessary printf warnings in EventLog.cViktor Dukhovni2023-01-171-4/+2
| | | | Fixes #22778
* compiler: Small optimisation of assertMBen Gamari2023-01-171-1/+7
| | | | | | | | | In #22739 @AndreasK noticed that assertM performed the action to compute the asserted predicate regardless of whether DEBUG is enabled. This is inconsistent with the other assertion operations and general convention. Fix this. Closes #22739.
* 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