Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
12 changed files:
- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Utils/Monad.hs
- + testsuite/tests/tcplugins/T26395.hs
- + testsuite/tests/tcplugins/T26395.stderr
- + testsuite/tests/tcplugins/T26395_Plugin.hs
- testsuite/tests/tcplugins/all.T
Changes:
| ... | ... | @@ -2,7 +2,7 @@ variables: |
| 2 | 2 | GIT_SSL_NO_VERIFY: "1"
|
| 3 | 3 | |
| 4 | 4 | # Commit of ghc/ci-images repository from which to pull Docker images
|
| 5 | - DOCKER_REV: be4ac2cd18f38e63b263e2a27c76a7c279385796
|
|
| 5 | + DOCKER_REV: a97d5c67d803c6b3811c6cccdf33dc8e9d7eafe3
|
|
| 6 | 6 | |
| 7 | 7 | # Sequential version number of all cached things.
|
| 8 | 8 | # Bump to invalidate GitLab CI cache.
|
| ... | ... | @@ -433,14 +433,14 @@ hadrian-ghc-in-ghci: |
| 433 | 433 | hadrian-multi:
|
| 434 | 434 | stage: testing
|
| 435 | 435 | needs:
|
| 436 | - - job: x86_64-linux-fedora33-release
|
|
| 436 | + - job: x86_64-linux-fedora42-release
|
|
| 437 | 437 | optional: true
|
| 438 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 438 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 439 | 439 | optional: true
|
| 440 | - - job: release-x86_64-linux-fedora33-release
|
|
| 440 | + - job: release-x86_64-linux-fedora42-release
|
|
| 441 | 441 | optional: true
|
| 442 | 442 | dependencies: null
|
| 443 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 443 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 444 | 444 | before_script:
|
| 445 | 445 | # workaround for docker permissions
|
| 446 | 446 | - sudo chown ghc:ghc -R .
|
| ... | ... | @@ -460,7 +460,7 @@ hadrian-multi: |
| 460 | 460 | - ls
|
| 461 | 461 | - |
|
| 462 | 462 | mkdir tmp
|
| 463 | - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
|
|
| 463 | + tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
|
|
| 464 | 464 | pushd tmp/ghc-*/
|
| 465 | 465 | ./configure --prefix=$root
|
| 466 | 466 | make install
|
| ... | ... | @@ -522,17 +522,17 @@ test-cabal-reinstall-x86_64-linux-deb10: |
| 522 | 522 | abi-test-nightly:
|
| 523 | 523 | stage: full-build
|
| 524 | 524 | needs:
|
| 525 | - - job: nightly-x86_64-linux-fedora33-release-hackage
|
|
| 526 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 525 | + - job: nightly-x86_64-linux-fedora42-release-hackage
|
|
| 526 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 527 | 527 | tags:
|
| 528 | 528 | - x86_64-linux
|
| 529 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 529 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 530 | 530 | dependencies: null
|
| 531 | 531 | before_script:
|
| 532 | 532 | - mkdir -p normal
|
| 533 | 533 | - mkdir -p hackage
|
| 534 | - - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C normal/
|
|
| 535 | - - tar -xf ghc-x86_64-linux-fedora33-release-hackage_docs.tar.xz -C hackage/
|
|
| 534 | + - tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C normal/
|
|
| 535 | + - tar -xf ghc-x86_64-linux-fedora42-release-hackage_docs.tar.xz -C hackage/
|
|
| 536 | 536 | script:
|
| 537 | 537 | - .gitlab/ci.sh compare_interfaces_of "normal/ghc-*" "hackage/ghc-*"
|
| 538 | 538 | artifacts:
|
| ... | ... | @@ -609,9 +609,9 @@ doc-tarball: |
| 609 | 609 | hackage-doc-tarball:
|
| 610 | 610 | stage: packaging
|
| 611 | 611 | needs:
|
| 612 | - - job: nightly-x86_64-linux-fedora33-release-hackage
|
|
| 612 | + - job: nightly-x86_64-linux-fedora42-release-hackage
|
|
| 613 | 613 | optional: true
|
| 614 | - - job: release-x86_64-linux-fedora33-release-hackage
|
|
| 614 | + - job: release-x86_64-linux-fedora42-release-hackage
|
|
| 615 | 615 | optional: true
|
| 616 | 616 | - job: source-tarball
|
| 617 | 617 | tags:
|
| ... | ... | @@ -628,7 +628,7 @@ hackage-doc-tarball: |
| 628 | 628 | - hackage_docs
|
| 629 | 629 | before_script:
|
| 630 | 630 | - tar -xf ghc-*[0-9]-src.tar.xz
|
| 631 | - - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C ghc*/
|
|
| 631 | + - tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C ghc*/
|
|
| 632 | 632 | script:
|
| 633 | 633 | - cd ghc*/
|
| 634 | 634 | - mv .gitlab/rel_eng/upload_ghc_libs.py .
|
| ... | ... | @@ -754,7 +754,7 @@ test-bootstrap: |
| 754 | 754 | # Triggering jobs in the ghc/head.hackage project requires that we have a job
|
| 755 | 755 | # token for that repository. Furthermore the head.hackage CI job must have
|
| 756 | 756 | # access to an unprivileged access token with the ability to query the ghc/ghc
|
| 757 | -# project such that it can find the job ID of the fedora33 job for the current
|
|
| 757 | +# project such that it can find the job ID of the fedora42 job for the current
|
|
| 758 | 758 | # pipeline.
|
| 759 | 759 | #
|
| 760 | 760 | # hackage-lint: Can be triggered on any MR, normal validate pipeline or nightly build.
|
| ... | ... | @@ -841,7 +841,7 @@ nightly-hackage-lint: |
| 841 | 841 | |
| 842 | 842 | nightly-hackage-perf:
|
| 843 | 843 | needs:
|
| 844 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 844 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 845 | 845 | optional: true
|
| 846 | 846 | artifacts: false
|
| 847 | 847 | - job: nightly-aarch64-linux-deb12-validate
|
| ... | ... | @@ -860,7 +860,7 @@ nightly-hackage-perf: |
| 860 | 860 | |
| 861 | 861 | release-hackage-lint:
|
| 862 | 862 | needs:
|
| 863 | - - job: release-x86_64-linux-fedora33-release
|
|
| 863 | + - job: release-x86_64-linux-fedora42-release
|
|
| 864 | 864 | optional: true
|
| 865 | 865 | artifacts: false
|
| 866 | 866 | - job: release-aarch64-linux-deb12-release+no_split_sections
|
| ... | ... | @@ -946,13 +946,13 @@ perf-nofib: |
| 946 | 946 | allow_failure: true
|
| 947 | 947 | stage: testing
|
| 948 | 948 | needs:
|
| 949 | - - job: x86_64-linux-fedora33-release
|
|
| 949 | + - job: x86_64-linux-fedora42-release
|
|
| 950 | 950 | optional: true
|
| 951 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 951 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 952 | 952 | optional: true
|
| 953 | - - job: release-x86_64-linux-fedora33-release
|
|
| 953 | + - job: release-x86_64-linux-fedora42-release
|
|
| 954 | 954 | optional: true
|
| 955 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 955 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 956 | 956 | rules:
|
| 957 | 957 | - when: never
|
| 958 | 958 | - *full-ci
|
| ... | ... | @@ -965,7 +965,7 @@ perf-nofib: |
| 965 | 965 | - root=$(pwd)/ghc
|
| 966 | 966 | - |
|
| 967 | 967 | mkdir tmp
|
| 968 | - tar -xf ../ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
|
|
| 968 | + tar -xf ../ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
|
|
| 969 | 969 | pushd tmp/ghc-*/
|
| 970 | 970 | ./configure --prefix=$root
|
| 971 | 971 | make install
|
| ... | ... | @@ -989,21 +989,24 @@ perf-nofib: |
| 989 | 989 | perf:
|
| 990 | 990 | stage: testing
|
| 991 | 991 | needs:
|
| 992 | - - job: x86_64-linux-fedora33-release
|
|
| 992 | + - job: x86_64-linux-fedora42-release
|
|
| 993 | 993 | optional: true
|
| 994 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 994 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 995 | 995 | optional: true
|
| 996 | - - job: release-x86_64-linux-fedora33-release
|
|
| 996 | + - job: release-x86_64-linux-fedora42-release
|
|
| 997 | 997 | optional: true
|
| 998 | 998 | dependencies: null
|
| 999 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 999 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 1000 | 1000 | tags:
|
| 1001 | 1001 | - x86_64-linux-perf
|
| 1002 | + before_script:
|
|
| 1003 | + # workaround for docker permissions
|
|
| 1004 | + - sudo chown ghc:ghc -R .
|
|
| 1002 | 1005 | script:
|
| 1003 | 1006 | - root=$(pwd)/ghc
|
| 1004 | 1007 | - |
|
| 1005 | 1008 | mkdir tmp
|
| 1006 | - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
|
|
| 1009 | + tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
|
|
| 1007 | 1010 | pushd tmp/ghc-*/
|
| 1008 | 1011 | ./configure --prefix=$root
|
| 1009 | 1012 | make install
|
| ... | ... | @@ -1027,14 +1030,14 @@ perf: |
| 1027 | 1030 | abi-test:
|
| 1028 | 1031 | stage: testing
|
| 1029 | 1032 | needs:
|
| 1030 | - - job: x86_64-linux-fedora33-release
|
|
| 1033 | + - job: x86_64-linux-fedora42-release
|
|
| 1031 | 1034 | optional: true
|
| 1032 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 1035 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 1033 | 1036 | optional: true
|
| 1034 | - - job: release-x86_64-linux-fedora33-release
|
|
| 1037 | + - job: release-x86_64-linux-fedora42-release
|
|
| 1035 | 1038 | optional: true
|
| 1036 | 1039 | dependencies: null
|
| 1037 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 1040 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 1038 | 1041 | rules:
|
| 1039 | 1042 | - if: $CI_MERGE_REQUEST_ID
|
| 1040 | 1043 | - if: '$CI_COMMIT_BRANCH == "master"'
|
| ... | ... | @@ -1045,7 +1048,7 @@ abi-test: |
| 1045 | 1048 | - root=$(pwd)/ghc
|
| 1046 | 1049 | - |
|
| 1047 | 1050 | mkdir tmp
|
| 1048 | - tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
|
|
| 1051 | + tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
|
|
| 1049 | 1052 | pushd tmp/ghc-*/
|
| 1050 | 1053 | ./configure --prefix=$root
|
| 1051 | 1054 | make install
|
| ... | ... | @@ -1200,7 +1203,7 @@ ghcup-metadata-nightly: |
| 1200 | 1203 | extends: .ghcup-metadata
|
| 1201 | 1204 | # Explicit needs for validate pipeline because we only need certain bindists
|
| 1202 | 1205 | needs:
|
| 1203 | - - job: nightly-x86_64-linux-fedora33-release
|
|
| 1206 | + - job: nightly-x86_64-linux-fedora42-release
|
|
| 1204 | 1207 | artifacts: false
|
| 1205 | 1208 | - job: nightly-x86_64-linux-ubuntu24_04-validate
|
| 1206 | 1209 | artifacts: false
|
| ... | ... | @@ -1251,7 +1254,7 @@ ghcup-metadata-nightly: |
| 1251 | 1254 | # Update the ghcup metadata with information about this nightly pipeline
|
| 1252 | 1255 | ghcup-metadata-nightly-push:
|
| 1253 | 1256 | stage: deploy
|
| 1254 | - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
|
|
| 1257 | + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
|
|
| 1255 | 1258 | dependencies: null
|
| 1256 | 1259 | tags:
|
| 1257 | 1260 | - x86_64-linux
|
| ... | ... | @@ -82,7 +82,7 @@ The generated names for the jobs is important as there are a few downstream cons |
| 82 | 82 | of the jobs artifacts. Therefore some care should be taken if changing the generated
|
| 83 | 83 | names of jobs to update these other places.
|
| 84 | 84 | |
| 85 | -1. Fedora33 jobs are required by head.hackage
|
|
| 85 | +1. fedora42 jobs are required by head.hackage
|
|
| 86 | 86 | 2. The fetch-gitlab release utility pulls release artifacts from the
|
| 87 | 87 | 3. The ghc-head-from script downloads release artifacts based on a pipeline change.
|
| 88 | 88 | 4. Some subsequent CI jobs have explicit dependencies (for example docs-tarball, perf, perf-nofib)
|
| ... | ... | @@ -118,8 +118,7 @@ data LinuxDistro |
| 118 | 118 | | Debian11Js
|
| 119 | 119 | | Debian10
|
| 120 | 120 | | Debian9
|
| 121 | - | Fedora33
|
|
| 122 | - | Fedora38
|
|
| 121 | + | Fedora42
|
|
| 123 | 122 | | Ubuntu2404LoongArch64
|
| 124 | 123 | | Ubuntu2404
|
| 125 | 124 | | Ubuntu2204
|
| ... | ... | @@ -319,8 +318,7 @@ distroName Debian12Riscv = "deb12-riscv" |
| 319 | 318 | distroName Debian12Wine = "deb12-wine"
|
| 320 | 319 | distroName Debian10 = "deb10"
|
| 321 | 320 | distroName Debian9 = "deb9"
|
| 322 | -distroName Fedora33 = "fedora33"
|
|
| 323 | -distroName Fedora38 = "fedora38"
|
|
| 321 | +distroName Fedora42 = "fedora42"
|
|
| 324 | 322 | distroName Ubuntu2404LoongArch64 = "ubuntu24_04-loongarch"
|
| 325 | 323 | distroName Ubuntu1804 = "ubuntu18_04"
|
| 326 | 324 | distroName Ubuntu2004 = "ubuntu20_04"
|
| ... | ... | @@ -501,14 +499,6 @@ alpineVariables arch = mconcat $ |
| 501 | 499 | distroVariables :: Arch -> LinuxDistro -> Variables
|
| 502 | 500 | distroVariables arch Alpine312 = alpineVariables arch
|
| 503 | 501 | distroVariables arch Alpine322 = alpineVariables arch
|
| 504 | -distroVariables _ Fedora33 = mconcat
|
|
| 505 | - -- LLC/OPT do not work for some reason in our fedora images
|
|
| 506 | - -- These tests fail with this error: T11649 T5681 T7571 T8131b
|
|
| 507 | - -- +/opt/llvm/bin/opt: /lib64/libtinfo.so.5: no version information available (required by /opt/llvm/bin/opt)
|
|
| 508 | - -- +/opt/llvm/bin/llc: /lib64/libtinfo.so.5: no version information available (required by /opt/llvm/bin/llc)
|
|
| 509 | - [ "LLC" =: "/bin/false"
|
|
| 510 | - , "OPT" =: "/bin/false"
|
|
| 511 | - ]
|
|
| 512 | 502 | distroVariables _ _ = mempty
|
| 513 | 503 | |
| 514 | 504 | -----------------------------------------------------------------------------
|
| ... | ... | @@ -1207,13 +1197,13 @@ rhel_x86 = |
| 1207 | 1197 | |
| 1208 | 1198 | fedora_x86 :: [JobGroup Job]
|
| 1209 | 1199 | fedora_x86 =
|
| 1210 | - [ -- Fedora33 job is always built with perf so there's one job in the normal
|
|
| 1200 | + [ -- Fedora42 job is always built with perf so there's one job in the normal
|
|
| 1211 | 1201 | -- validate pipeline which is built with perf.
|
| 1212 | - fastCI (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig)
|
|
| 1202 | + fastCI (standardBuildsWithConfig Amd64 (Linux Fedora42) releaseConfig)
|
|
| 1213 | 1203 | -- This job is only for generating head.hackage docs
|
| 1214 | - , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig))
|
|
| 1215 | - , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) dwarf)
|
|
| 1216 | - , disableValidate (standardBuilds Amd64 (Linux Fedora38))
|
|
| 1204 | + , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora42) releaseConfig))
|
|
| 1205 | + , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora42) dwarf)
|
|
| 1206 | + , disableValidate (standardBuilds Amd64 (Linux Fedora42))
|
|
| 1217 | 1207 | ]
|
| 1218 | 1208 | where
|
| 1219 | 1209 | hackage_doc_job = rename (<> "-hackage") . modifyJobs (addVariable "HADRIAN_ARGS" "--haddock-for-hackage")
|
| ... | ... | @@ -1375,7 +1365,7 @@ platform_mapping = Map.map go combined_result |
| 1375 | 1365 | , "x86_64-linux-deb11-validate"
|
| 1376 | 1366 | , "x86_64-linux-deb12-validate"
|
| 1377 | 1367 | , "x86_64-linux-deb10-validate+debug_info"
|
| 1378 | - , "x86_64-linux-fedora33-release"
|
|
| 1368 | + , "x86_64-linux-fedora42-release"
|
|
| 1379 | 1369 | , "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
|
| 1380 | 1370 | , "x86_64-windows-validate"
|
| 1381 | 1371 | , "aarch64-linux-deb12-validate"
|
| ... | ... | @@ -1390,13 +1380,13 @@ platform_mapping = Map.map go combined_result |
| 1390 | 1380 | , "nightly-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate"
|
| 1391 | 1381 | , "nightly-x86_64-linux-alpine3_12-validate+fully_static"
|
| 1392 | 1382 | , "nightly-x86_64-linux-deb10-validate"
|
| 1393 | - , "nightly-x86_64-linux-fedora33-release"
|
|
| 1383 | + , "nightly-x86_64-linux-fedora42-release"
|
|
| 1394 | 1384 | , "nightly-x86_64-windows-validate"
|
| 1395 | 1385 | , "release-x86_64-linux-alpine3_12-release+fully_static+no_split_sections"
|
| 1396 | 1386 | , "release-x86_64-linux-deb10-release"
|
| 1397 | 1387 | , "release-x86_64-linux-deb11-release"
|
| 1398 | 1388 | , "release-x86_64-linux-deb12-release"
|
| 1399 | - , "release-x86_64-linux-fedora33-release"
|
|
| 1389 | + , "release-x86_64-linux-fedora42-release"
|
|
| 1400 | 1390 | , "release-x86_64-windows-release"
|
| 1401 | 1391 | ]
|
| 1402 | 1392 |
| ... | ... | @@ -2942,7 +2942,7 @@ |
| 2942 | 2942 | "XZ_OPT": "-9"
|
| 2943 | 2943 | }
|
| 2944 | 2944 | },
|
| 2945 | - "nightly-x86_64-linux-fedora33-release": {
|
|
| 2945 | + "nightly-x86_64-linux-fedora42-release": {
|
|
| 2946 | 2946 | "after_script": [
|
| 2947 | 2947 | ".gitlab/ci.sh save_cache",
|
| 2948 | 2948 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -2953,7 +2953,7 @@ |
| 2953 | 2953 | "artifacts": {
|
| 2954 | 2954 | "expire_in": "8 weeks",
|
| 2955 | 2955 | "paths": [
|
| 2956 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 2956 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 2957 | 2957 | "junit.xml",
|
| 2958 | 2958 | "unexpected-test-output.tar.gz"
|
| 2959 | 2959 | ],
|
| ... | ... | @@ -2963,14 +2963,14 @@ |
| 2963 | 2963 | "when": "always"
|
| 2964 | 2964 | },
|
| 2965 | 2965 | "cache": {
|
| 2966 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 2966 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 2967 | 2967 | "paths": [
|
| 2968 | 2968 | "cabal-cache",
|
| 2969 | 2969 | "toolchain"
|
| 2970 | 2970 | ]
|
| 2971 | 2971 | },
|
| 2972 | 2972 | "dependencies": [],
|
| 2973 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 2973 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 2974 | 2974 | "needs": [
|
| 2975 | 2975 | {
|
| 2976 | 2976 | "artifacts": false,
|
| ... | ... | @@ -2996,18 +2996,16 @@ |
| 2996 | 2996 | ],
|
| 2997 | 2997 | "variables": {
|
| 2998 | 2998 | "BIGNUM_BACKEND": "gmp",
|
| 2999 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 2999 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 3000 | 3000 | "BUILD_FLAVOUR": "release",
|
| 3001 | 3001 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3002 | 3002 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3003 | - "LLC": "/bin/false",
|
|
| 3004 | - "OPT": "/bin/false",
|
|
| 3005 | 3003 | "RUNTEST_ARGS": "",
|
| 3006 | - "TEST_ENV": "x86_64-linux-fedora33-release",
|
|
| 3004 | + "TEST_ENV": "x86_64-linux-fedora42-release",
|
|
| 3007 | 3005 | "XZ_OPT": "-9"
|
| 3008 | 3006 | }
|
| 3009 | 3007 | },
|
| 3010 | - "nightly-x86_64-linux-fedora33-release-hackage": {
|
|
| 3008 | + "nightly-x86_64-linux-fedora42-release-hackage": {
|
|
| 3011 | 3009 | "after_script": [
|
| 3012 | 3010 | ".gitlab/ci.sh save_cache",
|
| 3013 | 3011 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -3018,7 +3016,7 @@ |
| 3018 | 3016 | "artifacts": {
|
| 3019 | 3017 | "expire_in": "8 weeks",
|
| 3020 | 3018 | "paths": [
|
| 3021 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 3019 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 3022 | 3020 | "junit.xml",
|
| 3023 | 3021 | "unexpected-test-output.tar.gz"
|
| 3024 | 3022 | ],
|
| ... | ... | @@ -3028,14 +3026,14 @@ |
| 3028 | 3026 | "when": "always"
|
| 3029 | 3027 | },
|
| 3030 | 3028 | "cache": {
|
| 3031 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 3029 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 3032 | 3030 | "paths": [
|
| 3033 | 3031 | "cabal-cache",
|
| 3034 | 3032 | "toolchain"
|
| 3035 | 3033 | ]
|
| 3036 | 3034 | },
|
| 3037 | 3035 | "dependencies": [],
|
| 3038 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 3036 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 3039 | 3037 | "needs": [
|
| 3040 | 3038 | {
|
| 3041 | 3039 | "artifacts": false,
|
| ... | ... | @@ -3061,19 +3059,17 @@ |
| 3061 | 3059 | ],
|
| 3062 | 3060 | "variables": {
|
| 3063 | 3061 | "BIGNUM_BACKEND": "gmp",
|
| 3064 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 3062 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 3065 | 3063 | "BUILD_FLAVOUR": "release",
|
| 3066 | 3064 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3067 | 3065 | "HADRIAN_ARGS": "--haddock-for-hackage",
|
| 3068 | 3066 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3069 | - "LLC": "/bin/false",
|
|
| 3070 | - "OPT": "/bin/false",
|
|
| 3071 | 3067 | "RUNTEST_ARGS": "",
|
| 3072 | - "TEST_ENV": "x86_64-linux-fedora33-release",
|
|
| 3068 | + "TEST_ENV": "x86_64-linux-fedora42-release",
|
|
| 3073 | 3069 | "XZ_OPT": "-9"
|
| 3074 | 3070 | }
|
| 3075 | 3071 | },
|
| 3076 | - "nightly-x86_64-linux-fedora33-validate+debug_info": {
|
|
| 3072 | + "nightly-x86_64-linux-fedora42-validate": {
|
|
| 3077 | 3073 | "after_script": [
|
| 3078 | 3074 | ".gitlab/ci.sh save_cache",
|
| 3079 | 3075 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -3084,7 +3080,7 @@ |
| 3084 | 3080 | "artifacts": {
|
| 3085 | 3081 | "expire_in": "8 weeks",
|
| 3086 | 3082 | "paths": [
|
| 3087 | - "ghc-x86_64-linux-fedora33-validate+debug_info.tar.xz",
|
|
| 3083 | + "ghc-x86_64-linux-fedora42-validate.tar.xz",
|
|
| 3088 | 3084 | "junit.xml",
|
| 3089 | 3085 | "unexpected-test-output.tar.gz"
|
| 3090 | 3086 | ],
|
| ... | ... | @@ -3094,14 +3090,14 @@ |
| 3094 | 3090 | "when": "always"
|
| 3095 | 3091 | },
|
| 3096 | 3092 | "cache": {
|
| 3097 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 3093 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 3098 | 3094 | "paths": [
|
| 3099 | 3095 | "cabal-cache",
|
| 3100 | 3096 | "toolchain"
|
| 3101 | 3097 | ]
|
| 3102 | 3098 | },
|
| 3103 | 3099 | "dependencies": [],
|
| 3104 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 3100 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 3105 | 3101 | "needs": [
|
| 3106 | 3102 | {
|
| 3107 | 3103 | "artifacts": false,
|
| ... | ... | @@ -3127,18 +3123,16 @@ |
| 3127 | 3123 | ],
|
| 3128 | 3124 | "variables": {
|
| 3129 | 3125 | "BIGNUM_BACKEND": "gmp",
|
| 3130 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-validate+debug_info",
|
|
| 3131 | - "BUILD_FLAVOUR": "validate+debug_info",
|
|
| 3126 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate",
|
|
| 3127 | + "BUILD_FLAVOUR": "validate",
|
|
| 3132 | 3128 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3133 | 3129 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3134 | - "LLC": "/bin/false",
|
|
| 3135 | - "OPT": "/bin/false",
|
|
| 3136 | 3130 | "RUNTEST_ARGS": "",
|
| 3137 | - "TEST_ENV": "x86_64-linux-fedora33-validate+debug_info",
|
|
| 3131 | + "TEST_ENV": "x86_64-linux-fedora42-validate",
|
|
| 3138 | 3132 | "XZ_OPT": "-9"
|
| 3139 | 3133 | }
|
| 3140 | 3134 | },
|
| 3141 | - "nightly-x86_64-linux-fedora38-validate": {
|
|
| 3135 | + "nightly-x86_64-linux-fedora42-validate+debug_info": {
|
|
| 3142 | 3136 | "after_script": [
|
| 3143 | 3137 | ".gitlab/ci.sh save_cache",
|
| 3144 | 3138 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -3149,7 +3143,7 @@ |
| 3149 | 3143 | "artifacts": {
|
| 3150 | 3144 | "expire_in": "8 weeks",
|
| 3151 | 3145 | "paths": [
|
| 3152 | - "ghc-x86_64-linux-fedora38-validate.tar.xz",
|
|
| 3146 | + "ghc-x86_64-linux-fedora42-validate+debug_info.tar.xz",
|
|
| 3153 | 3147 | "junit.xml",
|
| 3154 | 3148 | "unexpected-test-output.tar.gz"
|
| 3155 | 3149 | ],
|
| ... | ... | @@ -3159,14 +3153,14 @@ |
| 3159 | 3153 | "when": "always"
|
| 3160 | 3154 | },
|
| 3161 | 3155 | "cache": {
|
| 3162 | - "key": "x86_64-linux-fedora38-$CACHE_REV",
|
|
| 3156 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 3163 | 3157 | "paths": [
|
| 3164 | 3158 | "cabal-cache",
|
| 3165 | 3159 | "toolchain"
|
| 3166 | 3160 | ]
|
| 3167 | 3161 | },
|
| 3168 | 3162 | "dependencies": [],
|
| 3169 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora38:$DOCKER_REV",
|
|
| 3163 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 3170 | 3164 | "needs": [
|
| 3171 | 3165 | {
|
| 3172 | 3166 | "artifacts": false,
|
| ... | ... | @@ -3192,12 +3186,12 @@ |
| 3192 | 3186 | ],
|
| 3193 | 3187 | "variables": {
|
| 3194 | 3188 | "BIGNUM_BACKEND": "gmp",
|
| 3195 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-validate",
|
|
| 3196 | - "BUILD_FLAVOUR": "validate",
|
|
| 3189 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate+debug_info",
|
|
| 3190 | + "BUILD_FLAVOUR": "validate+debug_info",
|
|
| 3197 | 3191 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3198 | 3192 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 3199 | 3193 | "RUNTEST_ARGS": "",
|
| 3200 | - "TEST_ENV": "x86_64-linux-fedora38-validate",
|
|
| 3194 | + "TEST_ENV": "x86_64-linux-fedora42-validate+debug_info",
|
|
| 3201 | 3195 | "XZ_OPT": "-9"
|
| 3202 | 3196 | }
|
| 3203 | 3197 | },
|
| ... | ... | @@ -4814,7 +4808,7 @@ |
| 4814 | 4808 | "XZ_OPT": "-9"
|
| 4815 | 4809 | }
|
| 4816 | 4810 | },
|
| 4817 | - "release-x86_64-linux-fedora33-release": {
|
|
| 4811 | + "release-x86_64-linux-fedora42-release": {
|
|
| 4818 | 4812 | "after_script": [
|
| 4819 | 4813 | ".gitlab/ci.sh save_cache",
|
| 4820 | 4814 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -4825,7 +4819,7 @@ |
| 4825 | 4819 | "artifacts": {
|
| 4826 | 4820 | "expire_in": "1 year",
|
| 4827 | 4821 | "paths": [
|
| 4828 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 4822 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 4829 | 4823 | "junit.xml",
|
| 4830 | 4824 | "unexpected-test-output.tar.gz"
|
| 4831 | 4825 | ],
|
| ... | ... | @@ -4835,14 +4829,14 @@ |
| 4835 | 4829 | "when": "always"
|
| 4836 | 4830 | },
|
| 4837 | 4831 | "cache": {
|
| 4838 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 4832 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 4839 | 4833 | "paths": [
|
| 4840 | 4834 | "cabal-cache",
|
| 4841 | 4835 | "toolchain"
|
| 4842 | 4836 | ]
|
| 4843 | 4837 | },
|
| 4844 | 4838 | "dependencies": [],
|
| 4845 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 4839 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 4846 | 4840 | "needs": [
|
| 4847 | 4841 | {
|
| 4848 | 4842 | "artifacts": false,
|
| ... | ... | @@ -4868,19 +4862,17 @@ |
| 4868 | 4862 | ],
|
| 4869 | 4863 | "variables": {
|
| 4870 | 4864 | "BIGNUM_BACKEND": "gmp",
|
| 4871 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 4865 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 4872 | 4866 | "BUILD_FLAVOUR": "release",
|
| 4873 | 4867 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 4874 | 4868 | "IGNORE_PERF_FAILURES": "all",
|
| 4875 | 4869 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 4876 | - "LLC": "/bin/false",
|
|
| 4877 | - "OPT": "/bin/false",
|
|
| 4878 | 4870 | "RUNTEST_ARGS": "",
|
| 4879 | - "TEST_ENV": "x86_64-linux-fedora33-release",
|
|
| 4871 | + "TEST_ENV": "x86_64-linux-fedora42-release",
|
|
| 4880 | 4872 | "XZ_OPT": "-9"
|
| 4881 | 4873 | }
|
| 4882 | 4874 | },
|
| 4883 | - "release-x86_64-linux-fedora33-release+debug_info": {
|
|
| 4875 | + "release-x86_64-linux-fedora42-release+debug_info": {
|
|
| 4884 | 4876 | "after_script": [
|
| 4885 | 4877 | ".gitlab/ci.sh save_cache",
|
| 4886 | 4878 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -4891,7 +4883,7 @@ |
| 4891 | 4883 | "artifacts": {
|
| 4892 | 4884 | "expire_in": "1 year",
|
| 4893 | 4885 | "paths": [
|
| 4894 | - "ghc-x86_64-linux-fedora33-release+debug_info.tar.xz",
|
|
| 4886 | + "ghc-x86_64-linux-fedora42-release+debug_info.tar.xz",
|
|
| 4895 | 4887 | "junit.xml",
|
| 4896 | 4888 | "unexpected-test-output.tar.gz"
|
| 4897 | 4889 | ],
|
| ... | ... | @@ -4901,14 +4893,14 @@ |
| 4901 | 4893 | "when": "always"
|
| 4902 | 4894 | },
|
| 4903 | 4895 | "cache": {
|
| 4904 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 4896 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 4905 | 4897 | "paths": [
|
| 4906 | 4898 | "cabal-cache",
|
| 4907 | 4899 | "toolchain"
|
| 4908 | 4900 | ]
|
| 4909 | 4901 | },
|
| 4910 | 4902 | "dependencies": [],
|
| 4911 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 4903 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 4912 | 4904 | "needs": [
|
| 4913 | 4905 | {
|
| 4914 | 4906 | "artifacts": false,
|
| ... | ... | @@ -4934,19 +4926,17 @@ |
| 4934 | 4926 | ],
|
| 4935 | 4927 | "variables": {
|
| 4936 | 4928 | "BIGNUM_BACKEND": "gmp",
|
| 4937 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release+debug_info",
|
|
| 4929 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release+debug_info",
|
|
| 4938 | 4930 | "BUILD_FLAVOUR": "release+debug_info",
|
| 4939 | 4931 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 4940 | 4932 | "IGNORE_PERF_FAILURES": "all",
|
| 4941 | 4933 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 4942 | - "LLC": "/bin/false",
|
|
| 4943 | - "OPT": "/bin/false",
|
|
| 4944 | 4934 | "RUNTEST_ARGS": "",
|
| 4945 | - "TEST_ENV": "x86_64-linux-fedora33-release+debug_info",
|
|
| 4935 | + "TEST_ENV": "x86_64-linux-fedora42-release+debug_info",
|
|
| 4946 | 4936 | "XZ_OPT": "-9"
|
| 4947 | 4937 | }
|
| 4948 | 4938 | },
|
| 4949 | - "release-x86_64-linux-fedora33-release-hackage": {
|
|
| 4939 | + "release-x86_64-linux-fedora42-release-hackage": {
|
|
| 4950 | 4940 | "after_script": [
|
| 4951 | 4941 | ".gitlab/ci.sh save_cache",
|
| 4952 | 4942 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -4957,7 +4947,7 @@ |
| 4957 | 4947 | "artifacts": {
|
| 4958 | 4948 | "expire_in": "1 year",
|
| 4959 | 4949 | "paths": [
|
| 4960 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 4950 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 4961 | 4951 | "junit.xml",
|
| 4962 | 4952 | "unexpected-test-output.tar.gz"
|
| 4963 | 4953 | ],
|
| ... | ... | @@ -4967,14 +4957,14 @@ |
| 4967 | 4957 | "when": "always"
|
| 4968 | 4958 | },
|
| 4969 | 4959 | "cache": {
|
| 4970 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 4960 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 4971 | 4961 | "paths": [
|
| 4972 | 4962 | "cabal-cache",
|
| 4973 | 4963 | "toolchain"
|
| 4974 | 4964 | ]
|
| 4975 | 4965 | },
|
| 4976 | 4966 | "dependencies": [],
|
| 4977 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 4967 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 4978 | 4968 | "needs": [
|
| 4979 | 4969 | {
|
| 4980 | 4970 | "artifacts": false,
|
| ... | ... | @@ -5000,80 +4990,14 @@ |
| 5000 | 4990 | ],
|
| 5001 | 4991 | "variables": {
|
| 5002 | 4992 | "BIGNUM_BACKEND": "gmp",
|
| 5003 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 4993 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 5004 | 4994 | "BUILD_FLAVOUR": "release",
|
| 5005 | 4995 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 5006 | 4996 | "HADRIAN_ARGS": "--haddock-for-hackage",
|
| 5007 | 4997 | "IGNORE_PERF_FAILURES": "all",
|
| 5008 | 4998 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 5009 | - "LLC": "/bin/false",
|
|
| 5010 | - "OPT": "/bin/false",
|
|
| 5011 | - "RUNTEST_ARGS": "",
|
|
| 5012 | - "TEST_ENV": "x86_64-linux-fedora33-release",
|
|
| 5013 | - "XZ_OPT": "-9"
|
|
| 5014 | - }
|
|
| 5015 | - },
|
|
| 5016 | - "release-x86_64-linux-fedora38-release": {
|
|
| 5017 | - "after_script": [
|
|
| 5018 | - ".gitlab/ci.sh save_cache",
|
|
| 5019 | - ".gitlab/ci.sh save_test_output",
|
|
| 5020 | - ".gitlab/ci.sh clean",
|
|
| 5021 | - "cat ci_timings.txt"
|
|
| 5022 | - ],
|
|
| 5023 | - "allow_failure": false,
|
|
| 5024 | - "artifacts": {
|
|
| 5025 | - "expire_in": "1 year",
|
|
| 5026 | - "paths": [
|
|
| 5027 | - "ghc-x86_64-linux-fedora38-release.tar.xz",
|
|
| 5028 | - "junit.xml",
|
|
| 5029 | - "unexpected-test-output.tar.gz"
|
|
| 5030 | - ],
|
|
| 5031 | - "reports": {
|
|
| 5032 | - "junit": "junit.xml"
|
|
| 5033 | - },
|
|
| 5034 | - "when": "always"
|
|
| 5035 | - },
|
|
| 5036 | - "cache": {
|
|
| 5037 | - "key": "x86_64-linux-fedora38-$CACHE_REV",
|
|
| 5038 | - "paths": [
|
|
| 5039 | - "cabal-cache",
|
|
| 5040 | - "toolchain"
|
|
| 5041 | - ]
|
|
| 5042 | - },
|
|
| 5043 | - "dependencies": [],
|
|
| 5044 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora38:$DOCKER_REV",
|
|
| 5045 | - "needs": [
|
|
| 5046 | - {
|
|
| 5047 | - "artifacts": false,
|
|
| 5048 | - "job": "hadrian-ghc-in-ghci"
|
|
| 5049 | - }
|
|
| 5050 | - ],
|
|
| 5051 | - "rules": [
|
|
| 5052 | - {
|
|
| 5053 | - "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)",
|
|
| 5054 | - "when": "on_success"
|
|
| 5055 | - }
|
|
| 5056 | - ],
|
|
| 5057 | - "script": [
|
|
| 5058 | - "sudo chown ghc:ghc -R .",
|
|
| 5059 | - ".gitlab/ci.sh setup",
|
|
| 5060 | - ".gitlab/ci.sh configure",
|
|
| 5061 | - ".gitlab/ci.sh build_hadrian",
|
|
| 5062 | - ".gitlab/ci.sh test_hadrian"
|
|
| 5063 | - ],
|
|
| 5064 | - "stage": "full-build",
|
|
| 5065 | - "tags": [
|
|
| 5066 | - "x86_64-linux"
|
|
| 5067 | - ],
|
|
| 5068 | - "variables": {
|
|
| 5069 | - "BIGNUM_BACKEND": "gmp",
|
|
| 5070 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-release",
|
|
| 5071 | - "BUILD_FLAVOUR": "release",
|
|
| 5072 | - "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
|
| 5073 | - "IGNORE_PERF_FAILURES": "all",
|
|
| 5074 | - "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
|
| 5075 | 4999 | "RUNTEST_ARGS": "",
|
| 5076 | - "TEST_ENV": "x86_64-linux-fedora38-release",
|
|
| 5000 | + "TEST_ENV": "x86_64-linux-fedora42-release",
|
|
| 5077 | 5001 | "XZ_OPT": "-9"
|
| 5078 | 5002 | }
|
| 5079 | 5003 | },
|
| ... | ... | @@ -7108,7 +7032,7 @@ |
| 7108 | 7032 | "TEST_ENV": "x86_64-linux-deb9-validate"
|
| 7109 | 7033 | }
|
| 7110 | 7034 | },
|
| 7111 | - "x86_64-linux-fedora33-release": {
|
|
| 7035 | + "x86_64-linux-fedora42-release": {
|
|
| 7112 | 7036 | "after_script": [
|
| 7113 | 7037 | ".gitlab/ci.sh save_cache",
|
| 7114 | 7038 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -7119,7 +7043,7 @@ |
| 7119 | 7043 | "artifacts": {
|
| 7120 | 7044 | "expire_in": "2 weeks",
|
| 7121 | 7045 | "paths": [
|
| 7122 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 7046 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 7123 | 7047 | "junit.xml",
|
| 7124 | 7048 | "unexpected-test-output.tar.gz"
|
| 7125 | 7049 | ],
|
| ... | ... | @@ -7129,14 +7053,14 @@ |
| 7129 | 7053 | "when": "always"
|
| 7130 | 7054 | },
|
| 7131 | 7055 | "cache": {
|
| 7132 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 7056 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 7133 | 7057 | "paths": [
|
| 7134 | 7058 | "cabal-cache",
|
| 7135 | 7059 | "toolchain"
|
| 7136 | 7060 | ]
|
| 7137 | 7061 | },
|
| 7138 | 7062 | "dependencies": [],
|
| 7139 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 7063 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 7140 | 7064 | "needs": [
|
| 7141 | 7065 | {
|
| 7142 | 7066 | "artifacts": false,
|
| ... | ... | @@ -7145,7 +7069,7 @@ |
| 7145 | 7069 | ],
|
| 7146 | 7070 | "rules": [
|
| 7147 | 7071 | {
|
| 7148 | - "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora33-release(\\s|$).*/)) || (($ONLY_JOBS == null) && ((\"true\" == \"true\")))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7072 | + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-release(\\s|$).*/)) || (($ONLY_JOBS == null) && ((\"true\" == \"true\")))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7149 | 7073 | "when": "on_success"
|
| 7150 | 7074 | }
|
| 7151 | 7075 | ],
|
| ... | ... | @@ -7162,17 +7086,15 @@ |
| 7162 | 7086 | ],
|
| 7163 | 7087 | "variables": {
|
| 7164 | 7088 | "BIGNUM_BACKEND": "gmp",
|
| 7165 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 7089 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 7166 | 7090 | "BUILD_FLAVOUR": "release",
|
| 7167 | 7091 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7168 | 7092 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7169 | - "LLC": "/bin/false",
|
|
| 7170 | - "OPT": "/bin/false",
|
|
| 7171 | 7093 | "RUNTEST_ARGS": "",
|
| 7172 | - "TEST_ENV": "x86_64-linux-fedora33-release"
|
|
| 7094 | + "TEST_ENV": "x86_64-linux-fedora42-release"
|
|
| 7173 | 7095 | }
|
| 7174 | 7096 | },
|
| 7175 | - "x86_64-linux-fedora33-release-hackage": {
|
|
| 7097 | + "x86_64-linux-fedora42-release-hackage": {
|
|
| 7176 | 7098 | "after_script": [
|
| 7177 | 7099 | ".gitlab/ci.sh save_cache",
|
| 7178 | 7100 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -7183,7 +7105,7 @@ |
| 7183 | 7105 | "artifacts": {
|
| 7184 | 7106 | "expire_in": "2 weeks",
|
| 7185 | 7107 | "paths": [
|
| 7186 | - "ghc-x86_64-linux-fedora33-release.tar.xz",
|
|
| 7108 | + "ghc-x86_64-linux-fedora42-release.tar.xz",
|
|
| 7187 | 7109 | "junit.xml",
|
| 7188 | 7110 | "unexpected-test-output.tar.gz"
|
| 7189 | 7111 | ],
|
| ... | ... | @@ -7193,14 +7115,14 @@ |
| 7193 | 7115 | "when": "always"
|
| 7194 | 7116 | },
|
| 7195 | 7117 | "cache": {
|
| 7196 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 7118 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 7197 | 7119 | "paths": [
|
| 7198 | 7120 | "cabal-cache",
|
| 7199 | 7121 | "toolchain"
|
| 7200 | 7122 | ]
|
| 7201 | 7123 | },
|
| 7202 | 7124 | "dependencies": [],
|
| 7203 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 7125 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 7204 | 7126 | "needs": [
|
| 7205 | 7127 | {
|
| 7206 | 7128 | "artifacts": false,
|
| ... | ... | @@ -7209,7 +7131,7 @@ |
| 7209 | 7131 | ],
|
| 7210 | 7132 | "rules": [
|
| 7211 | 7133 | {
|
| 7212 | - "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora33-release(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7134 | + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-release(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7213 | 7135 | "when": "on_success"
|
| 7214 | 7136 | }
|
| 7215 | 7137 | ],
|
| ... | ... | @@ -7226,18 +7148,16 @@ |
| 7226 | 7148 | ],
|
| 7227 | 7149 | "variables": {
|
| 7228 | 7150 | "BIGNUM_BACKEND": "gmp",
|
| 7229 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
|
|
| 7151 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
|
|
| 7230 | 7152 | "BUILD_FLAVOUR": "release",
|
| 7231 | 7153 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7232 | 7154 | "HADRIAN_ARGS": "--haddock-for-hackage",
|
| 7233 | 7155 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7234 | - "LLC": "/bin/false",
|
|
| 7235 | - "OPT": "/bin/false",
|
|
| 7236 | 7156 | "RUNTEST_ARGS": "",
|
| 7237 | - "TEST_ENV": "x86_64-linux-fedora33-release"
|
|
| 7157 | + "TEST_ENV": "x86_64-linux-fedora42-release"
|
|
| 7238 | 7158 | }
|
| 7239 | 7159 | },
|
| 7240 | - "x86_64-linux-fedora33-validate+debug_info": {
|
|
| 7160 | + "x86_64-linux-fedora42-validate": {
|
|
| 7241 | 7161 | "after_script": [
|
| 7242 | 7162 | ".gitlab/ci.sh save_cache",
|
| 7243 | 7163 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -7248,7 +7168,7 @@ |
| 7248 | 7168 | "artifacts": {
|
| 7249 | 7169 | "expire_in": "2 weeks",
|
| 7250 | 7170 | "paths": [
|
| 7251 | - "ghc-x86_64-linux-fedora33-validate+debug_info.tar.xz",
|
|
| 7171 | + "ghc-x86_64-linux-fedora42-validate.tar.xz",
|
|
| 7252 | 7172 | "junit.xml",
|
| 7253 | 7173 | "unexpected-test-output.tar.gz"
|
| 7254 | 7174 | ],
|
| ... | ... | @@ -7258,14 +7178,14 @@ |
| 7258 | 7178 | "when": "always"
|
| 7259 | 7179 | },
|
| 7260 | 7180 | "cache": {
|
| 7261 | - "key": "x86_64-linux-fedora33-$CACHE_REV",
|
|
| 7181 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 7262 | 7182 | "paths": [
|
| 7263 | 7183 | "cabal-cache",
|
| 7264 | 7184 | "toolchain"
|
| 7265 | 7185 | ]
|
| 7266 | 7186 | },
|
| 7267 | 7187 | "dependencies": [],
|
| 7268 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV",
|
|
| 7188 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 7269 | 7189 | "needs": [
|
| 7270 | 7190 | {
|
| 7271 | 7191 | "artifacts": false,
|
| ... | ... | @@ -7274,7 +7194,7 @@ |
| 7274 | 7194 | ],
|
| 7275 | 7195 | "rules": [
|
| 7276 | 7196 | {
|
| 7277 | - "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora33-validate\\+debug_info(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7197 | + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7278 | 7198 | "when": "on_success"
|
| 7279 | 7199 | }
|
| 7280 | 7200 | ],
|
| ... | ... | @@ -7291,17 +7211,15 @@ |
| 7291 | 7211 | ],
|
| 7292 | 7212 | "variables": {
|
| 7293 | 7213 | "BIGNUM_BACKEND": "gmp",
|
| 7294 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-validate+debug_info",
|
|
| 7295 | - "BUILD_FLAVOUR": "validate+debug_info",
|
|
| 7214 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate",
|
|
| 7215 | + "BUILD_FLAVOUR": "validate",
|
|
| 7296 | 7216 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7297 | 7217 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7298 | - "LLC": "/bin/false",
|
|
| 7299 | - "OPT": "/bin/false",
|
|
| 7300 | 7218 | "RUNTEST_ARGS": "",
|
| 7301 | - "TEST_ENV": "x86_64-linux-fedora33-validate+debug_info"
|
|
| 7219 | + "TEST_ENV": "x86_64-linux-fedora42-validate"
|
|
| 7302 | 7220 | }
|
| 7303 | 7221 | },
|
| 7304 | - "x86_64-linux-fedora38-validate": {
|
|
| 7222 | + "x86_64-linux-fedora42-validate+debug_info": {
|
|
| 7305 | 7223 | "after_script": [
|
| 7306 | 7224 | ".gitlab/ci.sh save_cache",
|
| 7307 | 7225 | ".gitlab/ci.sh save_test_output",
|
| ... | ... | @@ -7312,7 +7230,7 @@ |
| 7312 | 7230 | "artifacts": {
|
| 7313 | 7231 | "expire_in": "2 weeks",
|
| 7314 | 7232 | "paths": [
|
| 7315 | - "ghc-x86_64-linux-fedora38-validate.tar.xz",
|
|
| 7233 | + "ghc-x86_64-linux-fedora42-validate+debug_info.tar.xz",
|
|
| 7316 | 7234 | "junit.xml",
|
| 7317 | 7235 | "unexpected-test-output.tar.gz"
|
| 7318 | 7236 | ],
|
| ... | ... | @@ -7322,14 +7240,14 @@ |
| 7322 | 7240 | "when": "always"
|
| 7323 | 7241 | },
|
| 7324 | 7242 | "cache": {
|
| 7325 | - "key": "x86_64-linux-fedora38-$CACHE_REV",
|
|
| 7243 | + "key": "x86_64-linux-fedora42-$CACHE_REV",
|
|
| 7326 | 7244 | "paths": [
|
| 7327 | 7245 | "cabal-cache",
|
| 7328 | 7246 | "toolchain"
|
| 7329 | 7247 | ]
|
| 7330 | 7248 | },
|
| 7331 | 7249 | "dependencies": [],
|
| 7332 | - "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora38:$DOCKER_REV",
|
|
| 7250 | + "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
|
|
| 7333 | 7251 | "needs": [
|
| 7334 | 7252 | {
|
| 7335 | 7253 | "artifacts": false,
|
| ... | ... | @@ -7338,7 +7256,7 @@ |
| 7338 | 7256 | ],
|
| 7339 | 7257 | "rules": [
|
| 7340 | 7258 | {
|
| 7341 | - "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora38-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7259 | + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-validate\\+debug_info(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
|
|
| 7342 | 7260 | "when": "on_success"
|
| 7343 | 7261 | }
|
| 7344 | 7262 | ],
|
| ... | ... | @@ -7355,12 +7273,12 @@ |
| 7355 | 7273 | ],
|
| 7356 | 7274 | "variables": {
|
| 7357 | 7275 | "BIGNUM_BACKEND": "gmp",
|
| 7358 | - "BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-validate",
|
|
| 7359 | - "BUILD_FLAVOUR": "validate",
|
|
| 7276 | + "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate+debug_info",
|
|
| 7277 | + "BUILD_FLAVOUR": "validate+debug_info",
|
|
| 7360 | 7278 | "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7361 | 7279 | "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
|
| 7362 | 7280 | "RUNTEST_ARGS": "",
|
| 7363 | - "TEST_ENV": "x86_64-linux-fedora38-validate"
|
|
| 7281 | + "TEST_ENV": "x86_64-linux-fedora42-validate+debug_info"
|
|
| 7364 | 7282 | }
|
| 7365 | 7283 | },
|
| 7366 | 7284 | "x86_64-linux-rocky8-validate": {
|
| ... | ... | @@ -23,10 +23,8 @@ def job_triple(job_name): |
| 23 | 23 | 'release-x86_64-linux-ubuntu22_04-release': 'x86_64-ubuntu22_04-linux',
|
| 24 | 24 | 'release-x86_64-linux-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux',
|
| 25 | 25 | 'release-x86_64-linux-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux',
|
| 26 | - 'release-x86_64-linux-fedora38-release': 'x86_64-fedora38-linux',
|
|
| 27 | - 'release-x86_64-linux-fedora33-release+debug_info': 'x86_64-fedora33-linux-dwarf',
|
|
| 28 | - 'release-x86_64-linux-fedora33-release': 'x86_64-fedora33-linux',
|
|
| 29 | - 'release-x86_64-linux-fedora27-release': 'x86_64-fedora27-linux',
|
|
| 26 | + 'release-x86_64-linux-fedora42-release': 'x86_64-fedora42-linux',
|
|
| 27 | + 'release-x86_64-linux-fedora42-release+debug_info': 'x86_64-fedora42-linux-dwarf',
|
|
| 30 | 28 | 'release-x86_64-linux-deb12-release': 'x86_64-deb12-linux',
|
| 31 | 29 | 'release-x86_64-linux-deb11-release': 'x86_64-deb11-linux',
|
| 32 | 30 | 'release-x86_64-linux-deb10-release+debug_info': 'x86_64-deb10-linux-dwarf',
|
| ... | ... | @@ -200,7 +200,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map): |
| 200 | 200 | ubuntu2204 = mk(ubuntu("22_04"))
|
| 201 | 201 | ubuntu2404 = mk(ubuntu("24_04"))
|
| 202 | 202 | rocky8 = mk(rocky("8"))
|
| 203 | - fedora33 = mk(fedora(33))
|
|
| 203 | + fedora42 = mk(fedora(42))
|
|
| 204 | 204 | darwin_x86 = mk(darwin("x86_64"))
|
| 205 | 205 | darwin_arm64 = mk(darwin("aarch64"))
|
| 206 | 206 | windows = mk(windowsArtifact)
|
| ... | ... | @@ -239,11 +239,9 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map): |
| 239 | 239 | , "unknown_versioning": ubuntu2004 }
|
| 240 | 240 | , "Linux_CentOS" : { "( >= 8 && < 9 )" : rocky8
|
| 241 | 241 | , "unknown_versioning" : rocky8 }
|
| 242 | - , "Linux_Fedora" : { ">= 33": fedora33
|
|
| 242 | + , "Linux_Fedora" : { ">= 42": fedora42
|
|
| 243 | 243 | , "unknown_versioning": rocky8 }
|
| 244 | - , "Linux_RedHat" : { "< 9": rocky8
|
|
| 245 | - , ">= 9": fedora33
|
|
| 246 | - , "unknown_versioning": fedora33 }
|
|
| 244 | + , "Linux_RedHat" : { "unknown_versioning": rocky8 }
|
|
| 247 | 245 | , "Linux_UnknownLinux" : { "unknown_versioning": rocky8 }
|
| 248 | 246 | , "Darwin" : { "unknown_versioning" : darwin_x86 }
|
| 249 | 247 | , "Windows" : { "unknown_versioning" : windows }
|
| ... | ... | @@ -58,6 +58,7 @@ module GHC.HsToCore.Monad ( |
| 58 | 58 | import GHC.Prelude
|
| 59 | 59 | |
| 60 | 60 | import GHC.Driver.Env
|
| 61 | +import GHC.Driver.Env.KnotVars
|
|
| 61 | 62 | import GHC.Driver.DynFlags
|
| 62 | 63 | import GHC.Driver.Ppr
|
| 63 | 64 | import GHC.Driver.Config.Diagnostic
|
| ... | ... | @@ -117,7 +118,7 @@ import GHC.Utils.Panic |
| 117 | 118 | import qualified GHC.Data.Strict as Strict
|
| 118 | 119 | |
| 119 | 120 | import Data.IORef
|
| 120 | -import GHC.Driver.Env.KnotVars
|
|
| 121 | + |
|
| 121 | 122 | import GHC.IO.Unsafe (unsafeInterleaveIO)
|
| 122 | 123 | |
| 123 | 124 | {-
|
| ... | ... | @@ -26,6 +26,7 @@ module GHC.Tc.Module ( |
| 26 | 26 | runTcInteractive, -- Used by GHC API clients (#8878)
|
| 27 | 27 | withTcPlugins, -- Used by GHC API clients (#20499)
|
| 28 | 28 | withHoleFitPlugins, -- Used by GHC API clients (#20499)
|
| 29 | + withDefaultingPlugins,
|
|
| 29 | 30 | tcRnLookupName,
|
| 30 | 31 | tcRnGetInfo,
|
| 31 | 32 | tcRnModule, tcRnModuleTcRnM,
|
| ... | ... | @@ -53,7 +54,6 @@ import GHC.Driver.DynFlags |
| 53 | 54 | import GHC.Driver.Config.Diagnostic
|
| 54 | 55 | import GHC.IO.Unsafe ( unsafeInterleaveIO )
|
| 55 | 56 | |
| 56 | -import GHC.Tc.Errors.Hole.Plugin ( HoleFitPluginR (..) )
|
|
| 57 | 57 | import GHC.Tc.Errors.Types
|
| 58 | 58 | import {-# SOURCE #-} GHC.Tc.Gen.Splice ( finishTH, runRemoteModFinalizers )
|
| 59 | 59 | import GHC.Tc.Gen.HsType
|
| ... | ... | @@ -141,7 +141,6 @@ import GHC.Types.Id as Id |
| 141 | 141 | import GHC.Types.Id.Info( IdDetails(..) )
|
| 142 | 142 | import GHC.Types.Var.Env
|
| 143 | 143 | import GHC.Types.TypeEnv
|
| 144 | -import GHC.Types.Unique.FM
|
|
| 145 | 144 | import GHC.Types.Name
|
| 146 | 145 | import GHC.Types.Name.Env
|
| 147 | 146 | import GHC.Types.Name.Set
|
| ... | ... | @@ -212,10 +211,6 @@ tcRnModule hsc_env mod_sum save_rn_syntax |
| 212 | 211 | (text "Renamer/typechecker"<+>brackets (ppr this_mod))
|
| 213 | 212 | (const ()) $
|
| 214 | 213 | initTc hsc_env hsc_src save_rn_syntax this_mod real_loc $
|
| 215 | - withTcPlugins hsc_env $
|
|
| 216 | - withDefaultingPlugins hsc_env $
|
|
| 217 | - withHoleFitPlugins hsc_env $
|
|
| 218 | - |
|
| 219 | 214 | tcRnModuleTcRnM hsc_env mod_sum parsedModule this_mod
|
| 220 | 215 | |
| 221 | 216 | | otherwise
|
| ... | ... | @@ -3182,72 +3177,11 @@ hasTopUserName x |
| 3182 | 3177 | {-
|
| 3183 | 3178 | ********************************************************************************
|
| 3184 | 3179 | |
| 3185 | -Type Checker Plugins
|
|
| 3180 | + Running plugins
|
|
| 3186 | 3181 | |
| 3187 | 3182 | ********************************************************************************
|
| 3188 | 3183 | -}
|
| 3189 | 3184 | |
| 3190 | -withTcPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 3191 | -withTcPlugins hsc_env m =
|
|
| 3192 | - case catMaybes $ mapPlugins (hsc_plugins hsc_env) tcPlugin of
|
|
| 3193 | - [] -> m -- Common fast case
|
|
| 3194 | - plugins -> do
|
|
| 3195 | - (solvers, rewriters, stops) <-
|
|
| 3196 | - unzip3 `fmap` mapM start_plugin plugins
|
|
| 3197 | - let
|
|
| 3198 | - rewritersUniqFM :: UniqFM TyCon [TcPluginRewriter]
|
|
| 3199 | - !rewritersUniqFM = sequenceUFMList rewriters
|
|
| 3200 | - -- The following ensures that tcPluginStop is called even if a type
|
|
| 3201 | - -- error occurs during compilation (Fix of #10078)
|
|
| 3202 | - eitherRes <- tryM $
|
|
| 3203 | - updGblEnv (\e -> e { tcg_tc_plugin_solvers = solvers
|
|
| 3204 | - , tcg_tc_plugin_rewriters = rewritersUniqFM }) m
|
|
| 3205 | - mapM_ runTcPluginM stops
|
|
| 3206 | - case eitherRes of
|
|
| 3207 | - Left _ -> failM
|
|
| 3208 | - Right res -> return res
|
|
| 3209 | - where
|
|
| 3210 | - start_plugin (TcPlugin start solve rewrite stop) =
|
|
| 3211 | - do s <- runTcPluginM start
|
|
| 3212 | - return (solve s, rewrite s, stop s)
|
|
| 3213 | - |
|
| 3214 | -withDefaultingPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 3215 | -withDefaultingPlugins hsc_env m =
|
|
| 3216 | - do case catMaybes $ mapPlugins (hsc_plugins hsc_env) defaultingPlugin of
|
|
| 3217 | - [] -> m -- Common fast case
|
|
| 3218 | - plugins -> do (plugins,stops) <- mapAndUnzipM start_plugin plugins
|
|
| 3219 | - -- This ensures that dePluginStop is called even if a type
|
|
| 3220 | - -- error occurs during compilation
|
|
| 3221 | - eitherRes <- tryM $ do
|
|
| 3222 | - updGblEnv (\e -> e { tcg_defaulting_plugins = plugins }) m
|
|
| 3223 | - mapM_ runTcPluginM stops
|
|
| 3224 | - case eitherRes of
|
|
| 3225 | - Left _ -> failM
|
|
| 3226 | - Right res -> return res
|
|
| 3227 | - where
|
|
| 3228 | - start_plugin (DefaultingPlugin start fill stop) =
|
|
| 3229 | - do s <- runTcPluginM start
|
|
| 3230 | - return (fill s, stop s)
|
|
| 3231 | - |
|
| 3232 | -withHoleFitPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 3233 | -withHoleFitPlugins hsc_env m =
|
|
| 3234 | - case catMaybes $ mapPlugins (hsc_plugins hsc_env) holeFitPlugin of
|
|
| 3235 | - [] -> m -- Common fast case
|
|
| 3236 | - plugins -> do (plugins,stops) <- mapAndUnzipM start_plugin plugins
|
|
| 3237 | - -- This ensures that hfPluginStop is called even if a type
|
|
| 3238 | - -- error occurs during compilation.
|
|
| 3239 | - eitherRes <- tryM $
|
|
| 3240 | - updGblEnv (\e -> e { tcg_hf_plugins = plugins }) m
|
|
| 3241 | - sequence_ stops
|
|
| 3242 | - case eitherRes of
|
|
| 3243 | - Left _ -> failM
|
|
| 3244 | - Right res -> return res
|
|
| 3245 | - where
|
|
| 3246 | - start_plugin (HoleFitPluginR init plugin stop) =
|
|
| 3247 | - do ref <- init
|
|
| 3248 | - return (plugin ref, stop ref)
|
|
| 3249 | - |
|
| 3250 | - |
|
| 3251 | 3185 | runRenamerPlugin :: TcGblEnv
|
| 3252 | 3186 | -> HsGroup GhcRn
|
| 3253 | 3187 | -> TcM (TcGblEnv, HsGroup GhcRn)
|
| ... | ... | @@ -31,6 +31,9 @@ module GHC.Tc.Utils.Monad( |
| 31 | 31 | updateEps, updateEps_,
|
| 32 | 32 | getHpt, getEpsAndHug,
|
| 33 | 33 | |
| 34 | + -- * Initialising TcM plugins
|
|
| 35 | + withTcPlugins, withDefaultingPlugins, withHoleFitPlugins,
|
|
| 36 | + |
|
| 34 | 37 | -- * Arrow scopes
|
| 35 | 38 | newArrowScope, escapeArrowScope,
|
| 36 | 39 | |
| ... | ... | @@ -163,6 +166,7 @@ import GHC.Builtin.Names |
| 163 | 166 | import GHC.Builtin.Types( zonkAnyTyCon )
|
| 164 | 167 | |
| 165 | 168 | import GHC.Tc.Errors.Types
|
| 169 | +import GHC.Tc.Errors.Hole.Plugin ( HoleFitPluginR (..) )
|
|
| 166 | 170 | import GHC.Tc.Types -- Re-export all
|
| 167 | 171 | import GHC.Tc.Types.Constraint
|
| 168 | 172 | import GHC.Tc.Types.CtLoc
|
| ... | ... | @@ -183,13 +187,17 @@ import GHC.Unit.Module.Warnings |
| 183 | 187 | import GHC.Unit.Home.PackageTable
|
| 184 | 188 | |
| 185 | 189 | import GHC.Core.UsageEnv
|
| 190 | + |
|
| 191 | +import GHC.Core.Coercion ( isReflCo )
|
|
| 186 | 192 | import GHC.Core.Multiplicity
|
| 187 | 193 | import GHC.Core.InstEnv
|
| 188 | 194 | import GHC.Core.FamInstEnv
|
| 189 | 195 | import GHC.Core.Type( mkNumLitTy )
|
| 196 | +import GHC.Core.TyCon ( TyCon )
|
|
| 190 | 197 | |
| 191 | 198 | import GHC.Driver.Env
|
| 192 | 199 | import GHC.Driver.Env.KnotVars
|
| 200 | +import GHC.Driver.Plugins ( Plugin(..), mapPlugins )
|
|
| 193 | 201 | import GHC.Driver.Session
|
| 194 | 202 | import GHC.Driver.Config.Diagnostic
|
| 195 | 203 | |
| ... | ... | @@ -226,7 +234,7 @@ import GHC.Types.SrcLoc |
| 226 | 234 | import GHC.Types.Name.Env
|
| 227 | 235 | import GHC.Types.Name.Set
|
| 228 | 236 | import GHC.Types.Name.Ppr
|
| 229 | -import GHC.Types.Unique.FM ( emptyUFM )
|
|
| 237 | +import GHC.Types.Unique.FM ( UniqFM, emptyUFM, sequenceUFMList )
|
|
| 230 | 238 | import GHC.Types.Unique.DFM
|
| 231 | 239 | import GHC.Types.Unique.Supply
|
| 232 | 240 | import GHC.Types.Annotations
|
| ... | ... | @@ -240,8 +248,6 @@ import Data.IORef |
| 240 | 248 | import Control.Monad
|
| 241 | 249 | |
| 242 | 250 | import qualified Data.Map as Map
|
| 243 | -import GHC.Core.Coercion (isReflCo)
|
|
| 244 | - |
|
| 245 | 251 | |
| 246 | 252 | {-
|
| 247 | 253 | ************************************************************************
|
| ... | ... | @@ -263,129 +269,139 @@ initTc :: HscEnv |
| 263 | 269 | -- (error messages should have been printed already)
|
| 264 | 270 | |
| 265 | 271 | initTc hsc_env hsc_src keep_rn_syntax mod loc do_this
|
| 266 | - = do { keep_var <- newIORef emptyNameSet ;
|
|
| 267 | - used_gre_var <- newIORef [] ;
|
|
| 268 | - th_var <- newIORef False ;
|
|
| 269 | - infer_var <- newIORef True ;
|
|
| 270 | - infer_reasons_var <- newIORef emptyMessages ;
|
|
| 271 | - dfun_n_var <- newIORef emptyOccSet ;
|
|
| 272 | - zany_n_var <- newIORef 0 ;
|
|
| 273 | - let { type_env_var = hsc_type_env_vars hsc_env };
|
|
| 274 | - |
|
| 275 | - dependent_files_var <- newIORef [] ;
|
|
| 276 | - dependent_dirs_var <- newIORef [] ;
|
|
| 277 | - static_wc_var <- newIORef emptyWC ;
|
|
| 278 | - cc_st_var <- newIORef newCostCentreState ;
|
|
| 279 | - th_topdecls_var <- newIORef [] ;
|
|
| 280 | - th_foreign_files_var <- newIORef [] ;
|
|
| 281 | - th_topnames_var <- newIORef emptyNameSet ;
|
|
| 282 | - th_modfinalizers_var <- newIORef [] ;
|
|
| 283 | - th_coreplugins_var <- newIORef [] ;
|
|
| 284 | - th_state_var <- newIORef Map.empty ;
|
|
| 285 | - th_remote_state_var <- newIORef Nothing ;
|
|
| 286 | - th_docs_var <- newIORef Map.empty ;
|
|
| 287 | - th_needed_deps_var <- newIORef ([], emptyUDFM) ;
|
|
| 288 | - next_wrapper_num <- newIORef emptyModuleEnv ;
|
|
| 289 | - let {
|
|
| 290 | - -- bangs to avoid leaking the env (#19356)
|
|
| 291 | - !dflags = hsc_dflags hsc_env ;
|
|
| 292 | - !mhome_unit = hsc_home_unit_maybe hsc_env;
|
|
| 293 | - !logger = hsc_logger hsc_env ;
|
|
| 294 | - |
|
| 295 | - maybe_rn_syntax :: forall a. a -> Maybe a ;
|
|
| 296 | - maybe_rn_syntax empty_val
|
|
| 297 | - | logHasDumpFlag logger Opt_D_dump_rn_ast = Just empty_val
|
|
| 298 | - |
|
| 299 | - | gopt Opt_WriteHie dflags = Just empty_val
|
|
| 300 | - |
|
| 301 | - -- We want to serialize the documentation in the .hi-files,
|
|
| 302 | - -- and need to extract it from the renamed syntax first.
|
|
| 303 | - -- See 'GHC.HsToCore.Docs.extractDocs'.
|
|
| 304 | - | gopt Opt_Haddock dflags = Just empty_val
|
|
| 305 | - |
|
| 306 | - | keep_rn_syntax = Just empty_val
|
|
| 307 | - | otherwise = Nothing ;
|
|
| 308 | - |
|
| 309 | - gbl_env = TcGblEnv {
|
|
| 310 | - tcg_th_topdecls = th_topdecls_var,
|
|
| 311 | - tcg_th_foreign_files = th_foreign_files_var,
|
|
| 312 | - tcg_th_topnames = th_topnames_var,
|
|
| 313 | - tcg_th_modfinalizers = th_modfinalizers_var,
|
|
| 314 | - tcg_th_coreplugins = th_coreplugins_var,
|
|
| 315 | - tcg_th_state = th_state_var,
|
|
| 316 | - tcg_th_remote_state = th_remote_state_var,
|
|
| 317 | - tcg_th_docs = th_docs_var,
|
|
| 318 | - |
|
| 319 | - tcg_mod = mod,
|
|
| 320 | - tcg_semantic_mod = homeModuleInstantiation mhome_unit mod,
|
|
| 321 | - tcg_src = hsc_src,
|
|
| 322 | - tcg_rdr_env = emptyGlobalRdrEnv,
|
|
| 323 | - tcg_fix_env = emptyNameEnv,
|
|
| 324 | - tcg_default = emptyDefaultEnv,
|
|
| 325 | - tcg_default_exports = emptyDefaultEnv,
|
|
| 326 | - tcg_type_env = emptyNameEnv,
|
|
| 327 | - tcg_type_env_var = type_env_var,
|
|
| 328 | - tcg_inst_env = emptyInstEnv,
|
|
| 329 | - tcg_fam_inst_env = emptyFamInstEnv,
|
|
| 330 | - tcg_ann_env = emptyAnnEnv,
|
|
| 331 | - tcg_complete_match_env = [],
|
|
| 332 | - tcg_th_used = th_var,
|
|
| 333 | - tcg_th_needed_deps = th_needed_deps_var,
|
|
| 334 | - tcg_exports = [],
|
|
| 335 | - tcg_imports = emptyImportAvails,
|
|
| 336 | - tcg_import_decls = [],
|
|
| 337 | - tcg_used_gres = used_gre_var,
|
|
| 338 | - tcg_dus = emptyDUs,
|
|
| 339 | - |
|
| 340 | - tcg_rn_imports = [],
|
|
| 341 | - tcg_rn_exports =
|
|
| 342 | - if hsc_src == HsigFile
|
|
| 343 | - -- Always retain renamed syntax, so that we can give
|
|
| 344 | - -- better errors. (TODO: how?)
|
|
| 345 | - then Just []
|
|
| 346 | - else maybe_rn_syntax [],
|
|
| 347 | - tcg_rn_decls = maybe_rn_syntax emptyRnGroup,
|
|
| 348 | - tcg_tr_module = Nothing,
|
|
| 349 | - tcg_binds = emptyLHsBinds,
|
|
| 350 | - tcg_imp_specs = [],
|
|
| 351 | - tcg_sigs = emptyNameSet,
|
|
| 352 | - tcg_ksigs = emptyNameSet,
|
|
| 353 | - tcg_ev_binds = emptyBag,
|
|
| 354 | - tcg_warns = emptyWarn,
|
|
| 355 | - tcg_anns = [],
|
|
| 356 | - tcg_tcs = [],
|
|
| 357 | - tcg_insts = [],
|
|
| 358 | - tcg_fam_insts = [],
|
|
| 359 | - tcg_rules = [],
|
|
| 360 | - tcg_fords = [],
|
|
| 361 | - tcg_patsyns = [],
|
|
| 362 | - tcg_merged = [],
|
|
| 363 | - tcg_dfun_n = dfun_n_var,
|
|
| 364 | - tcg_zany_n = zany_n_var,
|
|
| 365 | - tcg_keep = keep_var,
|
|
| 366 | - tcg_hdr_info = (Nothing,Nothing),
|
|
| 367 | - tcg_main = Nothing,
|
|
| 368 | - tcg_self_boot = NoSelfBoot,
|
|
| 369 | - tcg_safe_infer = infer_var,
|
|
| 370 | - tcg_safe_infer_reasons = infer_reasons_var,
|
|
| 371 | - tcg_dependent_files = dependent_files_var,
|
|
| 372 | - tcg_dependent_dirs = dependent_dirs_var,
|
|
| 373 | - tcg_tc_plugin_solvers = [],
|
|
| 374 | - tcg_tc_plugin_rewriters = emptyUFM,
|
|
| 375 | - tcg_defaulting_plugins = [],
|
|
| 376 | - tcg_hf_plugins = [],
|
|
| 377 | - tcg_top_loc = loc,
|
|
| 378 | - tcg_static_wc = static_wc_var,
|
|
| 379 | - tcg_complete_matches = [],
|
|
| 380 | - tcg_cc_st = cc_st_var,
|
|
| 381 | - tcg_next_wrapper_num = next_wrapper_num
|
|
| 382 | - } ;
|
|
| 383 | - } ;
|
|
| 272 | + = do { gbl_env <- initTcGblEnv hsc_env hsc_src keep_rn_syntax mod loc
|
|
| 384 | 273 | |
| 385 | 274 | -- OK, here's the business end!
|
| 386 | - initTcWithGbl hsc_env gbl_env loc do_this
|
|
| 275 | + ; initTcWithGbl hsc_env gbl_env loc $
|
|
| 276 | + |
|
| 277 | + -- Make sure to initialise all TcM plugins from the ambient HscEnv.
|
|
| 278 | + --
|
|
| 279 | + -- This ensures that all callers of 'initTc' enable plugins (#26395).
|
|
| 280 | + withTcPlugins hsc_env $
|
|
| 281 | + withDefaultingPlugins hsc_env $
|
|
| 282 | + withHoleFitPlugins hsc_env $
|
|
| 283 | + |
|
| 284 | + do_this
|
|
| 387 | 285 | }
|
| 388 | 286 | |
| 287 | +-- | Create an empty 'TcGblEnv'.
|
|
| 288 | +initTcGblEnv :: HscEnv -> HscSource -> Bool -> Module -> RealSrcSpan -> IO TcGblEnv
|
|
| 289 | +initTcGblEnv hsc_env hsc_src keep_rn_syntax mod loc =
|
|
| 290 | + do { keep_var <- newIORef emptyNameSet
|
|
| 291 | + ; used_gre_var <- newIORef []
|
|
| 292 | + ; th_var <- newIORef False
|
|
| 293 | + ; infer_var <- newIORef True
|
|
| 294 | + ; infer_reasons_var <- newIORef emptyMessages
|
|
| 295 | + ; dfun_n_var <- newIORef emptyOccSet
|
|
| 296 | + ; zany_n_var <- newIORef 0
|
|
| 297 | + ; dependent_files_var <- newIORef []
|
|
| 298 | + ; dependent_dirs_var <- newIORef []
|
|
| 299 | + ; static_wc_var <- newIORef emptyWC
|
|
| 300 | + ; cc_st_var <- newIORef newCostCentreState
|
|
| 301 | + ; th_topdecls_var <- newIORef []
|
|
| 302 | + ; th_foreign_files_var <- newIORef []
|
|
| 303 | + ; th_topnames_var <- newIORef emptyNameSet
|
|
| 304 | + ; th_modfinalizers_var <- newIORef []
|
|
| 305 | + ; th_coreplugins_var <- newIORef []
|
|
| 306 | + ; th_state_var <- newIORef Map.empty
|
|
| 307 | + ; th_remote_state_var <- newIORef Nothing
|
|
| 308 | + ; th_docs_var <- newIORef Map.empty
|
|
| 309 | + ; th_needed_deps_var <- newIORef ([], emptyUDFM)
|
|
| 310 | + ; next_wrapper_num <- newIORef emptyModuleEnv
|
|
| 311 | + ; let
|
|
| 312 | + -- bangs to avoid leaking the env (#19356)
|
|
| 313 | + !dflags = hsc_dflags hsc_env
|
|
| 314 | + !mhome_unit = hsc_home_unit_maybe hsc_env
|
|
| 315 | + !logger = hsc_logger hsc_env
|
|
| 316 | + |
|
| 317 | + maybe_rn_syntax :: forall a. a -> Maybe a ;
|
|
| 318 | + maybe_rn_syntax empty_val
|
|
| 319 | + | logHasDumpFlag logger Opt_D_dump_rn_ast = Just empty_val
|
|
| 320 | + |
|
| 321 | + | gopt Opt_WriteHie dflags = Just empty_val
|
|
| 322 | + |
|
| 323 | + -- We want to serialize the documentation in the .hi-files,
|
|
| 324 | + -- and need to extract it from the renamed syntax first.
|
|
| 325 | + -- See 'GHC.HsToCore.Docs.extractDocs'.
|
|
| 326 | + | gopt Opt_Haddock dflags = Just empty_val
|
|
| 327 | + |
|
| 328 | + | keep_rn_syntax = Just empty_val
|
|
| 329 | + | otherwise = Nothing ;
|
|
| 330 | + |
|
| 331 | + ; return $ TcGblEnv
|
|
| 332 | + { tcg_th_topdecls = th_topdecls_var
|
|
| 333 | + , tcg_th_foreign_files = th_foreign_files_var
|
|
| 334 | + , tcg_th_topnames = th_topnames_var
|
|
| 335 | + , tcg_th_modfinalizers = th_modfinalizers_var
|
|
| 336 | + , tcg_th_coreplugins = th_coreplugins_var
|
|
| 337 | + , tcg_th_state = th_state_var
|
|
| 338 | + , tcg_th_remote_state = th_remote_state_var
|
|
| 339 | + , tcg_th_docs = th_docs_var
|
|
| 340 | + |
|
| 341 | + , tcg_mod = mod
|
|
| 342 | + , tcg_semantic_mod = homeModuleInstantiation mhome_unit mod
|
|
| 343 | + , tcg_src = hsc_src
|
|
| 344 | + , tcg_rdr_env = emptyGlobalRdrEnv
|
|
| 345 | + , tcg_fix_env = emptyNameEnv
|
|
| 346 | + , tcg_default = emptyDefaultEnv
|
|
| 347 | + , tcg_default_exports = emptyDefaultEnv
|
|
| 348 | + , tcg_type_env = emptyNameEnv
|
|
| 349 | + , tcg_type_env_var = hsc_type_env_vars hsc_env
|
|
| 350 | + , tcg_inst_env = emptyInstEnv
|
|
| 351 | + , tcg_fam_inst_env = emptyFamInstEnv
|
|
| 352 | + , tcg_ann_env = emptyAnnEnv
|
|
| 353 | + , tcg_complete_match_env = []
|
|
| 354 | + , tcg_th_used = th_var
|
|
| 355 | + , tcg_th_needed_deps = th_needed_deps_var
|
|
| 356 | + , tcg_exports = []
|
|
| 357 | + , tcg_imports = emptyImportAvails
|
|
| 358 | + , tcg_import_decls = []
|
|
| 359 | + , tcg_used_gres = used_gre_var
|
|
| 360 | + , tcg_dus = emptyDUs
|
|
| 361 | + |
|
| 362 | + , tcg_rn_imports = []
|
|
| 363 | + , tcg_rn_exports = if hsc_src == HsigFile
|
|
| 364 | + -- Always retain renamed syntax, so that we can give
|
|
| 365 | + -- better errors. (TODO: how?)
|
|
| 366 | + then Just []
|
|
| 367 | + else maybe_rn_syntax []
|
|
| 368 | + , tcg_rn_decls = maybe_rn_syntax emptyRnGroup
|
|
| 369 | + , tcg_tr_module = Nothing
|
|
| 370 | + , tcg_binds = emptyLHsBinds
|
|
| 371 | + , tcg_imp_specs = []
|
|
| 372 | + , tcg_sigs = emptyNameSet
|
|
| 373 | + , tcg_ksigs = emptyNameSet
|
|
| 374 | + , tcg_ev_binds = emptyBag
|
|
| 375 | + , tcg_warns = emptyWarn
|
|
| 376 | + , tcg_anns = []
|
|
| 377 | + , tcg_tcs = []
|
|
| 378 | + , tcg_insts = []
|
|
| 379 | + , tcg_fam_insts = []
|
|
| 380 | + , tcg_rules = []
|
|
| 381 | + , tcg_fords = []
|
|
| 382 | + , tcg_patsyns = []
|
|
| 383 | + , tcg_merged = []
|
|
| 384 | + , tcg_dfun_n = dfun_n_var
|
|
| 385 | + , tcg_zany_n = zany_n_var
|
|
| 386 | + , tcg_keep = keep_var
|
|
| 387 | + , tcg_hdr_info = (Nothing,Nothing)
|
|
| 388 | + , tcg_main = Nothing
|
|
| 389 | + , tcg_self_boot = NoSelfBoot
|
|
| 390 | + , tcg_safe_infer = infer_var
|
|
| 391 | + , tcg_safe_infer_reasons = infer_reasons_var
|
|
| 392 | + , tcg_dependent_files = dependent_files_var
|
|
| 393 | + , tcg_dependent_dirs = dependent_dirs_var
|
|
| 394 | + , tcg_tc_plugin_solvers = []
|
|
| 395 | + , tcg_tc_plugin_rewriters = emptyUFM
|
|
| 396 | + , tcg_defaulting_plugins = []
|
|
| 397 | + , tcg_hf_plugins = []
|
|
| 398 | + , tcg_top_loc = loc
|
|
| 399 | + , tcg_static_wc = static_wc_var
|
|
| 400 | + , tcg_complete_matches = []
|
|
| 401 | + , tcg_cc_st = cc_st_var
|
|
| 402 | + , tcg_next_wrapper_num = next_wrapper_num
|
|
| 403 | + } }
|
|
| 404 | + |
|
| 389 | 405 | -- | Run a 'TcM' action in the context of an existing 'GblEnv'.
|
| 390 | 406 | initTcWithGbl :: HscEnv
|
| 391 | 407 | -> TcGblEnv
|
| ... | ... | @@ -686,6 +702,83 @@ withIfaceErr ctx do_this = do |
| 686 | 702 | liftIO $ throwGhcExceptionIO (ProgramError (renderWithContext ctx msg))
|
| 687 | 703 | Succeeded result -> return result
|
| 688 | 704 | |
| 705 | +{-
|
|
| 706 | +************************************************************************
|
|
| 707 | +* *
|
|
| 708 | + Initialising plugins for TcM
|
|
| 709 | +* *
|
|
| 710 | +************************************************************************
|
|
| 711 | +-}
|
|
| 712 | + |
|
| 713 | +-- | Initialise typechecker plugins, run the inner action, then stop
|
|
| 714 | +-- the typechecker plugins.
|
|
| 715 | +withTcPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 716 | +withTcPlugins hsc_env m =
|
|
| 717 | + case catMaybes $ mapPlugins (hsc_plugins hsc_env) tcPlugin of
|
|
| 718 | + [] -> m -- Common fast case
|
|
| 719 | + plugins -> do
|
|
| 720 | + (solvers, rewriters, stops) <-
|
|
| 721 | + unzip3 `fmap` mapM start_plugin plugins
|
|
| 722 | + let
|
|
| 723 | + rewritersUniqFM :: UniqFM TyCon [TcPluginRewriter]
|
|
| 724 | + !rewritersUniqFM = sequenceUFMList rewriters
|
|
| 725 | + -- The following ensures that tcPluginStop is called even if a type
|
|
| 726 | + -- error occurs during compilation (Fix of #10078)
|
|
| 727 | + eitherRes <- tryM $
|
|
| 728 | + updGblEnv (\e -> e { tcg_tc_plugin_solvers = solvers
|
|
| 729 | + , tcg_tc_plugin_rewriters = rewritersUniqFM })
|
|
| 730 | + m
|
|
| 731 | + mapM_ runTcPluginM stops
|
|
| 732 | + case eitherRes of
|
|
| 733 | + Left _ -> failM
|
|
| 734 | + Right res -> return res
|
|
| 735 | + where
|
|
| 736 | + start_plugin (TcPlugin start solve rewrite stop) =
|
|
| 737 | + do s <- runTcPluginM start
|
|
| 738 | + return (solve s, rewrite s, stop s)
|
|
| 739 | + |
|
| 740 | +-- | Initialise defaulting plugins, run the inner action, then stop
|
|
| 741 | +-- the defaulting plugins.
|
|
| 742 | +withDefaultingPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 743 | +withDefaultingPlugins hsc_env m =
|
|
| 744 | + do case catMaybes $ mapPlugins (hsc_plugins hsc_env) defaultingPlugin of
|
|
| 745 | + [] -> m -- Common fast case
|
|
| 746 | + plugins -> do (plugins,stops) <- mapAndUnzipM start_plugin plugins
|
|
| 747 | + -- This ensures that dePluginStop is called even if a type
|
|
| 748 | + -- error occurs during compilation
|
|
| 749 | + eitherRes <- tryM $ do
|
|
| 750 | + updGblEnv (\e -> e { tcg_defaulting_plugins = plugins })
|
|
| 751 | + m
|
|
| 752 | + mapM_ runTcPluginM stops
|
|
| 753 | + case eitherRes of
|
|
| 754 | + Left _ -> failM
|
|
| 755 | + Right res -> return res
|
|
| 756 | + where
|
|
| 757 | + start_plugin (DefaultingPlugin start fill stop) =
|
|
| 758 | + do s <- runTcPluginM start
|
|
| 759 | + return (fill s, stop s)
|
|
| 760 | + |
|
| 761 | +-- | Initialise hole fit plugins, run the inner action, then stop
|
|
| 762 | +-- the hole fit plugins.
|
|
| 763 | +withHoleFitPlugins :: HscEnv -> TcM a -> TcM a
|
|
| 764 | +withHoleFitPlugins hsc_env m =
|
|
| 765 | + case catMaybes $ mapPlugins (hsc_plugins hsc_env) holeFitPlugin of
|
|
| 766 | + [] -> m -- Common fast case
|
|
| 767 | + plugins -> do (plugins,stops) <- mapAndUnzipM start_plugin plugins
|
|
| 768 | + -- This ensures that hfPluginStop is called even if a type
|
|
| 769 | + -- error occurs during compilation.
|
|
| 770 | + eitherRes <- tryM $
|
|
| 771 | + updGblEnv (\e -> e { tcg_hf_plugins = plugins })
|
|
| 772 | + m
|
|
| 773 | + sequence_ stops
|
|
| 774 | + case eitherRes of
|
|
| 775 | + Left _ -> failM
|
|
| 776 | + Right res -> return res
|
|
| 777 | + where
|
|
| 778 | + start_plugin (HoleFitPluginR init plugin stop) =
|
|
| 779 | + do ref <- init
|
|
| 780 | + return (plugin ref, stop ref)
|
|
| 781 | + |
|
| 689 | 782 | {-
|
| 690 | 783 | ************************************************************************
|
| 691 | 784 | * *
|
| 1 | + |
|
| 2 | +{-# LANGUAGE DataKinds #-}
|
|
| 3 | +{-# LANGUAGE GADTs #-}
|
|
| 4 | +{-# LANGUAGE StandaloneKindSignatures #-}
|
|
| 5 | +{-# LANGUAGE TypeFamilies #-}
|
|
| 6 | +{-# LANGUAGE TypeOperators #-}
|
|
| 7 | +{-# LANGUAGE UnliftedDatatypes #-}
|
|
| 8 | + |
|
| 9 | +{-# OPTIONS_GHC -fplugin=T26395_Plugin #-}
|
|
| 10 | + |
|
| 11 | +{-# OPTIONS_GHC -Wincomplete-patterns #-}
|
|
| 12 | +{-# OPTIONS_GHC -Winaccessible-code #-}
|
|
| 13 | +{-# OPTIONS_GHC -Woverlapping-patterns #-}
|
|
| 14 | + |
|
| 15 | +module T26395 where
|
|
| 16 | + |
|
| 17 | +import Data.Kind
|
|
| 18 | +import GHC.TypeNats
|
|
| 19 | +import GHC.Exts ( UnliftedType )
|
|
| 20 | + |
|
| 21 | +-- This test verifies that typechecker plugins are enabled
|
|
| 22 | +-- when we run the solver for pattern-match checking.
|
|
| 23 | + |
|
| 24 | +type Peano :: Nat -> UnliftedType
|
|
| 25 | +data Peano n where
|
|
| 26 | + Z :: Peano 0
|
|
| 27 | + S :: Peano n -> Peano (1 + n)
|
|
| 28 | + |
|
| 29 | +test1 :: Peano n -> Peano n -> Int
|
|
| 30 | +test1 Z Z = 0
|
|
| 31 | +test1 (S n) (S m) = 1 + test1 n m
|
|
| 32 | + |
|
| 33 | +{-
|
|
| 34 | +The following test doesn't work properly due to #26401:
|
|
| 35 | +the pattern-match checker reports a missing equation
|
|
| 36 | + |
|
| 37 | + Z (S _) _
|
|
| 38 | + |
|
| 39 | +but there is no invocation of the solver of the form
|
|
| 40 | + |
|
| 41 | + [G] n ~ 0
|
|
| 42 | + [G] m ~ 1 + m1
|
|
| 43 | + [G] (n-m) ~ m2
|
|
| 44 | + |
|
| 45 | +for which we could report the Givens as contradictory.
|
|
| 46 | + |
|
| 47 | +test2 :: Peano n -> Peano m -> Peano (n - m) -> Int
|
|
| 48 | +test2 Z Z Z = 0
|
|
| 49 | +test2 (S _) (S _) _ = 1
|
|
| 50 | +test2 (S _) Z (S _) = 2
|
|
| 51 | +-} |
| 1 | +[1 of 2] Compiling T26395_Plugin ( T26395_Plugin.hs, T26395_Plugin.o )
|
|
| 2 | +[2 of 2] Compiling T26395 ( T26395.hs, T26395.o ) |
| 1 | +{-# LANGUAGE RecordWildCards #-}
|
|
| 2 | +{-# LANGUAGE LambdaCase #-}
|
|
| 3 | +{-# LANGUAGE MultiWayIf #-}
|
|
| 4 | +{-# LANGUAGE BlockArguments #-}
|
|
| 5 | +{-# LANGUAGE ViewPatterns #-}
|
|
| 6 | + |
|
| 7 | +{-# OPTIONS_GHC -Wall -Wno-orphans #-}
|
|
| 8 | + |
|
| 9 | +module T26395_Plugin where
|
|
| 10 | + |
|
| 11 | +-- base
|
|
| 12 | +import Prelude hiding ( (<>) )
|
|
| 13 | +import qualified Data.Semigroup as S
|
|
| 14 | +import Data.List ( partition )
|
|
| 15 | +import Data.Maybe
|
|
| 16 | +import GHC.TypeNats
|
|
| 17 | + |
|
| 18 | +-- ghc
|
|
| 19 | +import GHC.Builtin.Types.Literals
|
|
| 20 | +import GHC.Core.Predicate
|
|
| 21 | +import GHC.Core.TyCo.Rep
|
|
| 22 | +import GHC.Plugins
|
|
| 23 | +import GHC.Tc.Plugin
|
|
| 24 | +import GHC.Tc.Types
|
|
| 25 | +import GHC.Tc.Types.Constraint
|
|
| 26 | +import GHC.Tc.Types.Evidence
|
|
| 27 | +import GHC.Tc.Utils.TcType
|
|
| 28 | +import GHC.Types.Unique.Map
|
|
| 29 | + |
|
| 30 | +--------------------------------------------------------------------------------
|
|
| 31 | + |
|
| 32 | +plugin :: Plugin
|
|
| 33 | +plugin =
|
|
| 34 | + defaultPlugin
|
|
| 35 | + { pluginRecompile = purePlugin
|
|
| 36 | + , tcPlugin = \ _-> Just $
|
|
| 37 | + TcPlugin
|
|
| 38 | + { tcPluginInit = pure ()
|
|
| 39 | + , tcPluginSolve = \ _ -> solve
|
|
| 40 | + , tcPluginRewrite = \ _ -> emptyUFM
|
|
| 41 | + , tcPluginStop = \ _ -> pure ()
|
|
| 42 | + }
|
|
| 43 | + }
|
|
| 44 | + |
|
| 45 | +solve :: EvBindsVar -> [Ct] -> [Ct] -> TcPluginM TcPluginSolveResult
|
|
| 46 | +solve _ givens wanteds
|
|
| 47 | + -- This plugin only reports inconsistencies among Given constraints.
|
|
| 48 | + | not $ null wanteds
|
|
| 49 | + = pure $ TcPluginOk [] []
|
|
| 50 | + | otherwise
|
|
| 51 | + = do { let givenLinearExprs = mapMaybe linearExprCt_maybe givens
|
|
| 52 | + sols = solutions givenLinearExprs
|
|
| 53 | + |
|
| 54 | + ; tcPluginTrace "solveLinearExprs" $
|
|
| 55 | + vcat [ text "givens:" <+> ppr givens
|
|
| 56 | + , text "linExprs:" <+> ppr givenLinearExprs
|
|
| 57 | + , text "sols:" <+> ppr (take 1 sols)
|
|
| 58 | + ]
|
|
| 59 | + ; return $
|
|
| 60 | + if null sols
|
|
| 61 | + then TcPluginContradiction givens
|
|
| 62 | + else TcPluginOk [] []
|
|
| 63 | + }
|
|
| 64 | + |
|
| 65 | +data LinearExpr =
|
|
| 66 | + LinearExpr
|
|
| 67 | + { constant :: Integer
|
|
| 68 | + , coeffs :: UniqMap TyVar Integer
|
|
| 69 | + }
|
|
| 70 | +instance Semigroup LinearExpr where
|
|
| 71 | + LinearExpr c xs <> LinearExpr d ys =
|
|
| 72 | + LinearExpr ( c + d ) ( plusMaybeUniqMap_C comb xs ys )
|
|
| 73 | + where
|
|
| 74 | + comb a1 a2 =
|
|
| 75 | + let a = a1 + a2
|
|
| 76 | + in if a == 0
|
|
| 77 | + then Nothing
|
|
| 78 | + else Just a
|
|
| 79 | + |
|
| 80 | +instance Monoid LinearExpr where
|
|
| 81 | + mempty = LinearExpr 0 emptyUniqMap
|
|
| 82 | + |
|
| 83 | +mapLinearExpr :: (Integer -> Integer) -> LinearExpr -> LinearExpr
|
|
| 84 | +mapLinearExpr f (LinearExpr c xs) = LinearExpr (f c) (mapUniqMap f xs)
|
|
| 85 | + |
|
| 86 | +minusLinearExpr :: LinearExpr -> LinearExpr -> LinearExpr
|
|
| 87 | +minusLinearExpr a b = a S.<> mapLinearExpr negate b
|
|
| 88 | + |
|
| 89 | +instance Outputable LinearExpr where
|
|
| 90 | + ppr ( LinearExpr c xs ) =
|
|
| 91 | + hcat $ punctuate ( text " + " ) $
|
|
| 92 | + ( ppr c : map ppr_var ( nonDetUniqMapToList xs ) )
|
|
| 93 | + where
|
|
| 94 | + ppr_var ( tv, i )
|
|
| 95 | + | i == 1
|
|
| 96 | + = ppr tv
|
|
| 97 | + | i < 0
|
|
| 98 | + = parens ( text "-" <> ppr (abs i) ) <> text "*" <> ppr tv
|
|
| 99 | + | otherwise
|
|
| 100 | + = ppr i <> text "*" <> ppr tv
|
|
| 101 | + |
|
| 102 | +maxCoeff :: LinearExpr -> Double
|
|
| 103 | +maxCoeff ( LinearExpr c xs ) =
|
|
| 104 | + maximum ( map fromInteger ( c : nonDetEltsUniqMap xs ) )
|
|
| 105 | + |
|
| 106 | + |
|
| 107 | +linearExprCt_maybe :: Ct -> Maybe LinearExpr
|
|
| 108 | +linearExprCt_maybe ct =
|
|
| 109 | + case classifyPredType (ctPred ct) of
|
|
| 110 | + EqPred NomEq lhs rhs
|
|
| 111 | + | all isNaturalTy [ typeKind lhs, typeKind rhs ]
|
|
| 112 | + , Just e1 <- linearExprTy_maybe lhs
|
|
| 113 | + , Just e2 <- linearExprTy_maybe rhs
|
|
| 114 | + -> Just $ e1 `minusLinearExpr` e2
|
|
| 115 | + _ -> Nothing
|
|
| 116 | + |
|
| 117 | +isNat :: Type -> Maybe Integer
|
|
| 118 | +isNat ty
|
|
| 119 | + | Just (NumTyLit n) <- isLitTy ty
|
|
| 120 | + = Just n
|
|
| 121 | + | otherwise
|
|
| 122 | + = Nothing
|
|
| 123 | + |
|
| 124 | +linearExprTy_maybe :: Type -> Maybe LinearExpr
|
|
| 125 | +linearExprTy_maybe ty
|
|
| 126 | + | Just n <- isNat ty
|
|
| 127 | + = Just $ LinearExpr n emptyUniqMap
|
|
| 128 | + | Just (tc, args) <- splitTyConApp_maybe ty
|
|
| 129 | + = if | tc == typeNatAddTyCon
|
|
| 130 | + , [x, y] <- args
|
|
| 131 | + , Just e1 <- linearExprTy_maybe x
|
|
| 132 | + , Just e2 <- linearExprTy_maybe y
|
|
| 133 | + -> Just $ e1 S.<> e2
|
|
| 134 | + | tc == typeNatSubTyCon
|
|
| 135 | + , [x,y] <- args
|
|
| 136 | + , Just e1 <- linearExprTy_maybe x
|
|
| 137 | + , Just e2 <- linearExprTy_maybe y
|
|
| 138 | + -> Just $ e1 `minusLinearExpr` e2
|
|
| 139 | + | tc == typeNatMulTyCon
|
|
| 140 | + , [x, y] <- args
|
|
| 141 | + ->
|
|
| 142 | + if | Just ( LinearExpr n xs ) <- linearExprTy_maybe x
|
|
| 143 | + , isNullUniqMap xs
|
|
| 144 | + , Just e <- linearExprTy_maybe y
|
|
| 145 | + -> Just $
|
|
| 146 | + if n == 0
|
|
| 147 | + then mempty
|
|
| 148 | + else mapLinearExpr (n *) e
|
|
| 149 | + | Just ( LinearExpr n ys ) <- linearExprTy_maybe y
|
|
| 150 | + , isNullUniqMap ys
|
|
| 151 | + , Just e <- linearExprTy_maybe x
|
|
| 152 | + -> Just $
|
|
| 153 | + if n == 0
|
|
| 154 | + then mempty
|
|
| 155 | + else mapLinearExpr (fromIntegral n *) e
|
|
| 156 | + | otherwise
|
|
| 157 | + -> Nothing
|
|
| 158 | + | otherwise
|
|
| 159 | + -> Nothing
|
|
| 160 | + | Just tv <- getTyVar_maybe ty
|
|
| 161 | + = Just $ LinearExpr 0 ( unitUniqMap tv 1 )
|
|
| 162 | + | otherwise
|
|
| 163 | + = Nothing
|
|
| 164 | + |
|
| 165 | +-- Brute force algorithm to check whether a system of Diophantine
|
|
| 166 | +-- linear equations is solvable in natural numbers.
|
|
| 167 | +solutions :: [ LinearExpr ] -> [ UniqMap TyVar Natural ]
|
|
| 168 | +solutions eqs =
|
|
| 169 | + let
|
|
| 170 | + (constEqs, realEqs) = partition (isNullUniqMap . coeffs) eqs
|
|
| 171 | + d = length realEqs
|
|
| 172 | + fvs = nonDetKeysUniqMap $ plusUniqMapList ( map coeffs realEqs )
|
|
| 173 | + in
|
|
| 174 | + if | any ( ( /= 0 ) . evalLinearExpr emptyUniqMap ) constEqs
|
|
| 175 | + -> []
|
|
| 176 | + | d == 0
|
|
| 177 | + -> [ emptyUniqMap ]
|
|
| 178 | + | otherwise
|
|
| 179 | + ->
|
|
| 180 | + let
|
|
| 181 | + m = maximum $ map maxCoeff realEqs
|
|
| 182 | + hadamardBound = sqrt ( fromIntegral $ d ^ d ) * m ^ d
|
|
| 183 | + tests = mkAssignments ( floor hadamardBound ) fvs
|
|
| 184 | + in
|
|
| 185 | + filter ( \ test -> isSolution test realEqs ) tests
|
|
| 186 | + |
|
| 187 | + |
|
| 188 | +mkAssignments :: Natural -> [ TyVar ] -> [ UniqMap TyVar Natural ]
|
|
| 189 | +mkAssignments _ [] = [ emptyUniqMap ]
|
|
| 190 | +mkAssignments b (v : vs) =
|
|
| 191 | + [ addToUniqMap rest v n
|
|
| 192 | + | n <- [ 0 .. b ]
|
|
| 193 | + , rest <- mkAssignments b vs
|
|
| 194 | + ]
|
|
| 195 | + |
|
| 196 | +isSolution :: UniqMap TyVar Natural -> [ LinearExpr ] -> Bool
|
|
| 197 | +isSolution assig =
|
|
| 198 | + all ( \ expr -> evalLinearExpr assig expr == 0 )
|
|
| 199 | + |
|
| 200 | +evalLinearExpr :: UniqMap TyVar Natural -> LinearExpr -> Integer
|
|
| 201 | +evalLinearExpr vals ( LinearExpr c xs ) = nonDetFoldUniqMap aux c xs
|
|
| 202 | + where
|
|
| 203 | + aux ( tv, coeff ) !acc = acc + coeff * val
|
|
| 204 | + where
|
|
| 205 | + val :: Integer
|
|
| 206 | + val = case lookupUniqMap vals tv of
|
|
| 207 | + Nothing -> pprPanic "evalLinearExpr: missing tv" (ppr tv)
|
|
| 208 | + Just v -> fromIntegral v |
| ... | ... | @@ -110,6 +110,19 @@ test('TcPlugin_CtId' |
| 110 | 110 | , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ]
|
| 111 | 111 | )
|
| 112 | 112 | |
| 113 | +# Checks that we run type-checker plugins for pattern-match warnings.
|
|
| 114 | +test('T26395'
|
|
| 115 | + , [ extra_files(
|
|
| 116 | + [ 'T26395_Plugin.hs'
|
|
| 117 | + , 'T26395.hs'
|
|
| 118 | + ])
|
|
| 119 | + , req_th
|
|
| 120 | + ]
|
|
| 121 | + , multimod_compile
|
|
| 122 | + , [ 'T26395.hs'
|
|
| 123 | + , '-dynamic -package ghc' if have_dynamic() else '-package ghc' ]
|
|
| 124 | + )
|
|
| 125 | + |
|
| 113 | 126 | test('T11462', [js_broken(22261), req_th, req_plugins], multi_compile,
|
| 114 | 127 | [None, [('T11462_Plugin.hs', '-package ghc'), ('T11462.hs', '')],
|
| 115 | 128 | '-dynamic' if have_dynamic() else ''])
|