From git at git.haskell.org Sat Dec 1 03:39:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 03:39:44 +0000 (UTC) Subject: [commit: ghc] master: Add a Gitlab CI script that runs Circle CI validation jobs (b9260e9) Message-ID: <20181201033944.5AFB93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b9260e925e998f715865ae043bdb9f779ab5f849/ghc >--------------------------------------------------------------- commit b9260e925e998f715865ae043bdb9f779ab5f849 Author: Alp Mestanogullari Date: Wed Nov 7 01:21:55 2018 +0100 Add a Gitlab CI script that runs Circle CI validation jobs And put it to use for running i386 and x86_64 linux validate, x86_64 darwin validate and building with hadrian. For all the validate jobs, we save the artifacts (bindist + test results for now) in Circle CI and subsequently grab them in Gitlab. The nice side effect is that merge requests now show the change in test results from the patches and let you download or browse the artifacts. >--------------------------------------------------------------- b9260e925e998f715865ae043bdb9f779ab5f849 .circleci/config.yml | 40 ++++++++++----- .gitlab-ci.yml | 119 ++++++++++++++++++++++++++++++++++++++++++++ .gitlab/circle-ci-job.sh | 125 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 271 insertions(+), 13 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b9260e925e998f715865ae043bdb9f779ab5f849 From git at git.haskell.org Sat Dec 1 15:31:15 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 15:31:15 +0000 (UTC) Subject: [commit: ghc] master: hadrian/test: Don't depend upon iserv on Windows (cbf57b7) Message-ID: <20181201153115.834CC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cbf57b7dbfdbfa72475d793b27858cacf2ed9816/ghc >--------------------------------------------------------------- commit cbf57b7dbfdbfa72475d793b27858cacf2ed9816 Author: Ben Gamari Date: Mon Nov 26 11:08:39 2018 -0500 hadrian/test: Don't depend upon iserv on Windows Iserv is not supported on Windows. This fixes #15950 but this whole situation feels awfully fragile to me. >--------------------------------------------------------------- cbf57b7dbfdbfa72475d793b27858cacf2ed9816 hadrian/src/Rules/Test.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index bbce4db..d6ac7eb 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -81,7 +81,9 @@ testRules = do needTestsuitePackages :: Action () needTestsuitePackages = do targets <- mapM (needFile Stage1) =<< testsuitePackages - needIservBins + -- iserv is not supported under Windows + windows <- windowsHost + when (not windows) needIservBins need targets -- | Build the timeout program. From git at git.haskell.org Sat Dec 1 15:31:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 15:31:19 +0000 (UTC) Subject: [commit: ghc] master: Add GitLab CI (b610839) Message-ID: <20181201153119.C85B23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b6108395cb969f79332d4bc31a3996607b9e0c16/ghc >--------------------------------------------------------------- commit b6108395cb969f79332d4bc31a3996607b9e0c16 Author: Ben Gamari Date: Fri Nov 23 19:20:00 2018 -0500 Add GitLab CI >--------------------------------------------------------------- b6108395cb969f79332d4bc31a3996607b9e0c16 .circleci/config.yml | 16 +- .circleci/images/i386-linux/Dockerfile | 5 +- .circleci/images/x86_64-freebsd/Dockerfile | 1 + .circleci/images/x86_64-linux-fedora/Dockerfile | 5 +- .circleci/images/x86_64-linux/Dockerfile | 5 +- .gitlab-ci.yml | 262 +++++++++++++++--------- .gitlab/darwin-init.sh | 38 ++++ .gitlab/fix-submodules.py | 8 + .gitlab/win32-init.sh | 34 +++ 9 files changed, 266 insertions(+), 108 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b6108395cb969f79332d4bc31a3996607b9e0c16 From git at git.haskell.org Sat Dec 1 15:31:22 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 15:31:22 +0000 (UTC) Subject: [commit: ghc] master: Disable most Pipelines-based validation ways (cd79332) Message-ID: <20181201153122.C3E213A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cd793325e3e71cee761df35df0934999f7d77ad7/ghc >--------------------------------------------------------------- commit cd793325e3e71cee761df35df0934999f7d77ad7 Author: Ben Gamari Date: Sat Dec 1 09:10:35 2018 -0500 Disable most Pipelines-based validation ways >--------------------------------------------------------------- cd793325e3e71cee761df35df0934999f7d77ad7 .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 482e71a..686f83a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ before_script: - cabal-cache image: ghcci/x86_64-linux:0.0.8 -validate-x86_64-linux-hadrian: +.validate-x86_64-linux-hadrian: extends: .validate-hadrian before_script: # workaround for docker permissions @@ -59,7 +59,7 @@ validate-x86_64-linux-hadrian: - ghc.tar.xz - junit.xml -validate-x86_64-darwin: +.validate-x86_64-darwin: extends: .validate tags: - x86_64-darwin @@ -111,7 +111,7 @@ validate-x86_64-linux: # Validation via Pipelines (make, Windows) ############################################################ -validate-x86_64-windows: +.validate-x86_64-windows: variables: GHC_VERSION: "8.6.2" script: From git at git.haskell.org Sat Dec 1 15:31:25 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 15:31:25 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Don't use git status to determine whether we are inside a repo (3b075e1) Message-ID: <20181201153125.B7E343A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3b075e1a96564f29130540d933d07840c59a0feb/ghc >--------------------------------------------------------------- commit 3b075e1a96564f29130540d933d07840c59a0feb Author: Ben Gamari Date: Sat Dec 1 09:28:57 2018 -0500 testsuite: Don't use git status to determine whether we are inside a repo Git status is extremely expensive for this task. We instead use `git rev-parse HEAD` and throw away the output to ensure we don't spam the user. >--------------------------------------------------------------- 3b075e1a96564f29130540d933d07840c59a0feb testsuite/driver/perf_notes.py | 7 ++++--- testsuite/driver/runtests.py | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index c275041..5ceede7 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -20,11 +20,12 @@ from math import ceil, trunc from testutil import passed, failBecause -# Check if "git status" can be run successfully. +# Check if "git rev-parse" can be run successfully. # True implies the current directory is a git repo. -def can_git_status(): +def inside_git_repo(): try: - subprocess.check_call(['git', 'status']) + subprocess.check_call(['git', 'rev-parse', 'HEAD'], + stdout=subprocess.DEVNULL) return True except subprocess.CalledProcessError: return False diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index c8966b4..c1e8574 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -25,7 +25,7 @@ import subprocess from testutil import getStdout, Watcher, str_warn, str_info from testglobals import getConfig, ghc_env, getTestRun, TestOptions, brokens -from perf_notes import MetricChange, can_git_status +from perf_notes import MetricChange, inside_git_repo from junit import junit # Readline sometimes spews out ANSI escapes for some values of TERM, @@ -118,10 +118,10 @@ if args.threads: if args.verbose is not None: config.verbose = args.verbose -# Note force skip perf tests: skip if this is not a git repo (estimated with can_git_status) +# Note force skip perf tests: skip if this is not a git repo (estimated with inside_git_repo) # and no metrics file is given. In this case there is no way to read the previous commit's # perf test results, nor a way to store new perf test results. -canGitStatus = can_git_status() +canGitStatus = inside_git_repo() forceSkipPerfTests = not hasMetricsFile and not canGitStatus config.skip_perf_tests = args.skip_perf_tests or forceSkipPerfTests config.only_perf_tests = args.only_perf_tests From git at git.haskell.org Sat Dec 1 15:31:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 1 Dec 2018 15:31:28 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Print all testsuite output to stdout (93e86d6) Message-ID: <20181201153128.AE31F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/93e86d6103757b43017535c92bc6970e9e2315a5/ghc >--------------------------------------------------------------- commit 93e86d6103757b43017535c92bc6970e9e2315a5 Author: Andrey Mokhov Date: Mon Nov 26 22:18:36 2018 +0000 Hadrian: Print all testsuite output to stdout See https://ghc.haskell.org/trac/ghc/ticket/15951 >--------------------------------------------------------------- 93e86d6103757b43017535c92bc6970e9e2315a5 hadrian/src/Rules/Test.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index d6ac7eb..9a314dc 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -75,7 +75,10 @@ testRules = do setEnv "CHECK_API_ANNOTATIONS" annotationsPath -- Execute the test target. - buildWithCmdOptions env $ target (vanillaContext Stage2 compiler) RunTest [] [] + -- We override the verbosity setting to make sure the user can see + -- the test output: https://ghc.haskell.org/trac/ghc/ticket/15951. + withVerbosity Loud $ buildWithCmdOptions env $ + target (vanillaContext Stage2 compiler) RunTest [] [] -- | Build extra programs and libraries required by testsuite needTestsuitePackages :: Action () From git at git.haskell.org Sun Dec 2 11:38:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 2 Dec 2018 11:38:37 +0000 (UTC) Subject: [commit: ghc] master: update (CicleCI) CI script to work with ghc-ci (93a3f90) Message-ID: <20181202113837.89EF13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/93a3f9070d5d69ad6a28fe94ccccd20c54609698/ghc >--------------------------------------------------------------- commit 93a3f9070d5d69ad6a28fe94ccccd20c54609698 Author: Alp Mestanogullari Date: Wed Nov 28 16:31:31 2018 +0100 update (CicleCI) CI script to work with ghc-ci ghc-ci is a tiny webservice that acts as an intermediate between our CircleCI jobs on Gitlab and the actual builds running on CircleCI, so that the build script doesn't need to rely on any secret, which makes the whole setup fork-friendly. The concrete effect of this patch is to allow any fork of GHC on Gitlab to run CircleCI jobs. >--------------------------------------------------------------- 93a3f9070d5d69ad6a28fe94ccccd20c54609698 .gitlab-ci.yml | 21 ++----------------- .gitlab/circle-ci-job.sh | 53 +++++++++++++++++------------------------------- 2 files changed, 21 insertions(+), 53 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 686f83a..f669788 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,25 +143,6 @@ validate-x86_64-linux: .circleci: image: ghcci/x86_64-linux:0.0.8 - tags: - - circleci - before_script: - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - #- git config --global user.email "user at example.com" - #- git config --global user.name "User name" - - echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - #- sudo apt-get update -y - #- sudo apt-get install jq wget -y - #- 'which ssh-agent || sudo apt-get install openssh-client -y' - - eval $(ssh-agent -s) - ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store - ## We're using tr to fix line endings which makes ed25519 keys work - ## without extra base64 encoding. - ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556 - - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null artifacts: when: always reports: @@ -169,6 +150,8 @@ validate-x86_64-linux: paths: - ghc.tar.xz - junit.xml + tags: + - circleci # All validation jobs keep the bindists and test results are artifacts, # when we get far enough to generate them. diff --git a/.gitlab/circle-ci-job.sh b/.gitlab/circle-ci-job.sh index f629557..bbb00e0 100755 --- a/.gitlab/circle-ci-job.sh +++ b/.gitlab/circle-ci-job.sh @@ -4,23 +4,7 @@ # Usage example: # .gitlab/circle-ci-job.sh validate-x86_64-linux # -# It currently requires the following environment variables to -# be set: -# -# - CI_RUNNER_ID, CI_JOB_ID, CI_COMMIT_SHA, set automatically, -# as per: https://docs.gitlab.com/ce/ci/variables/ -# -# - CIRCLECI_TOKEN, which should be set as a Gitlab -# CI "variable", as per: -# https://docs.gitlab.com/ce/ci/variables/README.html#variables -# -# - SSH_PRIVATE_KEY, variable set in the gitlab interface, as per: -# https://docs.gitlab.com/ce/ci/ssh_keys/#ssh-keys-when-using-the-docker-executor -# This script itself doesn't actually need that one, but it is -# needed for the .gitlab-ci.yml script. -# -# -# Finally, there are two other things to configure to get artifacts to be +# There are two things to configure to get artifacts to be # uploaded to gitlab properly: # # - At https:///admin/application_settings, expand the @@ -39,29 +23,30 @@ set -e +GHCCI_URL="localhost:8888" + [ $# -gt 0 ] || (echo You need to pass the Circle CI job type as argument to this script; exit 1) [ ${CI_RUNNER_ID:-} ] || (echo "CI_RUNNER_ID is not set"; exit 1) [ ${CI_JOB_ID:-} ] || (echo "CI_JOB_ID is not set"; exit 1) [ ${CI_COMMIT_SHA:-} ] || (echo "CI_COMMIT_SHA is not set"; exit 1) - -GITHUB_ORG="ghc" -GITHUB_PROJECT="ghc-diffs" -GITHUB_BRANCH="gitlab/${CI_RUNNER_ID}/${CI_JOB_ID}" - +[ ${CI_REPOSITORY_URL:-} ] || (echo "CI_REPOSITORY_URL is not set"; exit 1) +[ ${CI_PIPELINE_ID:-} ] || (echo "CI_PIPELINE_ID is not set"; exit 1) # the first argument to this script is the Circle CI job type: # validate-x86_64-linux, validate-i386-linux, ... -CIRCLE_JOB=$1 +CIRCLE_JOB="circleci-$1" + +gitlab_user=$(echo $CI_REPOSITORY_URL | cut -d/ -f4) +gitlab_repo=$(echo $CI_REPOSITORY_URL | cut -d/ -f5 | cut -d. -f1) + +BODY="{ \"jobType\": \"$CIRCLE_JOB\", \"source\": { \"user\": \"$gitlab_user\", \"project\":\"$gitlab_repo\", \"commit\":\"$CI_COMMIT_SHA\" }, \"pipelineID\": $CI_PIPELINE_ID, \"runnerID\": $CI_RUNNER_ID, \"jobID\": $CI_JOB_ID }" -git remote add gh git at github.com:${GITHUB_ORG}/${GITHUB_PROJECT} &> /dev/null || echo "gh remote already present" -git checkout -b ${GITHUB_BRANCH} || true # if we've already done this before -git push gh ${GITHUB_BRANCH} || true # if we've already done this before -BODY="{ \"revision\": \"${CI_COMMIT_SHA}\", \"build_parameters\": { \"CIRCLE_JOB\": \"${CIRCLE_JOB}\" } }" -RESP=$(curl -s -X POST -H "Content-Type: application/json" -d "$BODY" \ - https://circleci.com/api/v1.1/project/github/${GITHUB_ORG}/${GITHUB_PROJECT}/tree/${GITHUB_BRANCH}?circle-token=${CIRCLECI_TOKEN}) +RESP=$(curl -s -XPOST -H "Content-Type: application/json" -d "$BODY" \ + http://${GHCCI_URL}/job) if [ $? -eq 0 ]; then - build_num=$(echo $RESP | jq '.build_num') + build_num=$(echo $RESP | jq '.build_num') + circle_url=$(echo $RESP | jq '.url') else echo "Couldn't submit job" echo $RESP @@ -69,10 +54,10 @@ else fi echo Circle CI build number: $build_num -echo Circle CI build page: https://circleci.com/gh/${GITHUB_ORG}/${GITHUB_PROJECT}/$build_num +echo Circle CI build page: $circle_url outcome="null" -STATUS_URL="https://circleci.com/api/v1.1/project/github/${GITHUB_ORG}/${GITHUB_PROJECT}/${build_num}?circle-token=${CIRCLECI_TOKEN}" +STATUS_URL="http://${GHCCI_URL}/job/${build_num}" STATUS_RESP="" while [ "$outcome" == "null" ]; do @@ -97,13 +82,13 @@ done if [ "$outcome" == "\"success\"" ]; then echo The build passed - artifactsBody=$(curl -s https://circleci.com/api/v1.1/project/github/${GITHUB_ORG}/${GITHUB_PROJECT}/${build_num}/artifacts?circle-token=${CIRCLECI_TOKEN}) + artifactsBody=$(curl -s http://${GHCCI_URL}/job/${build_num}/artifacts) (echo $artifactsBody | jq '.[] | .url' | xargs wget -q) || echo "No artifacts" exit 0 else echo The build failed - artifactsBody=$(curl -s https://circleci.com/api/v1.1/project/github/${GITHUB_ORG}/${GITHUB_PROJECT}/${build_num}/artifacts?circle-token=${CIRCLECI_TOKEN}) + artifactsBody=$(curl -s http://${GHCCI_URL}/job/${build_num}/artifacts) (echo $artifactsBody | jq '.[] | .url' | xargs wget -q) || echo "No artifacts" failing_step=$(echo $STATUS_RESP | jq '.steps | .[] | .actions | .[] | select(.status != "success")') From git at git.haskell.org Mon Dec 3 12:47:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 12:47:27 +0000 (UTC) Subject: [commit: ghc] master: Warn on all out-of-range literals in pats/exprs (75a8349) Message-ID: <20181203124727.D2AD53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/75a8349b2a7d0142d3d687837caf5a95bbb4368d/ghc >--------------------------------------------------------------- commit 75a8349b2a7d0142d3d687837caf5a95bbb4368d Author: Alec Theriault Date: Mon Dec 3 07:03:44 2018 -0500 Warn on all out-of-range literals in pats/exprs Summary: These changes were motivated by #13256. While poking around, I realized we weren't very consistent in our "-Woverflowed-literals" warnings. This patch fixes that by: * warning earlier on in the pipeline (ie. before we've desugared 'Int' patterns into 'I# Int#') * handling 'HsLit' as well as 'HsOverLit' (this covers unboxed literals) * covering more pattern / expression forms 4/6 of the warnings in the 'Overflow' test are due to this patch. The other two are mostly for completeness. Also fixed a missing empty-enumeration warning for 'Natural'. This warnings were tripped up by the 'Bounded Word' instance (see #9505), but the fix was obvious and simple: use unboxed word literals. Test Plan: make TEST=Overflow && make TEST=T10930 Reviewers: hvr, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #13256, #10930 Differential Revision: https://phabricator.haskell.org/D5181 >--------------------------------------------------------------- 75a8349b2a7d0142d3d687837caf5a95bbb4368d compiler/deSugar/DsExpr.hs | 18 ++-- compiler/deSugar/DsMonad.hs | 26 +++-- compiler/deSugar/Match.hs | 120 ++++++++++++--------- compiler/deSugar/MatchCon.hs | 4 +- compiler/deSugar/MatchLit.hs | 101 ++++++++++++----- compiler/prelude/TysPrim.hs | 16 +-- docs/users_guide/8.8.1-notes.rst | 5 + libraries/base/GHC/Enum.hs | 4 +- .../tests/warnings/should_compile/Overflow.hs | 32 ++++++ .../tests/warnings/should_compile/Overflow.stderr | 18 ++++ testsuite/tests/warnings/should_compile/T10930.hs | 10 ++ .../tests/warnings/should_compile/T10930.stderr | 11 ++ testsuite/tests/warnings/should_compile/T10930b.hs | 7 ++ .../tests/warnings/should_compile/T10930b.stderr | 15 +++ testsuite/tests/warnings/should_compile/T13256.hs | 4 + .../tests/warnings/should_compile/T13256.stderr | 3 + testsuite/tests/warnings/should_compile/T15460.hs | 9 ++ .../tests/warnings/should_compile/T15460.stderr | 3 + testsuite/tests/warnings/should_compile/all.T | 6 ++ 19 files changed, 314 insertions(+), 98 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 75a8349b2a7d0142d3d687837caf5a95bbb4368d From git at git.haskell.org Mon Dec 3 12:47:31 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 12:47:31 +0000 (UTC) Subject: [commit: ghc] master: Fix #15954 by rejigging check_type's order (2e6cc3d) Message-ID: <20181203124731.BA8AD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2e6cc3d08f8439a2c0b6426e839d80072dbcda2c/ghc >--------------------------------------------------------------- commit 2e6cc3d08f8439a2c0b6426e839d80072dbcda2c Author: Ryan Scott Date: Mon Dec 3 07:03:52 2018 -0500 Fix #15954 by rejigging check_type's order Summary: Previously, `check_type` (which catches illegal uses of unsaturated type synonyms without enabling `LiberalTypeSynonyms`, among other things) always checks for uses of polytypes before anything else. There is a problem with this plan, however: checking for polytypes requires decomposing `forall`s and other invisible arguments, an action which itself expands type synonyms! Therefore, if we have something like: ```lang=haskell type A a = Int type B (a :: Type -> Type) = forall x. x -> x type C = B A ``` Then when checking `B A`, `A` will get expanded to `forall x. x -> x` before `check_type` has an opportunity to realize that `A` is an unsaturated type synonym! This is the root cause of #15954. This patch fixes the issue by moving the case of `check_type` that detects polytypes to be //after// the case that checks for `TyConApp`s. That way, the `TyConApp` case will properly flag things like the unsaturated use of `A` in the example above before we ever attempt to check for polytypes. Test Plan: make test TEST=T15954 Reviewers: simonpj, bgamari, goldfire Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15954 Differential Revision: https://phabricator.haskell.org/D5402 >--------------------------------------------------------------- 2e6cc3d08f8439a2c0b6426e839d80072dbcda2c compiler/typecheck/TcType.hs | 2 +- compiler/typecheck/TcValidity.hs | 66 ++++++++++++++++------ compiler/types/Type.hs | 10 +++- testsuite/tests/dependent/should_fail/T15859.hs | 1 + .../tests/dependent/should_fail/T15859.stderr | 2 +- testsuite/tests/typecheck/should_compile/tc149.hs | 3 +- testsuite/tests/typecheck/should_fail/T15954.hs | 14 +++++ .../tests/typecheck/should_fail/T15954.stderr | 8 +++ testsuite/tests/typecheck/should_fail/T7809.stderr | 6 +- testsuite/tests/typecheck/should_fail/all.T | 1 + 10 files changed, 89 insertions(+), 24 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 2e6cc3d08f8439a2c0b6426e839d80072dbcda2c From git at git.haskell.org Mon Dec 3 12:47:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 12:47:35 +0000 (UTC) Subject: [commit: ghc] master: Fix embarrassing infinite loop in pprParendType (89d8092) Message-ID: <20181203124735.3B9043A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/89d80921d9328499ffca9877e7dea540350be9c1/ghc >--------------------------------------------------------------- commit 89d80921d9328499ffca9877e7dea540350be9c1 Author: Ryan Scott Date: Mon Dec 3 07:03:55 2018 -0500 Fix embarrassing infinite loop in pprParendType Summary: `pprParendType` was missing an explicit case for `EqualityT`, which caused it to fall through to a catch-all case that invokes `ppr`. But `ppr` itself does not have a case for a partial application of `EqualityT`, so //it// falls back to `pprParendType`, resulting in an infinite loop! The fix is simple: add a case for `EqualityT` in `pprParendType`. While I was in the neighborhood, I removed the catch-call case in `pprParendType` to make this sort of mistake less likely to happen in the future. Test Plan: make test TEST=T15985 Reviewers: bgamari, monoidal, simonpj Reviewed By: monoidal, simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15985 Differential Revision: https://phabricator.haskell.org/D5403 >--------------------------------------------------------------- 89d80921d9328499ffca9877e7dea540350be9c1 libraries/template-haskell/Language/Haskell/TH/Ppr.hs | 4 +++- testsuite/tests/th/T15985.hs | 7 +++++++ testsuite/tests/th/all.T | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs index 138cf62..621c0f5 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs @@ -739,7 +739,9 @@ pprParendType tuple | (TupleT n, args) <- split tuple , length args == n = parens (commaSep args) pprParendType (ImplicitParamT n t)= text ('?':n) <+> text "::" <+> ppr t -pprParendType other = parens (ppr other) +pprParendType EqualityT = text "(~)" +pprParendType t@(ForallT {}) = parens (ppr t) +pprParendType t@(AppT {}) = parens (ppr t) pprUInfixT :: Type -> Doc pprUInfixT (UInfixT x n y) = pprUInfixT x <+> pprName' Infix n <+> pprUInfixT y diff --git a/testsuite/tests/th/T15985.hs b/testsuite/tests/th/T15985.hs new file mode 100644 index 0000000..3ddd557 --- /dev/null +++ b/testsuite/tests/th/T15985.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} +module T15985 where + +import Language.Haskell.TH + +foo :: String +foo = $(stringE (pprint EqualityT)) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index b158313..e404c8f 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -451,3 +451,4 @@ test('T15815', normal, multimod_compile, test('T15845', normal, compile, ['-v0 -dsuppress-uniques']) test('T15437', expect_broken(15437), multimod_compile, ['T15437', '-v0 ' + config.ghc_th_way_flags]) +test('T15985', normal, compile, ['']) From git at git.haskell.org Mon Dec 3 13:42:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 13:42:58 +0000 (UTC) Subject: [commit: ghc] master: Introduce tcTypeKind, and use it (03d4852) Message-ID: <20181203134258.816783A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/03d4852658e1b7407abb4da84b1b03bfa6f6db3b/ghc >--------------------------------------------------------------- commit 03d4852658e1b7407abb4da84b1b03bfa6f6db3b Author: Simon Peyton Jones Date: Mon Dec 3 11:30:22 2018 +0000 Introduce tcTypeKind, and use it In the type checker Constraint and * are distinct; and the function that takes the kind of a type should respect that distinction (Trac #15971). This patch implements the change: * Introduce Type.tcTypeKind, and use it throughout the type inference engine * Add new Note [Kinding rules for types] for the kinding rules, especially for foralls. * Redefine isPredTy ty = tcIsConstraintKind (tcTypeKind ty) (it had a much more complicated definition before) Some miscellaneous refactoring * Get rid of TyCoRep.isTYPE, Kind.isTYPEApp, in favour of TyCoRep.kindRep, kindRep_maybe * Rename Type.getRuntimeRepFromKind_maybe to getRuntimeRep_maybe I did some spot-checks on compiler perf, and it really doesn't budge (as expected). >--------------------------------------------------------------- 03d4852658e1b7407abb4da84b1b03bfa6f6db3b compiler/typecheck/ClsInst.hs | 4 +- compiler/typecheck/FamInst.hs | 4 +- compiler/typecheck/Inst.hs | 8 +- compiler/typecheck/TcCanonical.hs | 16 +-- compiler/typecheck/TcDeriv.hs | 10 +- compiler/typecheck/TcDerivInfer.hs | 6 +- compiler/typecheck/TcErrors.hs | 33 ++--- compiler/typecheck/TcExpr.hs | 4 +- compiler/typecheck/TcFlatten.hs | 38 ++--- compiler/typecheck/TcHsSyn.hs | 2 +- compiler/typecheck/TcHsType.hs | 18 +-- compiler/typecheck/TcInteract.hs | 4 +- compiler/typecheck/TcMType.hs | 10 +- compiler/typecheck/TcPat.hs | 2 +- compiler/typecheck/TcPatSyn.hs | 4 +- compiler/typecheck/TcRnDriver.hs | 2 +- compiler/typecheck/TcRnTypes.hs | 4 +- compiler/typecheck/TcSimplify.hs | 4 +- compiler/typecheck/TcSplice.hs | 6 +- compiler/typecheck/TcTyClsDecls.hs | 8 +- compiler/typecheck/TcType.hs | 22 +-- compiler/typecheck/TcTypeable.hs | 17 ++- compiler/typecheck/TcUnify.hs | 12 +- compiler/typecheck/TcValidity.hs | 8 +- compiler/types/Kind.hs | 24 +--- compiler/types/TyCoRep.hs | 73 ++++++---- compiler/types/Type.hs | 274 +++++++++++++++++-------------------- 27 files changed, 304 insertions(+), 313 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 03d4852658e1b7407abb4da84b1b03bfa6f6db3b From git at git.haskell.org Mon Dec 3 13:49:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 13:49:19 +0000 (UTC) Subject: [commit: ghc] master: Comments only (a46511a) Message-ID: <20181203134919.E9DF03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a46511a88e719d990285f06b29a38839b3e0a0bf/ghc >--------------------------------------------------------------- commit a46511a88e719d990285f06b29a38839b3e0a0bf Author: Simon Peyton Jones Date: Mon Dec 3 13:47:55 2018 +0000 Comments only >--------------------------------------------------------------- a46511a88e719d990285f06b29a38839b3e0a0bf compiler/typecheck/TcInstDcls.hs | 9 +++++++-- compiler/typecheck/TcTyClsDecls.hs | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index b8eb17f..8d2ef94 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -799,7 +799,12 @@ tcDataFamHeader mb_clsinfo fam_tc imp_vars mb_bndrs fixity hs_ctxt hs_pats m_ksi ; lhs_ty <- checkExpectedKindX pp_lhs lhs_ty lhs_kind res_kind ; return (stupid_theta, lhs_ty, res_kind) } - -- See Note [Generalising in tcFamTyPatsAndThen] + -- See TcTyClsDecls Note [Generalising in tcFamTyPatsGuts] + -- This code (and the stuff immediately above) is very similar + -- to that in tcFamTyInstEqnGuts. Maybe we should abstract the + -- common code; but for the moment I concluded that it's + -- clearer to duplicate it. Still, if you fix a bug here, + -- check there too! ; let scoped_tvs = imp_tvs ++ exp_tvs ; dvs <- candidateQTyVarsOfTypes (lhs_ty : mkTyVarTys scoped_tvs) ; qtvs <- quantifyTyVars emptyVarSet dvs @@ -901,7 +906,7 @@ There are several fiddly subtleties lurking here data family X a :: forall k. * -> * -- Note: a forall that is not used data instance X Int b = MkX - So the data intance is really + So the data instance is really data istance X Int @k b = MkX The axiom will look like diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index eda86f9..ce7cc83 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -1817,8 +1817,8 @@ indexed-types/should_compile/T12369 for an example. So, the kind-checker must return the new skolems and args (that is, Type or (Type -> Type) for the equations above) and the instantiated kind. -Note [Generalising in tcFamTyPatsAndThen] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Generalising in tcFamTyPatsGuts] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppose we have something like type instance forall (a::k) b. F t1 t2 = rhs @@ -1872,7 +1872,12 @@ tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty ; rhs_ty <- tcCheckLHsType hs_rhs_ty rhs_kind ; return (lhs_ty, rhs_ty) } - -- See Note [Generalising in tcFamTyPatsAndThen] + -- See Note [Generalising in tcFamTyPatsGuts] + -- This code (and the stuff immediately above) is very similar + -- to that in tcDataFamHeader. Maybe we should abstract the + -- common code; but for the moment I concluded that it's + -- clearer to duplicate it. Still, if you fix a bug here, + -- check there too! ; let scoped_tvs = imp_tvs ++ exp_tvs ; dvs <- candidateQTyVarsOfTypes (lhs_ty : mkTyVarTys scoped_tvs) ; qtvs <- quantifyTyVars emptyVarSet dvs @@ -1882,6 +1887,9 @@ tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty ; rhs_ty <- zonkTcTypeToTypeX ze rhs_ty ; let pats = unravelFamInstPats lhs_ty + -- Note that we do this after solveEqualities + -- so that any strange coercions inside lhs_ty + -- have been solved before we attempt to unravel it ; traceTc "tcTyFamInstEqnGuts }" (ppr fam_tc <+> pprTyVars qtvs) ; return (qtvs, pats, rhs_ty) } where @@ -1963,6 +1971,10 @@ unravelFamInstPats fam_app = case splitTyConApp_maybe fam_app of Just (_, pats) -> pats Nothing -> WARN( True, bad_lhs fam_app ) [] + -- The Nothing case cannot happen for type families, because + -- we don't call unravelFamInstPats until we've solved the + -- equalities. For data families I wasn't quite as convinced + -- so I've let it as a warning rather than a panic. where bad_lhs fam_app = hang (text "Ill-typed LHS of family instance") From git at git.haskell.org Mon Dec 3 16:34:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 16:34:55 +0000 (UTC) Subject: [commit: ghc] master: Add test cases for #7503, #14451 (aef5d82) Message-ID: <20181203163455.D5BA53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/aef5d82543bb642a65f63e1f05f245b9cddafd8c/ghc >--------------------------------------------------------------- commit aef5d82543bb642a65f63e1f05f245b9cddafd8c Author: Ryan Scott Date: Mon Dec 3 11:34:02 2018 -0500 Add test cases for #7503, #14451 At some point between 8.4 and 8.6, two things were fixed: * The entirety of #14451. * One of the test cases in #7503. I've added this as T7503a. The other test case from that ticket still does /not/ work, so we'll have to add T7503b some other day. >--------------------------------------------------------------- aef5d82543bb642a65f63e1f05f245b9cddafd8c testsuite/tests/typecheck/should_compile/T14451.hs | 28 ++++++++++++++++++++++ testsuite/tests/typecheck/should_compile/T7503a.hs | 18 ++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 2 ++ 3 files changed, 48 insertions(+) diff --git a/testsuite/tests/typecheck/should_compile/T14451.hs b/testsuite/tests/typecheck/should_compile/T14451.hs new file mode 100644 index 0000000..a67ce74 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T14451.hs @@ -0,0 +1,28 @@ +{-# Language KindSignatures, TypeOperators, PolyKinds, TypeOperators, ConstraintKinds, TypeFamilies, DataKinds, TypeInType, GADTs, AllowAmbiguousTypes, InstanceSigs, RankNTypes, UndecidableInstances #-} +module T14451 where + +import Data.Kind + +data TyFun :: Type -> Type -> Type + +type a ~> b = TyFun a b -> Type + +type Cat ob = ob -> ob -> Type + +type family + Apply (f :: a ~> b) (x :: a) :: b where + Apply (CompSym2 f g) a = Comp f g a + +data CompSym2 :: (b ~> c) -> (a ~> b) -> (a ~> c) + +type a·b = Apply a b + +class Varpi (f :: i ~> j) where + type Dom (f :: i ~> j) :: Cat i + type Cod (f :: i ~> j) :: Cat j + + varpa :: Dom f a a' -> Cod f (f·a) (f·a') + +type family + Comp (f::k1 ~> k) (g::k2 ~> k1) (a::k2) :: k where + Comp f g a = f · (g · a) diff --git a/testsuite/tests/typecheck/should_compile/T7503a.hs b/testsuite/tests/typecheck/should_compile/T7503a.hs new file mode 100644 index 0000000..61c0fb3 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T7503a.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE ExistentialQuantification, DataKinds, PolyKinds, KindSignatures, GADTs #-} +module T7503a where + import Data.Kind + import GHC.Exts hiding (Any) + + data WrappedType = forall a. WrapType a + + data A :: WrappedType -> Type where + MkA :: forall (a :: Type). AW a -> A (WrapType a) + + type AW (a :: k) = A (WrapType a) + type AW' (a :: k) = A (WrapType a) + + class C (a :: k) where + aw :: AW a -- workaround: AW' + + instance C [] where + aw = aw diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index be7ad3d..99c2259 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -401,6 +401,7 @@ test('type_in_type_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-v test('T15370', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits']) test('T7408', normal, compile, ['']) test('UnboxStrictPrimitiveFields', normal, compile, ['']) +test('T7503a', normal, compile, ['']) test('T7541', normal, compile, ['']) test('T7562', normal, compile, ['']) test('T7641', normal, compile, ['']) @@ -596,6 +597,7 @@ test('T14396', [extra_files(['T14396.hs', 'T14396.hs-boot', 'T14396a.hs', 'T1439 test('T14434', [], run_command, ['$MAKE -s --no-print-directory T14434']) test('MissingExportList01', normal, compile, ['']) test('MissingExportList02', normal, compile, ['']) +test('T14451', normal, compile, ['']) test('T14488', normal, compile, ['']) test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits']) # We omit the hpc/profasm ways because this test checks the From git at git.haskell.org Mon Dec 3 19:00:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 19:00:35 +0000 (UTC) Subject: [commit: ghc] master: Fix link name to a note (920f1bd) Message-ID: <20181203190035.BE3F43A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/920f1bdc21cbbb74701f43aac1cbe5967fd75896/ghc >--------------------------------------------------------------- commit 920f1bdc21cbbb74701f43aac1cbe5967fd75896 Author: Arnaud Spiwack Date: Mon Dec 3 19:54:19 2018 +0100 Fix link name to a note Reviewers: goldfire, bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5399 >--------------------------------------------------------------- 920f1bdc21cbbb74701f43aac1cbe5967fd75896 compiler/iface/IfaceType.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs index 4a42afe..c92c5d0 100644 --- a/compiler/iface/IfaceType.hs +++ b/compiler/iface/IfaceType.hs @@ -1790,7 +1790,7 @@ instance Binary IfaceCoercion where = pprPanic "Can't serialise IfaceFreeCoVar" (ppr cv) put_ _ (IfaceHoleCo cv) = pprPanic "Can't serialise IfaceHoleCo" (ppr cv) - -- See Note [Holes in IfaceUnivCoProv] + -- See Note [Holes in IfaceCoercion] get bh = do tag <- getByte bh From git at git.haskell.org Mon Dec 3 19:00:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 3 Dec 2018 19:00:38 +0000 (UTC) Subject: [commit: ghc] master: Bump nofib submodule (51e56dd) Message-ID: <20181203190038.B4B453A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/51e56dd5e299a6d7a0a3b0b97afd33dbd3485279/ghc >--------------------------------------------------------------- commit 51e56dd5e299a6d7a0a3b0b97afd33dbd3485279 Author: klebinger.andreas at gmx.at Date: Mon Dec 3 19:59:09 2018 +0100 Bump nofib submodule Test Plan: run nofib Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5396 >--------------------------------------------------------------- 51e56dd5e299a6d7a0a3b0b97afd33dbd3485279 nofib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nofib b/nofib index a80baac..f87d446 160000 --- a/nofib +++ b/nofib @@ -1 +1 @@ -Subproject commit a80baacfc29cc2e7ed50e94f3cd2648d11b1d7d5 +Subproject commit f87d446b4e361cc82f219cf78917db9681af69b3 From git at git.haskell.org Tue Dec 4 07:15:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 4 Dec 2018 07:15:58 +0000 (UTC) Subject: [commit: ghc] master: Improve test T14452 for Windows (6090002) Message-ID: <20181204071558.CA6933A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6090002e19d5c888c2eda0ce06dd84e3c46aa0c9/ghc >--------------------------------------------------------------- commit 6090002e19d5c888c2eda0ce06dd84e3c46aa0c9 Author: Roland Senn Date: Tue Dec 4 00:17:47 2018 +0000 Improve test T14452 for Windows Summary: Under Windows all parameters to gcc are enclosed in quotes, opposite to Linux, where the quotes are missing. Therefore in the test, we remove all quotes in the stdout file with sed. Test Plan: make test TEST=T14452 Reviewers: osa1, hvr, bgamari, monoidal, Phyx, simonpj Reviewed By: Phyx Subscribers: rwbarton, carter GHC Trac Issues: #14452 Differential Revision: https://phabricator.haskell.org/D5398 >--------------------------------------------------------------- 6090002e19d5c888c2eda0ce06dd84e3c46aa0c9 testsuite/tests/driver/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index e60df7a..d1bb30f 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -672,4 +672,5 @@ T12971: .PHONY: T14452 T14452: "$(TEST_HC)" $(TEST_HC_OPTS) -v -c -O2 T14452.hs 2>&1 | grep 'O3' \ - | awk 'NF{print $$NF; exit}' # awk: extract last word of line + | awk 'NF{print $$NF; exit}' | sed 's/\"//g' + # awk: extract last word of line, sed: remove quotes From git at git.haskell.org Tue Dec 4 07:16:01 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 4 Dec 2018 07:16:01 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: include 'findPtr' via find-ptr cabal flag (924026e) Message-ID: <20181204071601.C330C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/924026e0405396a3f559f163e829b88f30cca49e/ghc >--------------------------------------------------------------- commit 924026e0405396a3f559f163e829b88f30cca49e Author: Alec Theriault Date: Tue Dec 4 00:21:48 2018 +0000 Hadrian: include 'findPtr' via find-ptr cabal flag Summary: This is the latest in the 'findPtr' saga. See * 900c47f88784b91517c00be3e1087322e62f698e * 561748cb507505bd5b7bd76bdc57796d896b62a2 for the previous attempts. The problem with re-using the 'debug' cabal flag for the purpose of forcing inclusion of 'findPtr' occurs when 'debug' is one of the RTS ways, but RTS is not being compiled with '-DDEBUG': * the 'debug' flag gets passed to cabal, signalling to build 'rts' with the debug flavour, but also forcing inclusion of the 'findPtr'/'_findPtr' symbol * since '-DDEBUG' isn't enabled, that symbol doesn't show up in the libraries, so executable that depend on 'rts' (everything) will end up always requiring 'findPtr'/'_findPtr' but 'rts' won'y provide it! The fix is simple: create a a new 'find-ptr' cabal-flag whose only purpose is forcing '-Wl,-u,findPtr'/'-Wl,-u,_findPtr'. Then, enable that flag when the RTS is being compiled with '-DDEBUG' Test Plan: ./hadrian/build.sh -c # on mac Reviewers: alpmestan, snowleopard, bgamari, erikd, simonmar, Phyx Reviewed By: alpmestan, snowleopard, Phyx Subscribers: Phyx, rwbarton, carter GHC Trac Issues: #15956 Differential Revision: https://phabricator.haskell.org/D5404 >--------------------------------------------------------------- 924026e0405396a3f559f163e829b88f30cca49e hadrian/src/Rules/Test.hs | 4 ++-- hadrian/src/Settings/Packages.hs | 1 + rts/rts.cabal.in | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index 9a314dc..b72c1b9 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -26,13 +26,13 @@ testRules :: Rules () testRules = do root <- buildRootRules - -- | Using program shipped with testsuite to generate ghcconfig file. + -- Using program shipped with testsuite to generate ghcconfig file. root -/- ghcConfigProgPath ~> do ghc <- builderPath $ Ghc CompileHs Stage0 createDirectory $ takeDirectory (root -/- ghcConfigProgPath) cmd ghc [ghcConfigHsPath, "-o" , root -/- ghcConfigProgPath] - -- | TODO : Use input test compiler and not just stage2 compiler. + -- TODO : Use input test compiler and not just stage2 compiler. root -/- ghcConfigPath ~> do ghcPath <- needFile Stage1 ghc need [root -/- ghcConfigProgPath] diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 51a980c..8963c76 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -286,6 +286,7 @@ rtsPackageArgs = package rts ? do , any (wayUnit Debug) rtsWays ? arg "debug" , any (wayUnit Logging) rtsWays ? arg "logging" , any (wayUnit Dynamic) rtsWays ? arg "dynamic" + , Debug `wayUnit` way ? arg "find-ptr" ] , builder (Cc FindCDependencies) ? cArgs , builder (Ghc CompileCWithGhc) ? map ("-optc" ++) <$> cArgs diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index e9cc7d1..a3f74be 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -28,6 +28,8 @@ flag leading-underscore default: @CabalLeadingUnderscore@ flag smp default: True +flag find-ptr + default: False -- Some cabal flags used to control the flavours we want to produce -- for libHSrts in hadrian. By default, we just produce vanilla and -- threaded. The flags "compose": if you enable debug and profiling, @@ -268,9 +270,8 @@ library "-Wl,-u,_hs_atomicwrite8" "-Wl,-u,_hs_atomicwrite16" "-Wl,-u,_hs_atomicwrite32" - "-Wl,-u,_findPtr" - if flag(debug) + if flag(find-ptr) -- This symbol is useful in gdb, but not referred to anywhere, -- so we need to force it to be included in the binary. ld-options: "-Wl,-u,_findPtr" @@ -346,10 +347,10 @@ library "-Wl,-u,hs_atomicwrite16" "-Wl,-u,hs_atomicwrite32" - if flag(debug) + if flag(find-ptr) -- This symbol is useful in gdb, but not referred to anywhere, -- so we need to force it to be included in the binary. - ld-options: "-Wl,-u,_findPtr" + ld-options: "-Wl,-u,findPtr" if os(osx) ld-options: "-Wl,-search_paths_first" From git at git.haskell.org Tue Dec 4 07:16:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 4 Dec 2018 07:16:05 +0000 (UTC) Subject: [commit: ghc] master: linker: store entire link map and use it. (a8b7cef) Message-ID: <20181204071605.E8D193A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a8b7cef4d45a5003bf7584e06912f0f632116c71/ghc >--------------------------------------------------------------- commit a8b7cef4d45a5003bf7584e06912f0f632116c71 Author: Tamar Christina Date: Tue Dec 4 00:29:08 2018 +0000 linker: store entire link map and use it. Summary: This fixes a corner case in which we have seen the symbol multiple times in different static libraries, but due to a depencency we end up loading the symbol from a library other than the first one. Previously the runtime linker would only track symbols from the first library and did not store the full link map. In this case it was unable to find the address for the symbols in the second library during delay loading. This change stores the address of all symbols seen so a full link map is generated, such that when we make a different decision later than what was expected we're able to still correctly load the library. Test Plan: ./validate, new testcase T15894 Reviewers: angerman, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15894 Differential Revision: https://phabricator.haskell.org/D5353 >--------------------------------------------------------------- a8b7cef4d45a5003bf7584e06912f0f632116c71 rts/Linker.c | 23 +++++++++++++---------- rts/LinkerInternals.h | 10 +++++++++- rts/linker/Elf.c | 5 +++-- rts/linker/MachO.c | 8 +++++--- rts/linker/PEi386.c | 10 ++++++---- testsuite/tests/rts/T15894/Makefile | 8 ++++++++ testsuite/tests/rts/T15894/T15894.stdout | 1 + testsuite/tests/rts/T15894/all.T | 3 +++ testsuite/tests/rts/T15894/copysign.c | 11 +++++++++++ testsuite/tests/rts/T15894/main.hs | 5 +++++ 10 files changed, 64 insertions(+), 20 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc a8b7cef4d45a5003bf7584e06912f0f632116c71 From git at git.haskell.org Wed Dec 5 10:34:12 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 5 Dec 2018 10:34:12 +0000 (UTC) Subject: [commit: ghc] master: Remove duplicates in -ddump-minimial-imports (84cba4b) Message-ID: <20181205103412.E831D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/84cba4bce65ffc99e2356b3621cf91258b055cad/ghc >--------------------------------------------------------------- commit 84cba4bce65ffc99e2356b3621cf91258b055cad Author: Simon Peyton Jones Date: Wed Dec 5 10:12:09 2018 +0000 Remove duplicates in -ddump-minimial-imports This fixes Trac #15994. Previously RdrName.gresToAvailInfo assumed that the input list of GREs had no duplicates. I accidentally broke this precondition in this refactoring: commit 6353efc7694ba8ec86c091918e02595662169ae2 Date: Thu Nov 22 14:48:05 2018 -0500 Fix unused-import warnings This patch fixes a fairly long-standing bug (dating back to 2015) in RdrName.bestImport, namely (There was an ASSERT, but it's usually switched off in stage2. It tripped when I switched stage2 assertions on.) The fix is straightforward: account for dups in gresToAvailInfo. >--------------------------------------------------------------- 84cba4bce65ffc99e2356b3621cf91258b055cad compiler/basicTypes/RdrName.hs | 42 +++++++++++++--------- testsuite/tests/rename/should_compile/Makefile | 7 +++- testsuite/tests/rename/should_compile/T15994.hs | 5 +++ .../tests/rename/should_compile/T15994.stdout | 1 + testsuite/tests/rename/should_compile/all.T | 1 + 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs index 6a3db51..60e4e84 100644 --- a/compiler/basicTypes/RdrName.hs +++ b/compiler/basicTypes/RdrName.hs @@ -88,7 +88,7 @@ import Util import NameEnv import Data.Data -import Data.List( sortBy, nub ) +import Data.List( sortBy ) {- ************************************************************************ @@ -696,17 +696,26 @@ greParent_maybe gre = case gre_par gre of -- uniqueness assumption. gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo] gresToAvailInfo gres - = ASSERT( nub gres == gres ) nameEnvElts avail_env + = nameEnvElts avail_env where - avail_env :: NameEnv AvailInfo -- keyed by the parent - avail_env = foldl' add emptyNameEnv gres - - add :: NameEnv AvailInfo -> GlobalRdrElt -> NameEnv AvailInfo - add env gre = extendNameEnv_Acc comb availFromGRE env - (fromMaybe (gre_name gre) - (greParent_maybe gre)) gre - + avail_env :: NameEnv AvailInfo -- Keyed by the parent + (avail_env, _) = foldl' add (emptyNameEnv, emptyNameSet) gres + + add :: (NameEnv AvailInfo, NameSet) + -> GlobalRdrElt + -> (NameEnv AvailInfo, NameSet) + add (env, done) gre + | name `elemNameSet` done + = (env, done) -- Don't insert twice into the AvailInfo + | otherwise + = ( extendNameEnv_Acc comb availFromGRE env key gre + , done `extendNameSet` name ) where + name = gre_name gre + key = case greParent_maybe gre of + Just parent -> parent + Nothing -> gre_name gre + -- We want to insert the child `k` into a list of children but -- need to maintain the invariant that the parent is first. -- @@ -718,13 +727,12 @@ gresToAvailInfo gres | otherwise = n:k:ns comb :: GlobalRdrElt -> AvailInfo -> AvailInfo - comb _ (Avail n) = Avail n -- Duplicated name - comb gre (AvailTC m ns fls) = - let n = gre_name gre - in case gre_par gre of - NoParent -> AvailTC m (n:ns) fls -- Not sure this ever happens - ParentIs {} -> AvailTC m (insertChildIntoChildren m ns n) fls - FldParent _ mb_lbl -> AvailTC m ns (mkFieldLabel n mb_lbl : fls) + comb _ (Avail n) = Avail n -- Duplicated name, should not happen + comb gre (AvailTC m ns fls) + = case gre_par gre of + NoParent -> AvailTC m (name:ns) fls -- Not sure this ever happens + ParentIs {} -> AvailTC m (insertChildIntoChildren m ns name) fls + FldParent _ mb_lbl -> AvailTC m ns (mkFieldLabel name mb_lbl : fls) availFromGRE :: GlobalRdrElt -> AvailInfo availFromGRE (GRE { gre_name = me, gre_par = parent }) diff --git a/testsuite/tests/rename/should_compile/Makefile b/testsuite/tests/rename/should_compile/Makefile index 69e899b..6e41534 100644 --- a/testsuite/tests/rename/should_compile/Makefile +++ b/testsuite/tests/rename/should_compile/Makefile @@ -27,12 +27,17 @@ T3449: '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449.hs T4239: - $(RM) T4239A.hi T4239A.o + $(RM) TT4239A.hi T4239A.o $(RM) T4239.hi T4239.o T4239.imports '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239A.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239.hs -ddump-minimal-imports cat T4239.imports +T15994: + $(RM) T15994.hi T15994.o T15994.imports + '$(TEST_HC)' $(TEST_HC_OPTS) -c T15994.hs -ddump-minimal-imports + cat T15994.imports + T4240: $(RM) T4240A.hi T4240A.o $(RM) T4240B.hi T4240B.o diff --git a/testsuite/tests/rename/should_compile/T15994.hs b/testsuite/tests/rename/should_compile/T15994.hs new file mode 100644 index 0000000..ff7c56f --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15994.hs @@ -0,0 +1,5 @@ +module T15994 where + +import System.IO + +f = [ReadMode, ReadMode] diff --git a/testsuite/tests/rename/should_compile/T15994.stdout b/testsuite/tests/rename/should_compile/T15994.stdout new file mode 100644 index 0000000..3297349 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15994.stdout @@ -0,0 +1 @@ +import System.IO ( IOMode(ReadMode) ) diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 86f04d0..b6c06c1 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -162,3 +162,4 @@ test('T14487', [], multimod_compile, ['T14487', '-v0']) test('T14747', [], multimod_compile, ['T14747', '-v0']) test('T15149', [], multimod_compile, ['T15149', '-v0']) test('T13064', normal, compile, ['']) +test('T15994', [], run_command, ['$MAKE -s --no-print-directory T15994']) From git at git.haskell.org Wed Dec 5 16:48:18 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 5 Dec 2018 16:48:18 +0000 (UTC) Subject: [commit: ghc] master: Remove explicit recursion in retainer profiling (fixes #14758) (5f1d949) Message-ID: <20181205164818.C22E93ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5f1d949ab9e09b8d95319633854b7959df06eb58/ghc >--------------------------------------------------------------- commit 5f1d949ab9e09b8d95319633854b7959df06eb58 Author: Alexander Vershilov Date: Wed Dec 5 19:47:32 2018 +0300 Remove explicit recursion in retainer profiling (fixes #14758) Retainer profiling contained a recursion that under certain circumstances could lead to the stack overflow in C code. The idea of the improvement is to keep an explicit stack for the object, more precise to reuse existing stack, but allow new type of objects to be stored there. There is no reliable reproducer that is not a big program but in some cases foldr (+) 0 [1..10000000] can work. Reviewers: bgamari, simonmar, erikd, osa1 Reviewed By: bgamari, osa1 Subscribers: osa1, rwbarton, carter GHC Trac Issues: #14758 Differential Revision: https://phabricator.haskell.org/D5351 >--------------------------------------------------------------- 5f1d949ab9e09b8d95319633854b7959df06eb58 rts/RetainerProfile.c | 223 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 146 insertions(+), 77 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5f1d949ab9e09b8d95319633854b7959df06eb58 From git at git.haskell.org Thu Dec 6 09:28:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 09:28:04 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15952' created Message-ID: <20181206092804.881543ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15952 Referencing: a99a43bbb7a8a506f31307591b3ee8e9ba3c4c6f From git at git.haskell.org Thu Dec 6 09:28:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 09:28:07 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Start on Trac #15952 (b169960) Message-ID: <20181206092807.8F5923ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/b169960c5ed45a7b6fa35d2dbcb66f44128f6a38/ghc >--------------------------------------------------------------- commit b169960c5ed45a7b6fa35d2dbcb66f44128f6a38 Author: Simon Peyton Jones Date: Wed Dec 5 08:43:59 2018 +0000 Start on Trac #15952 Actually it's working pretty well. Just one error message regression in typecheck/should_fail/T15629. >--------------------------------------------------------------- b169960c5ed45a7b6fa35d2dbcb66f44128f6a38 compiler/hsSyn/HsUtils.hs | 2 +- compiler/main/GHC.hs | 2 +- compiler/main/InteractiveEval.hs | 2 +- compiler/typecheck/Inst.hs | 3 +- compiler/typecheck/TcHsType.hs | 98 +++++++++++++++++++++++--------------- compiler/typecheck/TcMType.hs | 25 ++++++---- compiler/typecheck/TcTyClsDecls.hs | 3 +- compiler/typecheck/TcType.hs | 2 +- compiler/types/TyCoRep.hs | 5 +- 9 files changed, 88 insertions(+), 54 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b169960c5ed45a7b6fa35d2dbcb66f44128f6a38 From git at git.haskell.org Thu Dec 6 09:28:10 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 09:28:10 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Remove TcKind result for tc_infer_hs_type (79d0313) Message-ID: <20181206092810.9CF923ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/79d031326d614f6ca637b67a11949dab64afe728/ghc >--------------------------------------------------------------- commit 79d031326d614f6ca637b67a11949dab64afe728 Author: Simon Peyton Jones Date: Wed Dec 5 12:25:14 2018 +0000 Remove TcKind result for tc_infer_hs_type More cleaning up All works except a couple or piResultTys crashes in polykinds/T11399 polykinds/T14174a due to using substTy (rather than nakedSubstTy) in piResultTys >--------------------------------------------------------------- 79d031326d614f6ca637b67a11949dab64afe728 compiler/typecheck/TcDefaults.hs | 4 +- compiler/typecheck/TcHsType.hs | 283 +++++++++++++++----------------- compiler/typecheck/TcInstDcls.hs | 4 +- compiler/typecheck/TcRnDriver.hs | 12 +- compiler/typecheck/TcSplice.hs | 2 +- compiler/typecheck/TcTyClsDecls.hs | 22 +-- testsuite/tests/polykinds/T13659.stderr | 2 +- 7 files changed, 151 insertions(+), 178 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 79d031326d614f6ca637b67a11949dab64afe728 From git at git.haskell.org Thu Dec 6 09:28:13 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 09:28:13 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Make tcTypeKind monadic (a99a43b) Message-ID: <20181206092813.B26303ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/a99a43bbb7a8a506f31307591b3ee8e9ba3c4c6f/ghc >--------------------------------------------------------------- commit a99a43bbb7a8a506f31307591b3ee8e9ba3c4c6f Author: Simon Peyton Jones Date: Thu Dec 6 09:24:44 2018 +0000 Make tcTypeKind monadic This patch is work in progress on Trac #15952. IT DOES NOT COMPILE. The main payload is progress towards making tcTypeKind monadic. However I have not yet made a monadic version of tcEqType, nor changed all those tcEqType calls to a monadic context. Hence, it won't compile as-is. I'm just parking the work I've done, on a branch, until I've had a chance to agree the path with Richard. (The previous patches on this branch /do/ compile and almost-completely validate.) >--------------------------------------------------------------- a99a43bbb7a8a506f31307591b3ee8e9ba3c4c6f compiler/typecheck/ClsInst.hs | 15 +++-- compiler/typecheck/FamInst.hs | 12 ++-- compiler/typecheck/Inst.hs | 18 +++--- compiler/typecheck/TcCanonical.hs | 46 ++++++++------- compiler/typecheck/TcDeriv.hs | 48 ++++++++------- compiler/typecheck/TcDerivInfer.hs | 25 ++++---- compiler/typecheck/TcErrors.hs | 12 ++-- compiler/typecheck/TcExpr.hs | 8 ++- compiler/typecheck/TcFlatten.hs | 21 ++++--- compiler/typecheck/TcHsSyn.hs | 4 +- compiler/typecheck/TcHsType.hs | 29 ++++------ compiler/typecheck/TcInstDcls.hs | 2 +- compiler/typecheck/TcInteract.hs | 5 +- compiler/typecheck/TcMType.hs | 116 ++++++++++++++++++++++++++++++++++--- compiler/typecheck/TcPat.hs | 3 +- compiler/typecheck/TcPatSyn.hs | 40 ++++++------- compiler/typecheck/TcRnDriver.hs | 9 +-- compiler/typecheck/TcSimplify.hs | 37 ++++++++---- compiler/typecheck/TcSplice.hs | 6 +- compiler/typecheck/TcTyClsDecls.hs | 17 +++--- compiler/typecheck/TcUnify.hs | 30 +++++----- compiler/typecheck/TcValidity.hs | 25 ++++---- compiler/types/Type.hs | 37 +----------- compiler/utils/Bag.hs | 17 +++++- 24 files changed, 351 insertions(+), 231 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc a99a43bbb7a8a506f31307591b3ee8e9ba3c4c6f From git at git.haskell.org Thu Dec 6 14:44:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 14:44:26 +0000 (UTC) Subject: [commit: ghc] master: Remove a tcTrace (081f44b) Message-ID: <20181206144426.79ECA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/081f44bf3a2fbd87fe68f946306b836f12b20958/ghc >--------------------------------------------------------------- commit 081f44bf3a2fbd87fe68f946306b836f12b20958 Author: Simon Peyton Jones Date: Thu Dec 6 14:22:31 2018 +0000 Remove a tcTrace This tcTrace, in tcTyFamInstEqn, caused a knot-tying loop, because it was printing a type after zonking-to-Type. Easy solution: don't do that. >--------------------------------------------------------------- 081f44bf3a2fbd87fe68f946306b836f12b20958 compiler/typecheck/TcTyClsDecls.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index ce7cc83..877166d 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -1784,7 +1784,8 @@ tcTyFamInstEqn fam_tc mb_clsinfo imp_vars (mb_expl_bndrs `orElse` []) hs_pats hs_rhs_ty - ; traceTc "tcTyFamInstEqn" (ppr fam_tc $$ ppr qtvs $$ ppr pats $$ ppr rhs_ty) + -- Don't print results they may be knot-tied + -- (tcFamInstEqnGuts zonks to Type) ; return (mkCoAxBranch qtvs [] [] pats rhs_ty (map (const Nominal) qtvs) loc) } From git at git.haskell.org Thu Dec 6 14:44:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 14:44:30 +0000 (UTC) Subject: [commit: ghc] master: Tests Trac #14847 (91c4e71) Message-ID: <20181206144430.0E3893ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/91c4e71f633ebc81671fbfc752fc35b84883e744/ghc >--------------------------------------------------------------- commit 91c4e71f633ebc81671fbfc752fc35b84883e744 Author: Simon Peyton Jones Date: Thu Dec 6 14:21:33 2018 +0000 Tests Trac #14847 >--------------------------------------------------------------- 91c4e71f633ebc81671fbfc752fc35b84883e744 testsuite/tests/polykinds/T14847.hs | 17 +++++++++++++++++ testsuite/tests/polykinds/all.T | 1 + 2 files changed, 18 insertions(+) diff --git a/testsuite/tests/polykinds/T14847.hs b/testsuite/tests/polykinds/T14847.hs new file mode 100644 index 0000000..3474fe0 --- /dev/null +++ b/testsuite/tests/polykinds/T14847.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeInType #-} +module T14847 where + +data Proxy k (a :: k) = MkProxy +data Proxy2 k a = MkP (Proxy k a) + +data Proxy2' k a where + MkP' :: Proxy k a -> Proxy2' k a + +data T a where + T :: Int -> T Bool + +type family F a where + F Int = True + F _ = False diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 8be2c59..18eb8a5 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -203,3 +203,4 @@ test('T15881a', normal, compile_fail, ['']) test('T15817', normal, compile, ['']) test('T15874', normal, compile, ['']) test('T14887a', normal, compile, ['']) +test('T14847', normal, compile, ['']) From git at git.haskell.org Thu Dec 6 15:40:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 15:40:34 +0000 (UTC) Subject: [commit: ghc] master: Don't use a generic apply thunk for known calls (dc54c07) Message-ID: <20181206154034.09EC23ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/dc54c07cf18356a64cbe04aa9772c7f4c9fbc11d/ghc >--------------------------------------------------------------- commit dc54c07cf18356a64cbe04aa9772c7f4c9fbc11d Author: Sebastian Graf Date: Thu Dec 6 16:40:08 2018 +0100 Don't use a generic apply thunk for known calls Summary: Currently, an AP thunk like `sat = f a b c` will not have its own entry point and info pointer and will instead reuse a generic apply thunk like `stg_ap_4_upd`. That's great from a code size perspective, but if `f` is a known function, a specialised entry point with a plain call can be much faster than figuring out the arity and doing dynamic dispatch. This looks at `f`s arity to figure out if it is a known function and if so, it will not lower it to a generic apply function. Benchmark results are encouraging: No changes to allocation, but 0.2% less counted instructions. Test Plan: Validates locally Reviewers: simonmar, osa1, simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #16005 Differential Revision: https://phabricator.haskell.org/D5414 >--------------------------------------------------------------- dc54c07cf18356a64cbe04aa9772c7f4c9fbc11d compiler/codeGen/StgCmmBind.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 9e14311..d134dfd 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -311,6 +311,7 @@ mkRhsClosure dflags bndr _cc -- not when profiling: we don't want to -- lose information about this particular -- thunk (e.g. its type) (#949) + , idArity fun_id == unknownArity -- don't spoil a known call -- Ha! an Ap thunk = cgRhsStdThunk bndr lf_info payload From git at git.haskell.org Thu Dec 6 18:31:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 18:31:04 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: Remove explicit recursion in retainer profiling (fixes #14758) (6db7d11) Message-ID: <20181206183104.D58B63ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/6db7d11eed70b4db7b7698a9dfae94a6abae248a/ghc >--------------------------------------------------------------- commit 6db7d11eed70b4db7b7698a9dfae94a6abae248a Author: Alexander Vershilov Date: Wed Dec 5 19:47:32 2018 +0300 Remove explicit recursion in retainer profiling (fixes #14758) Retainer profiling contained a recursion that under certain circumstances could lead to the stack overflow in C code. The idea of the improvement is to keep an explicit stack for the object, more precise to reuse existing stack, but allow new type of objects to be stored there. There is no reliable reproducer that is not a big program but in some cases foldr (+) 0 [1..10000000] can work. Reviewers: bgamari, simonmar, erikd, osa1 Reviewed By: bgamari, osa1 Subscribers: osa1, rwbarton, carter GHC Trac Issues: #14758 Differential Revision: https://phabricator.haskell.org/D5351 (cherry picked from commit 5f1d949ab9e09b8d95319633854b7959df06eb58) >--------------------------------------------------------------- 6db7d11eed70b4db7b7698a9dfae94a6abae248a rts/RetainerProfile.c | 223 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 146 insertions(+), 77 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6db7d11eed70b4db7b7698a9dfae94a6abae248a From git at git.haskell.org Thu Dec 6 18:31:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 18:31:07 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: Bump iserv versions (bf074e3) Message-ID: <20181206183107.A3B3A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/bf074e3e92c138947d0da3979838e5588f6f292c/ghc >--------------------------------------------------------------- commit bf074e3e92c138947d0da3979838e5588f6f292c Author: Ben Gamari Date: Thu Dec 6 12:43:28 2018 -0500 Bump iserv versions This fixes #15866, the original fix for which didn't merge cleanly to the stable branch. >--------------------------------------------------------------- bf074e3e92c138947d0da3979838e5588f6f292c libraries/libiserv/libiserv.cabal | 2 +- utils/iserv/iserv.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libiserv/libiserv.cabal b/libraries/libiserv/libiserv.cabal index fc0a022..c2d6432 100644 --- a/libraries/libiserv/libiserv.cabal +++ b/libraries/libiserv/libiserv.cabal @@ -1,5 +1,5 @@ Name: libiserv -Version: 8.6.1 +Version: 8.6.3 Copyright: XXX License: BSD3 License-File: LICENSE diff --git a/utils/iserv/iserv.cabal b/utils/iserv/iserv.cabal index 6e78317..9f047ad 100644 --- a/utils/iserv/iserv.cabal +++ b/utils/iserv/iserv.cabal @@ -1,5 +1,5 @@ Name: iserv -Version: 8.6.1 +Version: 8.6.3 Copyright: XXX License: BSD3 -- XXX License-File: LICENSE From git at git.haskell.org Thu Dec 6 18:31:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 18:31:11 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: linker: store entire link map and use it. (c64918c) Message-ID: <20181206183111.9EC343ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/c64918c1fc86d8feb15bf53b9db11ad81095b8b9/ghc >--------------------------------------------------------------- commit c64918c1fc86d8feb15bf53b9db11ad81095b8b9 Author: Tamar Christina Date: Tue Dec 4 00:29:08 2018 +0000 linker: store entire link map and use it. Summary: This fixes a corner case in which we have seen the symbol multiple times in different static libraries, but due to a depencency we end up loading the symbol from a library other than the first one. Previously the runtime linker would only track symbols from the first library and did not store the full link map. In this case it was unable to find the address for the symbols in the second library during delay loading. This change stores the address of all symbols seen so a full link map is generated, such that when we make a different decision later than what was expected we're able to still correctly load the library. Test Plan: ./validate, new testcase T15894 Reviewers: angerman, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15894 Differential Revision: https://phabricator.haskell.org/D5353 (cherry picked from commit a8b7cef4d45a5003bf7584e06912f0f632116c71) >--------------------------------------------------------------- c64918c1fc86d8feb15bf53b9db11ad81095b8b9 rts/Linker.c | 23 +++++++++++++---------- rts/LinkerInternals.h | 10 +++++++++- rts/linker/Elf.c | 5 +++-- rts/linker/MachO.c | 8 +++++--- rts/linker/PEi386.c | 11 ++++++----- testsuite/tests/rts/T15894/Makefile | 8 ++++++++ testsuite/tests/rts/T15894/T15894.stdout | 1 + testsuite/tests/rts/T15894/all.T | 3 +++ testsuite/tests/rts/T15894/copysign.c | 11 +++++++++++ testsuite/tests/rts/T15894/main.hs | 5 +++++ 10 files changed, 64 insertions(+), 21 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc c64918c1fc86d8feb15bf53b9db11ad81095b8b9 From git at git.haskell.org Thu Dec 6 21:28:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 21:28:17 +0000 (UTC) Subject: [commit: ghc] master: Windows: Use the "big" PE object format on amd64 (1ef90f9) Message-ID: <20181206212817.473EB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1ef90f990da90036d481c830d8832e21b8f1571b/ghc >--------------------------------------------------------------- commit 1ef90f990da90036d481c830d8832e21b8f1571b Author: Ben Gamari Date: Thu Dec 6 15:28:47 2018 -0500 Windows: Use the "big" PE object format on amd64 Test Plan: Do full build on Windows. Reviewers: AndreasK, Phyx Reviewed By: AndreasK Subscribers: rwbarton, erikd, carter GHC Trac Issues: #15934 Differential Revision: https://phabricator.haskell.org/D5383 >--------------------------------------------------------------- 1ef90f990da90036d481c830d8832e21b8f1571b compiler/main/DriverPipeline.hs | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a9e486c..295d362 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1339,6 +1339,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags + -- See Note [Produce big objects on Windows] + ++ [ SysTools.Option "-Wa,-mbig-obj" + | platformOS (targetPlatform dflags) == OSMinGW32 + , not $ target32Bit (targetPlatform dflags) + ] -- We only support SparcV9 and better because V8 lacks an atomic CAS -- instruction so we have to make sure that the assembler accepts the @@ -2151,6 +2156,32 @@ generateMacros prefix name version = -- --------------------------------------------------------------------------- -- join object files into a single relocatable object file, using ld -r +{- +Note [Produce big objects on Windows] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Windows Portable Executable object format has a limit of 32k sections, which +we tend to blow through pretty easily. Thankfully, there is a "big object" +extension, which raises this limit to 2^32. However, it must be explicitly +enabled in the toolchain: + + * the assembler accepts the -mbig-obj flag, which causes it to produce a + bigobj-enabled COFF object. + + * the linker accepts the --oformat pe-bigobj-x86-64 flag. Despite what the name + suggests, this tells the linker to produce a bigobj-enabled COFF object, no a + PE executable. + +We must enable bigobj output in a few places: + + * When merging object files (DriverPipeline.joinObjectFiles) + + * When assembling (DriverPipeline.runPhase (RealPhase As ...)) + +Unfortunately the big object format is not supported on 32-bit targets so +none of this can be used in that case. +-} + joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO () joinObjectFiles dflags o_files output_fn = do let mySettings = settings dflags @@ -2160,7 +2191,7 @@ joinObjectFiles dflags o_files output_fn = do SysTools.Option "-nostdlib", SysTools.Option "-Wl,-r" ] - -- See Note [No PIE while linking] in SysTools + -- See Note [No PIE while linking] in DynFlags ++ (if sGccSupportsNoPie mySettings then [SysTools.Option "-no-pie"] else []) @@ -2179,6 +2210,11 @@ joinObjectFiles dflags o_files output_fn = do && ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] else []) + -- See Note [Produce big objects on Windows] + ++ [ SysTools.Option "-Wl,--oformat,pe-bigobj-x86-64" + | OSMinGW32 == osInfo + , not $ target32Bit (targetPlatform dflags) + ] ++ map SysTools.Option ld_build_id ++ [ SysTools.Option "-o", SysTools.FileOption "" output_fn ] From git at git.haskell.org Thu Dec 6 21:28:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 6 Dec 2018 21:28:33 +0000 (UTC) Subject: [commit: ghc] master: Add fusion rules for the zipWith functions in base (#15263) (fb669f5) Message-ID: <20181206212833.D190B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/fb669f51b3f2cae79511ac3d1c43939d951b1f69/ghc >--------------------------------------------------------------- commit fb669f51b3f2cae79511ac3d1c43939d951b1f69 Author: Tobias Decking Date: Thu Dec 6 15:32:18 2018 -0500 Add fusion rules for the zipWith functions in base (#15263) This patch will allow `zip3` and `zipWith3` in `GHC.List` as well as `zipWith4`, `zipWith5`, `zipWith6` and `zipWith7` in `Data.OldList` to fuse. These rules are kept in a similar style as the rules for `zip` and `zipWith`. Added a corresponding test case. Test Plan: validate Reviewers: hvr, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rockbmb, rwbarton, carter GHC Trac Issues: #15263 Differential Revision: https://phabricator.haskell.org/D5241 >--------------------------------------------------------------- fb669f51b3f2cae79511ac3d1c43939d951b1f69 docs/users_guide/8.8.1-notes.rst | 4 + libraries/base/Data/OldList.hs | 142 ++++++++++++++++++++++++++ libraries/base/GHC/List.hs | 51 +++++++++ testsuite/tests/perf/should_run/T15263.hs | 37 +++++++ testsuite/tests/perf/should_run/T15263.stdout | 6 ++ testsuite/tests/perf/should_run/all.T | 7 ++ 6 files changed, 247 insertions(+) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc fb669f51b3f2cae79511ac3d1c43939d951b1f69 From git at git.haskell.org Fri Dec 7 01:24:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 01:24:38 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: Windows: Use the "big" PE object format on amd64 (ed86e3b) Message-ID: <20181207012438.49E2B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/ed86e3b531322f74d2c2d00d7ff8662b08fabde6/ghc >--------------------------------------------------------------- commit ed86e3b531322f74d2c2d00d7ff8662b08fabde6 Author: Ben Gamari Date: Thu Dec 6 15:28:47 2018 -0500 Windows: Use the "big" PE object format on amd64 Test Plan: Do full build on Windows. Reviewers: AndreasK, Phyx Reviewed By: AndreasK Subscribers: rwbarton, erikd, carter GHC Trac Issues: #15934 Differential Revision: https://phabricator.haskell.org/D5383 (cherry picked from commit 1ef90f990da90036d481c830d8832e21b8f1571b) >--------------------------------------------------------------- ed86e3b531322f74d2c2d00d7ff8662b08fabde6 compiler/main/DriverPipeline.hs | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 92e3455..6d2e5b7 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1337,6 +1337,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags + -- See Note [Produce big objects on Windows] + ++ [ SysTools.Option "-Wa,-mbig-obj" + | platformOS (targetPlatform dflags) == OSMinGW32 + , not $ target32Bit (targetPlatform dflags) + ] -- We only support SparcV9 and better because V8 lacks an atomic CAS -- instruction so we have to make sure that the assembler accepts the @@ -2149,6 +2154,32 @@ generateMacros prefix name version = -- --------------------------------------------------------------------------- -- join object files into a single relocatable object file, using ld -r +{- +Note [Produce big objects on Windows] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Windows Portable Executable object format has a limit of 32k sections, which +we tend to blow through pretty easily. Thankfully, there is a "big object" +extension, which raises this limit to 2^32. However, it must be explicitly +enabled in the toolchain: + + * the assembler accepts the -mbig-obj flag, which causes it to produce a + bigobj-enabled COFF object. + + * the linker accepts the --oformat pe-bigobj-x86-64 flag. Despite what the name + suggests, this tells the linker to produce a bigobj-enabled COFF object, no a + PE executable. + +We must enable bigobj output in a few places: + + * When merging object files (DriverPipeline.joinObjectFiles) + + * When assembling (DriverPipeline.runPhase (RealPhase As ...)) + +Unfortunately the big object format is not supported on 32-bit targets so +none of this can be used in that case. +-} + joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO () joinObjectFiles dflags o_files output_fn = do let mySettings = settings dflags @@ -2158,7 +2189,7 @@ joinObjectFiles dflags o_files output_fn = do SysTools.Option "-nostdlib", SysTools.Option "-Wl,-r" ] - -- See Note [No PIE while linking] in SysTools + -- See Note [No PIE while linking] in DynFlags ++ (if sGccSupportsNoPie mySettings then [SysTools.Option "-no-pie"] else []) @@ -2177,6 +2208,11 @@ joinObjectFiles dflags o_files output_fn = do && ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] else []) + -- See Note [Produce big objects on Windows] + ++ [ SysTools.Option "-Wl,--oformat,pe-bigobj-x86-64" + | OSMinGW32 == osInfo + , not $ target32Bit (targetPlatform dflags) + ] ++ map SysTools.Option ld_build_id ++ [ SysTools.Option "-o", SysTools.FileOption "" output_fn ] From git at git.haskell.org Fri Dec 7 01:24:49 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 01:24:49 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: users guide: Add release notes for 8.6.3 (d59812c) Message-ID: <20181207012449.4FB073ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/d59812ce904461cd6e14125976e3053543634ca9/ghc >--------------------------------------------------------------- commit d59812ce904461cd6e14125976e3053543634ca9 Author: Ben Gamari Date: Thu Dec 6 16:57:16 2018 -0500 users guide: Add release notes for 8.6.3 >--------------------------------------------------------------- d59812ce904461cd6e14125976e3053543634ca9 .../{8.6.2-notes.rst => 8.6.3-notes.rst} | 41 +++++++++------------- docs/users_guide/index.rst | 1 + 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/docs/users_guide/8.6.2-notes.rst b/docs/users_guide/8.6.3-notes.rst similarity index 70% copy from docs/users_guide/8.6.2-notes.rst copy to docs/users_guide/8.6.3-notes.rst index 5fc6d8f..f666e52 100644 --- a/docs/users_guide/8.6.2-notes.rst +++ b/docs/users_guide/8.6.3-notes.rst @@ -1,36 +1,27 @@ -.. _release-8-6-2: +.. _release-8-6-3: -Release notes for version 8.6.2 +Release notes for version 8.6.3 =============================== -GHC 8.6.2 is a bug-fix release, fixing a few regressions found in 8.6.1. +GHC 8.6.3 is a bug-fix release, fixing a few regressions found in 8.6.1 and +8.6.2. As some of these issues are soundness issues users are strongly +encouraged to upgrade. Highlights ---------- -The highlights, since the 8.6.1 release, are: - -- A long-standing bug exposed in GHC 8.6.1, :ghc-ticket:`15696`, has been fixed. - This issue resulted in undefined runtime behavior with some uses of the - ``dataToTag#`` primop. Note that this issue, while less likely to manifest, - has existed in some form in all GHC releases prior to this release and may - result in silent, incorrect evaluation. For this reason, users are strongly - encouraged to upgrade to 8.6.2. - -- A long-standing bug in the LLVM code generator (:ghc-ticket:`14251`), - resulting in incorrect floating point evaluation, has been fixed. - -- Several compiler panics observed in GHC 8.6.1 have been fixed - (:ghc-ticket:`15499`, :ghc-ticket:`15053`, :ghc-ticket:`15692`, - :ghc-ticket:`15695`) - -- GHC now runs without complaining when installed to a read-only location on - Windows (:ghc-ticket:`15667`) - -- An integer overflow, resulting in some ``encodeFloat`` uses returning - incorrect results, has been fixed (:ghc-ticket:`15271`) - +The highlights, since the 8.6.2 release, are: + +- A bug resulting in segmentation faults in some programs has been fixed + (:ghc-ticket:`15892`) +- Darwin binary distributions are now correctly built against an in-tree + ``libgmp`` (:ghc-ticket:`15404`) +- Three bugs leading to linker failures on Windows has been fixed + (:ghc-ticket:`15105`, :ghc-ticket:`15894`, :ghc-ticket:`15934`) +- A bug leading to programs with deep stacks crashing when run with retainer profiling enabled has been fixed (:ghc-ticket:`14758`) +- A bug resulting in potential heap corruption during stable name allocation has been fixed (:ghc-ticket:`15906`) +- Plugins are now loaded during GHCi sessions (:ghc-ticket:`15633`) Known issues ------------ diff --git a/docs/users_guide/index.rst b/docs/users_guide/index.rst index 2d184ab..11718d8 100644 --- a/docs/users_guide/index.rst +++ b/docs/users_guide/index.rst @@ -14,6 +14,7 @@ Contents: intro 8.6.1-notes 8.6.2-notes + 8.6.3-notes ghci runghc usage From git at git.haskell.org Fri Dec 7 01:24:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 01:24:59 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: Release 8.6.3 (31cd867) Message-ID: <20181207012459.D12953ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/31cd867e4d37072c3ce1d51efadc94e66ddc1c28/ghc >--------------------------------------------------------------- commit 31cd867e4d37072c3ce1d51efadc94e66ddc1c28 Author: Ben Gamari Date: Thu Dec 6 16:58:34 2018 -0500 Release 8.6.3 >--------------------------------------------------------------- 31cd867e4d37072c3ce1d51efadc94e66ddc1c28 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2556561..8469247 100644 --- a/configure.ac +++ b/configure.ac @@ -13,10 +13,10 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.6.2], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.6.3], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) # Set this to YES for a released version, otherwise NO -: ${RELEASE=NO} +: ${RELEASE=YES} # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line # above. If this is not a released version, then we will append the From git at git.haskell.org Fri Dec 7 09:43:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 09:43:28 +0000 (UTC) Subject: [commit: ghc] master: hadrian: optimise Rules.Compile (eee1b61) Message-ID: <20181207094328.E2B5E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/eee1b61f85d949aa7c4bc496b5579cf759d1861e/ghc >--------------------------------------------------------------- commit eee1b61f85d949aa7c4bc496b5579cf759d1861e Author: Alp Mestanogullari Date: Fri Dec 7 10:42:08 2018 +0100 hadrian: optimise Rules.Compile Previously, as reported in #15938, resuming a build "in the middle", e.g when building _build/stage1/libraries/base/, hadrian would take up to a whole minute to get started doing actual work, building code. This was mostly due to a big enumeration that we do in Rules.hs, to generate all the possible patterns for object files for 1) all ways, 2) all packages and 3) all stages. Since rule enumeration is always performed, whatever the target, we were always paying this cost, which seemed to grow bigger the farther in the build we stopped and were resuming from. Instead, this patch borrows the approach that we took for Rules.Library in https://github.com/snowleopard/hadrian/pull/571, which exposes all the relevant object files under as few catch-all rules as possible (8 here), and parses all the information we need out of the object's path. The concrete effect of this patch that I have observed is to reduce the 45-60 seconds pause to <5 seconds. Along with the Shake performance improvements that Neil mentions in #15938, most of the pause should effectively disappear. Reviewers: snowleopard, bgamari, goldfire Reviewed By: snowleopard Subscribers: rwbarton, carter GHC Trac Issues: #15938 Differential Revision: https://phabricator.haskell.org/D5412 >--------------------------------------------------------------- eee1b61f85d949aa7c4bc496b5579cf759d1861e hadrian/hadrian.cabal | 1 + hadrian/src/Hadrian/BuildPath.hs | 122 ++++++++++++++++++++ hadrian/src/Rules.hs | 19 ++- hadrian/src/Rules/Compile.hs | 242 +++++++++++++++++++++++++++++++++++---- hadrian/src/Rules/Library.hs | 99 +--------------- 5 files changed, 349 insertions(+), 134 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc eee1b61f85d949aa7c4bc496b5579cf759d1861e From git at git.haskell.org Fri Dec 7 14:44:47 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 14:44:47 +0000 (UTC) Subject: [commit: ghc] master: Wibble to Taming the Kind Inference Monster (5b7ca03) Message-ID: <20181207144447.D0B283ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419/ghc >--------------------------------------------------------------- commit 5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419 Author: Simon Peyton Jones Date: Fri Dec 7 14:25:30 2018 +0000 Wibble to Taming the Kind Inference Monster I had allowed rename/should_fail/T15828 (Trac #15828) to regress a bit. The main payload of this patch is to fix that problem, at the cost of more contortions in checkConsistentFamInst. Oh well, at least they are highly localised. I also update the -ddump-types code in TcRnDriver to print out some more expicit information about each type constructor, thus instead of DF{3} :: forall k. * -> k -> * we get data family DF{3} :: forall k. * -> k -> * Remember, this is debug-printing only. This change is the reason that so many .stderr files change. >--------------------------------------------------------------- 5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419 compiler/typecheck/ClsInst.hs | 2 + compiler/typecheck/TcInstDcls.hs | 2 +- compiler/typecheck/TcRnDriver.hs | 14 ++-- compiler/typecheck/TcValidity.hs | 86 +++++++++++++++++----- compiler/types/Coercion.hs | 14 ++-- compiler/types/FamInstEnv.hs | 2 +- .../tests/dependent/should_compile/T15743.stderr | 5 +- .../tests/dependent/should_compile/T15743e.stderr | 36 +++++++-- .../indexed-types/should_compile/T15711.stderr | 6 +- .../indexed-types/should_compile/T15852.stderr | 7 +- .../indexed-types/should_compile/T3017.stderr | 8 +- .../should_fail/ExplicitForAllFams4b.stderr | 8 +- .../indexed-types/should_fail/SimpleFail2a.stderr | 2 +- .../indexed-types/should_fail/SimpleFail9.stderr | 2 +- .../tests/indexed-types/should_fail/T11450.stderr | 2 +- .../tests/indexed-types/should_fail/T12041.stderr | 2 +- .../tests/indexed-types/should_fail/T14230.stderr | 2 +- .../tests/indexed-types/should_fail/T9160.stderr | 2 +- .../tests/partial-sigs/should_compile/ADT.stderr | 2 +- .../should_compile/DataFamilyInstanceLHS.stderr | 9 +-- .../partial-sigs/should_compile/Meltdown.stderr | 4 +- .../NamedWildcardInDataFamilyInstanceLHS.stderr | 9 +-- .../NamedWildcardInTypeFamilyInstanceLHS.stderr | 4 +- .../partial-sigs/should_compile/SkipMany.stderr | 2 +- .../should_compile/TypeFamilyInstanceLHS.stderr | 4 +- testsuite/tests/polykinds/T14450.stderr | 2 +- testsuite/tests/polykinds/T15592.stderr | 4 +- testsuite/tests/polykinds/T15592b.stderr | 7 +- testsuite/tests/rename/should_fail/T15828.stderr | 2 +- testsuite/tests/roles/should_compile/Roles1.stderr | 24 +++--- .../tests/roles/should_compile/Roles14.stderr | 4 +- testsuite/tests/roles/should_compile/Roles2.stderr | 6 +- testsuite/tests/roles/should_compile/Roles3.stderr | 22 +++--- testsuite/tests/roles/should_compile/Roles4.stderr | 6 +- testsuite/tests/roles/should_compile/T8958.stderr | 10 +-- testsuite/tests/th/TH_Roles2.stderr | 4 +- .../tests/typecheck/should_compile/T12763.stderr | 2 +- .../tests/typecheck/should_compile/tc231.stderr | 6 +- 38 files changed, 205 insertions(+), 130 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419 From git at git.haskell.org Fri Dec 7 14:59:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 14:59:07 +0000 (UTC) Subject: [commit: ghc] master: Careful tweaking to exprOkForSpeculation (f334d20) Message-ID: <20181207145907.B1F173ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f334d20e00e3f4bd217e49216b7e9d9c8779db10/ghc >--------------------------------------------------------------- commit f334d20e00e3f4bd217e49216b7e9d9c8779db10 Author: Simon Peyton Jones Date: Fri Dec 7 12:56:08 2018 +0000 Careful tweaking to exprOkForSpeculation This patch does several things: * Make exprOkForSpeculation ignore evaluatedness of variables See the Note [exprOkForSpeculation and evaluated variables] This means that the binder-swap transformation no longer invaliates the let/app invariant. * Make exprOkForSpeculation return False for DataToTagOp and SeqOp. See Note [exprOkForSpeculation and SeqOp/DataToTagOp] * Remove the 'can_fail' property from dataToTag#; it was always a hack (described in the old Note [dataToTag#] in primops.txt.pp), and now its not necessary because of the fixes above. * Make SetLevels use exprIsHNF, /not/ exprOkForSpeculation, when floating single-alternative cases. See SetLevels Note [Floating single-alternative cases] * Fix a buglet in FloatIn; probably never bites in practice See Note [Dead bindings] Collectively, these changes finally fix Trac #15696. >--------------------------------------------------------------- f334d20e00e3f4bd217e49216b7e9d9c8779db10 compiler/coreSyn/CoreUtils.hs | 125 ++++++++++++++++++++++++++-------------- compiler/coreSyn/MkCore.hs | 2 +- compiler/prelude/PrelRules.hs | 33 ++++++++++- compiler/prelude/primops.txt.pp | 55 +----------------- compiler/simplCore/FloatIn.hs | 13 ++++- compiler/simplCore/SetLevels.hs | 32 +++++++--- 6 files changed, 149 insertions(+), 111 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f334d20e00e3f4bd217e49216b7e9d9c8779db10 From git at git.haskell.org Fri Dec 7 15:13:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 15:13:19 +0000 (UTC) Subject: [commit: ghc] master: Fix #12102/#15872 by removing outdated users' guide prose (73cce63) Message-ID: <20181207151319.64D4E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/73cce63f33ee80f5095085141df9313ac70d1cfa/ghc >--------------------------------------------------------------- commit 73cce63f33ee80f5095085141df9313ac70d1cfa Author: Ryan Scott Date: Fri Dec 7 09:35:53 2018 -0500 Fix #12102/#15872 by removing outdated users' guide prose Summary: In the beginning, #12102 (and #15872, which is of a similar ilk) were caused by a poor, confused user trying to use code that looks like this (with a constraint in the kind of a data type): ```lang=haskell type family IsTypeLit a where IsTypeLit Nat = 'True IsTypeLit Symbol = 'True IsTypeLit a = 'False data T :: forall a. (IsTypeLit a ~ 'True) => a -> * where MkNat :: T 42 MkSymbol :: T "Don't panic!" ``` Many bizarre GHC quirks (documented in those tickets) arose from this sort of construction. Ultimately, the use of constraints in data type kinds like this has made a lot of people very confused and been widely regarded as a bad move. Commit 2257a86daa72db382eb927df12a718669d5491f8 finally put this feature out of its misery, so now the code above simply errors with `Illegal constraint in a kind`. As a result, the aforementioned tickets are moot, so this patch wraps a bow on the whole thing by: 1. Removing the (now outdated) section on constraints in data type kinds from the users' guide, and 2. Adding a test case to test this code path. Test Plan: make test TEST=T12102 Reviewers: goldfire, simonpj, bgamari, tdammers Reviewed By: tdammers Subscribers: tdammers, rwbarton, carter GHC Trac Issues: #12102, #15872 Differential Revision: https://phabricator.haskell.org/D5397 >--------------------------------------------------------------- 73cce63f33ee80f5095085141df9313ac70d1cfa docs/users_guide/glasgow_exts.rst | 23 ---------------------- testsuite/tests/typecheck/should_fail/T12102.hs | 17 ++++++++++++++++ .../tests/typecheck/should_fail/T12102.stderr | 6 ++++++ testsuite/tests/typecheck/should_fail/all.T | 1 + 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index 9b8df91..402262e 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -9274,29 +9274,6 @@ distinction). GHC does not consider ``forall k. k -> Type`` and ``forall {k}. k -> Type`` to be equal at the kind level, and thus rejects ``Foo Proxy`` as ill-kinded. -Constraints in kinds --------------------- - -As kinds and types are the same, kinds can (with :extension:`PolyKinds`) -contain type constraints. Only equality constraints are currently supported, -however. We expect this to extend to other constraints in the future. - -Here is an example of a constrained kind: :: - - type family IsTypeLit a where - IsTypeLit Nat = 'True - IsTypeLit Symbol = 'True - IsTypeLit a = 'False - - data T :: forall a. (IsTypeLit a ~ 'True) => a -> Type where - MkNat :: T 42 - MkSymbol :: T "Don't panic!" - -The declarations above are accepted. However, if we add ``MkOther :: T Int``, -we get an error that the equality constraint is not satisfied; ``Int`` is -not a type literal. Note that explicitly quantifying with ``forall a`` is -not necessary here. - The kind ``Type`` ----------------- diff --git a/testsuite/tests/typecheck/should_fail/T12102.hs b/testsuite/tests/typecheck/should_fail/T12102.hs new file mode 100644 index 0000000..6d21fef --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T12102.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} +module T12102 where + +import Data.Kind +import GHC.TypeLits + +type family IsTypeLit a where + IsTypeLit Nat = 'True + IsTypeLit Symbol = 'True + IsTypeLit a = 'False + +data T :: forall a. (IsTypeLit a ~ 'True) => a -> Type where + MkNat :: T 42 + MkSymbol :: T "Don't panic!" diff --git a/testsuite/tests/typecheck/should_fail/T12102.stderr b/testsuite/tests/typecheck/should_fail/T12102.stderr new file mode 100644 index 0000000..ea3016b --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T12102.stderr @@ -0,0 +1,6 @@ + +T12102.hs:15:1: error: + • Illegal constraint in a kind: forall a. + (IsTypeLit a ~ 'True) => + a -> * + • In the data type declaration for ‘T’ diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 7ca05e6..777d1b9 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -408,6 +408,7 @@ test('T12063', [expect_broken(12063)], multimod_compile_fail, ['T12063', '-v0']) test('T12083a', normal, compile_fail, ['']) test('T12083b', normal, compile_fail, ['']) test('T11974b', normal, compile_fail, ['']) +test('T12102', normal, compile_fail, ['']) test('T12151', normal, compile_fail, ['']) test('T7437', normal, compile_fail, ['']) test('T12177', normal, compile_fail, ['']) From git at git.haskell.org Fri Dec 7 15:16:31 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 15:16:31 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix use of stats_num_field (a6b4da8) Message-ID: <20181207151631.B4CF13ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a6b4da8cd2e60618ae1819fbfc992b4958e40006/ghc >--------------------------------------------------------------- commit a6b4da8cd2e60618ae1819fbfc992b4958e40006 Author: Ben Gamari Date: Fri Dec 7 10:14:25 2018 -0500 testsuite: Fix use of stats_num_field This is now collect_stats. >--------------------------------------------------------------- a6b4da8cd2e60618ae1819fbfc992b4958e40006 testsuite/tests/perf/should_run/all.T | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T index d700fd5..6095317 100644 --- a/testsuite/tests/perf/should_run/all.T +++ b/testsuite/tests/perf/should_run/all.T @@ -352,8 +352,7 @@ test('T15226a', ['-O']) test('T15263', - [stats_num_field('bytes allocated', - [(wordsize(64), 1382184, 4)]), + [collect_stats('bytes allocated', 4), only_ways(['normal'])], compile_and_run, ['-O']) From git at git.haskell.org Fri Dec 7 15:40:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 15:40:48 +0000 (UTC) Subject: [commit: ghc] tag 'ghc-8.6.3-release' created Message-ID: <20181207154048.E10A83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New tag : ghc-8.6.3-release Referencing: c7545fb0fb02cc15fbc6b17788b72a2adcba0c5b From git at git.haskell.org Fri Dec 7 16:26:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 7 Dec 2018 16:26:39 +0000 (UTC) Subject: [commit: ghc] master: CircleCI: Don't ignore gitlab/.* branches (c77fbd9) Message-ID: <20181207162639.3DB6E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c77fbd94cc60301e5696b75cda44adb07da19a6a/ghc >--------------------------------------------------------------- commit c77fbd94cc60301e5696b75cda44adb07da19a6a Author: Ben Gamari Date: Fri Dec 7 11:24:07 2018 -0500 CircleCI: Don't ignore gitlab/.* branches This was added (for good reasons) in b9260e925e998f715865ae043bdb9f779ab5f849 but it seems this field isn't allowed in this context. Sadly there doesn't appear to be an easy way to accomplish what we are after with CircleCI's rather restrictive configuration language. Sigh. >--------------------------------------------------------------- c77fbd94cc60301e5696b75cda44adb07da19a6a .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68ab2c4..eaac945 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -351,9 +351,6 @@ workflows: - validate-x86_64-fedora: *trigger_on_tags - branches: - ignore: /gitlab\/.*/ - nightly: triggers: - schedule: From git at git.haskell.org Sat Dec 8 04:28:43 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 04:28:43 +0000 (UTC) Subject: [commit: ghc] master: Add some complexities to Data.List documentation (#15003) (07e02d5) Message-ID: <20181208042843.18BD03ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/07e02d578538248aa12bd3f5a77c76ccfdc9e0db/ghc >--------------------------------------------------------------- commit 07e02d578538248aa12bd3f5a77c76ccfdc9e0db Author: Sven Tennie Date: Sun Dec 2 18:02:18 2018 +0100 Add some complexities to Data.List documentation (#15003) Namely for: - head - uncons - tail - last - init - null >--------------------------------------------------------------- 07e02d578538248aa12bd3f5a77c76ccfdc9e0db libraries/base/GHC/List.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs index 63144ce..6b86b1f 100644 --- a/libraries/base/GHC/List.hs +++ b/libraries/base/GHC/List.hs @@ -44,7 +44,7 @@ infix 4 `elem`, `notElem` -- List-manipulation functions -------------------------------------------------------------- --- | Extract the first element of a list, which must be non-empty. +-- | /O(1)/. Extract the first element of a list, which must be non-empty. head :: [a] -> a head (x:_) = x head [] = badHead @@ -62,7 +62,7 @@ badHead = errorEmptyList "head" head (augment g xs) = g (\x _ -> x) (head xs) #-} --- | Decompose a list into its head and tail. If the list is empty, +-- | /O(1)/. Decompose a list into its head and tail. If the list is empty, -- returns 'Nothing'. If the list is non-empty, returns @'Just' (x, xs)@, -- where @x@ is the head of the list and @xs@ its tail. -- @@ -71,12 +71,14 @@ uncons :: [a] -> Maybe (a, [a]) uncons [] = Nothing uncons (x:xs) = Just (x, xs) --- | Extract the elements after the head of a list, which must be non-empty. +-- | /O(1)/. Extract the elements after the head of a list, which must be +-- non-empty. tail :: [a] -> [a] tail (_:xs) = xs tail [] = errorEmptyList "tail" --- | Extract the last element of a list, which must be finite and non-empty. +-- | /O(n)/. Extract the last element of a list, which must be finite and +-- non-empty. last :: [a] -> a #if defined(USE_REPORT_PRELUDE) last [x] = x @@ -94,7 +96,7 @@ lastError :: a lastError = errorEmptyList "last" #endif --- | Return all the elements of a list except the last one. +-- | /O(n)/. Return all the elements of a list except the last one. -- The list must be non-empty. init :: [a] -> [a] #if defined(USE_REPORT_PRELUDE) @@ -109,7 +111,7 @@ init (x:xs) = init' x xs init' y (z:zs) = y : init' z zs #endif --- | Test whether a list is empty. +-- | /O(1)/. Test whether a list is empty. null :: [a] -> Bool null [] = True null (_:_) = False From git at git.haskell.org Sat Dec 8 04:28:47 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 04:28:47 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix tests expecting 64-bit word size (e1a98fa) Message-ID: <20181208042847.17EAD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e1a98fabd4cc40b8f5401a058e6bf2f59596f698/ghc >--------------------------------------------------------------- commit e1a98fabd4cc40b8f5401a058e6bf2f59596f698 Author: Ben Gamari Date: Fri Dec 7 12:46:02 2018 -0500 testsuite: Fix tests expecting 64-bit word size These were added in 75a8349b2a7d0142d3d687837caf5a95bbb4368d. >--------------------------------------------------------------- e1a98fabd4cc40b8f5401a058e6bf2f59596f698 .../{Overflow.stderr => Overflow.stderr-ws-32} | 12 ++++++------ .../{Overflow.stderr => Overflow.stderr-ws-64} | 0 .../should_compile/{T10930.stderr => T10930.stderr-ws-32} | 5 +++-- .../should_compile/{T10930.stderr => T10930.stderr-ws-64} | 0 .../should_compile/{T13256.stderr => T13256.stderr-ws-32} | 2 +- .../should_compile/{T13256.stderr => T13256.stderr-ws-64} | 0 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/testsuite/tests/warnings/should_compile/Overflow.stderr b/testsuite/tests/warnings/should_compile/Overflow.stderr-ws-32 similarity index 67% copy from testsuite/tests/warnings/should_compile/Overflow.stderr copy to testsuite/tests/warnings/should_compile/Overflow.stderr-ws-32 index ce657ae..0868f26 100644 --- a/testsuite/tests/warnings/should_compile/Overflow.stderr +++ b/testsuite/tests/warnings/should_compile/Overflow.stderr-ws-32 @@ -1,18 +1,18 @@ Overflow.hs:8:15: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 10000000000000000000000000000000 is out of the Int# range -9223372036854775808..9223372036854775807 + Literal 10000000000000000000000000000000 is out of the Int# range -2147483648..2147483647 Overflow.hs:13:1: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 100000000000000000000000000 is out of the Int# range -9223372036854775808..9223372036854775807 + Literal 100000000000000000000000000 is out of the Int# range -2147483648..2147483647 Overflow.hs:18:5: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 1000000000000000000000000000000 is out of the Int range -9223372036854775808..9223372036854775807 + Literal 1000000000000000000000000000000 is out of the Int range -2147483648..2147483647 Overflow.hs:22:1: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 100000000000000000000000000000000 is out of the Int range -9223372036854775808..9223372036854775807 + Literal 100000000000000000000000000000000 is out of the Int range -2147483648..2147483647 Overflow.hs:27:6: warning: [-Woverflowed-literals (in -Wdefault)] - Literal -1 is out of the Word range 0..18446744073709551615 + Literal -1 is out of the Word range 0..4294967295 Overflow.hs:31:1: warning: [-Woverflowed-literals (in -Wdefault)] - Literal -1 is out of the Word range 0..18446744073709551615 + Literal -1 is out of the Word range 0..4294967295 diff --git a/testsuite/tests/warnings/should_compile/Overflow.stderr b/testsuite/tests/warnings/should_compile/Overflow.stderr-ws-64 similarity index 100% rename from testsuite/tests/warnings/should_compile/Overflow.stderr rename to testsuite/tests/warnings/should_compile/Overflow.stderr-ws-64 diff --git a/testsuite/tests/warnings/should_compile/T10930.stderr b/testsuite/tests/warnings/should_compile/T10930.stderr-ws-32 similarity index 66% copy from testsuite/tests/warnings/should_compile/T10930.stderr copy to testsuite/tests/warnings/should_compile/T10930.stderr-ws-32 index 1b593b9..8fcd1a3 100644 --- a/testsuite/tests/warnings/should_compile/T10930.stderr +++ b/testsuite/tests/warnings/should_compile/T10930.stderr-ws-32 @@ -1,11 +1,12 @@ T10930.hs:6:5: warning: [-Woverflowed-literals (in -Wdefault)] - Literal -123 is out of the Word range 0..18446744073709551615 + Literal -123 is out of the Word range 0..4294967295 T10930.hs:7:5: warning: [-Woverflowed-literals (in -Wdefault)] Literal -123 is negative but Natural only supports positive numbers -T10930.hs:9:5: warning: [-Wempty-enumerations (in -Wdefault)] Enumeration is empty +T10930.hs:9:5: warning: [-Wempty-enumerations (in -Wdefault)] + Enumeration is empty T10930.hs:10:5: warning: [-Wempty-enumerations (in -Wdefault)] Enumeration is empty diff --git a/testsuite/tests/warnings/should_compile/T10930.stderr b/testsuite/tests/warnings/should_compile/T10930.stderr-ws-64 similarity index 100% rename from testsuite/tests/warnings/should_compile/T10930.stderr rename to testsuite/tests/warnings/should_compile/T10930.stderr-ws-64 diff --git a/testsuite/tests/warnings/should_compile/T13256.stderr b/testsuite/tests/warnings/should_compile/T13256.stderr-ws-32 similarity index 72% copy from testsuite/tests/warnings/should_compile/T13256.stderr copy to testsuite/tests/warnings/should_compile/T13256.stderr-ws-32 index 6b06a7d..6309a97 100644 --- a/testsuite/tests/warnings/should_compile/T13256.stderr +++ b/testsuite/tests/warnings/should_compile/T13256.stderr-ws-32 @@ -1,3 +1,3 @@ T13256.hs:4:12: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 100000000000000000000000000000000 is out of the Int range -9223372036854775808..9223372036854775807 + Literal 100000000000000000000000000000000 is out of the Int range -2147483648..2147483647 diff --git a/testsuite/tests/warnings/should_compile/T13256.stderr b/testsuite/tests/warnings/should_compile/T13256.stderr-ws-64 similarity index 100% rename from testsuite/tests/warnings/should_compile/T13256.stderr rename to testsuite/tests/warnings/should_compile/T13256.stderr-ws-64 From git at git.haskell.org Sat Dec 8 04:28:50 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 04:28:50 +0000 (UTC) Subject: [commit: ghc] master: Fix typo in Foldable docs (eb7ba36) Message-ID: <20181208042850.0D1723ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/eb7ba36b8350d07ad89da2afebea4b17deb711ca/ghc >--------------------------------------------------------------- commit eb7ba36b8350d07ad89da2afebea4b17deb711ca Author: Simon Jakobi Date: Sat Nov 24 18:40:17 2018 +0100 Fix typo in Foldable docs >--------------------------------------------------------------- eb7ba36b8350d07ad89da2afebea4b17deb711ca libraries/base/Data/Foldable.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index 7134b05..a7d57f7 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -205,7 +205,7 @@ class Foldable t where -- For a general 'Foldable' structure this should be semantically identical -- to, -- - -- @foldl f z = 'List.foldl'' f z . 'toList'@ + -- @foldl' f z = 'List.foldl'' f z . 'toList'@ -- -- @since 4.6.0.0 foldl' :: (b -> a -> b) -> b -> t a -> b From git at git.haskell.org Sat Dec 8 04:28:53 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 04:28:53 +0000 (UTC) Subject: [commit: ghc] master: Add missing space in report_summary output (856dd66) Message-ID: <20181208042853.03F5F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/856dd66fc9c6416b2f62c8f2ac8bb61f4a48b859/ghc >--------------------------------------------------------------- commit 856dd66fc9c6416b2f62c8f2ac8bb61f4a48b859 Author: Adam Sandberg Eriksson Date: Wed Dec 5 21:53:37 2018 +0000 Add missing space in report_summary output >--------------------------------------------------------------- 856dd66fc9c6416b2f62c8f2ac8bb61f4a48b859 rts/Stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/Stats.c b/rts/Stats.c index 3d03d49..e42524f 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -717,7 +717,7 @@ static void report_summary(const RTSSummaryStats* sum) n_capabilities); statsPrintf(" SPARKS: %" FMT_Word64 - "(%" FMT_Word " converted, %" FMT_Word " overflowed, %" + " (%" FMT_Word " converted, %" FMT_Word " overflowed, %" FMT_Word " dud, %" FMT_Word " GC'd, %" FMT_Word " fizzled)\n\n", sum->sparks_count, sum->sparks.converted, sum->sparks.overflowed, From git at git.haskell.org Sat Dec 8 04:28:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 04:28:55 +0000 (UTC) Subject: [commit: ghc] master: Fixed plugin example to work (3de019c) Message-ID: <20181208042855.F01533ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3de019cb320a36b68039c1e2731e15cb72b33c0f/ghc >--------------------------------------------------------------- commit 3de019cb320a36b68039c1e2731e15cb72b33c0f Author: abc Date: Sun Nov 25 14:16:00 2018 +0900 Fixed plugin example to work >--------------------------------------------------------------- 3de019cb320a36b68039c1e2731e15cb72b33c0f docs/users_guide/extending_ghc.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst index ef07f61..20d9674 100644 --- a/docs/users_guide/extending_ghc.rst +++ b/docs/users_guide/extending_ghc.rst @@ -739,12 +739,13 @@ displayed. import HsDoc plugin :: Plugin - plugin = defaultPlugin { parsedResultAction = parsedPlugin - , renamedResultAction = Just renamedAction - , typeCheckResultAction = typecheckPlugin - , spliceRunAction = metaPlugin - , interfaceLoadAction = interfaceLoadPlugin - } + plugin = defaultPlugin + { parsedResultAction = parsedPlugin + , renamedResultAction = renamedAction + , typeCheckResultAction = typecheckPlugin + , spliceRunAction = metaPlugin + , interfaceLoadAction = interfaceLoadPlugin + } parsedPlugin :: [CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule parsedPlugin _ _ pm @@ -752,13 +753,11 @@ displayed. liftIO $ putStrLn $ "parsePlugin: \n" ++ (showSDoc dflags $ ppr $ hpm_module pm) return pm - renamedAction :: [CommandLineOption] -> ModSummary - -> ( HsGroup GhcRn, [LImportDecl GhcRn] - , Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString ) - -> TcM () - renamedAction _ _ ( gr, _, _, _ ) - = do dflags <- getDynFlags - liftIO $ putStrLn $ "typeCheckPlugin (rn): " ++ (showSDoc dflags $ ppr gr) + renamedAction :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) + renamedAction _ tc gr = do + dflags <- getDynFlags + liftIO $ putStrLn $ "typeCheckPlugin (rn): " ++ (showSDoc dflags $ ppr gr) + return (tc, gr) typecheckPlugin :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv typecheckPlugin _ _ tc @@ -783,12 +782,13 @@ When you compile a simple module that contains Template Haskell splice :: + {-# OPTIONS_GHC -fplugin SourcePlugin #-} {-# LANGUAGE TemplateHaskell #-} module A where a = () - $(return []) +$(return []) with the compiler flags ``-fplugin SourcePlugin`` it will give the following output: From git at git.haskell.org Sat Dec 8 05:04:52 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:04:52 +0000 (UTC) Subject: [commit: ghc] master: Mark broken tests on powerpc64le and skip ghci-ext (bd80831) Message-ID: <20181208050452.605C83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bd80831610092fef2f540abe9725e177c1ef0df8/ghc >--------------------------------------------------------------- commit bd80831610092fef2f540abe9725e177c1ef0df8 Author: Peter Trommler Date: Fri Dec 7 23:17:51 2018 -0500 Mark broken tests on powerpc64le and skip ghci-ext Mark tests with DWARF as broken Test way `ghci-ext` only where available Test Plan: validate Reviewers: bgamari, hvr, simonmar, erikd, Phyx Reviewed By: bgamari, Phyx Subscribers: Phyx, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5297 >--------------------------------------------------------------- bd80831610092fef2f540abe9725e177c1ef0df8 testsuite/tests/ghci.debugger/scripts/all.T | 2 +- testsuite/tests/rts/all.T | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index 7336311..156f8e1 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -1,5 +1,5 @@ setTestOpts([extra_run_opts('-ignore-dot-ghci'), - extra_ways(['ghci-ext']), # test with -fexternal-interpreter + when(config.have_ext_interp, extra_ways(['ghci-ext'])), # test with -fexternal-interpreter normalise_slashes]) test('print001', normal, ghci_script, ['print001.script']) diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index e42d970..6339344 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -454,6 +454,7 @@ test('keep-cafs-fail', [ extra_files(['KeepCafsBase.hs', 'KeepCafs1.hs', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), + when(platform('powerpc64le-unknown-linux'), expect_broken(11261)), filter_stdout_lines('Evaluated a CAF|exit.*'), ignore_stderr, # on OS X the shell emits an "Abort trap" message to stderr ], @@ -465,6 +466,7 @@ test('keep-cafs', [ extra_files(['KeepCafsBase.hs', 'KeepCafs1.hs', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), + when(platform('powerpc64le-unknown-linux'), expect_broken(11261)) ], run_command, ['$MAKE -s --no-print-directory KeepCafs']) From git at git.haskell.org Sat Dec 8 05:04:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:04:55 +0000 (UTC) Subject: [commit: ghc] master: Require 'libdw' for '--enable-dwarf-unwind' (cb882fc) Message-ID: <20181208050455.5C7233ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cb882fc993b4972f7f212b291229ef9e9ade0af9/ghc >--------------------------------------------------------------- commit cb882fc993b4972f7f212b291229ef9e9ade0af9 Author: Alec Theriault Date: Fri Dec 7 23:18:15 2018 -0500 Require 'libdw' for '--enable-dwarf-unwind' This causes './configure --enable-dwarf-unwind' to exit with a helpful error message when 'libdw' cannot be found (compared to the previous behaviour of silently pretending the user hadn't requested DWARF support at all). Test Plan: ./configure --enable-dwarf-unwind # on systems with/without libdw Reviewers: bgamari, nh2 Reviewed By: nh2 Subscribers: nh2, rwbarton, erikd, carter GHC Trac Issues: #15968 Differential Revision: https://phabricator.haskell.org/D5424 >--------------------------------------------------------------- cb882fc993b4972f7f212b291229ef9e9ade0af9 configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 88eddca..2cf98a7 100644 --- a/configure.ac +++ b/configure.ac @@ -1248,7 +1248,9 @@ USE_LIBDW=0 AC_ARG_ENABLE(dwarf-unwind, [AC_HELP_STRING([--enable-dwarf-unwind], [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])], - [AC_CHECK_LIB(dw, dwfl_attach_state, [UseLibdw=YES], [UseLibdw=NO])], + [AC_CHECK_LIB(dw, dwfl_attach_state, + [UseLibdw=YES], + [AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])] [UseLibdw=NO] ) AC_SUBST(UseLibdw) From git at git.haskell.org Sat Dec 8 05:04:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:04:58 +0000 (UTC) Subject: [commit: ghc] master: hadrian: eliminate most of the remaining big rule enumerations (665f8b0) Message-ID: <20181208050458.599FA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/665f8b0c778b3a5dac4696f81da0cea88b101ea9/ghc >--------------------------------------------------------------- commit 665f8b0c778b3a5dac4696f81da0cea88b101ea9 Author: Alp Mestanogullari Date: Fri Dec 7 23:19:36 2018 -0500 hadrian: eliminate most of the remaining big rule enumerations Following what was done to Rules.Library some time ago and to Rules.Compile recently (D5412), this patch moves more rules away from the "enumerate a lot of contexts and generate one rule for each" style and instead uses the "parse data from file path to recover context" approach. In fact, the only rules left to convert seem to be the ones from Rules.Generate. This effectively decreases the pauses described in #15938 further as well as the amount of allocations and GC that we do, unsurprisingly. Nowhere as drastically as D5412, though. Test Plan: perform full build and generate docs Reviewers: snowleopard, bgamari Reviewed By: snowleopard Subscribers: rwbarton, carter GHC Trac Issues: #15938 Differential Revision: https://phabricator.haskell.org/D5422 >--------------------------------------------------------------- 665f8b0c778b3a5dac4696f81da0cea88b101ea9 hadrian/src/Rules.hs | 19 ++----- hadrian/src/Rules/Dependencies.hs | 39 +++++++++++-- hadrian/src/Rules/Documentation.hs | 49 +++++++++++++--- hadrian/src/Rules/Program.hs | 111 ++++++++++++++++++++----------------- hadrian/src/Rules/Register.hs | 90 +++++++++++++++++++++--------- hadrian/src/Settings/Default.hs | 9 ++- 6 files changed, 213 insertions(+), 104 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 665f8b0c778b3a5dac4696f81da0cea88b101ea9 From git at git.haskell.org Sat Dec 8 05:05:01 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:01 +0000 (UTC) Subject: [commit: ghc] master: Mark SRT_1/SRT_2 as CONSTR_1_0/CONSTR_2_0 (38edeea) Message-ID: <20181208050501.5CCF33ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/38edeea990b455fa8bf201bb9190a0719663bf76/ghc >--------------------------------------------------------------- commit 38edeea990b455fa8bf201bb9190a0719663bf76 Author: Ömer Sinan Ağacan Date: Fri Dec 7 23:20:10 2018 -0500 Mark SRT_1/SRT_2 as CONSTR_1_0/CONSTR_2_0 Test Plan: Validated locally, but skipped perf tests as there's a framework-related error there. Reviewers: simonmar, bgamari, erikd Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5421 >--------------------------------------------------------------- 38edeea990b455fa8bf201bb9190a0719663bf76 rts/StgMiscClosures.cmm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm index c3a83dd..fdd9f15 100644 --- a/rts/StgMiscClosures.cmm +++ b/rts/StgMiscClosures.cmm @@ -512,10 +512,10 @@ CLOSURE(stg_NO_TREC_closure,stg_NO_TREC); See Note [SRTs] in compiler/cmm/CmmBuildInfoTable.hs ------------------------------------------------------------------------- */ -INFO_TABLE_CONSTR(stg_SRT_1, 1, 0, 0, CONSTR, "SRT_1", "SRT_1") +INFO_TABLE_CONSTR(stg_SRT_1, 1, 0, 0, CONSTR_1_0, "SRT_1", "SRT_1") { foreign "C" barf("SRT_1 object (%p) entered!", R1) never returns; } -INFO_TABLE_CONSTR(stg_SRT_2, 2, 0, 0, CONSTR, "SRT_2", "SRT_2") +INFO_TABLE_CONSTR(stg_SRT_2, 2, 0, 0, CONSTR_2_0, "SRT_2", "SRT_2") { foreign "C" barf("SRT_2 object (%p) entered!", R1) never returns; } INFO_TABLE_CONSTR(stg_SRT_3, 3, 0, 0, CONSTR, "SRT_3", "SRT_3") From git at git.haskell.org Sat Dec 8 05:05:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:04 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: fix dynamicGhcPrograms value for the quickest flavour (7d96d28) Message-ID: <20181208050504.573593ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7d96d2816d11bc067ce5b7d68b4a6f0fb1cf0259/ghc >--------------------------------------------------------------- commit 7d96d2816d11bc067ce5b7d68b4a6f0fb1cf0259 Author: Alp Mestanogullari Date: Fri Dec 7 23:20:23 2018 -0500 Hadrian: fix dynamicGhcPrograms value for the quickest flavour Quickest does not build anything in a dynamic way, so that flavour should default to not building "ghc programs" dynamically. I ran into this problem by building the 'docs' target with quickest, which failed because at some point we run a haddock command in a context whose Way is sensitive to dynamicGhcPrograms, and it started looking for dyn interface files when it shouldn't have. Test Plan: hadrian/build.sh --flavour=quickest docs Reviewers: snowleopard, bgamari Reviewed By: snowleopard Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5419 >--------------------------------------------------------------- 7d96d2816d11bc067ce5b7d68b4a6f0fb1cf0259 hadrian/src/Settings/Flavours/Quickest.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadrian/src/Settings/Flavours/Quickest.hs b/hadrian/src/Settings/Flavours/Quickest.hs index 3c5f944..c0fd727 100644 --- a/hadrian/src/Settings/Flavours/Quickest.hs +++ b/hadrian/src/Settings/Flavours/Quickest.hs @@ -11,7 +11,8 @@ quickestFlavour = defaultFlavour { name = "quickest" , args = defaultBuilderArgs <> quickestArgs <> defaultPackageArgs , libraryWays = pure [vanilla] - , rtsWays = pure [vanilla, threaded] } + , rtsWays = pure [vanilla, threaded] + , dynamicGhcPrograms = return False } quickestArgs :: Args quickestArgs = sourceArgs SourceArgs From git at git.haskell.org Sat Dec 8 05:05:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:07 +0000 (UTC) Subject: [commit: ghc] master: Rename "changed" to "no-change" in HscMain (f2bad7e) Message-ID: <20181208050507.564673ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f2bad7e1069e61955c16e4e73a254095807d863a/ghc >--------------------------------------------------------------- commit f2bad7e1069e61955c16e4e73a254095807d863a Author: Ömer Sinan Ağacan Date: Fri Dec 7 23:20:42 2018 -0500 Rename "changed" to "no-change" in HscMain hscSimpleIface is returning a bool for whether there were _no changes_ in the iface file. The same bool is called "no_change_at_all" in mkIface_, and "no_change" in hscWriteIface and other functions. However it is called "changed" in HscMain.finish and hscMaybeWriteIface, which is confusing because "changed" and "no_change" have opposite meanings. This patch renames "changed" to "no_change" to fix this. Reviewers: simonpj, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5416 >--------------------------------------------------------------- f2bad7e1069e61955c16e4e73a254095807d863a compiler/main/HscMain.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index d7cebd0..38dc727 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -743,10 +743,10 @@ finish summary tc_result mb_old_hash = do (_, HsBootFile) -> HscUpdateBoot (_, HsigFile) -> HscUpdateSig _ -> panic "finish" - (iface, changed, details) <- liftIO $ + (iface, no_change, details) <- liftIO $ hscSimpleIface hsc_env tc_result mb_old_hash - return (iface, changed, details, hsc_status) - (iface, changed, details, hsc_status) <- + return (iface, no_change, details, hsc_status) + (iface, no_change, details, hsc_status) <- -- we usually desugar even when we are not generating code, otherwise -- we would miss errors thrown by the desugaring (see #10600). The only -- exceptions are when the Module is Ghc.Prim or when @@ -761,25 +761,25 @@ finish summary tc_result mb_old_hash = do else do plugins <- liftIO $ readIORef (tcg_th_coreplugins tc_result) desugared_guts <- hscSimplify' plugins desugared_guts0 - (iface, changed, details, cgguts) <- + (iface, no_change, details, cgguts) <- liftIO $ hscNormalIface hsc_env desugared_guts mb_old_hash - return (iface, changed, details, HscRecomp cgguts summary) + return (iface, no_change, details, HscRecomp cgguts summary) else mk_simple_iface - liftIO $ hscMaybeWriteIface dflags iface changed summary + liftIO $ hscMaybeWriteIface dflags iface no_change summary return ( hsc_status , HomeModInfo {hm_details = details, hm_iface = iface, hm_linkable = Nothing}) hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO () -hscMaybeWriteIface dflags iface changed summary = +hscMaybeWriteIface dflags iface no_change summary = let force_write_interface = gopt Opt_WriteInterface dflags write_interface = case hscTarget dflags of HscNothing -> False HscInterpreted -> False _ -> True in when (write_interface || force_write_interface) $ - hscWriteIface dflags iface changed summary + hscWriteIface dflags iface no_change summary -------------------------------------------------------------- -- NoRecomp handlers From git at git.haskell.org Sat Dec 8 05:05:10 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:10 +0000 (UTC) Subject: [commit: ghc] master: Remove redundant include of Rts.h in EventLogWriter.h (a24ab44) Message-ID: <20181208050510.4F1F83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a24ab444c1b2242a47e4413de6b8e610acc56b2b/ghc >--------------------------------------------------------------- commit a24ab444c1b2242a47e4413de6b8e610acc56b2b Author: Zejun Wu Date: Fri Dec 7 23:21:00 2018 -0500 Remove redundant include of Rts.h in EventLogWriter.h `EventLogWriter.h` doesn't use anything from `Rts.h`, the include is redundant. This include is ignored when we include ``` Rts.h -> RtsAPI.h -> rts/EventLogWriter.h -> Rts.h ``` but can can cause problem when we include `RtsApi.h` directly with errors like ``` In file included from /usr/lib/ghc-8.6.2/include/RtsAPI.h:20: In file included from /usr/lib/ghc-8.6.2/include/rts/EventLogWriter.h:14: In file included from /usr/lib/ghc-8.6.2/include/Rts.h:185: /usr/lib/ghc-8.6.2/include/rts/storage/GC.h:187:29: error: unknown type name 'Capability' StgPtr allocate ( Capability *cap, W_ n ); ``` Test Plan: ./validate Reviewers: simonmar, bgamari, afarmer, erikd, alexbiehl Reviewed By: bgamari, alexbiehl Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5395 >--------------------------------------------------------------- a24ab444c1b2242a47e4413de6b8e610acc56b2b includes/rts/EventLogWriter.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/rts/EventLogWriter.h b/includes/rts/EventLogWriter.h index 829b0f2..347ff5b 100644 --- a/includes/rts/EventLogWriter.h +++ b/includes/rts/EventLogWriter.h @@ -4,6 +4,11 @@ * * Support for fast binary event logging. * + * Do not #include this file directly: #include "Rts.h" instead. + * + * To understand the structure of the RTS headers, see the wiki: + * http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * * ---------------------------------------------------------------------------*/ #pragma once @@ -11,8 +16,6 @@ #include #include -#include "Rts.h" - /* * Abstraction for writing eventlog data. */ From git at git.haskell.org Sat Dec 8 05:05:13 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:13 +0000 (UTC) Subject: [commit: ghc] master: Add haddock for Node in Digraph. [skip ci] (c5ced67) Message-ID: <20181208050513.49D9A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c5ced679a6f5421eb53acf1fd1d212088145c971/ghc >--------------------------------------------------------------- commit c5ced679a6f5421eb53acf1fd1d212088145c971 Author: klebinger.andreas at gmx.at Date: Fri Dec 7 23:22:08 2018 -0500 Add haddock for Node in Digraph. [skip ci] Test Plan: make Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5378 >--------------------------------------------------------------- c5ced679a6f5421eb53acf1fd1d212088145c971 compiler/utils/Digraph.hs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs index bb118a6..cb401be 100644 --- a/compiler/utils/Digraph.hs +++ b/compiler/utils/Digraph.hs @@ -87,15 +87,23 @@ data Graph node = Graph { data Edge node = Edge node node +{-| Representation for nodes of the Graph. + + * The @payload@ is user data, just carried around in this module + + * The @key@ is the node identifier. + Key has an Ord instance for performance reasons. + + * The @[key]@ are the dependencies of the node; + it's ok to have extra keys in the dependencies that + are not the key of any Node in the graph +-} data Node key payload = DigraphNode { - node_payload :: payload, - node_key :: key, - node_dependencies :: [key] } - -- The payload is user data, just carried around in this module - -- The keys are ordered - -- The [key] are the dependencies of the node; - -- it's ok to have extra keys in the dependencies that - -- are not the key of any Node in the graph + node_payload :: payload, -- ^ User data + node_key :: key, -- ^ User defined node id + node_dependencies :: [key] -- ^ Dependencies/successors of the node + } + instance (Outputable a, Outputable b) => Outputable (Node a b) where ppr (DigraphNode a b c) = ppr (a, b, c) From git at git.haskell.org Sat Dec 8 05:05:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:17 +0000 (UTC) Subject: [commit: ghc] master: Fix #15369: GHCi doesn't honor :set +c when loading for a second time (57c9b1a) Message-ID: <20181208050517.1C1F03ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/57c9b1ae4cafd0ee763451f2d4bc10220eef9689/ghc >--------------------------------------------------------------- commit 57c9b1ae4cafd0ee763451f2d4bc10220eef9689 Author: Roland Senn Date: Fri Dec 7 23:22:40 2018 -0500 Fix #15369: GHCi doesn't honor :set +c when loading for a second time The decision to (re)collect the type info for a (re)loaded module is now taken only by comparing the file timestamps of the .hs file of the module. (Or form the .o file if the .hs file is missing). If the file timestamp changes, we (re)collect the type info. The timestamp of the processing time of the last collect is no longer used. Test Plan: make test TEST=T15369 Reviewers: alanz, hvr, monoidal, osa1, thomie, bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15369 Differential Revision: https://phabricator.haskell.org/D5376 >--------------------------------------------------------------- 57c9b1ae4cafd0ee763451f2d4bc10220eef9689 ghc/GHCi/UI/Info.hs | 22 ++++++++++++++++------ testsuite/tests/ghci/should_run/T15369.hs | 3 +++ testsuite/tests/ghci/should_run/T15369.script | 13 +++++++++++++ testsuite/tests/ghci/should_run/T15369.stdout | 8 ++++++++ testsuite/tests/ghci/should_run/all.T | 1 + 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/ghc/GHCi/UI/Info.hs b/ghc/GHCi/UI/Info.hs index d608aad..d42f019 100644 --- a/ghc/GHCi/UI/Info.hs +++ b/ghc/GHCi/UI/Info.hs @@ -58,6 +58,7 @@ data ModInfo = ModInfo -- ^ Again, useful from GHC for accessing information -- (exports, instances, scope) from a module. , modinfoLastUpdate :: !UTCTime + -- ^ The timestamp of the file used to generate this record. } -- | Type of some span of source code. Most of these fields are @@ -277,15 +278,24 @@ collectInfo ms loaded = do cacheInvalid name = case M.lookup name ms of Nothing -> return True Just mi -> do - let src_fp = ml_hs_file (ms_location (modinfoSummary mi)) - obj_fp = ml_obj_file (ms_location (modinfoSummary mi)) - fp = fromMaybe obj_fp src_fp + let fp = srcFilePath (modinfoSummary mi) last' = modinfoLastUpdate mi + current <- getModificationTime fp exists <- doesFileExist fp if exists - then (> last') <$> getModificationTime fp + then return $ current /= last' else return True +-- | Get the source file path from a ModSummary. +-- If the .hs file is missing, and the .o file exists, +-- we return the .o file path. +srcFilePath :: ModSummary -> FilePath +srcFilePath modSum = fromMaybe obj_fp src_fp + where + src_fp = ml_hs_file ms_loc + obj_fp = ml_obj_file ms_loc + ms_loc = ms_location modSum + -- | Get info about the module: summary, types, etc. getModInfo :: (GhcMonad m) => ModuleName -> m ModInfo getModInfo name = do @@ -294,8 +304,8 @@ getModInfo name = do typechecked <- typecheckModule p allTypes <- processAllTypeCheckedModule typechecked let i = tm_checked_module_info typechecked - now <- liftIO getCurrentTime - return (ModInfo m allTypes i now) + ts <- liftIO $ getModificationTime $ srcFilePath m + return (ModInfo m allTypes i ts) -- | Get ALL source spans in the module. processAllTypeCheckedModule :: forall m . GhcMonad m => TypecheckedModule diff --git a/testsuite/tests/ghci/should_run/T15369.hs b/testsuite/tests/ghci/should_run/T15369.hs new file mode 100644 index 0000000..5377999 --- /dev/null +++ b/testsuite/tests/ghci/should_run/T15369.hs @@ -0,0 +1,3 @@ +module T15369 where +x :: Int +x = 1 diff --git a/testsuite/tests/ghci/should_run/T15369.script b/testsuite/tests/ghci/should_run/T15369.script new file mode 100644 index 0000000..5232c6a --- /dev/null +++ b/testsuite/tests/ghci/should_run/T15369.script @@ -0,0 +1,13 @@ +-- create an .o file +:set -fobject-code +:l T15369.hs +:set -fbyte-code +-- start the test +:set +c +:l *T15369.hs +:all-types +:l *T15369.hs +:all-types +:! sed -i 's/Int/Double/g' T15369.hs +:l *T15369.hs +:all-types diff --git a/testsuite/tests/ghci/should_run/T15369.stdout b/testsuite/tests/ghci/should_run/T15369.stdout new file mode 100644 index 0000000..0bb004c --- /dev/null +++ b/testsuite/tests/ghci/should_run/T15369.stdout @@ -0,0 +1,8 @@ +Collecting type info for 1 module(s) ... +T15369.hs:(3,1)-(3,2): GHC.Types.Int +T15369.hs:(3,5)-(3,6): GHC.Types.Int +T15369.hs:(3,1)-(3,2): GHC.Types.Int +T15369.hs:(3,5)-(3,6): GHC.Types.Int +Collecting type info for 1 module(s) ... +T15369.hs:(3,1)-(3,2): GHC.Types.Double +T15369.hs:(3,5)-(3,6): GHC.Types.Double diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T index aa6aab3..ea734e7 100644 --- a/testsuite/tests/ghci/should_run/all.T +++ b/testsuite/tests/ghci/should_run/all.T @@ -37,6 +37,7 @@ test('T14963b', just_ghci, ghci_script, ['T14963b.script']) test('T14963c', [extra_hc_opts("-fdefer-type-errors")], ghci_script, ['T14963c.script']) test('T15007', just_ghci, ghci_script, ['T15007.script']) test('T15806', just_ghci, ghci_script, ['T15806.script']) +test('T15369', just_ghci, ghci_script, ['T15369.script']) test('T15633a', [extra_files(['tc-plugin-ghci/']), From git at git.haskell.org Sat Dec 8 05:05:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:20 +0000 (UTC) Subject: [commit: ghc] master: Fix StgLint bound id check, generalize StgLint (04caa93) Message-ID: <20181208050520.1DFD53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/04caa935ac22bd2bd1a254f26df9dca4ee6abdd1/ghc >--------------------------------------------------------------- commit 04caa935ac22bd2bd1a254f26df9dca4ee6abdd1 Author: Ömer Sinan Ağacan Date: Fri Dec 7 23:23:10 2018 -0500 Fix StgLint bound id check, generalize StgLint StgLint was incorrectly using isLocalId for bound id check to see whether an id is imported (in which case we don't expect it to be bound) or local. The problem with isLocalId is that its semantics changes after Core, as explained in the note: (last line) Note [GlobalId/LocalId] ~~~~~~~~~~~~~~~~~~~~~~~ A GlobalId is * always a constant (top-level) * imported, or data constructor, or primop, or record selector * has a Unique that is globally unique across the whole GHC invocation (a single invocation may compile multiple modules) * never treated as a candidate by the free-variable finder; it's a constant! A LocalId is * bound within an expression (lambda, case, local let(rec)) * or defined at top level in the module being compiled * always treated as a candidate by the free-variable finder After CoreTidy, top-level LocalIds are turned into GlobalIds We now pass current module as a parameter to StgLint, which uses it to see if an id should be bound (defined in the current module) or not (imported). Other changes: - Generalized StgLint to make it work on both StgTopBinding and CgStgTopBinding. - Bring all top-level binders into scope before linting top-level bindings to allow uses before definitions. TODO: We should remove the binder from local vars when checking RHSs of non-recursive bindings. Test Plan: This validates. Reviewers: simonpj, bgamari, sgraf Reviewed By: simonpj, sgraf Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5370 >--------------------------------------------------------------- 04caa935ac22bd2bd1a254f26df9dca4ee6abdd1 compiler/main/HscMain.hs | 2 +- compiler/simplStg/SimplStg.hs | 18 ++++-- compiler/stgSyn/StgLint.hs | 133 +++++++++++++++++++++++++++--------------- compiler/stgSyn/StgSyn.hs | 13 +++-- testsuite/mk/test.mk | 3 +- 5 files changed, 109 insertions(+), 60 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 04caa935ac22bd2bd1a254f26df9dca4ee6abdd1 From git at git.haskell.org Sat Dec 8 05:05:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:23 +0000 (UTC) Subject: [commit: ghc] master: Add -fno-safe-haskell flag (45e98f6) Message-ID: <20181208050523.A30543ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/45e98f64e82f6ff16dc3e437c3031b9d315f1313/ghc >--------------------------------------------------------------- commit 45e98f64e82f6ff16dc3e437c3031b9d315f1313 Author: Matthew Pickering Date: Fri Dec 7 23:25:20 2018 -0500 Add -fno-safe-haskell flag This flag can be set to turn off the Safe Haskell checks. Whether a module is marked Safe/Unsafe/Trustworthy is ignored when this flag to set. Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15920 Differential Revision: https://phabricator.haskell.org/D5360 >--------------------------------------------------------------- 45e98f64e82f6ff16dc3e437c3031b9d315f1313 compiler/main/DynFlags.hs | 16 +++++++++++++--- compiler/main/HscMain.hs | 5 +++-- compiler/main/HscTypes.hs | 2 ++ docs/users_guide/safe_haskell.rst | 17 +++++++++++++++++ testsuite/tests/safeHaskell/flags/SafeIgnore.hs | 6 ++++++ testsuite/tests/safeHaskell/flags/SafeIgnoreA.hs | 4 ++++ testsuite/tests/safeHaskell/flags/all.T | 2 ++ 7 files changed, 47 insertions(+), 5 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 45e98f64e82f6ff16dc3e437c3031b9d315f1313 From git at git.haskell.org Sat Dec 8 05:05:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:26 +0000 (UTC) Subject: [commit: ghc] master: Use --no-as-needed with LLD too (aa619f3) Message-ID: <20181208050526.9CDE53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/aa619f39e39b09b6da4585b40413adcf9d54fe46/ghc >--------------------------------------------------------------- commit aa619f39e39b09b6da4585b40413adcf9d54fe46 Author: Simon Marlow Date: Fri Dec 7 23:25:40 2018 -0500 Use --no-as-needed with LLD too Test Plan: validate using LLD as the linker (TODO) Reviewers: bgamari, angerman, kavon, erikd Reviewed By: bgamari Subscribers: watashi, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5336 >--------------------------------------------------------------- aa619f39e39b09b6da4585b40413adcf9d54fe46 compiler/main/SysTools/Info.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/main/SysTools/Info.hs b/compiler/main/SysTools/Info.hs index 6b31057..420a2bf 100644 --- a/compiler/main/SysTools/Info.hs +++ b/compiler/main/SysTools/Info.hs @@ -142,7 +142,9 @@ getLinkerInfo' dflags = do return (GnuGold [Option "-Wl,--no-as-needed"]) | any ("LLD" `isPrefixOf`) stdo = - return (LlvmLLD []) + return (LlvmLLD $ map Option [ + -- see Note [ELF needed shared libs] + "-Wl,--no-as-needed"]) -- Unknown linker. | otherwise = fail "invalid --version output, or linker is unsupported" From git at git.haskell.org Sat Dec 8 05:05:29 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 05:05:29 +0000 (UTC) Subject: [commit: ghc] master: rts: Ensure that task->id is initialized (64ef4d7) Message-ID: <20181208050529.A080D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/64ef4d7fb131f04769c6cab331af335bd87103ec/ghc >--------------------------------------------------------------- commit 64ef4d7fb131f04769c6cab331af335bd87103ec Author: Ben Gamari Date: Fri Dec 7 23:25:53 2018 -0500 rts: Ensure that task->id is initialized Reviewers: erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5325 >--------------------------------------------------------------- 64ef4d7fb131f04769c6cab331af335bd87103ec rts/Task.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rts/Task.c b/rts/Task.c index ac86311..11ba5f1 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -220,6 +220,7 @@ newTask (bool worker) #if defined(THREADED_RTS) initCondition(&task->cond); initMutex(&task->lock); + task->id = 0; task->wakeup = false; task->node = 0; #endif From git at git.haskell.org Sat Dec 8 14:36:57 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 14:36:57 +0000 (UTC) Subject: [commit: ghc] master: testsuite: 32-bit expected output for T15460 (f5bff4b) Message-ID: <20181208143657.BBFB93ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f5bff4bc23259d38c37ef5f56da3334be5a891d9/ghc >--------------------------------------------------------------- commit f5bff4bc23259d38c37ef5f56da3334be5a891d9 Author: Ben Gamari Date: Sat Dec 8 09:35:40 2018 -0500 testsuite: 32-bit expected output for T15460 >--------------------------------------------------------------- f5bff4bc23259d38c37ef5f56da3334be5a891d9 .../warnings/should_compile/{T15460.stderr => T15460.stderr-ws-32} | 2 +- .../warnings/should_compile/{T15460.stderr => T15460.stderr-ws-64} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/warnings/should_compile/T15460.stderr b/testsuite/tests/warnings/should_compile/T15460.stderr-ws-32 similarity index 56% copy from testsuite/tests/warnings/should_compile/T15460.stderr copy to testsuite/tests/warnings/should_compile/T15460.stderr-ws-32 index 5907b44..2859116 100644 --- a/testsuite/tests/warnings/should_compile/T15460.stderr +++ b/testsuite/tests/warnings/should_compile/T15460.stderr-ws-32 @@ -1,3 +1,3 @@ T15460.hs:8:16: warning: [-Woverflowed-literals (in -Wdefault)] - Literal 7237005577332262213973186563042994240829374041602535252466099000494570602495 is out of the GHC.Prim.Int# range -9223372036854775808..9223372036854775807 + Literal 7237005577332262213973186563042994240829374041602535252466099000494570602495 is out of the GHC.Prim.Int# range -2147483648..2147483647 diff --git a/testsuite/tests/warnings/should_compile/T15460.stderr b/testsuite/tests/warnings/should_compile/T15460.stderr-ws-64 similarity index 100% rename from testsuite/tests/warnings/should_compile/T15460.stderr rename to testsuite/tests/warnings/should_compile/T15460.stderr-ws-64 From git at git.haskell.org Sat Dec 8 18:22:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 18:22:05 +0000 (UTC) Subject: [commit: ghc] branch 'circleci-centos' created Message-ID: <20181208182205.9B1B83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : circleci-centos Referencing: 7c2e8fdd43448db90b8845c6255f7b42a2333cd2 From git at git.haskell.org Sat Dec 8 18:22:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 18:22:09 +0000 (UTC) Subject: [commit: ghc] circleci-centos: CircleCI: Add configurations for Centos 7 and Debian 9 (7c2e8fd) Message-ID: <20181208182209.145683ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/7c2e8fdd43448db90b8845c6255f7b42a2333cd2/ghc >--------------------------------------------------------------- commit 7c2e8fdd43448db90b8845c6255f7b42a2333cd2 Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- 7c2e8fdd43448db90b8845c6255f7b42a2333cd2 .circleci/config.yml | 79 +++++++++++++++------- .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 6 files changed, 61 insertions(+), 30 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eaac945..5f9a631 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,10 +108,10 @@ aliases: only: /^ghc-.*/ jobs: - "validate-x86_64-linux": + "validate-x86_64-linux-deb8": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb8:0.1 environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: x86_64-linux @@ -182,10 +182,33 @@ jobs: - *store_test_artifacts - *push_perf_note - "validate-hadrian-x86_64-linux": + "validate-x86_64-linux-deb9": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb9:0.1 + environment: + <<: *buildenv + GHC_COLLECTOR_FLAVOR: x86_64-linux + TEST_ENV: x86_64-linux + steps: + - checkout + - *set_git_identity + - *prepare + - *submodules + - *boot + - *configure_unix + - *make + - *bindist + - *store_bindist + - *test + - *store_test_results + - *store_test_artifacts + - *push_perf_note + + "validate-hadrian-x86_64-linux-deb8": + resource_class: xlarge + docker: + - image: ghcci/x86_64-linux-deb8:0.1 environment: <<: *buildenv steps: @@ -197,10 +220,10 @@ jobs: - *configure_unix - *build_hadrian - "validate-x86_64-linux-unreg": + "validate-x86_64-linux-deb8-unreg": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb8:0.1 environment: <<: *buildenv TEST_ENV: x86_64-linux-unreg @@ -217,10 +240,10 @@ jobs: - *push_perf_note - *store_test_artifacts - "validate-x86_64-linux-llvm": + "validate-x86_64-linux-deb8-llvm": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb8:0.1 environment: <<: *buildenv BUILD_FLAVOUR: perf-llvm @@ -247,10 +270,10 @@ jobs: - *push_perf_note # Nightly build with -DDEBUG using devel2 flavour - "validate-x86_64-linux-debug": + "validate-x86_64-linux-deb8-debug": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb8:0.1 environment: BUILD_FLAVOUR: devel2 <<: *buildenv @@ -269,10 +292,10 @@ jobs: - *store_test_artifacts - *push_perf_note - "validate-i386-linux": + "validate-i386-linux-deb8": resource_class: xlarge docker: - - image: ghcci/i386-linux:0.0.7 + - image: ghcci/i386-linux-deb8:0.1 environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: i386-linux @@ -292,10 +315,10 @@ jobs: - *store_test_artifacts - *push_perf_note - "validate-x86_64-fedora": + "validate-x86_64-fedora27": resource_class: xlarge docker: - - image: ghcci/x86_64-linux-fedora:0.0.17 + - image: ghcci/x86_64-linux-fedora27:0.1 environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: x86_64-fedora @@ -315,10 +338,10 @@ jobs: - *store_test_artifacts - *push_perf_note - "slow-validate-x86_64-linux": + "slow-validate-x86_64-linux-deb8": resource_class: xlarge docker: - - image: ghcci/x86_64-linux:0.0.8 + - image: ghcci/x86_64-linux-deb8:0.1 environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: x86_64-linux @@ -338,17 +361,23 @@ workflows: version: 2 validate: jobs: - - validate-x86_64-linux: + - validate-x86_64-linux-deb8: *trigger_on_tags # FreeBSD disabled: https://github.com/haskell/unix/issues/102 # - validate-x86_64-freebsd - validate-x86_64-darwin: *trigger_on_tags - - validate-x86_64-linux-llvm - - validate-i386-linux: + - validate-x86_64-linux-deb8-llvm + - validate-i386-linux-deb8: + *trigger_on_tags + - validate-x86_64-linux-deb9: + *trigger_on_tags + - validate-i386-linux-deb9: + *trigger_on_tags + - validate-x86_64-linux-centos7: *trigger_on_tags - - validate-hadrian-x86_64-linux - - validate-x86_64-fedora: + - validate-hadrian-x86_64-linux-deb8 + - validate-x86_64-fedora27: *trigger_on_tags nightly: @@ -360,10 +389,10 @@ workflows: only: - master jobs: - - validate-x86_64-linux-unreg - - validate-x86_64-linux-llvm - - validate-x86_64-linux-debug - - slow-validate-x86_64-linux + - validate-x86_64-linux-deb8-unreg + - validate-x86_64-linux-deb8-llvm + - validate-x86_64-linux-deb8-debug + - slow-validate-x86_64-linux-deb8 notify: webhooks: diff --git a/.circleci/images/i386-linux/Dockerfile b/.circleci/images/i386-linux-deb8/Dockerfile similarity index 100% rename from .circleci/images/i386-linux/Dockerfile rename to .circleci/images/i386-linux-deb8/Dockerfile diff --git a/.circleci/images/x86_64-linux/Dockerfile b/.circleci/images/x86_64-linux-deb8/Dockerfile similarity index 100% copy from .circleci/images/x86_64-linux/Dockerfile copy to .circleci/images/x86_64-linux-deb8/Dockerfile diff --git a/.circleci/images/x86_64-linux/Dockerfile b/.circleci/images/x86_64-linux-deb9/Dockerfile similarity index 87% rename from .circleci/images/x86_64-linux/Dockerfile rename to .circleci/images/x86_64-linux-deb9/Dockerfile index 0491ad9..6d14daa 100644 --- a/.circleci/images/x86_64-linux/Dockerfile +++ b/.circleci/images/x86_64-linux-deb9/Dockerfile @@ -1,8 +1,10 @@ -FROM debian:jessie +FROM debian:stretch ENV LANG C.UTF-8 -RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list +RUN apt-get update -qq; apt-get install -qy gnupg + +RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > /etc/apt/sources.list.d/ghc.list RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 RUN apt-get update -qq diff --git a/.circleci/images/x86_64-linux-fedora/Dockerfile b/.circleci/images/x86_64-linux-fedora27/Dockerfile similarity index 100% rename from .circleci/images/x86_64-linux-fedora/Dockerfile rename to .circleci/images/x86_64-linux-fedora27/Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f669788..b0cf24d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ before_script: key: hadrian paths: - cabal-cache - image: ghcci/x86_64-linux:0.0.8 + image: ghcci/x86_64-linux-deb8:0.1 .validate-x86_64-linux-hadrian: extends: .validate-hadrian @@ -50,7 +50,7 @@ before_script: - | THREADS=`mk/detect-cpu-count.sh` make test THREADS=$THREADS JUNIT_FILE=../../junit.xml - image: ghcci/x86_64-linux:0.0.8 + image: ghcci/x86_64-linux-deb8:0.1 artifacts: when: always reports: @@ -142,7 +142,7 @@ validate-x86_64-linux: ############################################################ .circleci: - image: ghcci/x86_64-linux:0.0.8 + image: ghcci/x86_64-linux-deb8:0.1 artifacts: when: always reports: From git at git.haskell.org Sat Dec 8 19:05:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 19:05:33 +0000 (UTC) Subject: [commit: ghc] circleci-centos: CircleCI: Add configurations for Centos 7 and Debian 9 (fbcacfc) Message-ID: <20181208190533.CF6BC3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/fbcacfc58d03267ef3f8086800522126c63021a0/ghc >--------------------------------------------------------------- commit fbcacfc58d03267ef3f8086800522126c63021a0 Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- fbcacfc58d03267ef3f8086800522126c63021a0 .circleci/config.yml | 138 ++++++++++++++------- .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 6 files changed, 102 insertions(+), 48 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc fbcacfc58d03267ef3f8086800522126c63021a0 From git at git.haskell.org Sat Dec 8 19:05:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 19:05:36 +0000 (UTC) Subject: [commit: ghc] circleci-centos: hadrian: Drop nix build script (dc580ab) Message-ID: <20181208190536.C43C13ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/dc580ab0caea6205b3964f11d87a9e6869c016f6/ghc >--------------------------------------------------------------- commit dc580ab0caea6205b3964f11d87a9e6869c016f6 Author: Ben Gamari Date: Sat Dec 8 17:57:59 2018 +0000 hadrian: Drop nix build script It's currently too out-of-date to build current hadrian and is arguably completely broken anyways (see #15794). >--------------------------------------------------------------- dc580ab0caea6205b3964f11d87a9e6869c016f6 .../Dockerfile | 0 hadrian/build.nix.sh | 35 --------- hadrian/shell.nix | 89 ---------------------- 3 files changed, 124 deletions(-) diff --git a/.circleci/images/i386-linux-deb8/Dockerfile b/.circleci/images/i386-linux-deb9/Dockerfile similarity index 100% copy from .circleci/images/i386-linux-deb8/Dockerfile copy to .circleci/images/i386-linux-deb9/Dockerfile diff --git a/hadrian/build.nix.sh b/hadrian/build.nix.sh deleted file mode 100755 index 4b03ea8..0000000 --- a/hadrian/build.nix.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash shell.nix - -# This script sets up the build environment by invoking nix-shell shell.nix -# and then runs the hadrian executable. - -function rl { - TARGET_FILE="$1" - - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - - # Iterate down a (possible) chain of symlinks - while [ -L "$TARGET_FILE" ] - do - TARGET_FILE="$(readlink "$TARGET_FILE")" - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - done - - # Compute the canonicalized name by finding the physical path - # for the directory we're in and appending the target file. - PHYS_DIR="$(pwd -P)" - RESULT="$PHYS_DIR/$TARGET_FILE" - echo "$RESULT" -} - -absoluteRoot="$(dirname "$(rl "$0")")" -echo $absoluteRoot -cd "$absoluteRoot" - -hadrian \ - --lint \ - --directory="$absoluteRoot/.." \ - "$@" diff --git a/hadrian/shell.nix b/hadrian/shell.nix deleted file mode 100644 index 041bf09..0000000 --- a/hadrian/shell.nix +++ /dev/null @@ -1,89 +0,0 @@ -# Invoking nix-shell sets up an environment where we can build ghc -# by only invoking hadrian. - - -{ _nixpkgs ? import {} }: - -let - - nixpkgs = import (_nixpkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - rev = "e7a327da5cffdf5e77e1924906a4f0983591bd3e"; - sha256 = "1xzil4mayhggg2miwspbk12nihlszg0y4n6i4qacrxql5n75f0hr"; - }){ overlays = [cabalHashes]; }; - - - - cabalHashes = sel: super: { - all-cabal-hashes = super.fetchurl { - url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/b2b93ae610f5f1b51d22b191f972dc3dec8f94c6.tar.gz"; - sha256 = "0bffclpqbw62xff36qlzxghr042mhv0m06k5ml4298w6fv7ly1xw"; - }; - }; - - haskellPackages = nixpkgs.haskell.packages.ghc822; - - removeBuild = path: type: - let baseName = baseNameOf (toString path); - in - ! (baseName == "_build" - || baseName == "dist" - || baseName == "dist-newstyle" - || baseName == ".stack-work" - || baseName == "config.log" - || baseName == "config.status" - || baseName == "shell.nix" - || nixpkgs.lib.hasSuffix ".sh" baseName - || !(nixpkgs.lib.cleanSourceFilter path type)) ; - - filterSrc = path: builtins.filterSource removeBuild path; - - - hadrianPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - hadrian = localPackage "hadrian" ./. ; - happy = nixpkgs.haskell.lib.dontCheck (super.happy); - shake = self.callHackage "shake" "0.16.2" {}; - extra = self.callHackage "extra" "1.6.4" {}; - QuickCheck = self.callHackage "QuickCheck" "2.10" {}; - Cabal = localPackage "Cabal" ./../libraries/Cabal/Cabal ; - filepath = localPackage "filepath" ./../libraries/filepath ; - text = localPackage "text" ./../libraries/text ; - hpc = localPackage"hpc" ./../libraries/hpc ; - parsec = localPackage "parsec" ./../libraries/parsec ; - HUnit = nixpkgs.haskell.lib.dontCheck (self.callHackage "HUnit" "1.3.1.2" {}); - process = localPackage "process" ./../libraries/process ; - directory = localPackage "directory" ./../libraries/directory ; - }; }; - - cabalPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - Cabal = localPackage "Cabal" ./../../cabal/Cabal ; - cabal-install = self.callPackage ./../../cabal/cabal-install.nix {}; - }; }; - - -in - nixpkgs.lib.overrideDerivation nixpkgs.haskell.packages.ghcHEAD.ghc - (drv: { - name = "ghc-dev"; - nativeBuildInputs = drv.nativeBuildInputs ++ - [ hadrianPackages.hadrian - nixpkgs.arcanist - nixpkgs.git - nixpkgs.gmp.dev nixpkgs.gmp.out - nixpkgs.ncurses.dev nixpkgs.ncurses.out - nixpkgs.python3Packages.sphinx - nixpkgs.texlive.combined.scheme-basic - (nixpkgs.haskell.packages.ghc822.ghcWithPackages - (ps: [ps.html ps.regex-compat ps.dump-core])) - - #cabalPackages.cabal-install - ]; - }) - From git at git.haskell.org Sat Dec 8 19:09:53 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 19:09:53 +0000 (UTC) Subject: [commit: ghc] circleci-centos: CircleCI: Add configurations for Centos 7 and Debian 9 (cb98e74) Message-ID: <20181208190953.32CBA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/cb98e74d9527b474691e1f7d0ba8a5ea899acfac/ghc >--------------------------------------------------------------- commit cb98e74d9527b474691e1f7d0ba8a5ea899acfac Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- cb98e74d9527b474691e1f7d0ba8a5ea899acfac .circleci/config.yml | 173 +++++++++++++++------ .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 6 files changed, 131 insertions(+), 54 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc cb98e74d9527b474691e1f7d0ba8a5ea899acfac From git at git.haskell.org Sat Dec 8 19:09:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 19:09:56 +0000 (UTC) Subject: [commit: ghc] circleci-centos: hadrian: Drop nix build script (0add377) Message-ID: <20181208190956.3244E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/0add37775543a05cf6b4c96b784c2d160455d44a/ghc >--------------------------------------------------------------- commit 0add37775543a05cf6b4c96b784c2d160455d44a Author: Ben Gamari Date: Sat Dec 8 17:57:59 2018 +0000 hadrian: Drop nix build script It's currently too out-of-date to build current hadrian and is arguably completely broken anyways (see #15794). >--------------------------------------------------------------- 0add37775543a05cf6b4c96b784c2d160455d44a .../Dockerfile | 0 hadrian/build.nix.sh | 35 --------- hadrian/shell.nix | 89 ---------------------- 3 files changed, 124 deletions(-) diff --git a/.circleci/images/i386-linux-deb8/Dockerfile b/.circleci/images/i386-linux-deb9/Dockerfile similarity index 100% copy from .circleci/images/i386-linux-deb8/Dockerfile copy to .circleci/images/i386-linux-deb9/Dockerfile diff --git a/hadrian/build.nix.sh b/hadrian/build.nix.sh deleted file mode 100755 index 4b03ea8..0000000 --- a/hadrian/build.nix.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash shell.nix - -# This script sets up the build environment by invoking nix-shell shell.nix -# and then runs the hadrian executable. - -function rl { - TARGET_FILE="$1" - - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - - # Iterate down a (possible) chain of symlinks - while [ -L "$TARGET_FILE" ] - do - TARGET_FILE="$(readlink "$TARGET_FILE")" - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - done - - # Compute the canonicalized name by finding the physical path - # for the directory we're in and appending the target file. - PHYS_DIR="$(pwd -P)" - RESULT="$PHYS_DIR/$TARGET_FILE" - echo "$RESULT" -} - -absoluteRoot="$(dirname "$(rl "$0")")" -echo $absoluteRoot -cd "$absoluteRoot" - -hadrian \ - --lint \ - --directory="$absoluteRoot/.." \ - "$@" diff --git a/hadrian/shell.nix b/hadrian/shell.nix deleted file mode 100644 index 041bf09..0000000 --- a/hadrian/shell.nix +++ /dev/null @@ -1,89 +0,0 @@ -# Invoking nix-shell sets up an environment where we can build ghc -# by only invoking hadrian. - - -{ _nixpkgs ? import {} }: - -let - - nixpkgs = import (_nixpkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - rev = "e7a327da5cffdf5e77e1924906a4f0983591bd3e"; - sha256 = "1xzil4mayhggg2miwspbk12nihlszg0y4n6i4qacrxql5n75f0hr"; - }){ overlays = [cabalHashes]; }; - - - - cabalHashes = sel: super: { - all-cabal-hashes = super.fetchurl { - url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/b2b93ae610f5f1b51d22b191f972dc3dec8f94c6.tar.gz"; - sha256 = "0bffclpqbw62xff36qlzxghr042mhv0m06k5ml4298w6fv7ly1xw"; - }; - }; - - haskellPackages = nixpkgs.haskell.packages.ghc822; - - removeBuild = path: type: - let baseName = baseNameOf (toString path); - in - ! (baseName == "_build" - || baseName == "dist" - || baseName == "dist-newstyle" - || baseName == ".stack-work" - || baseName == "config.log" - || baseName == "config.status" - || baseName == "shell.nix" - || nixpkgs.lib.hasSuffix ".sh" baseName - || !(nixpkgs.lib.cleanSourceFilter path type)) ; - - filterSrc = path: builtins.filterSource removeBuild path; - - - hadrianPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - hadrian = localPackage "hadrian" ./. ; - happy = nixpkgs.haskell.lib.dontCheck (super.happy); - shake = self.callHackage "shake" "0.16.2" {}; - extra = self.callHackage "extra" "1.6.4" {}; - QuickCheck = self.callHackage "QuickCheck" "2.10" {}; - Cabal = localPackage "Cabal" ./../libraries/Cabal/Cabal ; - filepath = localPackage "filepath" ./../libraries/filepath ; - text = localPackage "text" ./../libraries/text ; - hpc = localPackage"hpc" ./../libraries/hpc ; - parsec = localPackage "parsec" ./../libraries/parsec ; - HUnit = nixpkgs.haskell.lib.dontCheck (self.callHackage "HUnit" "1.3.1.2" {}); - process = localPackage "process" ./../libraries/process ; - directory = localPackage "directory" ./../libraries/directory ; - }; }; - - cabalPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - Cabal = localPackage "Cabal" ./../../cabal/Cabal ; - cabal-install = self.callPackage ./../../cabal/cabal-install.nix {}; - }; }; - - -in - nixpkgs.lib.overrideDerivation nixpkgs.haskell.packages.ghcHEAD.ghc - (drv: { - name = "ghc-dev"; - nativeBuildInputs = drv.nativeBuildInputs ++ - [ hadrianPackages.hadrian - nixpkgs.arcanist - nixpkgs.git - nixpkgs.gmp.dev nixpkgs.gmp.out - nixpkgs.ncurses.dev nixpkgs.ncurses.out - nixpkgs.python3Packages.sphinx - nixpkgs.texlive.combined.scheme-basic - (nixpkgs.haskell.packages.ghc822.ghcWithPackages - (ps: [ps.html ps.regex-compat ps.dump-core])) - - #cabalPackages.cabal-install - ]; - }) - From git at git.haskell.org Sat Dec 8 19:12:03 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 8 Dec 2018 19:12:03 +0000 (UTC) Subject: [commit: ghc] master: hadrian: Drop nix build script (c00d2f5) Message-ID: <20181208191203.4C5BB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c00d2f59df1f3707d529531fd0c6b55903516ec4/ghc >--------------------------------------------------------------- commit c00d2f59df1f3707d529531fd0c6b55903516ec4 Author: Ben Gamari Date: Sat Dec 8 17:57:59 2018 +0000 hadrian: Drop nix build script It's currently too out-of-date to build current hadrian and is arguably completely broken anyways (see #15794). >--------------------------------------------------------------- c00d2f59df1f3707d529531fd0c6b55903516ec4 .../{i386-linux => i386-linux-deb9}/Dockerfile | 0 hadrian/build.nix.sh | 35 --------- hadrian/shell.nix | 89 ---------------------- 3 files changed, 124 deletions(-) diff --git a/.circleci/images/i386-linux/Dockerfile b/.circleci/images/i386-linux-deb9/Dockerfile similarity index 100% copy from .circleci/images/i386-linux/Dockerfile copy to .circleci/images/i386-linux-deb9/Dockerfile diff --git a/hadrian/build.nix.sh b/hadrian/build.nix.sh deleted file mode 100755 index 4b03ea8..0000000 --- a/hadrian/build.nix.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash shell.nix - -# This script sets up the build environment by invoking nix-shell shell.nix -# and then runs the hadrian executable. - -function rl { - TARGET_FILE="$1" - - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - - # Iterate down a (possible) chain of symlinks - while [ -L "$TARGET_FILE" ] - do - TARGET_FILE="$(readlink "$TARGET_FILE")" - cd "$(dirname "$TARGET_FILE")" - TARGET_FILE="$(basename "$TARGET_FILE")" - done - - # Compute the canonicalized name by finding the physical path - # for the directory we're in and appending the target file. - PHYS_DIR="$(pwd -P)" - RESULT="$PHYS_DIR/$TARGET_FILE" - echo "$RESULT" -} - -absoluteRoot="$(dirname "$(rl "$0")")" -echo $absoluteRoot -cd "$absoluteRoot" - -hadrian \ - --lint \ - --directory="$absoluteRoot/.." \ - "$@" diff --git a/hadrian/shell.nix b/hadrian/shell.nix deleted file mode 100644 index 041bf09..0000000 --- a/hadrian/shell.nix +++ /dev/null @@ -1,89 +0,0 @@ -# Invoking nix-shell sets up an environment where we can build ghc -# by only invoking hadrian. - - -{ _nixpkgs ? import {} }: - -let - - nixpkgs = import (_nixpkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - rev = "e7a327da5cffdf5e77e1924906a4f0983591bd3e"; - sha256 = "1xzil4mayhggg2miwspbk12nihlszg0y4n6i4qacrxql5n75f0hr"; - }){ overlays = [cabalHashes]; }; - - - - cabalHashes = sel: super: { - all-cabal-hashes = super.fetchurl { - url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/b2b93ae610f5f1b51d22b191f972dc3dec8f94c6.tar.gz"; - sha256 = "0bffclpqbw62xff36qlzxghr042mhv0m06k5ml4298w6fv7ly1xw"; - }; - }; - - haskellPackages = nixpkgs.haskell.packages.ghc822; - - removeBuild = path: type: - let baseName = baseNameOf (toString path); - in - ! (baseName == "_build" - || baseName == "dist" - || baseName == "dist-newstyle" - || baseName == ".stack-work" - || baseName == "config.log" - || baseName == "config.status" - || baseName == "shell.nix" - || nixpkgs.lib.hasSuffix ".sh" baseName - || !(nixpkgs.lib.cleanSourceFilter path type)) ; - - filterSrc = path: builtins.filterSource removeBuild path; - - - hadrianPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - hadrian = localPackage "hadrian" ./. ; - happy = nixpkgs.haskell.lib.dontCheck (super.happy); - shake = self.callHackage "shake" "0.16.2" {}; - extra = self.callHackage "extra" "1.6.4" {}; - QuickCheck = self.callHackage "QuickCheck" "2.10" {}; - Cabal = localPackage "Cabal" ./../libraries/Cabal/Cabal ; - filepath = localPackage "filepath" ./../libraries/filepath ; - text = localPackage "text" ./../libraries/text ; - hpc = localPackage"hpc" ./../libraries/hpc ; - parsec = localPackage "parsec" ./../libraries/parsec ; - HUnit = nixpkgs.haskell.lib.dontCheck (self.callHackage "HUnit" "1.3.1.2" {}); - process = localPackage "process" ./../libraries/process ; - directory = localPackage "directory" ./../libraries/directory ; - }; }; - - cabalPackages = nixpkgs.haskell.packages.ghc822.override { - overrides = self: super: let - localPackage = name: path: self.callCabal2nix name (filterSrc path) {}; - in { - Cabal = localPackage "Cabal" ./../../cabal/Cabal ; - cabal-install = self.callPackage ./../../cabal/cabal-install.nix {}; - }; }; - - -in - nixpkgs.lib.overrideDerivation nixpkgs.haskell.packages.ghcHEAD.ghc - (drv: { - name = "ghc-dev"; - nativeBuildInputs = drv.nativeBuildInputs ++ - [ hadrianPackages.hadrian - nixpkgs.arcanist - nixpkgs.git - nixpkgs.gmp.dev nixpkgs.gmp.out - nixpkgs.ncurses.dev nixpkgs.ncurses.out - nixpkgs.python3Packages.sphinx - nixpkgs.texlive.combined.scheme-basic - (nixpkgs.haskell.packages.ghc822.ghcWithPackages - (ps: [ps.html ps.regex-compat ps.dump-core])) - - #cabalPackages.cabal-install - ]; - }) - From git at git.haskell.org Mon Dec 10 03:27:22 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 10 Dec 2018 03:27:22 +0000 (UTC) Subject: [commit: ghc] master: Fix minor mistake in comment about data decls. (4773b43) Message-ID: <20181210032722.D96A63ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4773b4308203a7f9d50a26831ccf56d8afe3c5e5/ghc >--------------------------------------------------------------- commit 4773b4308203a7f9d50a26831ccf56d8afe3c5e5 Author: Richard Eisenberg Date: Sun Dec 9 22:26:43 2018 -0500 Fix minor mistake in comment about data decls. Fixes #16024. [skip ci] >--------------------------------------------------------------- 4773b4308203a7f9d50a26831ccf56d8afe3c5e5 compiler/typecheck/TcInstDcls.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index e2150e7..2fb9857 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -784,8 +784,8 @@ tcDataFamHeader :: AssocInstInfo -> TyCon -> [Name] -> Maybe [LHsTyVarBndr GhcRn -> HsTyPats GhcRn -> Maybe (LHsKind GhcRn) -> [LConDecl GhcRn] -> TcM ([TyVar], [Type], Kind, ThetaType) -- The "header" is the part other than the data constructors themselves --- e.g. data instance D [a] :: * -> * = ... --- Here the "header" is the bit before the "=" sign +-- e.g. data instance D [a] :: * -> * where ... +-- Here the "header" is the bit before the "where" tcDataFamHeader mb_clsinfo fam_tc imp_vars mb_bndrs fixity hs_ctxt hs_pats m_ksig hs_cons = do { (imp_tvs, (exp_tvs, (stupid_theta, lhs_ty, res_kind))) <- pushTcLevelM_ $ From git at git.haskell.org Tue Dec 11 03:02:57 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:02:57 +0000 (UTC) Subject: [commit: ghc] circleci-centos: rts: Disable fallthrough attribute when compiling with Clang (515633e) Message-ID: <20181211030257.90F303ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/515633ebaef7fa1cc20322f01479f81e3fd96952/ghc >--------------------------------------------------------------- commit 515633ebaef7fa1cc20322f01479f81e3fd96952 Author: Ben Gamari Date: Mon Dec 10 21:48:51 2018 -0500 rts: Disable fallthrough attribute when compiling with Clang Apparently clang doesn't enable implicitly fallthrough warnings by default http://llvm.org/viewvc/llvm-project?revision=167655&view=revision when compiling C and the attribute cause warnings of their own (#16019). >--------------------------------------------------------------- 515633ebaef7fa1cc20322f01479f81e3fd96952 includes/Stg.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Stg.h b/includes/Stg.h index 9b54526..57cb00d 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -197,7 +197,11 @@ #endif /* Used to mark a switch case that falls-through */ -#if (defined(__GNUC__) && __GNUC__ >= 7) || defined(__clang__) +#if (defined(__GNUC__) && __GNUC__ >= 7) +// N.B. Don't enable fallthrough annotations when compiling with Clang. +// Apparently clang doesn't enable implicitly fallthrough warnings by default +// http://llvm.org/viewvc/llvm-project?revision=167655&view=revision +// when compiling C and the attribute cause warnings of their own (#16019). #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough) #else #define FALLTHROUGH ((void)0) From git at git.haskell.org Tue Dec 11 03:03:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:03:00 +0000 (UTC) Subject: [commit: ghc] circleci-centos: testsuite: Use explicit -e in sed command (6c98b9f) Message-ID: <20181211030300.8FB663ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/6c98b9f011351d486a4a723b4ad86472edbb0290/ghc >--------------------------------------------------------------- commit 6c98b9f011351d486a4a723b4ad86472edbb0290 Author: Ben Gamari Date: Sun Dec 9 11:05:52 2018 -0500 testsuite: Use explicit -e in sed command Otherwise Darwin's sed interprets the command as the suffix for -i. >--------------------------------------------------------------- 6c98b9f011351d486a4a723b4ad86472edbb0290 testsuite/tests/ghci/should_run/T15369.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/should_run/T15369.script b/testsuite/tests/ghci/should_run/T15369.script index 5232c6a..2ebed01 100644 --- a/testsuite/tests/ghci/should_run/T15369.script +++ b/testsuite/tests/ghci/should_run/T15369.script @@ -8,6 +8,6 @@ :all-types :l *T15369.hs :all-types -:! sed -i 's/Int/Double/g' T15369.hs +:! sed -i -e 's/Int/Double/g' T15369.hs :l *T15369.hs :all-types From git at git.haskell.org Tue Dec 11 03:03:03 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:03:03 +0000 (UTC) Subject: [commit: ghc] circleci-centos: utils/gen-dll: Bump containers upper bound (b6ccabe) Message-ID: <20181211030303.904433ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/b6ccabe3240bf0f2e67991748aa1ef6704c26ca5/ghc >--------------------------------------------------------------- commit b6ccabe3240bf0f2e67991748aa1ef6704c26ca5 Author: Ben Gamari Date: Sun Dec 9 15:28:52 2018 -0500 utils/gen-dll: Bump containers upper bound Fixes #16023. >--------------------------------------------------------------- b6ccabe3240bf0f2e67991748aa1ef6704c26ca5 utils/gen-dll/gen-dll.cabal.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gen-dll/gen-dll.cabal.in b/utils/gen-dll/gen-dll.cabal.in index 4dd7dc5..7c5c355 100644 --- a/utils/gen-dll/gen-dll.cabal.in +++ b/utils/gen-dll/gen-dll.cabal.in @@ -27,7 +27,7 @@ Executable gen-dll process >= 1.2 && < 1.9, filepath >= 1.3 && < 1.5, directory >= 1.1 && < 1.4, - containers >= 0.5 && < 0.6 + containers >= 0.5 && < 0.7 Extra-Libraries: Shell32 ghc-options: -UGEN_SXS -DHAS_GENLIB=@HAVE_GENLIB@ From git at git.haskell.org Tue Dec 11 03:03:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:03:07 +0000 (UTC) Subject: [commit: ghc] circleci-centos: CircleCI: Add configurations for Centos 7 and Debian 9 (ba85e38) Message-ID: <20181211030307.3D4503ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/ba85e38de91c1fc8c1bf93fcd2c71399bc369ab8/ghc >--------------------------------------------------------------- commit ba85e38de91c1fc8c1bf93fcd2c71399bc369ab8 Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- ba85e38de91c1fc8c1bf93fcd2c71399bc369ab8 .circleci/config.yml | 173 +++++++++++++++------ .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .circleci/images/update-image | 14 +- .../Dockerfile | 10 +- .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 8 files changed, 145 insertions(+), 64 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ba85e38de91c1fc8c1bf93fcd2c71399bc369ab8 From git at git.haskell.org Tue Dec 11 03:03:10 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:03:10 +0000 (UTC) Subject: [commit: ghc] circleci-centos: testsuite: Mark tickets identified in #15467 as broken (b1e2846) Message-ID: <20181211030310.327253ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/b1e2846f381e1db3b96f88d00c3c0d2ce18eb08e/ghc >--------------------------------------------------------------- commit b1e2846f381e1db3b96f88d00c3c0d2ce18eb08e Author: Ben Gamari Date: Mon Dec 10 22:01:48 2018 -0500 testsuite: Mark tickets identified in #15467 as broken >--------------------------------------------------------------- b1e2846f381e1db3b96f88d00c3c0d2ce18eb08e testsuite/tests/codeGen/should_compile/all.T | 2 +- testsuite/tests/codeGen/should_run/all.T | 8 ++++++-- testsuite/tests/concurrent/should_run/all.T | 2 +- testsuite/tests/rts/all.T | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 7a5e103..5bb5f82 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -23,7 +23,7 @@ test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, ['']) test('T8205', normal, compile, ['-O0']) test('T9155', normal, compile, ['-O2']) test('T9303', normal, compile, ['-O2']) -test('T9329', [cmm_src], compile, ['']) +test('T9329', [when(unregisterised, expect_broken(15467)), cmm_src], compile, ['']) test('debug', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))], diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 1dec2a6..0d5fcb9 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -72,8 +72,11 @@ test('cgrun065', normal, compile_and_run, ['']) test('cgrun066', normal, compile_and_run, ['']) test('cgrun067', [extra_files(['Cgrun067A.hs'])], compile_and_run, ['']) test('cgrun068', reqlib('random'), compile_and_run, ['']) -test('cgrun069', omit_ways(['ghci']), multi_compile_and_run, - ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) +test('cgrun069', + [when(unregisterised, expect_broken(15467)), + omit_ways(['ghci'])], + multi_compile_and_run, + ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) test('cgrun070', normal, compile_and_run, ['']) test('cgrun071', normal, compile_and_run, ['']) test('cgrun072', normal, compile_and_run, ['']) @@ -161,6 +164,7 @@ test('T12855', normal, compile_and_run, ['']) test('T9577', [ unless(arch('x86_64') or arch('i386'),skip), when(opsys('darwin'), expect_broken(12937)), when(opsys('mingw32'), expect_broken(12965)), + when(unregisterised, skip), only_ways(['normal']) ], compile_and_run, ['']) test('T13425', normal, compile_and_run, ['-O']) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 08f439c..19b69cc 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -36,7 +36,7 @@ test('T3279', normal, compile_and_run, ['']) # This test takes a long time with the default context switch interval test('T3429', [ extra_run_opts('+RTS -C0.001 -RTS'), - extra_ways(['debug_numa']) ], + unless(unregisterised, extra_ways(['debug_numa'])) ], compile_and_run, ['']) # without -O, goes into an infinite loop diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 6339344..6b0dccc 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -397,7 +397,7 @@ test('T10296a', [req_smp], run_command, test('T10296b', [only_ways('threaded2')], compile_and_run, ['']) -test('numa001', [ extra_run_opts('8'), extra_ways(['debug_numa']) ] +test('numa001', [ extra_run_opts('8'), unless(unregisterised, extra_ways(['debug_numa'])) ] , compile_and_run, ['']) test('T12497', [ unless(opsys('mingw32'), skip) @@ -423,6 +423,7 @@ test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O'] test('T14695', [normal, ignore_stderr] , run_command, ['$MAKE -s --no-print-directory T14695']) test('T14702', [ ignore_stdout + , when(unregisterised, skip) , only_ways(['threaded1', 'threaded2']) , extra_run_opts('+RTS -A32m -N8 -T -RTS') ] From git at git.haskell.org Tue Dec 11 03:03:12 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 03:03:12 +0000 (UTC) Subject: [commit: ghc] circleci-centos's head updated: testsuite: Mark tickets identified in #15467 as broken (b1e2846) Message-ID: <20181211030312.C731D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'circleci-centos' now includes: c00d2f5 hadrian: Drop nix build script 4773b43 Fix minor mistake in comment about data decls. 6c98b9f testsuite: Use explicit -e in sed command ba85e38 CircleCI: Add configurations for Centos 7 and Debian 9 b6ccabe utils/gen-dll: Bump containers upper bound 515633e rts: Disable fallthrough attribute when compiling with Clang b1e2846 testsuite: Mark tickets identified in #15467 as broken From git at git.haskell.org Tue Dec 11 05:28:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 05:28:35 +0000 (UTC) Subject: [commit: ghc] circleci-centos: CircleCI: Add configurations for Centos 7 and Debian 9 (905f35b) Message-ID: <20181211052835.437563ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/905f35b7e5949ffe599560cb541e7897bb85f8d5/ghc >--------------------------------------------------------------- commit 905f35b7e5949ffe599560cb541e7897bb85f8d5 Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- 905f35b7e5949ffe599560cb541e7897bb85f8d5 .circleci/config.yml | 175 +++++++++++++++------ .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .circleci/images/update-image | 14 +- .../Dockerfile | 10 +- .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 8 files changed, 147 insertions(+), 64 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 905f35b7e5949ffe599560cb541e7897bb85f8d5 From git at git.haskell.org Tue Dec 11 05:28:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 05:28:38 +0000 (UTC) Subject: [commit: ghc] circleci-centos: rts: Disable fallthrough attribute when compiling with Clang (dc34667) Message-ID: <20181211052838.397553ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/dc346674c4b5609e15560820b33e533e73213b32/ghc >--------------------------------------------------------------- commit dc346674c4b5609e15560820b33e533e73213b32 Author: Ben Gamari Date: Mon Dec 10 21:48:51 2018 -0500 rts: Disable fallthrough attribute when compiling with Clang Apparently clang doesn't enable implicitly fallthrough warnings by default http://llvm.org/viewvc/llvm-project?revision=167655&view=revision when compiling C and the attribute cause warnings of their own (#16019). >--------------------------------------------------------------- dc346674c4b5609e15560820b33e533e73213b32 includes/Stg.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Stg.h b/includes/Stg.h index 9b54526..57cb00d 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -197,7 +197,11 @@ #endif /* Used to mark a switch case that falls-through */ -#if (defined(__GNUC__) && __GNUC__ >= 7) || defined(__clang__) +#if (defined(__GNUC__) && __GNUC__ >= 7) +// N.B. Don't enable fallthrough annotations when compiling with Clang. +// Apparently clang doesn't enable implicitly fallthrough warnings by default +// http://llvm.org/viewvc/llvm-project?revision=167655&view=revision +// when compiling C and the attribute cause warnings of their own (#16019). #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough) #else #define FALLTHROUGH ((void)0) From git at git.haskell.org Tue Dec 11 05:28:41 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 05:28:41 +0000 (UTC) Subject: [commit: ghc] circleci-centos: testsuite: Mark tickets identified in #15467 as broken (5ef7619) Message-ID: <20181211052841.3355F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/5ef76195bbdd2459f1dd34636a8cce5a938c699c/ghc >--------------------------------------------------------------- commit 5ef76195bbdd2459f1dd34636a8cce5a938c699c Author: Ben Gamari Date: Mon Dec 10 22:01:48 2018 -0500 testsuite: Mark tickets identified in #15467 as broken >--------------------------------------------------------------- 5ef76195bbdd2459f1dd34636a8cce5a938c699c testsuite/tests/codeGen/should_compile/all.T | 3 ++- testsuite/tests/codeGen/should_run/all.T | 8 ++++++-- testsuite/tests/concurrent/T13615/all.T | 1 + testsuite/tests/concurrent/should_run/all.T | 2 +- testsuite/tests/rts/all.T | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 7a5e103..465a4a3 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -23,7 +23,7 @@ test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, ['']) test('T8205', normal, compile, ['-O0']) test('T9155', normal, compile, ['-O2']) test('T9303', normal, compile, ['-O2']) -test('T9329', [cmm_src], compile, ['']) +test('T9329', [when(unregisterised, expect_broken(15467)), cmm_src], compile, ['']) test('debug', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))], @@ -37,6 +37,7 @@ test('T12115', normal, compile, ['']) test('T12355', normal, compile, ['']) test('T14999', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261)), + when(unregisterised, skip), unless(opsys('linux') and arch('x86_64') and have_gdb() and have_readelf(), skip)], run_command, ['$MAKE -s --no-print-directory T14999']) diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 1dec2a6..0d5fcb9 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -72,8 +72,11 @@ test('cgrun065', normal, compile_and_run, ['']) test('cgrun066', normal, compile_and_run, ['']) test('cgrun067', [extra_files(['Cgrun067A.hs'])], compile_and_run, ['']) test('cgrun068', reqlib('random'), compile_and_run, ['']) -test('cgrun069', omit_ways(['ghci']), multi_compile_and_run, - ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) +test('cgrun069', + [when(unregisterised, expect_broken(15467)), + omit_ways(['ghci'])], + multi_compile_and_run, + ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) test('cgrun070', normal, compile_and_run, ['']) test('cgrun071', normal, compile_and_run, ['']) test('cgrun072', normal, compile_and_run, ['']) @@ -161,6 +164,7 @@ test('T12855', normal, compile_and_run, ['']) test('T9577', [ unless(arch('x86_64') or arch('i386'),skip), when(opsys('darwin'), expect_broken(12937)), when(opsys('mingw32'), expect_broken(12965)), + when(unregisterised, skip), only_ways(['normal']) ], compile_and_run, ['']) test('T13425', normal, compile_and_run, ['-O']) diff --git a/testsuite/tests/concurrent/T13615/all.T b/testsuite/tests/concurrent/T13615/all.T index 681f7b0..2ec8757 100644 --- a/testsuite/tests/concurrent/T13615/all.T +++ b/testsuite/tests/concurrent/T13615/all.T @@ -1,5 +1,6 @@ test('T13615', [when(fast(), skip), + when(unregisterised, skip), req_smp, # needs -N support only_ways(threaded_ways), extra_files(['Parallel.hs', 'Memo.hs']), diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 08f439c..19b69cc 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -36,7 +36,7 @@ test('T3279', normal, compile_and_run, ['']) # This test takes a long time with the default context switch interval test('T3429', [ extra_run_opts('+RTS -C0.001 -RTS'), - extra_ways(['debug_numa']) ], + unless(unregisterised, extra_ways(['debug_numa'])) ], compile_and_run, ['']) # without -O, goes into an infinite loop diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 6339344..a02c0fb 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -303,6 +303,7 @@ test('T9045', [ omit_ways(['ghci']), extra_run_opts('10000 +RTS -A8k -RTS') ], c test('T9078', only_ways(['threaded1']), compile_and_run, ['']) test('T10017', [ when(opsys('mingw32'), skip) + , when(unregisterised, skip) , req_smp , only_ways(threaded_ways), extra_run_opts('+RTS -N2 -RTS') ], compile_and_run, ['']) @@ -397,7 +398,7 @@ test('T10296a', [req_smp], run_command, test('T10296b', [only_ways('threaded2')], compile_and_run, ['']) -test('numa001', [ extra_run_opts('8'), extra_ways(['debug_numa']) ] +test('numa001', [ extra_run_opts('8'), unless(unregisterised, extra_ways(['debug_numa'])) ] , compile_and_run, ['']) test('T12497', [ unless(opsys('mingw32'), skip) @@ -423,6 +424,7 @@ test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O'] test('T14695', [normal, ignore_stderr] , run_command, ['$MAKE -s --no-print-directory T14695']) test('T14702', [ ignore_stdout + , when(unregisterised, skip) , only_ways(['threaded1', 'threaded2']) , extra_run_opts('+RTS -A32m -N8 -T -RTS') ] From git at git.haskell.org Tue Dec 11 05:28:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 05:28:44 +0000 (UTC) Subject: [commit: ghc] circleci-centos: utils/gen-dll: Bump containers upper bound (e6900f0) Message-ID: <20181211052844.309F83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : circleci-centos Link : http://ghc.haskell.org/trac/ghc/changeset/e6900f081a7bce47b7c6660a6510aeb021751fb1/ghc >--------------------------------------------------------------- commit e6900f081a7bce47b7c6660a6510aeb021751fb1 Author: Ben Gamari Date: Sun Dec 9 15:28:52 2018 -0500 utils/gen-dll: Bump containers upper bound Fixes #16023. >--------------------------------------------------------------- e6900f081a7bce47b7c6660a6510aeb021751fb1 utils/gen-dll/gen-dll.cabal.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gen-dll/gen-dll.cabal.in b/utils/gen-dll/gen-dll.cabal.in index 4dd7dc5..7c5c355 100644 --- a/utils/gen-dll/gen-dll.cabal.in +++ b/utils/gen-dll/gen-dll.cabal.in @@ -27,7 +27,7 @@ Executable gen-dll process >= 1.2 && < 1.9, filepath >= 1.3 && < 1.5, directory >= 1.1 && < 1.4, - containers >= 0.5 && < 0.6 + containers >= 0.5 && < 0.7 Extra-Libraries: Shell32 ghc-options: -UGEN_SXS -DHAS_GENLIB=@HAVE_GENLIB@ From git at git.haskell.org Tue Dec 11 11:26:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 11:26:17 +0000 (UTC) Subject: [commit: ghc] master: Fix #16008 with a pinch of addConsistencyConstraints (3899966) Message-ID: <20181211112617.DC4F43ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3899966e4613ec18f365c28d64e9acc163cc1165/ghc >--------------------------------------------------------------- commit 3899966e4613ec18f365c28d64e9acc163cc1165 Author: Ryan Scott Date: Tue Dec 11 06:22:49 2018 -0500 Fix #16008 with a pinch of addConsistencyConstraints Summary: #16008 happened because we forgot to typecheck nullary associated type family instances in a way that's consistent with the type variables bound by the parent class. Oops. Easily fixed with a use of `checkConsistencyConstraints`. Test Plan: make test TEST=T16008 Reviewers: simonpj, goldfire, bgamari Reviewed By: goldfire Subscribers: rwbarton, carter GHC Trac Issues: #16008 Differential Revision: https://phabricator.haskell.org/D5435 >--------------------------------------------------------------- 3899966e4613ec18f365c28d64e9acc163cc1165 compiler/typecheck/TcInstDcls.hs | 5 ++++- compiler/typecheck/TcTyClsDecls.hs | 16 ++++++++-------- testsuite/tests/typecheck/should_compile/T16008.hs | 16 ++++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index 2fb9857..c6628a5 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -793,7 +793,10 @@ tcDataFamHeader mb_clsinfo fam_tc imp_vars mb_bndrs fixity hs_ctxt hs_pats m_ksi bindImplicitTKBndrs_Q_Skol imp_vars $ bindExplicitTKBndrs_Q_Skol AnyKind exp_bndrs $ do { stupid_theta <- tcHsContext hs_ctxt - ; (lhs_ty, lhs_kind) <- tcFamTyPats fam_tc mb_clsinfo hs_pats + ; (lhs_ty, lhs_kind) <- tcFamTyPats fam_tc hs_pats + -- Ensure that the instance is consistent with its + -- parent class + ; addConsistencyConstraints mb_clsinfo lhs_ty ; mapM_ (wrapLocM_ kcConDecl) hs_cons ; res_kind <- tc_kind_sig m_ksig ; lhs_ty <- checkExpectedKindX pp_lhs lhs_ty lhs_kind res_kind diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index 877166d..cc9779a 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -18,7 +18,7 @@ module TcTyClsDecls ( kcConDecl, tcConDecls, dataDeclChecks, checkValidTyCon, tcFamTyPats, tcTyFamInstEqn, tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt, - unravelFamInstPats, + unravelFamInstPats, addConsistencyConstraints, wrongKindOfFamily ) where @@ -1741,7 +1741,7 @@ kcTyFamInstEqn tc_fam_tc ; discardResult $ bindImplicitTKBndrs_Q_Tv imp_vars $ bindExplicitTKBndrs_Q_Tv AnyKind (mb_expl_bndrs `orElse` []) $ - do { (_, res_kind) <- tcFamTyPats tc_fam_tc NotAssociated hs_pats + do { (_, res_kind) <- tcFamTyPats tc_fam_tc hs_pats ; tcCheckLHsType hs_rhs_ty res_kind } -- Why "_Tv" here? Consider (Trac #14066 -- type family Bar x y where @@ -1870,6 +1870,9 @@ tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty bindImplicitTKBndrs_Q_Skol imp_vars $ bindExplicitTKBndrs_Q_Skol AnyKind exp_bndrs $ do { (lhs_ty, rhs_kind) <- tc_lhs + -- Ensure that the instance is consistent with its + -- parent class (#16008) + ; addConsistencyConstraints mb_clsinfo lhs_ty ; rhs_ty <- tcCheckLHsType hs_rhs_ty rhs_kind ; return (lhs_ty, rhs_ty) } @@ -1900,7 +1903,7 @@ tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty (tyConKind fam_tc) ; return (mkTyConApp fam_tc args, rhs_kind) } | otherwise - = tcFamTyPats fam_tc mb_clsinfo hs_pats + = tcFamTyPats fam_tc hs_pats {- Note [Apparently-nullary families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1932,11 +1935,11 @@ Inferred quantifiers always come first. ----------------- -tcFamTyPats :: TyCon -> AssocInstInfo +tcFamTyPats :: TyCon -> HsTyPats GhcRn -- Patterns -> TcM (TcType, TcKind) -- (lhs_type, lhs_kind) -- Used for both type and data families -tcFamTyPats fam_tc mb_clsinfo hs_pats +tcFamTyPats fam_tc hs_pats = do { traceTc "tcFamTyPats {" $ vcat [ ppr fam_tc <+> dcolon <+> ppr fam_kind , text "arity:" <+> ppr fam_arity @@ -1951,9 +1954,6 @@ tcFamTyPats fam_tc mb_clsinfo hs_pats vcat [ ppr fam_tc <+> dcolon <+> ppr fam_kind , text "res_kind:" <+> ppr res_kind ] - -- Ensure that the instance is consistent its parent class - ; addConsistencyConstraints mb_clsinfo fam_app - ; return (fam_app, res_kind) } where fam_name = tyConName fam_tc diff --git a/testsuite/tests/typecheck/should_compile/T16008.hs b/testsuite/tests/typecheck/should_compile/T16008.hs new file mode 100644 index 0000000..26426e5 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16008.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} +module T16008 where + +import Data.Kind + +class C k where + type S :: k -> Type + +data D :: Type -> Type +data SD :: forall a. D a -> Type + +instance C (D a) where + type S = SD diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 99c2259..bebdc6c 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -655,3 +655,4 @@ test('T15586', normal, compile, ['']) test('T15368', normal, compile, ['-fdefer-type-errors']) test('T15778', normal, compile, ['']) test('T14761c', normal, compile, ['']) +test('T16008', normal, compile, ['']) From git at git.haskell.org Tue Dec 11 15:05:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 15:05:59 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Use explicit -e in sed command (3ab8234) Message-ID: <20181211150559.209AD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3ab8234a973598800e95d15e9beefa653318e90e/ghc >--------------------------------------------------------------- commit 3ab8234a973598800e95d15e9beefa653318e90e Author: Ben Gamari Date: Sun Dec 9 11:05:52 2018 -0500 testsuite: Use explicit -e in sed command Otherwise Darwin's sed interprets the command as the suffix for -i. >--------------------------------------------------------------- 3ab8234a973598800e95d15e9beefa653318e90e testsuite/tests/ghci/should_run/T15369.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/should_run/T15369.script b/testsuite/tests/ghci/should_run/T15369.script index 5232c6a..2ebed01 100644 --- a/testsuite/tests/ghci/should_run/T15369.script +++ b/testsuite/tests/ghci/should_run/T15369.script @@ -8,6 +8,6 @@ :all-types :l *T15369.hs :all-types -:! sed -i 's/Int/Double/g' T15369.hs +:! sed -i -e 's/Int/Double/g' T15369.hs :l *T15369.hs :all-types From git at git.haskell.org Tue Dec 11 15:06:16 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 15:06:16 +0000 (UTC) Subject: [commit: ghc] master: CircleCI: Add configurations for Centos 7 and Debian 9 (6eab7cd) Message-ID: <20181211150616.A6CC63ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6eab7cda23b5421895cd0ecb06d637e2fa054154/ghc >--------------------------------------------------------------- commit 6eab7cda23b5421895cd0ecb06d637e2fa054154 Author: Ben Gamari Date: Fri Dec 7 20:23:58 2018 -0500 CircleCI: Add configurations for Centos 7 and Debian 9 >--------------------------------------------------------------- 6eab7cda23b5421895cd0ecb06d637e2fa054154 .circleci/config.yml | 176 +++++++++++++++------ .../{i386-linux => i386-linux-deb8}/Dockerfile | 0 .circleci/images/update-image | 14 +- .../Dockerfile | 10 +- .../{x86_64-linux => x86_64-linux-deb8}/Dockerfile | 0 .../{x86_64-linux => x86_64-linux-deb9}/Dockerfile | 6 +- .../Dockerfile | 0 .gitlab-ci.yml | 6 +- 8 files changed, 148 insertions(+), 64 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6eab7cda23b5421895cd0ecb06d637e2fa054154 From git at git.haskell.org Tue Dec 11 15:06:31 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 15:06:31 +0000 (UTC) Subject: [commit: ghc] master: utils/gen-dll: Bump containers upper bound (e709c8f) Message-ID: <20181211150631.9BAD73ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e709c8f8d45c699840f5bab7c9ff71373a53b8b0/ghc >--------------------------------------------------------------- commit e709c8f8d45c699840f5bab7c9ff71373a53b8b0 Author: Ben Gamari Date: Sun Dec 9 15:28:52 2018 -0500 utils/gen-dll: Bump containers upper bound Fixes #16023. >--------------------------------------------------------------- e709c8f8d45c699840f5bab7c9ff71373a53b8b0 utils/gen-dll/gen-dll.cabal.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gen-dll/gen-dll.cabal.in b/utils/gen-dll/gen-dll.cabal.in index 4dd7dc5..7c5c355 100644 --- a/utils/gen-dll/gen-dll.cabal.in +++ b/utils/gen-dll/gen-dll.cabal.in @@ -27,7 +27,7 @@ Executable gen-dll process >= 1.2 && < 1.9, filepath >= 1.3 && < 1.5, directory >= 1.1 && < 1.4, - containers >= 0.5 && < 0.6 + containers >= 0.5 && < 0.7 Extra-Libraries: Shell32 ghc-options: -UGEN_SXS -DHAS_GENLIB=@HAVE_GENLIB@ From git at git.haskell.org Tue Dec 11 15:06:46 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 15:06:46 +0000 (UTC) Subject: [commit: ghc] master: rts: Disable fallthrough attribute when compiling with Clang (6a71add) Message-ID: <20181211150646.BFF9C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6a71add81d8f30b0caca0e869fb8e35787881c87/ghc >--------------------------------------------------------------- commit 6a71add81d8f30b0caca0e869fb8e35787881c87 Author: Ben Gamari Date: Mon Dec 10 21:48:51 2018 -0500 rts: Disable fallthrough attribute when compiling with Clang Apparently clang doesn't enable implicitly fallthrough warnings by default http://llvm.org/viewvc/llvm-project?revision=167655&view=revision when compiling C and the attribute cause warnings of their own (#16019). >--------------------------------------------------------------- 6a71add81d8f30b0caca0e869fb8e35787881c87 includes/Stg.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Stg.h b/includes/Stg.h index 9b54526..57cb00d 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -197,7 +197,11 @@ #endif /* Used to mark a switch case that falls-through */ -#if (defined(__GNUC__) && __GNUC__ >= 7) || defined(__clang__) +#if (defined(__GNUC__) && __GNUC__ >= 7) +// N.B. Don't enable fallthrough annotations when compiling with Clang. +// Apparently clang doesn't enable implicitly fallthrough warnings by default +// http://llvm.org/viewvc/llvm-project?revision=167655&view=revision +// when compiling C and the attribute cause warnings of their own (#16019). #define FALLTHROUGH GNU_ATTRIBUTE(fallthrough) #else #define FALLTHROUGH ((void)0) From git at git.haskell.org Tue Dec 11 15:07:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 15:07:02 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark tickets identified in #15467 as broken (4b30220) Message-ID: <20181211150702.30EC53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4b3022021d49778bcd29a57308dbe0a076549f1b/ghc >--------------------------------------------------------------- commit 4b3022021d49778bcd29a57308dbe0a076549f1b Author: Ben Gamari Date: Mon Dec 10 22:01:48 2018 -0500 testsuite: Mark tickets identified in #15467 as broken >--------------------------------------------------------------- 4b3022021d49778bcd29a57308dbe0a076549f1b testsuite/tests/codeGen/should_compile/all.T | 3 ++- testsuite/tests/codeGen/should_run/all.T | 8 ++++++-- testsuite/tests/concurrent/T13615/all.T | 1 + testsuite/tests/concurrent/should_run/all.T | 2 +- testsuite/tests/rts/all.T | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 7a5e103..465a4a3 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -23,7 +23,7 @@ test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, ['']) test('T8205', normal, compile, ['-O0']) test('T9155', normal, compile, ['-O2']) test('T9303', normal, compile, ['-O2']) -test('T9329', [cmm_src], compile, ['']) +test('T9329', [when(unregisterised, expect_broken(15467)), cmm_src], compile, ['']) test('debug', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))], @@ -37,6 +37,7 @@ test('T12115', normal, compile, ['']) test('T12355', normal, compile, ['']) test('T14999', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261)), + when(unregisterised, skip), unless(opsys('linux') and arch('x86_64') and have_gdb() and have_readelf(), skip)], run_command, ['$MAKE -s --no-print-directory T14999']) diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 1dec2a6..0d5fcb9 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -72,8 +72,11 @@ test('cgrun065', normal, compile_and_run, ['']) test('cgrun066', normal, compile_and_run, ['']) test('cgrun067', [extra_files(['Cgrun067A.hs'])], compile_and_run, ['']) test('cgrun068', reqlib('random'), compile_and_run, ['']) -test('cgrun069', omit_ways(['ghci']), multi_compile_and_run, - ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) +test('cgrun069', + [when(unregisterised, expect_broken(15467)), + omit_ways(['ghci'])], + multi_compile_and_run, + ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) test('cgrun070', normal, compile_and_run, ['']) test('cgrun071', normal, compile_and_run, ['']) test('cgrun072', normal, compile_and_run, ['']) @@ -161,6 +164,7 @@ test('T12855', normal, compile_and_run, ['']) test('T9577', [ unless(arch('x86_64') or arch('i386'),skip), when(opsys('darwin'), expect_broken(12937)), when(opsys('mingw32'), expect_broken(12965)), + when(unregisterised, skip), only_ways(['normal']) ], compile_and_run, ['']) test('T13425', normal, compile_and_run, ['-O']) diff --git a/testsuite/tests/concurrent/T13615/all.T b/testsuite/tests/concurrent/T13615/all.T index 681f7b0..2ec8757 100644 --- a/testsuite/tests/concurrent/T13615/all.T +++ b/testsuite/tests/concurrent/T13615/all.T @@ -1,5 +1,6 @@ test('T13615', [when(fast(), skip), + when(unregisterised, skip), req_smp, # needs -N support only_ways(threaded_ways), extra_files(['Parallel.hs', 'Memo.hs']), diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 08f439c..19b69cc 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -36,7 +36,7 @@ test('T3279', normal, compile_and_run, ['']) # This test takes a long time with the default context switch interval test('T3429', [ extra_run_opts('+RTS -C0.001 -RTS'), - extra_ways(['debug_numa']) ], + unless(unregisterised, extra_ways(['debug_numa'])) ], compile_and_run, ['']) # without -O, goes into an infinite loop diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 6339344..a02c0fb 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -303,6 +303,7 @@ test('T9045', [ omit_ways(['ghci']), extra_run_opts('10000 +RTS -A8k -RTS') ], c test('T9078', only_ways(['threaded1']), compile_and_run, ['']) test('T10017', [ when(opsys('mingw32'), skip) + , when(unregisterised, skip) , req_smp , only_ways(threaded_ways), extra_run_opts('+RTS -N2 -RTS') ], compile_and_run, ['']) @@ -397,7 +398,7 @@ test('T10296a', [req_smp], run_command, test('T10296b', [only_ways('threaded2')], compile_and_run, ['']) -test('numa001', [ extra_run_opts('8'), extra_ways(['debug_numa']) ] +test('numa001', [ extra_run_opts('8'), unless(unregisterised, extra_ways(['debug_numa'])) ] , compile_and_run, ['']) test('T12497', [ unless(opsys('mingw32'), skip) @@ -423,6 +424,7 @@ test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O'] test('T14695', [normal, ignore_stderr] , run_command, ['$MAKE -s --no-print-directory T14695']) test('T14702', [ ignore_stdout + , when(unregisterised, skip) , only_ways(['threaded1', 'threaded2']) , extra_run_opts('+RTS -A32m -N8 -T -RTS') ] From git at git.haskell.org Tue Dec 11 23:21:15 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:15 +0000 (UTC) Subject: [commit: ghc] master: circleci: Add integer-simple build target (50f0cd4) Message-ID: <20181211232115.5F5453ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/50f0cd4647ffc6300c762375419831a11f8648e6/ghc >--------------------------------------------------------------- commit 50f0cd4647ffc6300c762375419831a11f8648e6 Author: Ben Gamari Date: Tue Dec 11 13:01:00 2018 -0500 circleci: Add integer-simple build target Fixes #15915. >--------------------------------------------------------------- 50f0cd4647ffc6300c762375419831a11f8648e6 .circleci/config.yml | 27 ++++++++++++++++++++++++++- .circleci/prepare-system.sh | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8eb1362..5bf0336 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -182,6 +182,29 @@ jobs: - *store_test_artifacts - *push_perf_note + "validate-x86_64-linux-deb9-integer-simple": + resource_class: xlarge + docker: + - image: ghcci/x86_64-linux-deb9:0.1 + environment: + <<: *buildenv + INTEGER_LIBRARY: integer-simple + GHC_COLLECTOR_FLAVOR: x86_64-linux-deb9 + steps: + - checkout + - *set_git_identity + - *prepare + - *submodules + - *boot + - *configure_unix + - *make + - *bindist + - *store_bindist + - *test + - *store_test_results + - *store_test_artifacts + - *push_perf_note + "validate-x86_64-linux-deb9": resource_class: xlarge docker: @@ -189,7 +212,7 @@ jobs: environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: x86_64-linux-deb9 - TEST_ENV: x86_64-linux + TEST_ENV: x86_64-linux-deb9 steps: - checkout - *set_git_identity @@ -441,6 +464,8 @@ workflows: - validate-x86_64-linux-deb8-unreg - validate-x86_64-linux-deb8-llvm - validate-x86_64-linux-deb8-debug + - validate-x86_64-linux-deb9 + - validate-x86_64-linux-deb9-integer-simple - slow-validate-x86_64-linux-deb8 notify: diff --git a/.circleci/prepare-system.sh b/.circleci/prepare-system.sh index 9a16c01..d424243 100755 --- a/.circleci/prepare-system.sh +++ b/.circleci/prepare-system.sh @@ -11,6 +11,7 @@ hackage_index_state="@1522046735" if [[ -z ${BUILD_SPHINX_HTML:-} ]]; then BUILD_SPHINX_HTML=YES; fi if [[ -z ${BUILD_SPHINX_PDF:-} ]]; then BUILD_SPHINX_PDF=YES; fi +if [[ -z ${INTEGER_LIBRARY:-} ]]; then INTEGER_LIBRARY=integer-gmp; fi cat > mk/build.mk < Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4efafe7e5288532b385bbfe3cd684ddcda0f3b0a/ghc >--------------------------------------------------------------- commit 4efafe7e5288532b385bbfe3cd684ddcda0f3b0a Author: David Eichmann Date: Tue Dec 11 13:02:25 2018 -0500 Revert dynamically linking ghc. Building a dynamically linked ghc is broken do to incorrectly building and installing libffi. This disables building a dynamically linked ghc and ghc-iserv-dyn while keeping most of the code in the relevant commits: 79d5427e1 and 89fa34ecd Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default`. Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter GHC Trac Issues: #15837 Differential Revision: https://phabricator.haskell.org/D5430 >--------------------------------------------------------------- 4efafe7e5288532b385bbfe3cd684ddcda0f3b0a hadrian/src/Rules/Program.hs | 4 +++- hadrian/src/Rules/Test.hs | 6 +++++- hadrian/src/Settings/Builders/Ghc.hs | 23 +++++++++++++---------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs index 316cc44..32e7496 100644 --- a/hadrian/src/Rules/Program.hs +++ b/hadrian/src/Rules/Program.hs @@ -46,7 +46,9 @@ getProgramContexts stage = do -- iserv gets its names from Packages.hs:programName let allCtxs = [ vanillaContext stage pkg , Context stage pkg profiling - , Context stage pkg dynamic + -- TODO Dynamic way has been reverted as the dynamic build is + -- broken. See #15837. + -- , Context stage pkg dynamic ] forM allCtxs $ \ctx -> do name <- programName ctx diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index b72c1b9..461a95f 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -113,7 +113,11 @@ needIservBins = do rtsways <- interpretInContext (vanillaContext Stage1 ghc) getRtsWays need =<< traverse programPath [ Context Stage1 iserv w - | w <- [vanilla, profiling, dynamic] + | w <- [vanilla, profiling + -- TODO dynamic way has been reverted as the dynamic build + -- is broken. See #15837. + -- , dynamic + ] , w `elem` rtsways ] diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 04aea32..b656d1f 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -155,13 +155,16 @@ includeGhcArgs = do -- Check if building dynamically is required. GHC is a special case that needs -- to be built dynamically if any of the RTS ways is dynamic. requiresDynamic :: Expr Bool -requiresDynamic = do - pkg <- getPackage - way <- getWay - rtsWays <- getRtsWays - let - dynRts = any (Dynamic `wayUnit`) rtsWays - dynWay = Dynamic `wayUnit` way - return $ if pkg == ghc - then dynRts || dynWay - else dynWay +requiresDynamic = wayUnit Dynamic <$> getWay + -- TODO This logic has been reverted as the dynamic build is broken. + -- See #15837. + -- + -- pkg <- getPackage + -- way <- getWay + -- rtsWays <- getRtsWays + -- let + -- dynRts = any (Dynamic `wayUnit`) rtsWays + -- dynWay = Dynamic `wayUnit` way + -- return $ if pkg == ghc + -- then dynRts || dynWay + -- else dynWay From git at git.haskell.org Tue Dec 11 23:21:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:21 +0000 (UTC) Subject: [commit: ghc] master: Add +RTS -F to the --help output (015dd8a) Message-ID: <20181211232121.513CD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/015dd8ab64e2cf8dd82845fec9b1daf5fedbf55b/ghc >--------------------------------------------------------------- commit 015dd8ab64e2cf8dd82845fec9b1daf5fedbf55b Author: Simon Marlow Date: Tue Dec 11 13:02:37 2018 -0500 Add +RTS -F to the --help output Test Plan: `./inplace/bin/ghc-stage2 +RTS --help" Reviewers: bgamari, sgraf, erikd Reviewed By: sgraf Subscribers: adamse, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5428 >--------------------------------------------------------------- 015dd8ab64e2cf8dd82845fec9b1daf5fedbf55b rts/RtsFlags.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 0aa0b62..78e70dd 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -284,6 +284,8 @@ usage_text[] = { " -A Sets the minimum allocation area size (default 1m) Egs: -A20m -A10k", " -AL Sets the amount of large-object memory that can be allocated", " before a GC is triggered (default: the value of -A)", +" -F Sets the collecting threshold for old generations as a factor of" +" the live data in that generation the last time it was collected." " -n Allocation area chunk size (0 = disabled, default: 0)", " -O Sets the minimum size of the old generation (default 1M)", " -M Sets the maximum heap size (default unlimited) Egs: -M256k -M1G", From git at git.haskell.org Tue Dec 11 23:21:24 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:24 +0000 (UTC) Subject: [commit: ghc] master: configure: Don't use ln -v (066d398) Message-ID: <20181211232124.554113ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/066d3989a45003d2caaf96fab90ec30b55a647ee/ghc >--------------------------------------------------------------- commit 066d3989a45003d2caaf96fab90ec30b55a647ee Author: Ben Gamari Date: Tue Dec 11 13:02:50 2018 -0500 configure: Don't use ln -v There's no reason why we need to print the linked files and apparently ln on OpenBSD doesn't support -v. Fixes #15946. Test Plan: Validate Reviewers: monoidal Reviewed By: monoidal Subscribers: rwbarton, erikd, carter GHC Trac Issues: #15946 Differential Revision: https://phabricator.haskell.org/D5425 >--------------------------------------------------------------- 066d3989a45003d2caaf96fab90ec30b55a647ee configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 2cf98a7..0ff192a 100644 --- a/configure.ac +++ b/configure.ac @@ -673,11 +673,11 @@ dnl -------------------------------------------------------------- dnl ** Copy the files from the "fs" utility into the right folders. dnl -------------------------------------------------------------- AC_MSG_NOTICE([Creating links for in-tree file handling routines.]) -ln -f -v utils/fs/fs.* utils/lndir/ -ln -f -v utils/fs/fs.* utils/unlit/ -ln -f -v utils/fs/fs.* rts/ -ln -f -v utils/fs/fs.h libraries/base/include/ -ln -f -v utils/fs/fs.c libraries/base/cbits/ +ln -f utils/fs/fs.* utils/lndir/ +ln -f utils/fs/fs.* utils/unlit/ +ln -f utils/fs/fs.* rts/ +ln -f utils/fs/fs.h libraries/base/include/ +ln -f utils/fs/fs.c libraries/base/cbits/ AC_MSG_NOTICE([Routines in place. Packages can now be build normally.]) dnl -------------------------------------------------------------- From git at git.haskell.org Tue Dec 11 23:21:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:27 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: simple targets for building libraries and executables (7491ced) Message-ID: <20181211232127.A2F5B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7491cedb20d15a54e905205c51aea72a13ac73aa/ghc >--------------------------------------------------------------- commit 7491cedb20d15a54e905205c51aea72a13ac73aa Author: Alp Mestanogullari Date: Tue Dec 11 13:10:03 2018 -0500 Hadrian: simple targets for building libraries and executables This patch introduces (phony) build targets of the form (1) stage:: (e.g: stage1:lib:Cabal) (2) stage:: (e.g: stage2:exe:ghc-bin) where (1) builds the given library with the stage N compiler and (2) builds the given executable with the stage N-1 compiler. This patch may be generating too many such targets but it's a first stab that we can refine. This fixes #15949. Test Plan: hadrian/build.sh stage1:exe:ghc-bin Reviewers: bgamari, snowleopard Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15949 Differential Revision: https://phabricator.haskell.org/D5434 >--------------------------------------------------------------- 7491cedb20d15a54e905205c51aea72a13ac73aa hadrian/README.md | 30 +++++++++++++++++++++++ hadrian/hadrian.cabal | 1 + hadrian/src/Rules.hs | 2 ++ hadrian/src/Rules/SimpleTargets.hs | 49 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) diff --git a/hadrian/README.md b/hadrian/README.md index b88d08d..7bd5fa8 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -110,6 +110,36 @@ by Shake oracles. The Make-based build system uses `mk/build.mk` to specify user build settings. We use `hadrian/UserSettings.hs` for the same purpose, see [documentation](doc/user-settings.md). +#### Building libraries and executables + +You can build a specific library or executable for a given stage by doing +`build stage::`. Examples: + +``` sh +# build the stage 1 GHC compiler (the executable), the binary will be placed +# under _build/stage0/bin/ghc (because it is built by the stage0 compiler). +build stage1:exe:ghc-bin + +# build the stage 2 GHC compiler, the binary will be placed under +# _build/stage1/bin/ghc (because it is built by the stage1 compiler). +build stage2:exe:ghc-bin + +# build the ghc library with the boot compiler, and register it +# in the package database under _build/stage0/lib. +build stage0:lib:ghc + +# build the Cabal library with the stage 1 compiler and register it +# in the package database under _build/stage1/lib. + +# build the text library with the stage 2 compiler and register it +# in the package database under _build/stage2/lib. +build stage2:lib:text + +# build the stage 2 haddock executable and place the program under +# _build/stage1/haddock. +build stage2:exe:haddock +``` + #### Clean and full rebuild * `build clean` removes all build artefacts. diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index c70c215..669d16c 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -67,6 +67,7 @@ executable hadrian , Rules.Program , Rules.Register , Rules.Selftest + , Rules.SimpleTargets , Rules.SourceDist , Rules.Test , Settings diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs index 69a151c..e51dae4 100644 --- a/hadrian/src/Rules.hs +++ b/hadrian/src/Rules.hs @@ -20,6 +20,7 @@ import qualified Rules.Libffi import qualified Rules.Library import qualified Rules.Program import qualified Rules.Register +import qualified Rules.SimpleTargets import Settings import Target import UserSettings @@ -109,6 +110,7 @@ packageRules = do let vanillaContexts = liftM2 vanillaContext allStages knownPackages forM_ vanillaContexts Rules.Generate.generatePackageCode + Rules.SimpleTargets.simplePackageTargets buildRules :: Rules () buildRules = do diff --git a/hadrian/src/Rules/SimpleTargets.hs b/hadrian/src/Rules/SimpleTargets.hs new file mode 100644 index 0000000..d005043 --- /dev/null +++ b/hadrian/src/Rules/SimpleTargets.hs @@ -0,0 +1,49 @@ +module Rules.SimpleTargets (simplePackageTargets) where + +import Base +import Context +import Packages +import Settings + +import Data.Foldable + +-- | Simple aliases for library and executable targets. +-- +-- - @stage:lib:@ will build library @name@ with +-- the stage N compiler, putting the result under +-- @/stage/lib at . +-- - @stage:exe:@ will build executable @name@ +-- with the stage N-1 compiler, putting the result under +-- @/stage/bin. +simplePackageTargets :: Rules () +simplePackageTargets = traverse_ simpleTarget targets + + where targets = [ (stage, target) + | stage <- [minBound..maxBound] + , target <- knownPackages + ] + +simpleTarget :: (Stage, Package) -> Rules () +simpleTarget (stage, target) = do + let tgt = intercalate ":" [stagestr, typ, pkgname] + tgt ~> do + p <- getTargetPath stage target + need [ p ] + + where typ = if isLibrary target then "lib" else "exe" + stagestr = stageString stage + pkgname = pkgName target + +getTargetPath :: Stage -> Package -> Action FilePath +getTargetPath stage pkg + | isLibrary pkg = getLibraryPath stage pkg + | otherwise = getProgramPath stage pkg + +getLibraryPath :: Stage -> Package -> Action FilePath +getLibraryPath stage pkg = pkgConfFile (vanillaContext stage pkg) + +getProgramPath :: Stage -> Package -> Action FilePath +getProgramPath Stage0 _ = + error ("Cannot build a stage 0 executable target: " ++ + "it is the boot compiler's toolchain") +getProgramPath stage pkg = programPath (vanillaContext (pred stage) pkg) From git at git.haskell.org Tue Dec 11 23:21:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:30 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: ability to run a subset of the testsuite (a5e76a0) Message-ID: <20181211232130.EA5683ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a5e76a073afc8ffdde274a4cb3d09847f2d35be9/ghc >--------------------------------------------------------------- commit a5e76a073afc8ffdde274a4cb3d09847f2d35be9 Author: Alp Mestanogullari Date: Tue Dec 11 13:11:32 2018 -0500 Hadrian: ability to run a subset of the testsuite This was supposed to be working already but didn't work when we specified several tests with --only. This patch not only fixes this but also makes it possible to specify a subset of tests to run with the TEST environment variable, like the make build system. Here are some examples: hadrian/build.sh test --only=plugins01 hadrian/build.sh test --only="plugins01 plugins02" TEST="plugins01 plugins02" hadrian/build.sh test TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02" When both the TEST environment variable and the --only flag are used, we simply concatenate the list of tests from both sources and ask the testsuite driver to run them all. This patch addresses #16026. Test Plan: hadrian/build.sh test --only="plugins01 plugins02" Reviewers: bgamari, snowleopard Reviewed By: bgamari, snowleopard Subscribers: rwbarton, carter GHC Trac Issues: #16026 Differential Revision: https://phabricator.haskell.org/D5431 >--------------------------------------------------------------- a5e76a073afc8ffdde274a4cb3d09847f2d35be9 hadrian/README.md | 14 ++-- hadrian/doc/testsuite.md | 130 +++++++++++++++++++++++++++++++ hadrian/src/CommandLine.hs | 9 ++- hadrian/src/Settings/Builders/RunTest.hs | 6 +- 4 files changed, 144 insertions(+), 15 deletions(-) diff --git a/hadrian/README.md b/hadrian/README.md index 7bd5fa8..c88d98e 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -170,16 +170,12 @@ workflow, for now. #### Testing -* `build validate` runs GHC tests by simply executing `make fast` in `testsuite/tests` -directory. This can be used instead of `sh validate --fast --no-clean` in the existing -build system. Note: this will rebuild Stage2 GHC, `ghc-pkg` and `hpc` if they are out of date. +To run GHC's testsuite, use `build test`. See +[doc/testsuite.md](doc/testsuite.md) to learn about all the options +you can use to mimic what the Make build system offers. -* `build test` runs GHC tests by calling the `testsuite/driver/runtests.py` python -script with appropriate flags. The current implementation is limited and cannot -replace the `validate` script (see [#187][validation-issue]). - -* `build selftest` runs tests of the build system. Current test coverage is close to -zero (see [#197][test-issue]). +`build selftest` runs tests of the build system. Current test coverage +is close to zero (see [#197][test-issue]). Troubleshooting --------------- diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md new file mode 100644 index 0000000..bdc7186 --- /dev/null +++ b/hadrian/doc/testsuite.md @@ -0,0 +1,130 @@ +# Running the testsuite + +## Quickstart + +The simplest way to run the testsuite is + +``` sh +# assuming 'build' is the build script you're using +# (hadrian/build.sh, hadrian/build.bat, ...) +build test +``` + +This is the equivalent of running `make test` with the +Make build system: it will run the entire testsuite in +normal mode (as opposed to slow or fast). If you have not +built GHC before, this will also build a stage 2 GHC in +the default flavour along with many libraries and programs +needed by the tests. + +## Running only a subset of the testsuite + +You can use the `TEST` environment variable, like with the +Make build system, or the `--only=...` command line argument. +This is best illustrated with examples: + +``` sh +# only run the test named 'sometest' +build test --only=sometest + +# only run 'test1' and 'test2' +build test --only="test1 test2" + +# only run 'sometest' +TEST=sometest build test + +# only run 'test1' and 'test2' +TEST="test1 test2" build test + +# only run 'test1', 'test2', 'test3' and 'test4' +TEST="test1 test2" build test --only="test3 test4" +``` + +## Performance tests + +You can use the `--only-perf` and `--skip-perf` flags to +respectively run only the performance tests or everything +but the performance tests. + +``` sh +# just performance tests, equivalent to: +# make test ONLY_PERF_TESTS=YES +build test --only-perf + +# skip performance tests, equivalent to: +# make test SKIP_PERF_TESTS=YES +build test --skip-perf +``` + +## Test speed + +You can run the tests in `slow`, `normal` (default) or `fast` +mode using `--test-speed={slow, normal, fast}`. + +``` sh +# equivalent to: make slowtest +build test --test-speed=slow + +# equivalent to: make test +build test --test-speed=normal + +# equivalent to: make fasttest +build test --test-speed=fast +``` + +## Test ways + +You can specify which test ways to use using `--test-way=`, +once per way that you want to run. + +``` sh +# equivalent to: make test WAY=ghci +build test --test-way=ghci + +# equivalent to: make test WAY=ghci WAY=hpc +build test --test-way=ghci --test-way=hpc +``` + +## Misc. + +``` + --summary[=TEST_SUMMARY] +``` +Where to output the test summary file. + +--- + +``` + --test-verbose[=TEST_VERBOSE] +``` +A verbosity value between 0 and 5. 0 is silent, 4 and higher +activates extra output. + +--- + +``` + --test-compiler[=TEST_COMPILER] +``` +Use given compiler [Default=stage2]. + +--- + +``` + --test-config-file[=CONFIG_FILE] +``` +Configuration file for testsuite. Default is +`testsuite/config/ghc` + +--- + +``` + --config[=EXTRA_TEST_CONFIG] +``` +Configurations to run test, in `key=value` format. + +--- + +``` + --summary-junit[=TEST_SUMMARY_JUNIT] +``` +Output testsuite summary in JUnit format. diff --git a/hadrian/src/CommandLine.hs b/hadrian/src/CommandLine.hs index 36f3818..1f940f2 100644 --- a/hadrian/src/CommandLine.hs +++ b/hadrian/src/CommandLine.hs @@ -46,7 +46,7 @@ data TestArgs = TestArgs , testConfigFile :: String , testConfigs :: [String] , testJUnit :: Maybe FilePath - , testOnly :: Maybe String + , testOnly :: [String] , testOnlyPerf :: Bool , testSkipPerf :: Bool , testSpeed :: TestSpeed @@ -62,7 +62,7 @@ defaultTestArgs = TestArgs , testConfigFile = "testsuite/config/ghc" , testConfigs = [] , testJUnit = Nothing - , testOnly = Nothing + , testOnly = [] , testOnlyPerf = False , testSkipPerf = False , testSpeed = Fast @@ -142,7 +142,10 @@ readTestJUnit :: Maybe String -> Either String (CommandLineArgs -> CommandLineAr readTestJUnit filepath = Right $ \flags -> flags { testArgs = (testArgs flags) { testJUnit = filepath } } readTestOnly :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs) -readTestOnly tests = Right $ \flags -> flags { testArgs = (testArgs flags) { testOnly = tests } } +readTestOnly tests = Right $ \flags -> + flags { testArgs = (testArgs flags) { testOnly = tests' } } + + where tests' = maybe [] words tests readTestOnlyPerf :: Either String (CommandLineArgs -> CommandLineArgs) readTestOnlyPerf = Right $ \flags -> flags { testArgs = (testArgs flags) { testOnlyPerf = True } } diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 734fecd..6188b64 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -129,14 +129,14 @@ runTestBuilderArgs = builder RunTest ? do -- | Command line arguments for running GHC's test script. getTestArgs :: Args getTestArgs = do + -- targets specified in the TEST env var + testEnvTargets <- maybe [] words <$> expr (liftIO $ lookupEnv "TEST") args <- expr $ userSetting defaultTestArgs bindir <- expr $ setBinaryDirectory (testCompiler args) compiler <- expr $ setCompiler (testCompiler args) globalVerbosity <- shakeVerbosity <$> expr getShakeOptions let configFileArg= ["--config-file=" ++ (testConfigFile args)] - testOnlyArg = case testOnly args of - Just cases -> map ("--only=" ++) (words cases) - Nothing -> [] + testOnlyArg = map ("--only=" ++) (testOnly args ++ testEnvTargets) onlyPerfArg = if testOnlyPerf args then Just "--only-perf-tests" else Nothing From git at git.haskell.org Tue Dec 11 23:21:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:33 +0000 (UTC) Subject: [commit: ghc] master: circleci: ignore gitlab branches for all jobs in the validate workflow (d7cb230) Message-ID: <20181211232133.E57363ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d7cb230ad8784ff9cacc6f7734ae71e8da72c93b/ghc >--------------------------------------------------------------- commit d7cb230ad8784ff9cacc6f7734ae71e8da72c93b Author: Alp Mestanogullari Date: Tue Dec 11 13:11:46 2018 -0500 circleci: ignore gitlab branches for all jobs in the validate workflow Our previous attempt ended up breaking the CircleCI config, but this one has been tested, see: https://circleci.com/gh/ghc/ghc/tree/alp%2Fcircleci%2Fignore-gitlab-branches which shows the builds getting triggered correctly. I also pushed the same branch under 'gitlab/alp/test', and that didn't trigger any build, as desired. Reviewers: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5429 >--------------------------------------------------------------- d7cb230ad8784ff9cacc6f7734ae71e8da72c93b .circleci/config.yml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5bf0336..d455940 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,10 +102,12 @@ aliases: - &store_bindist store_artifacts: path: ghc.tar.xz - - &trigger_on_tags - filters: - tags: - only: /^ghc-.*/ + - &only_release_tags + tags: + only: /^ghc-.*/ + - &ignore_gitlab_branches + branches: + ignore: /^gitlab\/.*/ jobs: "validate-x86_64-freebsd": @@ -434,23 +436,34 @@ workflows: validate: jobs: - validate-x86_64-linux-deb8: - *trigger_on_tags + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] # FreeBSD disabled: https://github.com/haskell/unix/issues/102 # - validate-x86_64-freebsd - validate-x86_64-darwin: - *trigger_on_tags - - validate-x86_64-linux-deb8-llvm + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] + - validate-x86_64-linux-deb8-llvm: + filters: + <<: *ignore_gitlab_branches - validate-i386-linux-deb8: - *trigger_on_tags + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] - validate-x86_64-linux-deb9: - *trigger_on_tags + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] - validate-i386-linux-deb9: - *trigger_on_tags + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] - validate-x86_64-linux-centos7: - *trigger_on_tags - - validate-hadrian-x86_64-linux-deb8 + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] + - validate-hadrian-x86_64-linux-deb8: + filters: + <<: *ignore_gitlab_branches - validate-x86_64-linux-fedora27: - *trigger_on_tags + filters: + <<: [*only_release_tags, *ignore_gitlab_branches] nightly: triggers: From git at git.haskell.org Tue Dec 11 23:21:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:37 +0000 (UTC) Subject: [commit: ghc] master: cosmetic change: expandtab in utils/hp2ps/HpFile.c (0ff5ecf) Message-ID: <20181211232137.07CD13ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/0ff5ecfbc543d80d1668fec460df90b98d563898/ghc >--------------------------------------------------------------- commit 0ff5ecfbc543d80d1668fec460df90b98d563898 Author: Zejun Wu Date: Tue Dec 11 13:15:13 2018 -0500 cosmetic change: expandtab in utils/hp2ps/HpFile.c rGHCbba2b9bf2d69700dc114118658507aaac34c5e62 expand tabs in utils/hp2ps/HpFile.c with tabwidth 2, but the code was written as tabwidth 8. This change simply retabs the code with tabwidth 8 and removes trailing spaces. Test Plan: Tested in stacked diff: {D5388} Reviewers: simonmar, bgamari, afarmer, tdammers Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5407 >--------------------------------------------------------------- 0ff5ecfbc543d80d1668fec460df90b98d563898 utils/hp2ps/HpFile.c | 404 +++++++++++++++++++++++++-------------------------- 1 file changed, 202 insertions(+), 202 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0ff5ecfbc543d80d1668fec460df90b98d563898 From git at git.haskell.org Tue Dec 11 23:21:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:40 +0000 (UTC) Subject: [commit: ghc] master: Fix uninformative hp2ps error when the cmdline contains double quotes (0136906) Message-ID: <20181211232140.CB98C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/0136906c9e69b02cd1ffe2704fa5d737d8c4cfaf/ghc >--------------------------------------------------------------- commit 0136906c9e69b02cd1ffe2704fa5d737d8c4cfaf Author: Zejun Wu Date: Tue Dec 11 13:18:03 2018 -0500 Fix uninformative hp2ps error when the cmdline contains double quotes Reapply D5346 with fix incompatible shell quoting in tests. It seems like `$'string'` is not recognized under all test environments, so let's avoid it in tests. Test Plan: ``` hp2ps: "T15904".hp, line 2: integer must follow identifier ``` use new ghc and hp2ps to profile a simple program. Reviewers: simonmar, bgamari, erikd, tdammers Reviewed By: bgamari Subscribers: tdammers, carter, rwbarton GHC Trac Issues: #15904 Differential Revision: https://phabricator.haskell.org/D5388 >--------------------------------------------------------------- 0136906c9e69b02cd1ffe2704fa5d737d8c4cfaf rts/ProfHeap.c | 30 ++++++++++++++++++++++-------- testsuite/tests/hp2ps/Makefile | 9 +++++++++ testsuite/tests/hp2ps/T15904.hs | 8 ++++++++ testsuite/tests/hp2ps/T15904.stdout | 6 ++++++ testsuite/tests/hp2ps/all.T | 1 + utils/hp2ps/HpFile.c | 37 +++++++++++++++++-------------------- 6 files changed, 63 insertions(+), 28 deletions(-) diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index de3d2b6..517702f 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -361,6 +361,18 @@ void endProfiling( void ) #endif /* !PROFILING */ static void +printEscapedString(const char* string) +{ + for (const char* p = string; *p != '\0'; ++p) { + if (*p == '\"') { + // Escape every " as "" + fputc('"', hp_file); + } + fputc(*p, hp_file); + } +} + +static void printSample(bool beginSample, StgDouble sampleValue) { fprintf(hp_file, "%s %f\n", @@ -428,16 +440,18 @@ initHeapProfiling(void) initEra( &censuses[era] ); /* initProfilingLogFile(); */ - fprintf(hp_file, "JOB \"%s", prog_name); + fprintf(hp_file, "JOB \""); + printEscapedString(prog_name); #if defined(PROFILING) - { - int count; - for(count = 1; count < prog_argc; count++) - fprintf(hp_file, " %s", prog_argv[count]); - fprintf(hp_file, " +RTS"); - for(count = 0; count < rts_argc; count++) - fprintf(hp_file, " %s", rts_argv[count]); + for (int i = 1; i < prog_argc; ++i) { + fputc(' ', hp_file); + printEscapedString(prog_argv[i]); + } + fprintf(hp_file, " +RTS"); + for (int i = 0; i < rts_argc; ++i) { + fputc(' ', hp_file); + printEscapedString(rts_argv[i]); } #endif /* PROFILING */ diff --git a/testsuite/tests/hp2ps/Makefile b/testsuite/tests/hp2ps/Makefile new file mode 100644 index 0000000..ec7deb5 --- /dev/null +++ b/testsuite/tests/hp2ps/Makefile @@ -0,0 +1,9 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +.PHONY: T15904 +T15904: + "$(TEST_HC)" $(TEST_HC_OPTS) -rtsopts -main-is "$@" "$@.hs" -o "\"$@\"" + "./\"$@\"" '{"e": 2.72, "pi": 3.14}' "\\" "" '"' +RTS -h + "$(HP2PS_ABS)" "\"$@\".hp" diff --git a/testsuite/tests/hp2ps/T15904.hs b/testsuite/tests/hp2ps/T15904.hs new file mode 100644 index 0000000..7c009ff --- /dev/null +++ b/testsuite/tests/hp2ps/T15904.hs @@ -0,0 +1,8 @@ +module T15904 (main) where + +import System.Environment + +main :: IO () +main = do + args <- getArgs + mapM_ putStrLn args diff --git a/testsuite/tests/hp2ps/T15904.stdout b/testsuite/tests/hp2ps/T15904.stdout new file mode 100644 index 0000000..e77005b --- /dev/null +++ b/testsuite/tests/hp2ps/T15904.stdout @@ -0,0 +1,6 @@ +[1 of 1] Compiling T15904 ( T15904.hs, T15904.o ) +Linking "T15904" ... +{"e": 2.72, "pi": 3.14} +\ + +" diff --git a/testsuite/tests/hp2ps/all.T b/testsuite/tests/hp2ps/all.T new file mode 100644 index 0000000..bebeb56 --- /dev/null +++ b/testsuite/tests/hp2ps/all.T @@ -0,0 +1 @@ +test('T15904', [], run_command, ['$MAKE -s --no-print-directory T15904']) diff --git a/utils/hp2ps/HpFile.c b/utils/hp2ps/HpFile.c index a64a74a..bc172e5 100644 --- a/utils/hp2ps/HpFile.c +++ b/utils/hp2ps/HpFile.c @@ -398,45 +398,42 @@ GetIdent(FILE *infp) /* - * Read a sequence of characters that make up a string and - * assign the result to "thestring". + * Read a sequence of characters that make up a string and assign the result to + * "thestring". A string is surrounded by double quotes, with a double quote + * itself escaped as two contiguous double quotes. */ void GetString(FILE *infp) { - unsigned int i; - char *stringbuffer; - size_t stringbuffersize; - ASSERT(ch == '\"'); - stringbuffersize = 5000; - stringbuffer = xmalloc(stringbuffersize); + size_t stringbuffersize = 5000; + char *stringbuffer = xmalloc(stringbuffersize); ch = getc(infp); /* skip the '\"' that begins the string */ - i = 0; - while (ch != '\"') { + for (size_t i = 0; ; ++i) { if (ch == EOF) { - Error("%s, line %d: EOF when expecting \"", hpfile, linenum, ch); + Error("%s, line %d: EOF when expecting \"", hpfile, linenum, ch); } - else if (i == stringbuffersize - 1) { - stringbuffersize = 2 * stringbuffersize; + if (i == stringbuffersize) { + stringbuffersize *= 2; stringbuffer = xrealloc(stringbuffer, stringbuffersize); } - stringbuffer[ i++ ] = ch; + if (ch == '\"') { + ch = getc(infp); + if (ch != '\"') { + stringbuffer[i] = '\0'; + break; + } + } + stringbuffer[i] = ch; ch = getc(infp); } - stringbuffer[i] = '\0'; thestring = copystring(stringbuffer); - free(stringbuffer); - - ASSERT(ch == '\"'); - - ch = getc(infp); /* skip the '\"' that terminates the string */ } boolish From git at git.haskell.org Tue Dec 11 23:21:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:45 +0000 (UTC) Subject: [commit: ghc] master: Fix recompilation bug with default class methods (#15970) (288f681) Message-ID: <20181211232145.0CA6F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/288f681e06accbae690c46eb8a6e997fa9e5f56a/ghc >--------------------------------------------------------------- commit 288f681e06accbae690c46eb8a6e997fa9e5f56a Author: Simon Marlow Date: Tue Dec 11 13:18:47 2018 -0500 Fix recompilation bug with default class methods (#15970) If a module uses a class, then it can instantiate the class and thereby use its default methods, so we must include the default methods when calculating the fingerprint for the class. Test Plan: New unit test: driver/T15970 Before: ``` =====> T15970(normal) 1 of 1 [0, 0, 0] cd "T15970.run" && $MAKE -s --no-print-directory T15970 Wrong exit code for T15970()(expected 0 , actual 2 ) Stdout ( T15970 ): Makefile:13: recipe for target 'T15970' failed Stderr ( T15970 ): C.o:function Main_zdfTypeClassMyDataType1_info: error: undefined reference to 'A_toTypedData2_closure' C.o:function Main_main1_info: error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x298): error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x480): error: undefined reference to 'A_toTypedData2_closure' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) ``` After: test passes. Reviewers: bgamari, simonpj, erikd, watashi, afarmer Subscribers: rwbarton, carter GHC Trac Issues: #15970 Differential Revision: https://phabricator.haskell.org/D5394 >--------------------------------------------------------------- 288f681e06accbae690c46eb8a6e997fa9e5f56a compiler/iface/MkIface.hs | 78 ++++++++++++++++++++++++++++------ testsuite/tests/driver/T15970/A1.hs | 13 ++++++ testsuite/tests/driver/T15970/A2.hs | 13 ++++++ testsuite/tests/driver/T15970/B.hs | 9 ++++ testsuite/tests/driver/T15970/C.hs | 15 +++++++ testsuite/tests/driver/T15970/Makefile | 17 ++++++++ testsuite/tests/driver/T15970/all.T | 2 + 7 files changed, 134 insertions(+), 13 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 288f681e06accbae690c46eb8a6e997fa9e5f56a From git at git.haskell.org Tue Dec 11 23:21:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:48 +0000 (UTC) Subject: [commit: ghc] master: Do not save performance test results if worktree is dirty. (54ee148) Message-ID: <20181211232148.0327F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/54ee148c2b28d2326cfd273aed4842c2b53e2625/ghc >--------------------------------------------------------------- commit 54ee148c2b28d2326cfd273aed4842c2b53e2625 Author: David Eichmann Date: Tue Dec 11 13:19:50 2018 -0500 Do not save performance test results if worktree is dirty. Reviewers: bgamari, tdammers Reviewed By: bgamari, tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15924 Differential Revision: https://phabricator.haskell.org/D5368 >--------------------------------------------------------------- 54ee148c2b28d2326cfd273aed4842c2b53e2625 testsuite/driver/perf_notes.py | 4 ++++ testsuite/driver/runtests.py | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index 5ceede7..6d80e07 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -30,6 +30,10 @@ def inside_git_repo(): except subprocess.CalledProcessError: return False +# Check if the worktree is dirty. +def is_worktree_dirty(): + return subprocess.check_output(['git', 'status', '--porcelain']) != b'' + # # Some data access functions. A the moment this uses git notes. # diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index c1e8574..02d00f0 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -25,7 +25,7 @@ import subprocess from testutil import getStdout, Watcher, str_warn, str_info from testglobals import getConfig, ghc_env, getTestRun, TestOptions, brokens -from perf_notes import MetricChange, inside_git_repo +from perf_notes import MetricChange, inside_git_repo, is_worktree_dirty from junit import junit # Readline sometimes spews out ANSI escapes for some values of TERM, @@ -394,7 +394,12 @@ else: with open(config.metrics_file, 'a') as file: file.write("\n" + Perf.format_perf_stat(stats)) elif canGitStatus and any(stats): - Perf.append_perf_stat(stats) + if is_worktree_dirty(): + print() + print(str_warn('Working Tree is Dirty') + ' performance metrics will not be saved.' + \ + ' Commit changes or use --metrics-file to save metrics to a file.') + else: + Perf.append_perf_stat(stats) # Write summary if config.summary_file: From git at git.haskell.org Tue Dec 11 23:21:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:51 +0000 (UTC) Subject: [commit: ghc] master: Misleading msg with qualified imports "No module named X imported" (4c174dd) Message-ID: <20181211232151.902DA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4c174dddc7b36ebf97ba0e182f843d563e3d598c/ghc >--------------------------------------------------------------- commit 4c174dddc7b36ebf97ba0e182f843d563e3d598c Author: Roland Senn Date: Tue Dec 11 13:20:37 2018 -0500 Misleading msg with qualified imports "No module named X imported" To check whether a given module has been imported, we do the following: From the list of all qualified names we extract the distinct module names to a list of module names. Then we check whether the given module name is in this list of module names. Test Plan: make test TEST=T14225 Reviewers: mpickering, hvr, monoidal, osa1, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #14225 Differential Revision: https://phabricator.haskell.org/D5331 >--------------------------------------------------------------- 4c174dddc7b36ebf97ba0e182f843d563e3d598c compiler/rename/RnUnbound.hs | 50 +++++++++++++----------- testsuite/tests/rename/should_fail/T14225.script | 2 + testsuite/tests/rename/should_fail/T14225.stderr | 3 ++ testsuite/tests/rename/should_fail/all.T | 1 + 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/compiler/rename/RnUnbound.hs b/compiler/rename/RnUnbound.hs index bf481c5..bdda66f 100644 --- a/compiler/rename/RnUnbound.hs +++ b/compiler/rename/RnUnbound.hs @@ -105,7 +105,8 @@ unknownNameSuggestions_ :: WhereLooking -> DynFlags unknownNameSuggestions_ where_look dflags hpt curr_mod global_env local_env imports tried_rdr_name = similarNameSuggestions where_look dflags global_env local_env tried_rdr_name $$ - importSuggestions where_look hpt curr_mod imports tried_rdr_name $$ + importSuggestions where_look global_env hpt + curr_mod imports tried_rdr_name $$ extensionSuggestions tried_rdr_name @@ -165,26 +166,20 @@ similarNameSuggestions where_look dflags global_env , let occ = nameOccName name , correct_name_space occ] - gre_ok :: GlobalRdrElt -> Bool - gre_ok = case where_look of - WL_LocalTop -> isLocalGRE - WL_LocalOnly -> const False - _ -> const True - global_possibilities :: GlobalRdrEnv -> [(RdrName, (RdrName, HowInScope))] global_possibilities global_env | tried_is_qual = [ (rdr_qual, (rdr_qual, how)) | gre <- globalRdrEnvElts global_env - , gre_ok gre + , isGreOk where_look gre , let name = gre_name gre occ = nameOccName name , correct_name_space occ - , (mod, how) <- quals_in_scope gre + , (mod, how) <- qualsInScope gre , let rdr_qual = mkRdrQual mod occ ] | otherwise = [ (rdr_unqual, pair) | gre <- globalRdrEnvElts global_env - , gre_ok gre + , isGreOk where_look gre , let name = gre_name gre occ = nameOccName name rdr_unqual = mkRdrUnqual occ @@ -212,15 +207,6 @@ similarNameSuggestions where_look dflags global_env | i <- is, let ispec = is_decl i , not (is_qual ispec) ] - -------------------- - quals_in_scope :: GlobalRdrElt -> [(ModuleName, HowInScope)] - -- Ones for which the qualified version is in scope - quals_in_scope (GRE { gre_name = n, gre_lcl = lcl, gre_imp = is }) - | lcl = case nameModule_maybe n of - Nothing -> [] - Just m -> [(moduleName m, Left (nameSrcSpan n))] - | otherwise = [ (is_as ispec, Right ispec) - | i <- is, let ispec = is_decl i ] -------------------- quals_only :: GlobalRdrElt -> [(RdrName, HowInScope)] @@ -231,9 +217,10 @@ similarNameSuggestions where_look dflags global_env -- | Generate helpful suggestions if a qualified name Mod.foo is not in scope. importSuggestions :: WhereLooking + -> GlobalRdrEnv -> HomePackageTable -> Module -> ImportAvails -> RdrName -> SDoc -importSuggestions where_look hpt currMod imports rdr_name +importSuggestions where_look global_env hpt currMod imports rdr_name | WL_LocalOnly <- where_look = Outputable.empty | not (isQual rdr_name || isUnqual rdr_name) = Outputable.empty | null interesting_imports @@ -344,8 +331,7 @@ importSuggestions where_look hpt currMod imports rdr_name -- See note [When to show/hide the module-not-imported line] show_not_imported_line :: ModuleName -> Bool -- #15611 show_not_imported_line modnam - | modnam `elem` - fmap moduleName (moduleEnvKeys (imp_mods imports)) = False -- 1 + | modnam `elem` globMods = False -- #14225 -- 1 | moduleName currMod == modnam = False -- 2.1 | is_last_loaded_mod modnam hpt_uniques = False -- 2.2 | otherwise = True @@ -353,6 +339,11 @@ importSuggestions where_look hpt currMod imports rdr_name hpt_uniques = map fst (udfmToList hpt) is_last_loaded_mod _ [] = False is_last_loaded_mod modnam uniqs = last uniqs == getUnique modnam + globMods = nub [ mod + | gre <- globalRdrEnvElts global_env + , isGreOk where_look gre + , (mod, _) <- qualsInScope gre + ] extensionSuggestions :: RdrName -> SDoc extensionSuggestions rdrName @@ -366,6 +357,21 @@ perhapsForallMsg = vcat [ text "Perhaps you intended to use ExplicitForAll or similar flag" , text "to enable explicit-forall syntax: forall . "] +qualsInScope :: GlobalRdrElt -> [(ModuleName, HowInScope)] +-- Ones for which the qualified version is in scope +qualsInScope GRE { gre_name = n, gre_lcl = lcl, gre_imp = is } + | lcl = case nameModule_maybe n of + Nothing -> [] + Just m -> [(moduleName m, Left (nameSrcSpan n))] + | otherwise = [ (is_as ispec, Right ispec) + | i <- is, let ispec = is_decl i ] + +isGreOk :: WhereLooking -> GlobalRdrElt -> Bool +isGreOk where_look = case where_look of + WL_LocalTop -> isLocalGRE + WL_LocalOnly -> const False + _ -> const True + {- Note [When to show/hide the module-not-imported line] -- #15611 For the error message: Not in scope X.Y diff --git a/testsuite/tests/rename/should_fail/T14225.script b/testsuite/tests/rename/should_fail/T14225.script new file mode 100644 index 0000000..93f212f --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14225.script @@ -0,0 +1,2 @@ +import qualified Data.Maybe as M +M.fromJusr diff --git a/testsuite/tests/rename/should_fail/T14225.stderr b/testsuite/tests/rename/should_fail/T14225.stderr new file mode 100644 index 0000000..f54e463 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14225.stderr @@ -0,0 +1,3 @@ +:2:1: error: + Not in scope: ‘M.fromJusr’ + Perhaps you meant ‘M.fromJust’ (imported from Data.Maybe) diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 6fd0143..ba69754 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -129,6 +129,7 @@ test('T13644', normal, multimod_compile_fail, ['T13644','-v0']) test('T13568', normal, multimod_compile_fail, ['T13568','-v0']) test('T13947', normal, compile_fail, ['']) test('T13847', normal, multimod_compile_fail, ['T13847','-v0']) +test('T14225', normal, ghci_script, ['T14225.script']) test('T14307', normal, compile_fail, ['']) test('T14591', normal, compile_fail, ['']) test('T14907a', normal, compile_fail, ['']) From git at git.haskell.org Tue Dec 11 23:21:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:54 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Implement MachOps for smaller sizes (9e763af) Message-ID: <20181211232154.906173ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9e763afa9f1f75eacce24291f298f32527591b14/ghc >--------------------------------------------------------------- commit 9e763afa9f1f75eacce24291f298f32527591b14 Author: Peter Trommler Date: Tue Dec 11 13:21:50 2018 -0500 PPC NCG: Implement MachOps for smaller sizes Generate code for MachOps with smaller than wordsize data. Refactor conversion MachOps. Fixes #15854 Test Plan: validate (I validated on powerpc64le and x86_64 Linux) Reviewers: bgamari, hvr, erikd, simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15854 Differential Revision: https://phabricator.haskell.org/D5300 >--------------------------------------------------------------- 9e763afa9f1f75eacce24291f298f32527591b14 compiler/nativeGen/PPC/CodeGen.hs | 307 ++++++++++++++++++-------------------- 1 file changed, 146 insertions(+), 161 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9e763afa9f1f75eacce24291f298f32527591b14 From git at git.haskell.org Tue Dec 11 23:21:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:21:58 +0000 (UTC) Subject: [commit: ghc] master: Support registering Plugins through the GHC API (da05d79) Message-ID: <20181211232158.DA8B73ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/da05d79d03e5e03e391b381f23c46fc02957abf7/ghc >--------------------------------------------------------------- commit da05d79d03e5e03e391b381f23c46fc02957abf7 Author: Daniel Gröber Date: Tue Dec 11 13:24:12 2018 -0500 Support registering Plugins through the GHC API This allows tooling using the GHC API to use plugins internally. Hopefully this will make it possible to decouple the development of useful plugins from (currently) kitchen-sink type tooling projects such as ghc-mod or HIE -- at least to some extent. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, alanz, rwbarton, carter GHC Trac Issues: #15826 Differential Revision: https://phabricator.haskell.org/D5278 >--------------------------------------------------------------- da05d79d03e5e03e391b381f23c46fc02957abf7 compiler/deSugar/Desugar.hs | 2 +- compiler/iface/MkIface.hs | 18 ++--- compiler/main/DynFlags.hs | 19 +++-- compiler/main/DynamicLoading.hs | 13 ++-- compiler/main/Plugins.hs | 45 +++++++++--- compiler/main/Plugins.hs-boot | 1 + compiler/typecheck/TcRnDriver.hs | 3 +- testsuite/tests/plugins/all.T | 6 ++ testsuite/tests/plugins/static-plugins-module.hs | 2 + testsuite/tests/plugins/static-plugins.hs | 80 ++++++++++++++++++++++ .../{plugins10.stdout => static-plugins.stdout} | 22 +++--- 11 files changed, 166 insertions(+), 45 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc da05d79d03e5e03e391b381f23c46fc02957abf7 From git at git.haskell.org Tue Dec 11 23:22:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:02 +0000 (UTC) Subject: [commit: ghc] master: Support generating HIE files (f582379) Message-ID: <20181211232202.1ECC83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f582379de2c4ff7577235c926ad953debdae3cac/ghc >--------------------------------------------------------------- commit f582379de2c4ff7577235c926ad953debdae3cac Author: Alec Theriault Date: Tue Dec 11 13:47:35 2018 -0500 Support generating HIE files Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie` files (see the wiki page: https://ghc.haskell.org/trac/ghc/wiki/HIEFiles). This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for his GSOC project, as posted here: https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d. Test Plan: ./validate Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi Reviewed By: alanz, sjakobi Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter Differential Revision: https://phabricator.haskell.org/D5239 >--------------------------------------------------------------- f582379de2c4ff7577235c926ad953debdae3cac compiler/backpack/DriverBkp.hs | 8 +- compiler/basicTypes/Module.hs | 17 +- compiler/ghc.cabal.in | 6 + compiler/hieFile/HieAst.hs | 1713 ++++++++++++++++++++ compiler/hieFile/HieBin.hs | 271 ++++ compiler/hieFile/HieDebug.hs | 143 ++ compiler/hieFile/HieTypes.hs | 503 ++++++ compiler/hieFile/HieUtils.hs | 455 ++++++ compiler/iface/MkIface.hs | 20 +- compiler/main/DriverPipeline.hs | 38 +- compiler/main/DynFlags.hs | 22 +- compiler/main/Finder.hs | 23 +- compiler/main/GhcMake.hs | 13 +- compiler/main/HscMain.hs | 68 +- compiler/main/HscTypes.hs | 4 +- compiler/typecheck/TcRnMonad.hs | 2 + compiler/utils/Binary.hs | 41 +- docs/users_guide/8.8.1-notes.rst | 4 + docs/users_guide/separate_compilation.rst | 54 + docs/users_guide/using.rst | 3 + hadrian/src/Settings/Builders/Ghc.hs | 4 +- rules/distdir-way-opts.mk | 2 +- testsuite/tests/driver/recomp018/A.hs | 7 + testsuite/tests/driver/recomp018/B.hs | 6 + testsuite/tests/driver/recomp018/C.hs | 6 + testsuite/tests/driver/recomp018/Makefile | 30 + testsuite/tests/driver/recomp018/all.T | 5 + testsuite/tests/driver/recomp018/recomp018.stdout | 7 + testsuite/tests/{ado => hiefile}/Makefile | 0 testsuite/tests/hiefile/should_compile/CPP.hs | 26 + testsuite/tests/hiefile/should_compile/CPP.stderr | 2 + .../tests/hiefile/should_compile/Constructors.hs | 35 + .../hiefile/should_compile/Constructors.stderr | 2 + testsuite/tests/hiefile/should_compile/all.T | 12 + testsuite/tests/hiefile/should_compile/hie001.hs | 9 + .../tests/hiefile/should_compile/hie001.stderr | 2 + .../T14683.hs => hiefile/should_compile/hie002.hs} | 0 testsuite/tests/hiefile/should_compile/hie003.hs | 38 + .../tests/hiefile/should_compile/hie003.stderr | 2 + testsuite/tests/hiefile/should_compile/hie004.hs | 28 + .../tests/hiefile/should_compile/hie004.stderr | 2 + testsuite/tests/hiefile/should_compile/hie005.hs | 17 + .../tests/hiefile/should_compile/hie005.stderr | 2 + testsuite/tests/hiefile/should_compile/hie006.hs | 22 + .../tests/hiefile/should_compile/hie006.stderr | 2 + testsuite/tests/hiefile/should_compile/hie007.hs | 66 + .../tests/hiefile/should_compile/hie007.stderr | 2 + testsuite/tests/hiefile/should_compile/hie008.hs | 34 + .../tests/hiefile/should_compile/hie008.stderr | 2 + testsuite/tests/hiefile/should_compile/hie009.hs | 42 + .../tests/hiefile/should_compile/hie009.stderr | 2 + testsuite/tests/hiefile/should_compile/hie010.hs | 23 + .../tests/hiefile/should_compile/hie010.stderr | 2 + testsuite/tests/regalloc/regalloc_unit_tests.hs | 2 +- utils/ghc-in-ghci/settings.ghci | 1 + 55 files changed, 3795 insertions(+), 57 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f582379de2c4ff7577235c926ad953debdae3cac From git at git.haskell.org Tue Dec 11 23:22:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:05 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Generate MO_?_QuotRem for subword sizes (9e7d58c) Message-ID: <20181211232205.19CEE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9e7d58c894571f3c114c4f793b52f9d17c4c57fe/ghc >--------------------------------------------------------------- commit 9e7d58c894571f3c114c4f793b52f9d17c4c57fe Author: Peter Trommler Date: Tue Dec 11 13:22:00 2018 -0500 PPC NCG: Generate MO_?_QuotRem for subword sizes Handle Int*QuotRemOP and Word*QuotRemOp in PPC NCG. Refactor common code with remainder operation. Test Plan: validate (I validated on Linux powerpc64le and x86_64) Reviewers: erikd, hvr, bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5323 >--------------------------------------------------------------- 9e7d58c894571f3c114c4f793b52f9d17c4c57fe compiler/codeGen/StgCmmPrim.hs | 35 +++++++++++------------------- compiler/nativeGen/PPC/CodeGen.hs | 45 +++++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 43 deletions(-) diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 015eece..a6f3395 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -880,11 +880,11 @@ callishPrimOpSupported dflags op | otherwise -> Right (genericIntQuotRemOp (wordWidth dflags)) - Int8QuotRemOp | (ncg && x86ish) + Int8QuotRemOp | ncg && (x86ish || ppc) -> Left (MO_S_QuotRem W8) | otherwise -> Right (genericIntQuotRemOp W8) - Int16QuotRemOp | (ncg && x86ish) + Int16QuotRemOp | ncg && (x86ish || ppc) -> Left (MO_S_QuotRem W16) | otherwise -> Right (genericIntQuotRemOp W16) @@ -894,54 +894,45 @@ callishPrimOpSupported dflags op | otherwise -> Right (genericWordQuotRemOp (wordWidth dflags)) - WordQuotRem2Op | (ncg && (x86ish - || ppc)) + WordQuotRem2Op | (ncg && (x86ish || ppc)) || llvm -> Left (MO_U_QuotRem2 (wordWidth dflags)) | otherwise -> Right (genericWordQuotRem2Op dflags) - Word8QuotRemOp | (ncg && x86ish) + Word8QuotRemOp | ncg && (x86ish || ppc) -> Left (MO_U_QuotRem W8) | otherwise -> Right (genericWordQuotRemOp W8) - Word16QuotRemOp| (ncg && x86ish) + Word16QuotRemOp| ncg && (x86ish || ppc) -> Left (MO_U_QuotRem W16) | otherwise -> Right (genericWordQuotRemOp W16) - WordAdd2Op | (ncg && (x86ish - || ppc)) + WordAdd2Op | (ncg && (x86ish || ppc)) || llvm -> Left (MO_Add2 (wordWidth dflags)) | otherwise -> Right genericWordAdd2Op - WordAddCOp | (ncg && (x86ish - || ppc)) + WordAddCOp | (ncg && (x86ish || ppc)) || llvm -> Left (MO_AddWordC (wordWidth dflags)) | otherwise -> Right genericWordAddCOp - WordSubCOp | (ncg && (x86ish - || ppc)) + WordSubCOp | (ncg && (x86ish || ppc)) || llvm -> Left (MO_SubWordC (wordWidth dflags)) | otherwise -> Right genericWordSubCOp - IntAddCOp | (ncg && (x86ish - || ppc)) + IntAddCOp | (ncg && (x86ish || ppc)) || llvm -> Left (MO_AddIntC (wordWidth dflags)) | otherwise -> Right genericIntAddCOp - IntSubCOp | (ncg && (x86ish - || ppc)) + IntSubCOp | (ncg && (x86ish || ppc)) || llvm -> Left (MO_SubIntC (wordWidth dflags)) | otherwise -> Right genericIntSubCOp - WordMul2Op | ncg && (x86ish - || ppc) + WordMul2Op | ncg && (x86ish || ppc) || llvm -> Left (MO_U_Mul2 (wordWidth dflags)) | otherwise -> Right genericWordMul2Op - FloatFabsOp | (ncg && x86ish - || ppc) + FloatFabsOp | (ncg && x86ish || ppc) || llvm -> Left MO_F32_Fabs | otherwise -> Right $ genericFabsOp W32 - DoubleFabsOp | (ncg && x86ish - || ppc) + DoubleFabsOp | (ncg && x86ish || ppc) || llvm -> Left MO_F64_Fabs | otherwise -> Right $ genericFabsOp W64 diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index 70e4b05..a716765 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -617,8 +617,8 @@ getRegister' _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_S_Quot rep -> divCode rep True x y MO_U_Quot rep -> divCode rep False x y - MO_S_Rem rep -> remainderCode rep True x y - MO_U_Rem rep -> remainderCode rep False x y + MO_S_Rem rep -> remainder rep True x y + MO_U_Rem rep -> remainder rep False x y MO_And rep -> case y of (CmmLit (CmmInt imm _)) | imm == -8 || imm == -4 @@ -642,6 +642,14 @@ getRegister' _ (CmmMachOp mop [x, y]) -- dyadic PrimOps triv_float :: Width -> (Format -> Reg -> Reg -> Reg -> Instr) -> NatM Register triv_float width instr = trivialCodeNoImm (floatFormat width) instr x y + remainder :: Width -> Bool -> CmmExpr -> CmmExpr -> NatM Register + remainder rep sgn x y = do + let fmt = intFormat rep + tmp <- getNewRegNat fmt + code <- remainderCode rep sgn tmp x y + return (Any fmt code) + + getRegister' _ (CmmLit (CmmInt i rep)) | Just imm <- makeImmediate rep True i = let @@ -1300,14 +1308,8 @@ genCCall target dest_regs argsAndHints where divOp1 platform signed width [res_q, res_r] [arg_x, arg_y] = do let reg_q = getRegisterReg platform (CmmLocal res_q) reg_r = getRegisterReg platform (CmmLocal res_r) - fmt = intFormat width - (x_reg, x_code) <- getSomeReg arg_x - (y_reg, y_code) <- getSomeReg arg_y - return $ y_code `appOL` x_code - `appOL` toOL [ DIV fmt signed reg_q x_reg y_reg - , MULL fmt reg_r reg_q (RIReg y_reg) - , SUBF reg_r reg_r x_reg - ] + remainderCode width signed reg_q arg_x arg_y + <*> pure reg_r divOp1 _ _ _ _ _ = panic "genCCall: Wrong number of arguments for divOp1" @@ -2271,19 +2273,20 @@ trivialUCode rep instr x = do -- it the hard way. -- The "sgn" parameter is the signedness for the division instruction -remainderCode :: Width -> Bool -> CmmExpr -> CmmExpr -> NatM Register -remainderCode rep sgn x y = do +remainderCode :: Width -> Bool -> Reg -> CmmExpr -> CmmExpr + -> NatM (Reg -> InstrBlock) +remainderCode rep sgn reg_q arg_x arg_y = do let op_len = max W32 rep - ins_fmt = intFormat op_len + fmt = intFormat op_len extend = if sgn then extendSExpr else extendUExpr - (src1, code1) <- getSomeReg (extend rep op_len x) - (src2, code2) <- getSomeReg (extend rep op_len y) - let code dst = code1 `appOL` code2 `appOL` toOL [ - DIV ins_fmt sgn dst src1 src2, - MULL ins_fmt dst dst (RIReg src2), - SUBF dst dst src1 - ] - return (Any (intFormat rep) code) + (x_reg, x_code) <- getSomeReg (extend rep op_len arg_x) + (y_reg, y_code) <- getSomeReg (extend rep op_len arg_y) + return $ \reg_r -> y_code `appOL` x_code + `appOL` toOL [ DIV fmt sgn reg_q x_reg y_reg + , MULL fmt reg_r reg_q (RIReg y_reg) + , SUBF reg_r reg_r x_reg + ] + coerceInt2FP :: Width -> Width -> CmmExpr -> NatM Register coerceInt2FP fromRep toRep x = do From git at git.haskell.org Tue Dec 11 23:22:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:08 +0000 (UTC) Subject: [commit: ghc] master: dmdAnal: Move handling of datacon strictness to mkWWstr_one (d549c08) Message-ID: <20181211232208.232893ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d549c081f19925dd0e4c70d45bded0497c649d49/ghc >--------------------------------------------------------------- commit d549c081f19925dd0e4c70d45bded0497c649d49 Author: Ben Gamari Date: Tue Dec 11 13:34:47 2018 -0500 dmdAnal: Move handling of datacon strictness to mkWWstr_one Previously datacon strictness was accounted for when we demand analysed a case analysis. However, this results in pessimistic demands in some cases. For instance, consider the program (from T10482) data family Bar a data instance Bar (a, b) = BarPair !(Bar a) !(Bar b) newtype instance Bar Int = Bar Int foo :: Bar ((Int, Int), Int) -> Int -> Int foo f k = case f of BarPair x y -> case burble of True -> case x of BarPair p q -> ... False -> ... We really should be able to assume that `p` is already evaluated since it came from a strict field of BarPair. However, as written the demand analyser can not conclude this since we may end up in the False branch of the case on `burble` (which places no demand on `x`). By accounting for the data con strictness later, applied to the demand of the RHS, we get the strict demand signature we want. See Note [Add demands for strict constructors] for a more comprehensive discussion. Test Plan: Validate Reviewers: simonpj, osa1, goldfire Subscribers: rwbarton, carter GHC Trac Issues: #15696 Differential Revision: https://phabricator.haskell.org/D5226 >--------------------------------------------------------------- d549c081f19925dd0e4c70d45bded0497c649d49 compiler/stranal/DmdAnal.hs | 61 ++-------------------------------- compiler/stranal/WwLib.hs | 79 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 81 insertions(+), 59 deletions(-) diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 9959119..0b8133d 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -250,7 +250,7 @@ dmdAnal' env dmd (Case scrut case_bndr ty [(DataAlt dc, bndrs, rhs)]) -- Compute demand on the scrutinee -- See Note [Demand on scrutinee of a product case] - scrut_dmd = mkProdDmd (addDataConStrictness dc id_dmds) + scrut_dmd = mkProdDmd id_dmds (scrut_ty, scrut') = dmdAnal env scrut_dmd scrut res_ty = alt_ty3 `bothDmdType` toBothDmdArg scrut_ty case_bndr' = setIdDemandInfo case_bndr case_bndr_dmd @@ -1214,17 +1214,6 @@ extendEnvForProdAlt env scrut case_bndr dc bndrs is_var (Var v) = isLocalId v is_var _ = False -addDataConStrictness :: DataCon -> [Demand] -> [Demand] --- See Note [Add demands for strict constructors] -addDataConStrictness con ds - = ASSERT2( equalLength strs ds, ppr con $$ ppr strs $$ ppr ds ) - zipWith add ds strs - where - strs = dataConRepStrictness con - add dmd str | isMarkedStrict str - , not (isAbsDmd dmd) = strictifyDmd dmd - | otherwise = dmd - findBndrsDmds :: AnalEnv -> DmdType -> [Var] -> (DmdType, [Demand]) -- Return the demands on the Ids in the [Var] findBndrsDmds env dmd_ty bndrs @@ -1308,8 +1297,8 @@ binders the CPR property. Specifically | otherwise = x For $wf2 we are going to unbox the MkT *and*, since it is strict, the - first argument of the MkT; see Note [Add demands for strict constructors]. - But then we don't want box it up again when returning it! We want + first argument of the MkT; see Note [Add demands for strict constructors] + in WwLib. But then we don't want box it up again when returning it! We want 'f2' to have the CPR property, so we give 'x' the CPR property. * It's a bit delicate because if this case is scrutinising something other @@ -1325,50 +1314,6 @@ binders the CPR property. Specifically sub-component thereof. But it's simple, and nothing terrible happens if we get it wrong. e.g. Trac #10694. -Note [Add demands for strict constructors] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Consider this program (due to Roman): - - data X a = X !a - - foo :: X Int -> Int -> Int - foo (X a) n = go 0 - where - go i | i < n = a + go (i+1) - | otherwise = 0 - -We want the worker for 'foo' too look like this: - - $wfoo :: Int# -> Int# -> Int# - -with the first argument unboxed, so that it is not eval'd each time -around the 'go' loop (which would otherwise happen, since 'foo' is not -strict in 'a'). It is sound for the wrapper to pass an unboxed arg -because X is strict, so its argument must be evaluated. And if we -*don't* pass an unboxed argument, we can't even repair it by adding a -`seq` thus: - - foo (X a) n = a `seq` go 0 - -because the seq is discarded (very early) since X is strict! - -We achieve the effect using addDataConStrictness. It is called at a -case expression, such as the pattern match on (X a) in the example -above. After computing how 'a' is used in the alternatives, we add an -extra 'seqDmd' to it. The case alternative isn't itself strict in the -sub-components, but simply evaluating the scrutinee to HNF does force -those sub-components. - -If the argument is not used at all in the alternative (i.e. it is -Absent), then *don't* add a 'seqDmd'. If we do, it makes it look used -and hence it'll be passed to the worker when it doesn't need to be. -Hence the isAbsDmd test in addDataConStrictness. - -There is the usual danger of reboxing, which as usual we ignore. But -if X is monomorphic, and has an UNPACK pragma, then this optimisation -is even more important. We don't want the wrapper to rebox an unboxed -argument, and pass an Int to $wfoo! - Note [Initial CPR for strict binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs index f01dc6c..ce036c8 100644 --- a/compiler/stranal/WwLib.hs +++ b/compiler/stranal/WwLib.hs @@ -614,7 +614,9 @@ mkWWstr_one dflags fam_envs has_inlineable_prag arg , cs `equalLength` inst_con_arg_tys -- See Note [mkWWstr and unsafeCoerce] = do { (uniq1:uniqs) <- getUniquesM - ; let unpk_args = zipWith3 mk_ww_arg uniqs inst_con_arg_tys cs + ; let -- See Note [Add demands for strict constructors] + cs' = addDataConStrictness data_con cs + unpk_args = zipWith3 mk_ww_arg uniqs inst_con_arg_tys cs' unbox_fn = mkUnpackCase (Var arg) co uniq1 data_con unpk_args arg_no_unf = zapStableUnfolding arg @@ -638,7 +640,82 @@ mkWWstr_one dflags fam_envs has_inlineable_prag arg nop_fn :: CoreExpr -> CoreExpr nop_fn body = body +addDataConStrictness :: DataCon -> [Demand] -> [Demand] +-- See Note [Add demands for strict constructors] +addDataConStrictness con ds + = ASSERT2( equalLength strs ds, ppr con $$ ppr strs $$ ppr ds ) + zipWith add ds strs + where + strs = dataConRepStrictness con + add dmd str | isMarkedStrict str + , not (isAbsDmd dmd) = dmd `bothDmd` seqDmd + | otherwise = dmd + {- +Note [Add demands for strict constructors] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Consider this program (due to Roman): + + data X a = X !a + + foo :: X Int -> Int -> Int + foo (X a) n = go 0 + where + go i | i < n = a + go (i+1) + | otherwise = 0 + +We want the worker for 'foo' too look like this: + + $wfoo :: Int# -> Int# -> Int# + +with the first argument unboxed, so that it is not eval'd each time +around the 'go' loop (which would otherwise happen, since 'foo' is not +strict in 'a'). It is sound for the wrapper to pass an unboxed arg +because X is strict, so its argument must be evaluated. And if we +*don't* pass an unboxed argument, we can't even repair it by adding a +`seq` thus: + + foo (X a) n = a `seq` go 0 + +So here's what we do + +* We leave the demand-analysis alone. The demand on 'a' in the definition of + 'foo' is ; the strictness info is Lazy because foo's body may or may + not evaluate 'a'; but the usage info says that 'a' is unpacked and its content + is used. + +* During worker/wrapper, if we unpack a strict constructor (as we do for 'foo'), + we use 'strictifyDemand' to bump up the strictness on the strict arguments of + the data constructor. That in turn means that, if the usage info supports + doing so (i.e. splitProdDmd_maybe returns Just), we will unpack that argument + -- even though the original demand (e.g. on 'a') was lazy. + +The net effect is that the w/w transformation is more aggressive about unpacking +the strict arguments of a data constructor, when that eagerness is supported by +the usage info. + +This works in nested situations like + + data family Bar a + data instance Bar (a, b) = BarPair !(Bar a) !(Bar b) + newtype instance Bar Int = Bar Int + + foo :: Bar ((Int, Int), Int) -> Int -> Int + foo f k = + case f of + BarPair x y -> case burble of + True -> case x of + BarPair p q -> ... + False -> ... + +The extra eagerness lets us produce a worker of type: + + $wfoo :: Int# -> Int# -> Int# -> Int -> Int + $wfoo p# q# y# = ... + +even though the `case x` is only lazily evaluated + + Note [mkWWstr and unsafeCoerce] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By using unsafeCoerce, it is possible to make the number of demands fail to From git at git.haskell.org Tue Dec 11 23:22:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:11 +0000 (UTC) Subject: [commit: ghc] master: RTS linker: don't crash early when not finding extra-libraries (21339c9) Message-ID: <20181211232211.1DA4F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/21339c9f6bfb952a3a0b8de5ee649d46dfbf0d9b/ghc >--------------------------------------------------------------- commit 21339c9f6bfb952a3a0b8de5ee649d46dfbf0d9b Author: Kyrill Briantsev Date: Tue Dec 11 13:45:10 2018 -0500 RTS linker: don't crash early when not finding extra-libraries Allow GHCi to not crash when no assumed DLL is found in the standard location. E.g. when loading the package built "dyn" way, we may well have the package's DLL around, and it's the system linker which loads necessary dependencies. Why does this (partially) fix #11042? It's because we often (and when having packages built `dyn` way -- almost always) don't need to load anything recorded in the `extra-libraries` stanza, since if the package DLL exists, GHCi linker simply calls the system linker (via `dlopen`/ `LoadLibrary` APIs) to load it and doesn't bother to load package prelinked object file (if any) or package static library. Thus, all "regular" (with no fancy low-level package content manipulation) packages built "dyn" way should be OK after this fix. Reviewers: hvr, bgamari, int-index Reviewed By: bgamari, int-index Subscribers: Phyx, int-index, rwbarton, carter GHC Trac Issues: #11042 Differential Revision: https://phabricator.haskell.org/D5170 >--------------------------------------------------------------- 21339c9f6bfb952a3a0b8de5ee649d46dfbf0d9b compiler/ghci/Linker.hs | 77 ++++++++++++++++++++++++++++++++----- compiler/main/DynFlags.hs | 3 ++ docs/users_guide/using-warnings.rst | 11 ++++++ 3 files changed, 82 insertions(+), 9 deletions(-) diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 9f1307d..32bf270 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -1262,8 +1262,9 @@ linkPackage hsc_env pkg = do let dflags = hsc_dflags hsc_env platform = targetPlatform dflags - dirs | interpreterDynamic dflags = Packages.libraryDynDirs pkg - | otherwise = Packages.libraryDirs pkg + is_dyn = interpreterDynamic dflags + dirs | is_dyn = Packages.libraryDynDirs pkg + | otherwise = Packages.libraryDirs pkg let hs_libs = Packages.hsLibraries pkg -- The FFI GHCi import lib isn't needed as @@ -1313,8 +1314,12 @@ linkPackage hsc_env pkg -- See comments with partOfGHCi when (packageName pkg `notElem` partOfGHCi) $ do loadFrameworks hsc_env platform pkg - mapM_ (load_dyn hsc_env) - (known_dlls ++ map (mkSOName platform) dlls) + -- See Note [Crash early load_dyn and locateLib] + -- Crash early if can't load any of `known_dlls` + mapM_ (load_dyn hsc_env True) known_dlls + -- For remaining `dlls` crash early only when there is surely + -- no package's DLL around ... (not is_dyn) + mapM_ (load_dyn hsc_env (not is_dyn) . mkSOName platform) dlls -- After loading all the DLLs, we can load the static objects. -- Ordering isn't important here, because we do one final link @@ -1337,18 +1342,72 @@ linkPackage hsc_env pkg ++ sourcePackageIdString pkg ++ "'" in throwGhcExceptionIO (InstallationError errmsg) +{- +Note [Crash early load_dyn and locateLib] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If a package is "normal" (exposes it's code from more than zero Haskell +modules, unlike e.g. that in ghcilink004) and is built "dyn" way, then +it has it's code compiled and linked into the DLL, which GHCi linker picks +when loading the package's code (see the big comment in the beginning of +`locateLib`). + +When loading DLLs, GHCi linker simply calls the system's `dlopen` or +`LoadLibrary` APIs. This is quite different from the case when GHCi linker +loads an object file or static library. When loading an object file or static +library GHCi linker parses them and resolves all symbols "manually". +These object file or static library may reference some external symbols +defined in some external DLLs. And GHCi should know which these +external DLLs are. + +But when GHCi loads a DLL, it's the *system* linker who manages all +the necessary dependencies, and it is able to load this DLL not having +any extra info. Thus we don't *have to* crash in this case even if we +are unable to load any supposed dependencies explicitly. + +Suppose during GHCi session a client of the package wants to +`foreign import` a symbol which isn't exposed by the package DLL, but +is exposed by such an external (dependency) DLL. +If the DLL isn't *explicitly* loaded because `load_dyn` failed to do +this, then the client code eventually crashes because the GHCi linker +isn't able to locate this symbol (GHCi linker maintains a list of +explicitly loaded DLLs it looks into when trying to find a symbol). + +This is why we still should try to load all the dependency DLLs +even though we know that the system linker loads them implicitly when +loading the package DLL. + +Why we still keep the `crash_early` opportunity then not allowing such +a permissive behaviour for any DLLs? Well, we, perhaps, improve a user +experience in some cases slightly. + +But if it happens there exist other corner cases where our current +usage of `crash_early` flag is overly restrictive, we may lift the +restriction very easily. +-} + -- we have already searched the filesystem; the strings passed to load_dyn -- can be passed directly to loadDLL. They are either fully-qualified -- ("/usr/lib/libfoo.so"), or unqualified ("libfoo.so"). In the latter case, -- loadDLL is going to search the system paths to find the library. --- -load_dyn :: HscEnv -> FilePath -> IO () -load_dyn hsc_env dll = do +load_dyn :: HscEnv -> Bool -> FilePath -> IO () +load_dyn hsc_env crash_early dll = do r <- loadDLL hsc_env dll case r of Nothing -> return () - Just err -> cmdLineErrorIO ("can't load .so/.DLL for: " - ++ dll ++ " (" ++ err ++ ")") + Just err -> + if crash_early + then cmdLineErrorIO err + else let dflags = hsc_dflags hsc_env in + when (wopt Opt_WarnMissedExtraSharedLib dflags) + $ putLogMsg dflags + (Reason Opt_WarnMissedExtraSharedLib) SevWarning + noSrcSpan (defaultUserStyle dflags)(note err) + where + note err = vcat $ map text + [ err + , "It's OK if you don't want to use symbols from it directly." + , "(the package DLL is loaded by the system linker" + , " which manages dependencies by itself)." ] loadFrameworks :: HscEnv -> Platform -> PackageConfig -> IO () loadFrameworks hsc_env platform pkg diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 48c7103..9e93e47 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -807,6 +807,7 @@ data WarningFlag = | Opt_WarnAllMissedSpecs | Opt_WarnUnsupportedCallingConventions | Opt_WarnUnsupportedLlvmVersion + | Opt_WarnMissedExtraSharedLib | Opt_WarnInlineRuleShadowing | Opt_WarnTypedHoles | Opt_WarnPartialTypeSignatures @@ -3985,6 +3986,7 @@ wWarningFlagsDeps = [ flagSpec "unsupported-calling-conventions" Opt_WarnUnsupportedCallingConventions, flagSpec "unsupported-llvm-version" Opt_WarnUnsupportedLlvmVersion, + flagSpec "missed-extra-shared-lib" Opt_WarnMissedExtraSharedLib, flagSpec "unticked-promoted-constructors" Opt_WarnUntickedPromotedConstructors, flagSpec "unused-do-bind" Opt_WarnUnusedDoBind, @@ -4707,6 +4709,7 @@ standardWarnings -- see Note [Documenting warning flags] Opt_WarnInlineRuleShadowing, Opt_WarnAlternativeLayoutRuleTransitional, Opt_WarnUnsupportedLlvmVersion, + Opt_WarnMissedExtraSharedLib, Opt_WarnTabs, Opt_WarnUnrecognisedWarningFlags, Opt_WarnSimplifiableClassConstraints, diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index fe3c8cb..6a6166b 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -39,6 +39,7 @@ generally likely to indicate bugs in your program. These are: * :ghc-flag:`-Wdodgy-foreign-imports` * :ghc-flag:`-Winline-rule-shadowing` * :ghc-flag:`-Wunsupported-llvm-version` + * :ghc-flag:`-Wmissed-extra-shared-lib` * :ghc-flag:`-Wtabs` * :ghc-flag:`-Wunrecognised-warning-flags` * :ghc-flag:`-Winaccessible-code` @@ -1326,6 +1327,16 @@ of ``-W(no-)*``. Warn when using :ghc-flag:`-fllvm` with an unsupported version of LLVM. +.. ghc-flag:: -Wmissed-extra-shared-lib + :shortdesc: Warn when GHCi can't load a shared lib. + :type: dynamic + :reverse: -Wno-missed-extra-shared-lib + :category: + + Warn when GHCi can't load a shared lib it deduced it should load + when loading a package and analyzing the extra-libraries stanza + of the target package description. + .. ghc-flag:: -Wunticked-promoted-constructors :shortdesc: warn if promoted constructors are not ticked :type: dynamic From git at git.haskell.org Tue Dec 11 23:22:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:14 +0000 (UTC) Subject: [commit: ghc] master: Explicitly pass -fno-PIC to C compiler on linux (c98e25a) Message-ID: <20181211232214.1D19A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c98e25a4de88f12c6ded0a97fcf3ed8f4996b9ea/ghc >--------------------------------------------------------------- commit c98e25a4de88f12c6ded0a97fcf3ed8f4996b9ea Author: Zejun Wu Date: Tue Dec 11 13:49:12 2018 -0500 Explicitly pass -fno-PIC to C compiler on linux Recent gcc on some linux ditributions may have -fPIC on by default ``` $ uname -a Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28 20:45:30 CEST 2018 i686 GNU/Linux $ gcc --version gcc (GCC) 7.3.1 20180312 $ touch dummy.c $ gcc -Q -v dummy.c 2>&1 | grep PIC options enabled: -fPIC -fPIE -faggressive-loop-optimizations ``` This results in following error for i686: ``` $ TEST=T13366 make test ... c-iserv.bin: /home/watashi/github/ghc/libraries/ghc-prim/dist-install/build/HSghc-pri m-0.5.3.o: unknown symbol `_GLOBAL_OFFSET_TABLE_' ghc-stage2: unable to load package `ghc-prim-0.5.3' ... ``` As our runtime linker doesn't support R_386_GOTPC relocations at all (#15847). Also while we don't have such problem on x86_64, it's not desired to build PIC objects either. Test Plan: `TEST=T13366 make test` passed on {rGHC82a716431cc680392e332bc2b1a1fd0d7faa4cd8} Reviewers: simonmar, bgamari, austin Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15848 Differential Revision: https://phabricator.haskell.org/D5288 >--------------------------------------------------------------- c98e25a4de88f12c6ded0a97fcf3ed8f4996b9ea compiler/main/DynFlags.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 6c4ee86..be347d9 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -5510,7 +5510,9 @@ picCCOpts dflags = pieOpts ++ picOpts -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode | gopt Opt_PIC dflags || WayDyn `elem` ways dflags -> ["-fPIC", "-U__PIC__", "-D__PIC__"] - | otherwise -> [] + -- gcc may be configured to have PIC on by default, let's be + -- explicit here, see Trac #15847 + | otherwise -> ["-fno-PIC"] pieOpts | gopt Opt_PICExecutable dflags = ["-pie"] From git at git.haskell.org Tue Dec 11 23:22:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:17 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Add tests for #15270 (18b74cd) Message-ID: <20181211232217.B383F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/18b74cdbbfa053704caabd104587d8a91a9233a0/ghc >--------------------------------------------------------------- commit 18b74cdbbfa053704caabd104587d8a91a9233a0 Author: Ben Gamari Date: Tue Dec 11 13:48:08 2018 -0500 testsuite: Add tests for #15270 Reviewers: alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5216 >--------------------------------------------------------------- 18b74cdbbfa053704caabd104587d8a91a9233a0 testsuite/tests/th/T15270A.hs | 8 ++++++++ testsuite/tests/th/T15270A.stderr | 5 +++++ testsuite/tests/th/T15270B.hs | 8 ++++++++ testsuite/tests/th/T15270B.stderr | 5 +++++ testsuite/tests/th/all.T | 2 ++ 5 files changed, 28 insertions(+) diff --git a/testsuite/tests/th/T15270A.hs b/testsuite/tests/th/T15270A.hs new file mode 100644 index 0000000..d317f8f --- /dev/null +++ b/testsuite/tests/th/T15270A.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T10047A where + +import Language.Haskell.TH + +-- Passing var name to conE should fail. +x = $(conE 'id) diff --git a/testsuite/tests/th/T15270A.stderr b/testsuite/tests/th/T15270A.stderr new file mode 100644 index 0000000..2eb67f6 --- /dev/null +++ b/testsuite/tests/th/T15270A.stderr @@ -0,0 +1,5 @@ + +T15270A.hs:8:7: + Illegal data constructor name: ‘id’ + When splicing a TH expression: GHC.Base.id + In the untyped splice: $(conE 'id) diff --git a/testsuite/tests/th/T15270B.hs b/testsuite/tests/th/T15270B.hs new file mode 100644 index 0000000..397b5dc --- /dev/null +++ b/testsuite/tests/th/T15270B.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T10047B where + +import Language.Haskell.TH + +-- Passing datacon name to varE should fail. +x = $(varE 'Just) diff --git a/testsuite/tests/th/T15270B.stderr b/testsuite/tests/th/T15270B.stderr new file mode 100644 index 0000000..3403d13 --- /dev/null +++ b/testsuite/tests/th/T15270B.stderr @@ -0,0 +1,5 @@ + +T15270B.hs:8:7: + Illegal variable name: ‘Just’ + When splicing a TH expression: GHC.Maybe.Just + In the untyped splice: $(varE 'Just) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index e404c8f..0ab7dba 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -419,6 +419,8 @@ test('T14885a', normal, compile, ['']) test('T14885b', normal, compile, ['']) test('T14885c', normal, compile, ['']) test('T15243', normal, compile, ['-dsuppress-uniques']) +test('T15270A', normal, compile_fail, ['']) +test('T15270B', normal, compile_fail, ['']) test('T15321', normal, compile_fail, ['']) test('T15324', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) test('T15331', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) From git at git.haskell.org Tue Dec 11 23:22:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:20 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Don't use sed -i in T15369 (e98d220) Message-ID: <20181211232220.AF80D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e98d220601fb12a7ccbdf46474cd2dbb2c3e642e/ghc >--------------------------------------------------------------- commit e98d220601fb12a7ccbdf46474cd2dbb2c3e642e Author: Ben Gamari Date: Tue Dec 11 17:39:58 2018 -0500 testsuite: Don't use sed -i in T15369 BSD sed doesn't allow use of sed -i on symlinks and the source file is symlinked into place. >--------------------------------------------------------------- e98d220601fb12a7ccbdf46474cd2dbb2c3e642e testsuite/tests/ghci/should_run/T15369.script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/should_run/T15369.script b/testsuite/tests/ghci/should_run/T15369.script index 2ebed01..f6f66e0 100644 --- a/testsuite/tests/ghci/should_run/T15369.script +++ b/testsuite/tests/ghci/should_run/T15369.script @@ -8,6 +8,8 @@ :all-types :l *T15369.hs :all-types -:! sed -i -e 's/Int/Double/g' T15369.hs +-- Note: BSD sed doesn't allow use of -i here due to symlinks +:! sed -e 's/Int/Double/g' T15369.hs > Temp.hs +:! mv Temp.hs T15369.hs :l *T15369.hs :all-types From git at git.haskell.org Tue Dec 11 23:22:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:23 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark keep-cafs and keep-cafs-fail as broken on FreeBSD (847e8b6) Message-ID: <20181211232223.A76163ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/847e8b60ff1f2a1b2dcf281a6e82c340225acf96/ghc >--------------------------------------------------------------- commit 847e8b60ff1f2a1b2dcf281a6e82c340225acf96 Author: Ben Gamari Date: Tue Dec 11 17:51:21 2018 -0500 testsuite: Mark keep-cafs and keep-cafs-fail as broken on FreeBSD See #16035. >--------------------------------------------------------------- 847e8b60ff1f2a1b2dcf281a6e82c340225acf96 testsuite/tests/rts/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index ef4e42e..466ee84 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -457,6 +457,7 @@ test('keep-cafs-fail', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), when(platform('powerpc64le-unknown-linux'), expect_broken(11261)), + when(opsys('freebsd'), expect_broken(16035)), filter_stdout_lines('Evaluated a CAF|exit.*'), ignore_stderr, # on OS X the shell emits an "Abort trap" message to stderr ], @@ -468,7 +469,8 @@ test('keep-cafs', [ extra_files(['KeepCafsBase.hs', 'KeepCafs1.hs', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), - when(platform('powerpc64le-unknown-linux'), expect_broken(11261)) + when(platform('powerpc64le-unknown-linux'), expect_broken(11261)), + when(opsys('freebsd'), expect_broken(16035)), ], run_command, ['$MAKE -s --no-print-directory KeepCafs']) From git at git.haskell.org Tue Dec 11 23:22:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:27 +0000 (UTC) Subject: [commit: ghc] master: Enable rebindable fail with overloaded strings (8a4edd1) Message-ID: <20181211232227.975EE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8a4edd15d87849d070f7608b0825789a22e52374/ghc >--------------------------------------------------------------- commit 8a4edd15d87849d070f7608b0825789a22e52374 Author: Shayne Fletcher Date: Tue Dec 11 13:49:48 2018 -0500 Enable rebindable fail with overloaded strings Summary: enable rebindable fail with overloaded strings Reviewers: bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, ndmitchell, rwbarton, carter GHC Trac Issues: #15645 Differential Revision: https://phabricator.haskell.org/D5251 >--------------------------------------------------------------- 8a4edd15d87849d070f7608b0825789a22e52374 compiler/hsSyn/HsExpr.hs | 10 ++- compiler/hsSyn/HsUtils.hs | 3 +- compiler/rename/RnExpr.hs | 96 +++++++++++++++++----- compiler/typecheck/TcExpr.hs | 12 ++- docs/users_guide/glasgow_exts.rst | 5 +- .../should_compile/T15645.hs} | 18 ++-- .../tests/typecheck/should_compile/T15645.stderr | 4 + testsuite/tests/typecheck/should_compile/all.T | 1 + 8 files changed, 108 insertions(+), 41 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 8a4edd15d87849d070f7608b0825789a22e52374 From git at git.haskell.org Tue Dec 11 23:22:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:30 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Skip T703 on non-Linux platforms (4faab14) Message-ID: <20181211232230.92F113ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4faab14bcf8a892414306a61bcde02d82cf735be/ghc >--------------------------------------------------------------- commit 4faab14bcf8a892414306a61bcde02d82cf735be Author: Ben Gamari Date: Tue Dec 11 17:44:43 2018 -0500 testsuite: Skip T703 on non-Linux platforms While the test is in principle applicable to many platforms, the current implementation requires readelf, which we can only assume is present on ELF-based platforms (e.g. Linux). See Trac #703. >--------------------------------------------------------------- 4faab14bcf8a892414306a61bcde02d82cf735be testsuite/tests/driver/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index a33dba1..02eeeb3 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -198,7 +198,9 @@ test('T8959a', run_command, ['$MAKE -s --no-print-directory T8959a']) -test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703']) +# Requires readelf +test('T703', unless(opsys('linux'), skip), + run_command, ['$MAKE -s --no-print-directory T703']) test('T2182', normal, run_command, ['$MAKE -s --no-print-directory T2182']) test('T8101', normal, compile, ['-Wall -fno-code']) test('T8101b', normal, multimod_compile, From git at git.haskell.org Tue Dec 11 23:22:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:33 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Ensure that unregisterised function is called (003ab6a) Message-ID: <20181211232233.8B2BA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/003ab6a1288ed504447985a1329409adf4eaa367/ghc >--------------------------------------------------------------- commit 003ab6a1288ed504447985a1329409adf4eaa367 Author: Ben Gamari Date: Tue Dec 11 17:34:10 2018 -0500 testsuite: Ensure that unregisterised function is called Strangely the previous formulation works locally and under CircleCI but fails on another machine. Odd. >--------------------------------------------------------------- 003ab6a1288ed504447985a1329409adf4eaa367 testsuite/tests/codeGen/should_compile/all.T | 4 ++-- testsuite/tests/codeGen/should_gen_asm/all.T | 2 +- testsuite/tests/codeGen/should_run/all.T | 4 ++-- testsuite/tests/concurrent/T13615/all.T | 2 +- testsuite/tests/concurrent/should_run/all.T | 2 +- testsuite/tests/rts/all.T | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 465a4a3..7217d93 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -23,7 +23,7 @@ test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, ['']) test('T8205', normal, compile, ['-O0']) test('T9155', normal, compile, ['-O2']) test('T9303', normal, compile, ['-O2']) -test('T9329', [when(unregisterised, expect_broken(15467)), cmm_src], compile, ['']) +test('T9329', [when(unregisterised(), expect_broken(15467)), cmm_src], compile, ['']) test('debug', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261))], @@ -37,7 +37,7 @@ test('T12115', normal, compile, ['']) test('T12355', normal, compile, ['']) test('T14999', [when((arch('powerpc64') or arch('powerpc64le')), expect_broken(11261)), - when(unregisterised, skip), + when(unregisterised(), skip), unless(opsys('linux') and arch('x86_64') and have_gdb() and have_readelf(), skip)], run_command, ['$MAKE -s --no-print-directory T14999']) diff --git a/testsuite/tests/codeGen/should_gen_asm/all.T b/testsuite/tests/codeGen/should_gen_asm/all.T index db5fdaf..08a0472 100644 --- a/testsuite/tests/codeGen/should_gen_asm/all.T +++ b/testsuite/tests/codeGen/should_gen_asm/all.T @@ -1,6 +1,6 @@ is_amd64_codegen = [ unless(platform('x86_64-unknown-linux'),skip), - when(unregisterised, skip), + when(unregisterised(), skip), ] test('memcpy', is_amd64_codegen, compile_cmp_asm, ['']) diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 0d5fcb9..7f976b8 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -73,7 +73,7 @@ test('cgrun066', normal, compile_and_run, ['']) test('cgrun067', [extra_files(['Cgrun067A.hs'])], compile_and_run, ['']) test('cgrun068', reqlib('random'), compile_and_run, ['']) test('cgrun069', - [when(unregisterised, expect_broken(15467)), + [when(unregisterised(), expect_broken(15467)), omit_ways(['ghci'])], multi_compile_and_run, ['cgrun069', [('cgrun069_cmm.cmm', '')], '']) @@ -164,7 +164,7 @@ test('T12855', normal, compile_and_run, ['']) test('T9577', [ unless(arch('x86_64') or arch('i386'),skip), when(opsys('darwin'), expect_broken(12937)), when(opsys('mingw32'), expect_broken(12965)), - when(unregisterised, skip), + when(unregisterised(), skip), only_ways(['normal']) ], compile_and_run, ['']) test('T13425', normal, compile_and_run, ['-O']) diff --git a/testsuite/tests/concurrent/T13615/all.T b/testsuite/tests/concurrent/T13615/all.T index 2ec8757..419fe9b 100644 --- a/testsuite/tests/concurrent/T13615/all.T +++ b/testsuite/tests/concurrent/T13615/all.T @@ -1,6 +1,6 @@ test('T13615', [when(fast(), skip), - when(unregisterised, skip), + when(unregisterised(), skip), req_smp, # needs -N support only_ways(threaded_ways), extra_files(['Parallel.hs', 'Memo.hs']), diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 19b69cc..99f9b6e 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -36,7 +36,7 @@ test('T3279', normal, compile_and_run, ['']) # This test takes a long time with the default context switch interval test('T3429', [ extra_run_opts('+RTS -C0.001 -RTS'), - unless(unregisterised, extra_ways(['debug_numa'])) ], + unless(unregisterised(), extra_ways(['debug_numa'])) ], compile_and_run, ['']) # without -O, goes into an infinite loop diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index a02c0fb..ef4e42e 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -303,7 +303,7 @@ test('T9045', [ omit_ways(['ghci']), extra_run_opts('10000 +RTS -A8k -RTS') ], c test('T9078', only_ways(['threaded1']), compile_and_run, ['']) test('T10017', [ when(opsys('mingw32'), skip) - , when(unregisterised, skip) + , when(unregisterised(), skip) , req_smp , only_ways(threaded_ways), extra_run_opts('+RTS -N2 -RTS') ], compile_and_run, ['']) @@ -398,7 +398,7 @@ test('T10296a', [req_smp], run_command, test('T10296b', [only_ways('threaded2')], compile_and_run, ['']) -test('numa001', [ extra_run_opts('8'), unless(unregisterised, extra_ways(['debug_numa'])) ] +test('numa001', [ extra_run_opts('8'), unless(unregisterised(), extra_ways(['debug_numa'])) ] , compile_and_run, ['']) test('T12497', [ unless(opsys('mingw32'), skip) @@ -424,7 +424,7 @@ test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O'] test('T14695', [normal, ignore_stderr] , run_command, ['$MAKE -s --no-print-directory T14695']) test('T14702', [ ignore_stdout - , when(unregisterised, skip) + , when(unregisterised(), skip) , only_ways(['threaded1', 'threaded2']) , extra_run_opts('+RTS -A32m -N8 -T -RTS') ] From git at git.haskell.org Tue Dec 11 23:22:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 11 Dec 2018 23:22:36 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark linkwhole as broken on FreeBSD (65fb69b) Message-ID: <20181211232236.856ED3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/65fb69b78f4850b56ee6a2655bc5dc6c441a984e/ghc >--------------------------------------------------------------- commit 65fb69b78f4850b56ee6a2655bc5dc6c441a984e Author: Ben Gamari Date: Tue Dec 11 17:57:11 2018 -0500 testsuite: Mark linkwhole as broken on FreeBSD See #16035. >--------------------------------------------------------------- 65fb69b78f4850b56ee6a2655bc5dc6c441a984e testsuite/tests/driver/linkwhole/all.T | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/tests/driver/linkwhole/all.T b/testsuite/tests/driver/linkwhole/all.T index 1562aa8..adc1084 100644 --- a/testsuite/tests/driver/linkwhole/all.T +++ b/testsuite/tests/driver/linkwhole/all.T @@ -1,5 +1,6 @@ test('linkwhole', [extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']), when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)), + when(opsys('freebsd'), expect_broken(16035)), when(opsys('mingw32'), skip)], run_command, ['$MAKE -s --no-print-directory linkwhole']) From git at git.haskell.org Wed Dec 12 08:51:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 12 Dec 2018 08:51:54 +0000 (UTC) Subject: [commit: ghc] master: Typo fix, replace a foldl with foldl' (ded4a1d) Message-ID: <20181212085154.540A53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ded4a1db4d61b1bc8b5fd73e8eb87cf572efda35/ghc >--------------------------------------------------------------- commit ded4a1db4d61b1bc8b5fd73e8eb87cf572efda35 Author: Ömer Sinan Ağacan Date: Wed Dec 12 11:51:20 2018 +0300 Typo fix, replace a foldl with foldl' >--------------------------------------------------------------- ded4a1db4d61b1bc8b5fd73e8eb87cf572efda35 compiler/codeGen/StgCmmEnv.hs | 6 +++--- rts/Capability.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/codeGen/StgCmmEnv.hs b/compiler/codeGen/StgCmmEnv.hs index f277281..e605762 100644 --- a/compiler/codeGen/StgCmmEnv.hs +++ b/compiler/codeGen/StgCmmEnv.hs @@ -114,9 +114,9 @@ addBindC stuff_to_bind = do addBindsC :: [CgIdInfo] -> FCode () addBindsC new_bindings = do binds <- getBinds - let new_binds = foldl (\ binds info -> extendVarEnv binds (cg_id info) info) - binds - new_bindings + let new_binds = foldl' (\ binds info -> extendVarEnv binds (cg_id info) info) + binds + new_bindings setBinds new_binds getCgIdInfo :: Id -> FCode CgIdInfo diff --git a/rts/Capability.c b/rts/Capability.c index 74f7a29..bda3b0e 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -484,7 +484,7 @@ giveCapabilityToTask (Capability *cap USED_IF_DEBUG, Task *task) if (task->wakeup == false) { task->wakeup = true; // the wakeup flag is needed because signalCondition() doesn't - // flag the condition if the thread is already runniing, but we want + // flag the condition if the thread is already running, but we want // it to be sticky. signalCondition(&task->cond); } From git at git.haskell.org Wed Dec 12 17:39:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 12 Dec 2018 17:39:56 +0000 (UTC) Subject: [commit: ghc] master: Improvements to demand analysis (d77501c) Message-ID: <20181212173956.04A3F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d77501cd5b9060e38acd50e11e0c5aae89d75b65/ghc >--------------------------------------------------------------- commit d77501cd5b9060e38acd50e11e0c5aae89d75b65 Author: Simon Peyton Jones Date: Wed Dec 12 17:22:07 2018 +0000 Improvements to demand analysis This patch collects a few improvements triggered by Trac #15696, and fixing Trac #16029 * Stop making toCleanDmd behave specially for unlifted types. This special case was the cause of stupid behaviour in Trac #16029. And to my joy I discovered the let/app invariant rendered it unnecessary. (Maybe the special case pre-dated the let/app invariant.) Result: less special-case handling in the compiler, and better perf for the compiled code. * In WwLib.mkWWstr_one, treat seqDmd like U(AAA). It was not being so treated before, which again led to stupid code. * Update and improve Notes There are .stderr test wibbles because we get slightly different strictness signatures for an argumment of unlifted type: rather than for Int# rather than for Int >--------------------------------------------------------------- d77501cd5b9060e38acd50e11e0c5aae89d75b65 compiler/basicTypes/Demand.hs | 124 +++--------- compiler/simplStg/StgLiftLams/Analysis.hs | 2 +- compiler/stranal/DmdAnal.hs | 28 +-- compiler/stranal/WwLib.hs | 213 ++++++++++++++++----- .../tests/numeric/should_compile/T7116.stdout | 8 +- .../tests/simplCore/should_compile/T13143.stderr | 4 +- .../tests/simplCore/should_compile/T13543.stderr | 11 +- .../tests/simplCore/should_compile/T3772.stdout | 4 +- .../tests/simplCore/should_compile/T4930.stderr | 4 +- .../simplCore/should_compile/spec-inline.stderr | 4 +- testsuite/tests/stranal/should_compile/Makefile | 5 + testsuite/tests/stranal/should_compile/T16029.hs | 12 ++ .../tests/stranal/should_compile/T16029.stdout | 11 ++ testsuite/tests/stranal/should_compile/all.T | 2 + testsuite/tests/stranal/sigs/HyperStrUse.stderr | 4 +- testsuite/tests/stranal/sigs/T12370.stderr | 8 +- testsuite/tests/stranal/sigs/T8598.stderr | 4 +- 17 files changed, 258 insertions(+), 190 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d77501cd5b9060e38acd50e11e0c5aae89d75b65 From git at git.haskell.org Wed Dec 12 20:29:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 12 Dec 2018 20:29:21 +0000 (UTC) Subject: [commit: ghc] master: Remove dead code (f0eb404) Message-ID: <20181212202921.ABAC53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d/ghc >--------------------------------------------------------------- commit f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d Author: Simon Peyton Jones Date: Wed Dec 12 20:21:12 2018 +0000 Remove dead code This is a follow-up to d77501cd5b Improvements to demand analysis I forgot to remove some now-dead code >--------------------------------------------------------------- f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d compiler/stranal/WwLib.hs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs index ef6be89..a62ed16 100644 --- a/compiler/stranal/WwLib.hs +++ b/compiler/stranal/WwLib.hs @@ -1183,20 +1183,6 @@ mk_absent_let dflags arg -- See also Note [Unique Determinism] in Unique unlifted_rhs = mkTyApps (Lit rubbishLit) [arg_ty] -mk_seq_case :: Id -> CoreExpr -> CoreExpr -mk_seq_case arg body = Case (Var arg) (sanitiseCaseBndr arg) (exprType body) [(DEFAULT, [], body)] - -sanitiseCaseBndr :: Id -> Id --- The argument we are scrutinising has the right type to be --- a case binder, so it's convenient to re-use it for that purpose. --- But we *must* throw away all its IdInfo. In particular, the argument --- will have demand info on it, and that demand info may be incorrect for --- the case binder. e.g. case ww_arg of ww_arg { I# x -> ... } --- Quite likely ww_arg isn't used in '...'. The case may get discarded --- if the case binder says "I'm demanded". This happened in a situation --- like (x+y) `seq` .... -sanitiseCaseBndr id = id `setIdInfo` vanillaIdInfo - mk_ww_local :: Unique -> (Type, StrictnessMark) -> Id -- The StrictnessMark comes form the data constructor and says -- whether this field is strict From git at git.haskell.org Thu Dec 13 04:27:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:14 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Try accepting new output for memcpy test (251db97) Message-ID: <20181213042714.348FC3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/251db9799ad64d36640d388617da8cf793c98240/ghc >--------------------------------------------------------------- commit 251db9799ad64d36640d388617da8cf793c98240 Author: Ben Gamari Date: Tue Dec 11 23:55:47 2018 -0500 testsuite: Try accepting new output for memcpy test See #16037. >--------------------------------------------------------------- 251db9799ad64d36640d388617da8cf793c98240 testsuite/tests/codeGen/should_gen_asm/memcpy.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/codeGen/should_gen_asm/memcpy.asm b/testsuite/tests/codeGen/should_gen_asm/memcpy.asm index 1fb604f..eedd5ad 100644 --- a/testsuite/tests/codeGen/should_gen_asm/memcpy.asm +++ b/testsuite/tests/codeGen/should_gen_asm/memcpy.asm @@ -1,9 +1,9 @@ callMemcpy: + subq movq ; Move arguments into place movq movl - subq - movl + xorl call memcpy addq jmp From git at git.haskell.org Thu Dec 13 04:27:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:17 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix job names (532da1b) Message-ID: <20181213042717.318263ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/532da1b5c9e7d9f37023e828c87f17fd25605ff3/ghc >--------------------------------------------------------------- commit 532da1b5c9e7d9f37023e828c87f17fd25605ff3 Author: Ben Gamari Date: Tue Dec 11 20:03:35 2018 -0500 gitlab-ci: Fix job names >--------------------------------------------------------------- 532da1b5c9e7d9f37023e828c87f17fd25605ff3 .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee8ffae..a87af4c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,13 +159,13 @@ validate-x86_64-linux: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. -circleci-validate-x86_64-linux: +circleci-validate-x86_64-linux-deb8: extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-x86_64-linux" + script: ".gitlab/circle-ci-job.sh validate-x86_64-linux-deb8" -circleci-validate-i386-linux: +circleci-validate-i386-linux-deb8: extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-i386-linux" + script: ".gitlab/circle-ci-job.sh validate-i386-linux-deb8" # circleci-validate-x86_64-freebsd: # extends: .circleci From git at git.haskell.org Thu Dec 13 04:27:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:21 +0000 (UTC) Subject: [commit: ghc] master: Fix recompilation checking of pure plugins (efb6a30) Message-ID: <20181213042721.38FE83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/efb6a30f0b70948ba51497bf2831e009ec6e1378/ghc >--------------------------------------------------------------- commit efb6a30f0b70948ba51497bf2831e009ec6e1378 Author: Daniel Gröber Date: Tue Dec 11 18:36:00 2018 -0500 Fix recompilation checking of pure plugins Previously when switching from using a Plugin with `RecompMaybe`/`ForceRecompile` in `pluginRecompile` to a Plugin with `NoForceRecompile` GHC would never even consider recompiling. However the previously active plugin could have modified the compilation output so we should recompile. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #15858 Differential Revision: https://phabricator.haskell.org/D5299 >--------------------------------------------------------------- efb6a30f0b70948ba51497bf2831e009ec6e1378 compiler/iface/MkIface.hs | 59 ++++++++++++++++++++++++++++------- compiler/main/DynFlags.hs | 7 +++++ docs/users_guide/extending_ghc.rst | 19 ++++++++--- testsuite/tests/plugins/T15858.script | 33 ++++++++++++++++++++ testsuite/tests/plugins/T15858.stderr | 21 +++++++++++++ testsuite/tests/plugins/all.T | 8 +++++ 6 files changed, 132 insertions(+), 15 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc efb6a30f0b70948ba51497bf2831e009ec6e1378 From git at git.haskell.org Thu Dec 13 04:27:24 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:24 +0000 (UTC) Subject: [commit: ghc] master: Enable more GitLab CI ways (fec753d) Message-ID: <20181213042724.341CE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/fec753d87e9da6c65b956b0fa3de897d1f80e8ab/ghc >--------------------------------------------------------------- commit fec753d87e9da6c65b956b0fa3de897d1f80e8ab Author: Ben Gamari Date: Tue Dec 11 20:12:10 2018 -0500 Enable more GitLab CI ways But allow failure since CircleCI is still our source of truth. >--------------------------------------------------------------- fec753d87e9da6c65b956b0fa3de897d1f80e8ab .gitlab-ci.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a87af4c..967dafc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" before_script: - - python .gitlab/fix-submodules.py + - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules @@ -12,20 +12,21 @@ before_script: ############################################################ .validate-hadrian: + allow_failure: true script: - bash .circleci/prepare-system.sh - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi - ./boot - - ./configure + - ./configure $CONFIGURE_ARGS - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` cache: key: hadrian paths: - cabal-cache - image: ghcci/x86_64-linux-deb8:0.1 -.validate-x86_64-linux-hadrian: +validate-x86_64-linux-deb8-hadrian: extends: .validate-hadrian + image: ghcci/x86_64-linux-deb8:0.1 before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . @@ -37,10 +38,11 @@ before_script: ############################################################ .validate: + allow_failure: true script: - make clean || true - ./boot - - ./configure + - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` make V=0 -j$THREADS @@ -50,7 +52,6 @@ before_script: - | THREADS=`mk/detect-cpu-count.sh` make test THREADS=$THREADS JUNIT_FILE=../../junit.xml - image: ghcci/x86_64-linux-deb8:0.1 artifacts: when: always reports: @@ -86,12 +87,13 @@ before_script: - cabal-cache - toolchain -validate-x86_64-linux: + +.validate-linux: extends: .validate tags: - x86_64-linux before_script: - - python .gitlab/fix-submodules.py + - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules @@ -102,11 +104,45 @@ validate-x86_64-linux: after_script: - cp -Rf $HOME/.cabal cabal-cache cache: - key: darwin + key: linux paths: - cabal-cache - toolchain +validate-x86_64-linux-deb9: + extends: .validate-linux + image: ghcci/x86_64-linux-deb9:0.1 + cache: + key: linux-x86_64-deb9 + +validate-x86_64-linux-deb8: + extends: .validate-linux + image: ghcci/x86_64-linux-deb8:0.1 + cache: + key: linux-x86_64-deb8 + +validate-x86_64-linux-fedora27: + extends: .validate-linux + image: ghcci/x86_64-linux-fedora27:0.1 + cache: + key: linux-x86_64-fedora27 + +validate-x86_64-linux-deb9-integer-simple: + extends: .validate-linux + variables: + INTEGER_LIBRARY: integer-simple + image: ghcci/x86_64-linux-deb9:0.1 + cache: + key: linux-x86_64-deb9 + +validate-x86_64-linux-deb9-unreg: + extends: .validate-linux + variables: + CONFIGURE_ARGS: --enable-unregisterised + image: ghcci/x86_64-linux-deb9:0.1 + cache: + key: linux-x86_64-deb9 + ############################################################ # Validation via Pipelines (make, Windows) ############################################################ From git at git.haskell.org Thu Dec 13 04:27:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:27 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Enable Haddock documentation (b2912c8) Message-ID: <20181213042727.381443ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b2912c892c6e3b9f1dc4a9335b1ed4c94b724578/ghc >--------------------------------------------------------------- commit b2912c892c6e3b9f1dc4a9335b1ed4c94b724578 Author: Ben Gamari Date: Sat Dec 1 15:36:19 2018 -0500 gitlab-ci: Enable Haddock documentation >--------------------------------------------------------------- b2912c892c6e3b9f1dc4a9335b1ed4c94b724578 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0cf24d..ee8ffae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ before_script: - ./configure - | THREADS=`mk/detect-cpu-count.sh` - make V=0 -j$THREADS HADDOCK_DOCS=NO + make V=0 -j$THREADS - | make binary-dist TAR_COMP_OPTS="-1" mv ghc-*.tar.xz ghc.tar.xz From git at git.haskell.org Thu Dec 13 04:27:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:30 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Print which ways we are going to run (2500588) Message-ID: <20181213042730.36FDE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/250058891a52cb790bc53ab7cf947a8fb2837466/ghc >--------------------------------------------------------------- commit 250058891a52cb790bc53ab7cf947a8fb2837466 Author: Ben Gamari Date: Wed Dec 12 16:41:49 2018 -0500 testsuite: Print which ways we are going to run >--------------------------------------------------------------- 250058891a52cb790bc53ab7cf947a8fb2837466 testsuite/driver/runtests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 02d00f0..55b13df 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -245,6 +245,9 @@ if config.timeout == -1: config.timeout = int(read_no_crs(config.top + '/timeout/calibrate.out')) print('Timeout is ' + str(config.timeout)) +print('Known ways: ' + ', '.join(config.other_ways)) +print('Run ways: ' + ', '.join(config.run_ways)) +print('Compile ways: ' + ', '.join(config.compile_ways)) # Try get allowed performance changes from the git commit. try: @@ -252,7 +255,7 @@ try: except subprocess.CalledProcessError: print('Failed to get allowed metric changes from the HEAD git commit message.') -print(len(config.allowed_perf_changes)) +print('Allowing performance changes in: ' + ', '.join(config.allowed_perf_changes.keys())) # ----------------------------------------------------------------------------- # The main dude From git at git.haskell.org Thu Dec 13 04:27:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:33 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix a number of GHCi-related failures due to integer-simple (14500da) Message-ID: <20181213042733.3A0653ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/14500dab3e9c24d2701c8be6f5a0fca30531ab80/ghc >--------------------------------------------------------------- commit 14500dab3e9c24d2701c8be6f5a0fca30531ab80 Author: Ben Gamari Date: Wed Dec 12 16:42:37 2018 -0500 testsuite: Fix a number of GHCi-related failures due to integer-simple Towards fixing #16043. >--------------------------------------------------------------- 14500dab3e9c24d2701c8be6f5a0fca30531ab80 testsuite/driver/testlib.py | 5 +++ testsuite/mk/test.mk | 2 ++ testsuite/tests/ghci.debugger/scripts/all.T | 53 +++++++++++++++-------------- testsuite/tests/ghci/scripts/all.T | 4 +-- testsuite/tests/lib/integer/all.T | 4 +-- 5 files changed, 38 insertions(+), 30 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 14500dab3e9c24d2701c8be6f5a0fca30531ab80 From git at git.haskell.org Thu Dec 13 04:27:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:36 +0000 (UTC) Subject: [commit: ghc] master: configure: Disable LD_NO_GOLD logic when cross-compiling (0d7fb47) Message-ID: <20181213042736.374783ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/0d7fb471f368237462c700bac5500a90d29a1114/ghc >--------------------------------------------------------------- commit 0d7fb471f368237462c700bac5500a90d29a1114 Author: Ben Gamari Date: Wed Dec 12 12:17:21 2018 -0500 configure: Disable LD_NO_GOLD logic when cross-compiling This is generally terrible: see #16025. In short, we previously just blindly used an un-prefixed ld for LD_NO_GOLD. This is blatantly wrong. Ideally we would actually verify that ld.gold is indeed broken (by binutils #22266) before insisting on using another linker but sadly we cannot do so when cross-compiling since this would require running host code. For now we simply disable the LD_NO_GOLD logic when cross-compiling and hope that the user has verified that their ld.gold isn't affected by #22266. >--------------------------------------------------------------- 0d7fb471f368237462c700bac5500a90d29a1114 aclocal.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 447fd61..7aa3fb4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2408,7 +2408,11 @@ AC_DEFUN([FIND_LD],[ FP_CC_LINKER_FLAG_TRY(bfd, $2) ;; "GNU gold"*) FP_CC_LINKER_FLAG_TRY(gold, $2) - LD_NO_GOLD=ld + if test "$cross_compiling" = "yes"; then + AC_MSG_NOTICE([Using ld.gold and assuming that it is not affected by binutils issue 22266]); + else + LD_NO_GOLD=ld; + fi ;; "LLD"*) FP_CC_LINKER_FLAG_TRY(lld, $2) ;; From git at git.haskell.org Thu Dec 13 04:27:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:39 +0000 (UTC) Subject: [commit: ghc] master: RetainerProfiler: Update retainer profiler debugging (b2227af) Message-ID: <20181213042739.3FC9F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b2227af3205534c2bdf3e93ed2d1cf1da5864a77/ghc >--------------------------------------------------------------- commit b2227af3205534c2bdf3e93ed2d1cf1da5864a77 Author: Alexander Vershilov Date: Wed Dec 12 09:53:57 2018 -0500 RetainerProfiler: Update retainer profiler debugging Debug code have not been updated for a long time, now it's changed to it compiles with recent RTS. Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5369 >--------------------------------------------------------------- b2227af3205534c2bdf3e93ed2d1cf1da5864a77 rts/RetainerProfile.c | 210 ++++++++++++++++++++------------------------------ 1 file changed, 85 insertions(+), 125 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b2227af3205534c2bdf3e93ed2d1cf1da5864a77 From git at git.haskell.org Thu Dec 13 04:27:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:42 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Normalise away spurious differences in out-of-scope instances (9d9f4c9) Message-ID: <20181213042742.39E963ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9d9f4c9a7c04e152b40ae2db7c051cd9e0f5df61/ghc >--------------------------------------------------------------- commit 9d9f4c9a7c04e152b40ae2db7c051cd9e0f5df61 Author: Ben Gamari Date: Wed Dec 12 16:45:55 2018 -0500 testsuite: Normalise away spurious differences in out-of-scope instances This fixes a variety of testsuite failures with integer-simple of the form ``` --- typecheck/should_fail/tcfail072.run/tcfail072.stderr.normalised +++ typecheck/should_fail/tcfail072.run/tcfail072.comp.stderr.normalised @@ -12,7 +12,7 @@ -- Defined in ‘integer--:GHC.Integer.Type’ instance Ord () -- Defined in ‘GHC.Classes’ ...plus 21 others - ...plus three instances involving out-of-scope types + ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) In the expression: g A In an equation for ‘g’: g (B _ _) = g A ``` In service of fixing #16043. >--------------------------------------------------------------- 9d9f4c9a7c04e152b40ae2db7c051cd9e0f5df61 testsuite/driver/testlib.py | 8 +++++++- testsuite/tests/arrows/should_compile/all.T | 2 +- testsuite/tests/determinism/determ021/all.T | 5 ++++- testsuite/tests/partial-sigs/should_fail/all.T | 2 +- testsuite/tests/typecheck/should_fail/all.T | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index dca6ed1..e5de8e5 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1739,9 +1739,15 @@ def normalise_errmsg( str ): # collisions, so we need to normalise that to just "ghc" str = re.sub('ghc-stage[123]', 'ghc', str) - # Error messages simetimes contain integer implementation package + # Error messages sometimes contain integer implementation package str = re.sub('integer-(gmp|simple)-[0-9.]+', 'integer--', str) + # Error messages sometimes contain this blurb which can vary + # spuriously depending upon build configuration (e.g. based on integer + # backend) + str = re.sub('...plus [a-z]+ instances involving out-of-scope types', + '...plus N instances involving out-of-scope types', str) + # Also filter out bullet characters. This is because bullets are used to # separate error sections, and tests shouldn't be sensitive to how the # the division happens. diff --git a/testsuite/tests/arrows/should_compile/all.T b/testsuite/tests/arrows/should_compile/all.T index ace8af5..279dd10 100644 --- a/testsuite/tests/arrows/should_compile/all.T +++ b/testsuite/tests/arrows/should_compile/all.T @@ -14,5 +14,5 @@ test('arrowpat', normal, compile, ['']) test('T3964', normal, compile, ['']) test('T5283', normal, compile, ['']) test('T5267', expect_broken(5267), compile, ['']) -test('T5022', normal, compile, ['']) +test('T5022', normalise_fun(normalise_errmsg), compile, ['']) test('T5333', normal, compile, ['']) diff --git a/testsuite/tests/determinism/determ021/all.T b/testsuite/tests/determinism/determ021/all.T index 9fde644..331d1f1 100644 --- a/testsuite/tests/determinism/determ021/all.T +++ b/testsuite/tests/determinism/determ021/all.T @@ -1 +1,4 @@ -test('determ021', [extra_files(['A.hs'])], run_command, ['$MAKE -s --no-print-directory determ021']) +test('determ021', + [normalise_fun(normalise_errmsg), extra_files(['A.hs'])], + run_command, + ['$MAKE -s --no-print-directory determ021']) diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T index 9866029..949f449 100644 --- a/testsuite/tests/partial-sigs/should_fail/all.T +++ b/testsuite/tests/partial-sigs/should_fail/all.T @@ -57,7 +57,7 @@ test('WildcardInTypeSynonymLHS', normal, compile_fail, ['']) test('WildcardInTypeSynonymRHS', normal, compile_fail, ['']) test('T10615', normal, compile_fail, ['']) test('T10045', normal, compile_fail, ['']) -test('T10999', normal, compile_fail, ['']) +test('T10999', normalise_fun(normalise_errmsg), compile_fail, ['']) test('T11122', normal, compile, ['']) test('T11515', normal, compile_fail, ['']) test('T11976', normal, compile_fail, ['']) diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 777d1b9..e8efeb5 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -60,7 +60,7 @@ test('tcfail068', normal, compile_fail, ['']) test('tcfail069', normal, compile_fail, ['']) test('tcfail070', normal, compile_fail, ['']) test('tcfail071', normal, compile, ['']) -test('tcfail072', normal, compile_fail, ['']) +test('tcfail072', normalise_fun(normalise_errmsg), compile_fail, ['']) test('tcfail073', normal, compile_fail, ['']) test('tcfail075', normal, compile_fail, ['']) test('tcfail076', normal, compile_fail, ['']) @@ -250,7 +250,7 @@ test('T5051', normal, compile, ['']) test('T5236',normal,compile,['']) test('T5246',normal,compile_fail,['']) test('T5300',normal,compile_fail,['']) -test('T5095',normal,compile_fail,['']) +test('T5095',normalise_fun(normalise_errmsg),compile_fail,['']) test('T1897a',normal,compile_fail,['']) test('AssocTyDef01', normal, compile_fail, ['']) From git at git.haskell.org Thu Dec 13 04:27:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:27:45 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Normalise away package name differences from safePkg01 (cd4477c) Message-ID: <20181213042745.333653ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cd4477c9137d6df8dfc00d66d54900d45f047af9/ghc >--------------------------------------------------------------- commit cd4477c9137d6df8dfc00d66d54900d45f047af9 Author: Ben Gamari Date: Wed Dec 12 16:57:01 2018 -0500 testsuite: Normalise away package name differences from safePkg01 Spurious changes observed in a integer-simple build. In service of #16043. >--------------------------------------------------------------- cd4477c9137d6df8dfc00d66d54900d45f047af9 testsuite/tests/safeHaskell/check/pkg01/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/safeHaskell/check/pkg01/all.T b/testsuite/tests/safeHaskell/check/pkg01/all.T index 8574694..105ea5f 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/all.T +++ b/testsuite/tests/safeHaskell/check/pkg01/all.T @@ -28,7 +28,7 @@ make_args = 'VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn # and can be changed correctly test('safePkg01', [extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']), - normalise_errmsg_fun(ignoreLdOutput), + normalise_errmsg_fun(ignoreLdOutput, normalise_errmsg), normalise_version("array", "integer-gmp", "integer-simple", "bytestring", "base", "deepseq", "ghc-prim")], run_command, ['$MAKE -s --no-print-directory safePkg01 ' + make_args]) From git at git.haskell.org Thu Dec 13 04:56:12 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 04:56:12 +0000 (UTC) Subject: [commit: ghc] master: Show recursive Stg bindings in Rec {} blocks (f899b38) Message-ID: <20181213045612.A0A773ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f899b3892a8c1ce130d6f3f952045fc758099501/ghc >--------------------------------------------------------------- commit f899b3892a8c1ce130d6f3f952045fc758099501 Author: Ömer Sinan Ağacan Date: Thu Dec 13 07:55:38 2018 +0300 Show recursive Stg bindings in Rec {} blocks Makes the printer same as Rec binding printer in Core Reviewers: sgraf, bgamari Reviewed By: sgraf Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5441 >--------------------------------------------------------------- f899b3892a8c1ce130d6f3f952045fc758099501 compiler/stgSyn/StgSyn.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/stgSyn/StgSyn.hs b/compiler/stgSyn/StgSyn.hs index e55cba6..2f3148c 100644 --- a/compiler/stgSyn/StgSyn.hs +++ b/compiler/stgSyn/StgSyn.hs @@ -725,8 +725,9 @@ pprGenStgBinding (StgNonRec bndr rhs) 4 (ppr rhs <> semi) pprGenStgBinding (StgRec pairs) - = vcat $ whenPprDebug (text "{- StgRec (begin) -}") : - map (ppr_bind) pairs ++ [whenPprDebug (text "{- StgRec (end) -}")] + = vcat [ text "Rec {" + , vcat (map ppr_bind pairs) + , text "end Rec }" ] where ppr_bind (bndr, expr) = hang (hsep [pprBndr LetBind bndr, equals]) From git at git.haskell.org Thu Dec 13 23:38:32 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 13 Dec 2018 23:38:32 +0000 (UTC) Subject: [commit: ghc] master: Remove another unused import from WwLib (80ccee2) Message-ID: <20181213233832.D5F5A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/80ccee2367952ca634adf58c42bca0b53cedd803/ghc >--------------------------------------------------------------- commit 80ccee2367952ca634adf58c42bca0b53cedd803 Author: Simon Peyton Jones Date: Thu Dec 13 23:37:04 2018 +0000 Remove another unused import from WwLib >--------------------------------------------------------------- 80ccee2367952ca634adf58c42bca0b53cedd803 compiler/stranal/WwLib.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs index a62ed16..902adbf 100644 --- a/compiler/stranal/WwLib.hs +++ b/compiler/stranal/WwLib.hs @@ -18,7 +18,7 @@ import GhcPrelude import CoreSyn import CoreUtils ( exprType, mkCast ) import Id -import IdInfo ( JoinArity, vanillaIdInfo ) +import IdInfo ( JoinArity ) import DataCon import Demand import MkCore ( mkAbsentErrorApp, mkCoreUbxTup From git at git.haskell.org Fri Dec 14 02:59:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 02:59:48 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Don't save artifacts for unreg and integer-simple ways (966b912) Message-ID: <20181214025948.7BFDB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/966b9126036bd95d934c1cb3b1fcb31fe0a6c202/ghc >--------------------------------------------------------------- commit 966b9126036bd95d934c1cb3b1fcb31fe0a6c202 Author: Ben Gamari Date: Thu Dec 13 00:25:58 2018 -0500 gitlab-ci: Don't save artifacts for unreg and integer-simple ways >--------------------------------------------------------------- 966b9126036bd95d934c1cb3b1fcb31fe0a6c202 .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 967dafc..55ea67f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,7 +53,6 @@ validate-x86_64-linux-deb8-hadrian: THREADS=`mk/detect-cpu-count.sh` make test THREADS=$THREADS JUNIT_FILE=../../junit.xml artifacts: - when: always reports: junit: junit.xml paths: @@ -81,6 +80,8 @@ validate-x86_64-linux-deb8-hadrian: - echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache + artifacts: + when: always cache: key: darwin paths: @@ -120,12 +121,16 @@ validate-x86_64-linux-deb8: image: ghcci/x86_64-linux-deb8:0.1 cache: key: linux-x86_64-deb8 + artifacts: + when: always validate-x86_64-linux-fedora27: extends: .validate-linux image: ghcci/x86_64-linux-fedora27:0.1 cache: key: linux-x86_64-fedora27 + artifacts: + when: always validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux From git at git.haskell.org Fri Dec 14 02:59:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 02:59:51 +0000 (UTC) Subject: [commit: ghc] master: Add some complexities to Data.List documentation (#15003) (6cf8d0b) Message-ID: <20181214025951.E8CEB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6cf8d0b3bf61bc4134780c9efab2ab882d57e0f0/ghc >--------------------------------------------------------------- commit 6cf8d0b3bf61bc4134780c9efab2ab882d57e0f0 Author: Sven Tennie Date: Wed Dec 5 17:58:40 2018 +0100 Add some complexities to Data.List documentation (#15003) Describe complexity and add an example for `GHC.List.filter`. >--------------------------------------------------------------- 6cf8d0b3bf61bc4134780c9efab2ab882d57e0f0 libraries/base/Data/OldList.hs | 30 +++++++++++++++++------------- libraries/base/GHC/List.hs | 12 +++++++++--- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index 80c6267..99ad914 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -431,8 +431,8 @@ elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs #endif --- | 'delete' @x@ removes the first occurrence of @x@ from its list argument. --- For example, +-- | /O(n)/. 'delete' @x@ removes the first occurrence of @x@ from its list +-- argument. For example, -- -- >>> delete 'a' "banana" -- "bnana" @@ -442,7 +442,7 @@ elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs delete :: (Eq a) => a -> [a] -> [a] delete = deleteBy (==) --- | The 'deleteBy' function behaves like 'delete', but takes a +-- | /O(n)/. The 'deleteBy' function behaves like 'delete', but takes a -- user-supplied equality predicate. -- -- >>> deleteBy (<=) 4 [1..10] @@ -618,19 +618,18 @@ mapAccumR f s (x:xs) = (s'', y:ys) where (s'',y ) = f s' x (s', ys) = mapAccumR f s xs --- | The 'insert' function takes an element and a list and inserts the --- element into the list at the first position where it is less --- than or equal to the next element. In particular, if the list --- is sorted before the call, the result will also be sorted. --- It is a special case of 'insertBy', which allows the programmer to --- supply their own comparison function. +-- | /O(n)/. The 'insert' function takes an element and a list and inserts the +-- element into the list at the first position where it is less than or equal to +-- the next element. In particular, if the list is sorted before the call, the +-- result will also be sorted. It is a special case of 'insertBy', which allows +-- the programmer to supply their own comparison function. -- -- >>> insert 4 [1,2,3,5,6,7] -- [1,2,3,4,5,6,7] insert :: Ord a => a -> [a] -> [a] insert e ls = insertBy (compare) e ls --- | The non-overloaded version of 'insert'. +-- | /O(n)/. The non-overloaded version of 'insert'. insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a] insertBy _ x [] = [x] insertBy cmp x ys@(y:ys') @@ -670,9 +669,14 @@ minimumBy cmp xs = foldl1 minBy xs GT -> y _ -> x --- | The 'genericLength' function is an overloaded version of 'length'. In --- particular, instead of returning an 'Int', it returns any type which is --- an instance of 'Num'. It is, however, less efficient than 'length'. +-- | /O(n)/. The 'genericLength' function is an overloaded version of 'length'. +-- In particular, instead of returning an 'Int', it returns any type which is an +-- instance of 'Num'. It is, however, less efficient than 'length'. +-- +-- >>> genericLength [1, 2, 3] :: Int +-- 3 +-- >>> genericLength [1, 2, 3] :: Float +-- 3.0 genericLength :: (Num i) => [a] -> i {-# NOINLINE [1] genericLength #-} genericLength [] = 0 diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs index 6b86b1f..fced329 100644 --- a/libraries/base/GHC/List.hs +++ b/libraries/base/GHC/List.hs @@ -142,10 +142,13 @@ lengthFB _ r = \ !a -> r (a + 1) idLength :: Int -> Int idLength = id --- | 'filter', applied to a predicate and a list, returns the list of +-- | /O(n)/. 'filter', applied to a predicate and a list, returns the list of -- those elements that satisfy the predicate; i.e., -- -- > filter p xs = [ x | x <- xs, p x] +-- +-- >>> filter odd [1, 2, 3] +-- [1,3] {-# NOINLINE [1] filter #-} filter :: (a -> Bool) -> [a] -> [a] @@ -847,11 +850,14 @@ notElem x (y:ys)= x /= y && notElem x ys #-} #endif --- | 'lookup' @key assocs@ looks up a key in an association list. +-- | /O(n)/. 'lookup' @key assocs@ looks up a key in an association list. +-- +-- >>> lookup 2 [(1, "first"), (2, "second"), (3, "third")] +-- Just "second" lookup :: (Eq a) => a -> [(a,b)] -> Maybe b lookup _key [] = Nothing lookup key ((x,y):xys) - | key == x = Just y + | key == x = Just y | otherwise = lookup key xys -- | Map a function over a list and concatenate the results. From git at git.haskell.org Fri Dec 14 02:59:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 02:59:56 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Add linters (e9f68a1) Message-ID: <20181214025956.16E013ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e9f68a1529687b11e22cf2b28e119b043dded6a6/ghc >--------------------------------------------------------------- commit e9f68a1529687b11e22cf2b28e119b043dded6a6 Author: Ben Gamari Date: Thu Dec 13 13:53:27 2018 -0500 gitlab-ci: Add linters These are taken from our previous arcanist linters as well as the gitolite hooks but with some heavy refactoring. >--------------------------------------------------------------- e9f68a1529687b11e22cf2b28e119b043dded6a6 .../{x86_64-linux-deb8 => linters}/Dockerfile | 29 +++--- .gitlab-ci.yml | 30 +++++- .gitlab/linters/check-cpp.py | 22 +++++ .gitlab/linters/check-makefiles.py | 19 ++++ .gitlab/linters/linter.py | 109 +++++++++++++++++++++ 5 files changed, 191 insertions(+), 18 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e9f68a1529687b11e22cf2b28e119b043dded6a6 From git at git.haskell.org Fri Dec 14 02:59:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 02:59:59 +0000 (UTC) Subject: [commit: ghc] master: Fix broken link in comment (#16010) (2634d84) Message-ID: <20181214025959.20F2B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2634d840269c84c4f929af52f3b592ece64f3b86/ghc >--------------------------------------------------------------- commit 2634d840269c84c4f929af52f3b592ece64f3b86 Author: Sven Tennie Date: Tue Dec 11 18:04:20 2018 +0100 Fix broken link in comment (#16010) >--------------------------------------------------------------- 2634d840269c84c4f929af52f3b592ece64f3b86 libraries/base/Data/OldList.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index 8203135..80c6267 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -221,7 +221,7 @@ import GHC.Real import GHC.List import GHC.Base -infix 5 \\ -- comment to fool cpp: https://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps +infix 5 \\ -- comment to fool cpp: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#cpp-and-string-gaps -- ----------------------------------------------------------------------------- -- List functions From git at git.haskell.org Fri Dec 14 03:00:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:02 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Add LLVM way (f4ac0b0) Message-ID: <20181214030002.2050C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f4ac0b0c73298de7a3223825274793215cbd2e86/ghc >--------------------------------------------------------------- commit f4ac0b0c73298de7a3223825274793215cbd2e86 Author: Ben Gamari Date: Thu Dec 13 00:26:59 2018 -0500 gitlab-ci: Add LLVM way >--------------------------------------------------------------- f4ac0b0c73298de7a3223825274793215cbd2e86 .circleci/config.yml | 12 ++---------- .circleci/images/update-image | 1 + .circleci/images/x86_64-linux-deb9/Dockerfile | 9 +++++++++ .circleci/prepare-system.sh | 8 ++++++++ .gitlab-ci.yml | 16 +++++++++++++--- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d455940..ed10d21 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,13 +25,6 @@ aliases: name: Boot command: | ./boot - - cat <> mk/build.mk - BuildFlavour=$BUILD_FLAVOUR - ifneq "\$(BuildFlavour)" "" - include mk/flavours/\$(BuildFlavour).mk - endif - EOF - &set_git_identity run: name: Set Git Identity @@ -187,7 +180,7 @@ jobs: "validate-x86_64-linux-deb9-integer-simple": resource_class: xlarge docker: - - image: ghcci/x86_64-linux-deb9:0.1 + - image: ghcci/x86_64-linux-deb9:0.2 environment: <<: *buildenv INTEGER_LIBRARY: integer-simple @@ -277,7 +270,6 @@ jobs: - run: name: Install LLVM command: | - curl http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-debian8.tar.xz | tar -xJC .. echo "export PATH=`pwd`/../clang+llvm-6.0.0-x86_64-linux-gnu-debian8/bin:\$PATH" >> $BASH_ENV - run: name: Verify that llc works @@ -320,7 +312,7 @@ jobs: "validate-i386-linux-deb9": resource_class: xlarge docker: - - image: ghcci/i386-linux-deb9:0.1 + - image: ghcci/i386-linux-deb9:0.2 environment: <<: *buildenv GHC_COLLECTOR_FLAVOR: i386-linux-deb9 diff --git a/.circleci/images/update-image b/.circleci/images/update-image index 9900b35..dd69122 100755 --- a/.circleci/images/update-image +++ b/.circleci/images/update-image @@ -30,4 +30,5 @@ docker push $repo/$name:$version repo_name="$repo/$name" sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../config.yml +sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../../.gitlab-ci.yml echo "Built, pushed, and bumped $name:$version" diff --git a/.circleci/images/x86_64-linux-deb9/Dockerfile b/.circleci/images/x86_64-linux-deb9/Dockerfile index 6d14daa..5341abe 100644 --- a/.circleci/images/x86_64-linux-deb9/Dockerfile +++ b/.circleci/images/x86_64-linux-deb9/Dockerfile @@ -22,6 +22,15 @@ RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2 ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH +# LLVM +ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz +ENV PATH /opt/llvm/bin:$PATH +RUN curl $LLVM_TARBALL | tar -xJC ..; \ + mkdir /opt/llvm; \ + cp -R clang+llvm*/* /opt/llvm; \ + rm -R clang+llvm*; \ + llc --version + # Create a normal user. RUN adduser ghc --gecos "GHC builds" --disabled-password RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc diff --git a/.circleci/prepare-system.sh b/.circleci/prepare-system.sh index d424243..804e0fd 100755 --- a/.circleci/prepare-system.sh +++ b/.circleci/prepare-system.sh @@ -12,6 +12,7 @@ hackage_index_state="@1522046735" if [[ -z ${BUILD_SPHINX_HTML:-} ]]; then BUILD_SPHINX_HTML=YES; fi if [[ -z ${BUILD_SPHINX_PDF:-} ]]; then BUILD_SPHINX_PDF=YES; fi if [[ -z ${INTEGER_LIBRARY:-} ]]; then INTEGER_LIBRARY=integer-gmp; fi +if [[ -z ${BUILD_FLAVOUR:-} ]]; then BUILD_FLAVOUR=perf; fi cat > mk/build.mk <> mk/build.mk +BuildFlavour=$BUILD_FLAVOUR +ifneq "\$(BuildFlavour)" "" +include mk/flavours/\$(BuildFlavour).mk +endif +EOF + case "$(uname)" in Linux) if [[ -n ${TARGET:-} ]]; then diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4273c3..5af0b0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,17 @@ validate-x86_64-darwin: validate-x86_64-linux-deb9: extends: .validate-linux - image: ghcci/x86_64-linux-deb9:0.1 + image: ghcci/x86_64-linux-deb9:0.2 + artifacts: + when: always + cache: + key: linux-x86_64-deb9 + +validate-x86_64-linux-deb9-llvm: + extends: .validate-linux + image: ghcci/x86_64-linux-deb9:0.2 + variables: + BUILD_FLAVOUR: perf-llvm cache: key: linux-x86_64-deb9 @@ -136,7 +146,7 @@ validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux variables: INTEGER_LIBRARY: integer-simple - image: ghcci/x86_64-linux-deb9:0.1 + image: ghcci/x86_64-linux-deb9:0.2 cache: key: linux-x86_64-deb9 @@ -144,7 +154,7 @@ validate-x86_64-linux-deb9-unreg: extends: .validate-linux variables: CONFIGURE_ARGS: --enable-unregisterised - image: ghcci/x86_64-linux-deb9:0.1 + image: ghcci/x86_64-linux-deb9:0.2 cache: key: linux-x86_64-deb9 From git at git.haskell.org Fri Dec 14 03:00:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:05 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Bump Darwin boot compiler to 8.6.3 (bcca67d) Message-ID: <20181214030005.16E203ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bcca67d584b55d42e7f253a747080030036cd821/ghc >--------------------------------------------------------------- commit bcca67d584b55d42e7f253a747080030036cd821 Author: Ben Gamari Date: Thu Dec 13 18:00:28 2018 -0500 gitlab-ci: Bump Darwin boot compiler to 8.6.3 >--------------------------------------------------------------- bcca67d584b55d42e7f253a747080030036cd821 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c19167..6ef2ca8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,7 @@ validate-x86_64-darwin: tags: - x86_64-darwin variables: - GHC_VERSION: 8.6.2 + GHC_VERSION: 8.6.3 MACOSX_DEPLOYMENT_TARGET: "10.7" # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" From git at git.haskell.org Fri Dec 14 03:00:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:08 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Enable darwin builds (4d77646) Message-ID: <20181214030008.105183ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4d7764657251ad374fe12117d53dc4460b0c58bf/ghc >--------------------------------------------------------------- commit 4d7764657251ad374fe12117d53dc4460b0c58bf Author: Ben Gamari Date: Thu Dec 13 00:26:19 2018 -0500 gitlab-ci: Enable darwin builds >--------------------------------------------------------------- 4d7764657251ad374fe12117d53dc4460b0c58bf .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55ea67f..b4273c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ validate-x86_64-linux-deb8-hadrian: - ghc.tar.xz - junit.xml -.validate-x86_64-darwin: +validate-x86_64-darwin: extends: .validate tags: - x86_64-darwin From git at git.haskell.org Fri Dec 14 03:00:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:11 +0000 (UTC) Subject: [commit: ghc] master: llvm-targets: Add amd64-unknown-freebsd triple (9b8713e) Message-ID: <20181214030011.0CD4E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9b8713e8bf905c17251a0fad22eee690c4e50f0c/ghc >--------------------------------------------------------------- commit 9b8713e8bf905c17251a0fad22eee690c4e50f0c Author: Ben Gamari Date: Thu Dec 13 13:25:05 2018 -0500 llvm-targets: Add amd64-unknown-freebsd triple 396aac4c65a47b6252e0a73d2a3066e924d53f11 added the amd64-portbld-freebsd triple but #15718 suggests that we should rather be using x86_64-unknown-freebsd. Not knowing which is correct I've left the amd64-portbld- triplet in place. >--------------------------------------------------------------- 9b8713e8bf905c17251a0fad22eee690c4e50f0c llvm-targets | 1 + utils/llvm-targets/gen-data-layout.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/llvm-targets b/llvm-targets index 2537ece..a73eb84 100644 --- a/llvm-targets +++ b/llvm-targets @@ -17,6 +17,7 @@ ,("aarch64-unknown-linux-android", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("powerpc64le-unknown-linux", ("e-m:e-i64:64-n32:64", "ppc64le", "")) ,("amd64-portbld-freebsd", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) +,("x86_64-unknown-freebsd", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) ,("arm-unknown-nto-qnx-eabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm7tdmi", "+strict-align")) ,("i386-apple-darwin", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) ,("x86_64-apple-darwin", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 85ee5c5..7060b10 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -34,6 +34,7 @@ TARGETS=( # FreeBSD amd64 "amd64-portbld-freebsd" + "x86_64-unknown-freebsd" # See #15718 # QNX "arm-unknown-nto-qnx-eabi" From git at git.haskell.org Fri Dec 14 03:00:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:14 +0000 (UTC) Subject: [commit: ghc] master: llvmGen: Fix minor correctness issue (d9d1b9b) Message-ID: <20181214030014.08B863ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d9d1b9b00321743611b271da3d427f9ffea00b96/ghc >--------------------------------------------------------------- commit d9d1b9b00321743611b271da3d427f9ffea00b96 Author: Gabor Greif Date: Tue Nov 20 18:18:55 2018 +0100 llvmGen: Fix minor correctness issue The alias is of type i8, so its global variable name should have type i8*. Anyway we should never deal with pointers to (i8*)! >--------------------------------------------------------------- d9d1b9b00321743611b271da3d427f9ffea00b96 compiler/llvmGen/LlvmCodeGen/Base.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs index 21b45e5..e978d6f 100644 --- a/compiler/llvmGen/LlvmCodeGen/Base.hs +++ b/compiler/llvmGen/LlvmCodeGen/Base.hs @@ -480,7 +480,7 @@ aliasify (LMGlobal var val) = do defVar = LMGlobalVar defLbl ty Internal sect align const defPtrVar = LMGlobalVar defLbl (LMPointer ty) link Nothing Nothing const - aliasVar = LMGlobalVar lbl (LMPointer i8Ptr) link Nothing Nothing Alias + aliasVar = LMGlobalVar lbl i8Ptr link Nothing Nothing Alias aliasVal = LMBitc (LMStaticPointer defPtrVar) i8Ptr -- we need to mark the $def symbols as used so LLVM doesn't forget which From git at git.haskell.org Fri Dec 14 03:00:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 03:00:17 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix typo: integer-gimp /= integer-gmp (fa2a6e4) Message-ID: <20181214030017.0469D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/fa2a6e4fe95c20a21d7722eacc9aea18343c034e/ghc >--------------------------------------------------------------- commit fa2a6e4fe95c20a21d7722eacc9aea18343c034e Author: Ben Gamari Date: Thu Dec 13 11:45:27 2018 -0500 testsuite: Fix typo: integer-gimp /= integer-gmp >--------------------------------------------------------------- fa2a6e4fe95c20a21d7722eacc9aea18343c034e testsuite/driver/testlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index e5de8e5..1c6668d 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -215,7 +215,7 @@ def record_broken(name, opts, bug): def broken_without_gmp(name, opts): # Many tests sadly break with integer-simple due to GHCi's ignorance of it. - when(config.integer_backend != "integer-gimp", + when(config.integer_backend != "integer-gmp", expect_broken(16043)) def _expect_pass(way): From git at git.haskell.org Fri Dec 14 04:31:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 14 Dec 2018 04:31:35 +0000 (UTC) Subject: [commit: ghc] master: Update -F RTS help: (f583ccf) Message-ID: <20181214043135.A074D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f583ccfe640815d853dab25c0d92a239dc3c3244/ghc >--------------------------------------------------------------- commit f583ccfe640815d853dab25c0d92a239dc3c3244 Author: Ömer Sinan Ağacan Date: Fri Dec 14 07:31:00 2018 +0300 Update -F RTS help: - Add default value - Update the help line as multiple short lines instead of one long line, for consistency with other lines. Reviewers: simonmar, bgamari, erikd Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5445 >--------------------------------------------------------------- f583ccfe640815d853dab25c0d92a239dc3c3244 rts/RtsFlags.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 78e70dd..999b727 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -284,8 +284,9 @@ usage_text[] = { " -A Sets the minimum allocation area size (default 1m) Egs: -A20m -A10k", " -AL Sets the amount of large-object memory that can be allocated", " before a GC is triggered (default: the value of -A)", -" -F Sets the collecting threshold for old generations as a factor of" -" the live data in that generation the last time it was collected." +" -F Sets the collecting threshold for old generations as a factor of", +" the live data in that generation the last time it was collected", +" (default: 2.0)", " -n Allocation area chunk size (0 = disabled, default: 0)", " -O Sets the minimum size of the old generation (default 1M)", " -M Sets the maximum heap size (default unlimited) Egs: -M256k -M1G", @@ -422,7 +423,7 @@ usage_text[] = { " -qg[] Use parallel GC only for generations >= ", " (default: 0, -qg alone turns off parallel GC)", " -qb[] Use load-balancing in the parallel GC only for generations >= ", -" (default: 1 for -A < 32M, 0 otherwise;" +" (default: 1 for -A < 32M, 0 otherwise;", " -qb alone turns off load-balancing)", " -qn Use threads for parallel GC (defaults to value of -N)", " -qa Use the OS to set thread affinity (experimental)", From git at git.haskell.org Sat Dec 15 00:49:47 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 15 Dec 2018 00:49:47 +0000 (UTC) Subject: [commit: ghc] master: Use https links in user-facing startup and error messages (a1c0b70) Message-ID: <20181215004947.9E57A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a1c0b70638949a73bbd404c11797f2edf28f5965/ghc >--------------------------------------------------------------- commit a1c0b70638949a73bbd404c11797f2edf28f5965 Author: Ben Gamari Date: Fri Dec 14 11:10:56 2018 -0500 Use https links in user-facing startup and error messages I consider myself lucky that in my circle of friends, `http` urls (as opposed to `https` urls) are frowned upon in that we generally apologize in the rase cases that we share an `http` url. This pull request changes `http` links into their `https` analogues in the following places: * In the GHCI startup message (and parts of the User's Guide, where there are verbatim transcripts of GHCi sessions). * In a couple of error messages, asking the user to report a bug. (I also took the liberty to change a single space before the reportabug url into two spaces, harmonizing this occurence with the others.) I'm not trying to start a war. I just had a moment to spare and felt like preparing this diff. Merge or don't merge as you wish! Reviewers: bgamari, erikd, simonmar Subscribers: goldfire, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5450 >--------------------------------------------------------------- a1c0b70638949a73bbd404c11797f2edf28f5965 compiler/typecheck/TcTyClsDecls.hs | 2 +- compiler/utils/Panic.hs | 2 +- docs/users_guide/ghci.rst | 4 ++-- ghc/GHCi/UI.hs | 2 +- rts/RtsMessages.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index cc9779a..71899a1 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -3609,7 +3609,7 @@ checkValidRoles tc report_error doc = addErrTc $ vcat [text "Internal error in role inference:", doc, - text "Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug"] + text "Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug"] {- ************************************************************************ diff --git a/compiler/utils/Panic.hs b/compiler/utils/Panic.hs index 03f095b..4f0f3b1 100644 --- a/compiler/utils/Panic.hs +++ b/compiler/utils/Panic.hs @@ -168,7 +168,7 @@ showGhcException exception showString "panic! (the 'impossible' happened)\n" . showString (" (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t") . s . showString "\n\n" - . showString "Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n" + . showString "Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug\n" throwGhcException :: GhcException -> a diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index 49a96ca..f468e80 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -37,7 +37,7 @@ command ``ghci``: .. code-block:: none $ ghci - GHCi, version 8.y.z: http://www.haskell.org/ghc/ :? for help + GHCi, version 8.y.z: https://www.haskell.org/ghc/ :? for help Prelude> There may be a short pause while GHCi loads the prelude and standard @@ -2052,7 +2052,7 @@ by using the :ghc-flag:`-package ⟨pkg⟩` flag: .. code-block:: none $ ghci -package readline - GHCi, version 8.y.z: http://www.haskell.org/ghc/ :? for help + GHCi, version 8.y.z: https://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Loading package readline-1.0 ... linking ... done. Prelude> diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index ae8ba02..13275f8 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -162,7 +162,7 @@ defaultGhciSettings = ghciWelcomeMsg :: String ghciWelcomeMsg = "GHCi, version " ++ cProjectVersion ++ - ": http://www.haskell.org/ghc/ :? for help" + ": https://www.haskell.org/ghc/ :? for help" ghciCommands :: [Command] ghciCommands = map mkCmd [ diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c index 053805e..a90962e 100644 --- a/rts/RtsMessages.c +++ b/rts/RtsMessages.c @@ -172,7 +172,7 @@ rtsFatalInternalErrorFn(const char *s, va_list ap) #endif fprintf(stderr, "\n"); fprintf(stderr, " (GHC version %s for %s)\n", ProjectVersion, xstr(HostPlatform_TYPE)); - fprintf(stderr, " Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n"); + fprintf(stderr, " Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug\n"); fflush(stderr); } #if defined(mingw32_HOST_OS) From git at git.haskell.org Sat Dec 15 00:49:50 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 15 Dec 2018 00:49:50 +0000 (UTC) Subject: [commit: ghc] master: rts: Annotate fallthroughs in AArch64 linker (aeefd7b) Message-ID: <20181215004950.9DC5C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/aeefd7b36b2cab640352f6c8bd16c62d38782edf/ghc >--------------------------------------------------------------- commit aeefd7b36b2cab640352f6c8bd16c62d38782edf Author: Ben Gamari Date: Fri Dec 14 09:55:15 2018 -0500 rts: Annotate fallthroughs in AArch64 linker >--------------------------------------------------------------- aeefd7b36b2cab640352f6c8bd16c62d38782edf rts/linker/elf_reloc_aarch64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c index c50ef04..bb15576 100644 --- a/rts/linker/elf_reloc_aarch64.c +++ b/rts/linker/elf_reloc_aarch64.c @@ -125,18 +125,23 @@ encodeAddendAarch64(Section * section, Elf_Rel * rel, int64_t addend) { // 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 // ... imm12 ] [ Rn ] [ Rd ] - /* fall through */ + FALLTHROUGH; } case COMPAT_R_AARCH64_LDST8_ABS_LO12_NC: if(exp_shift == -1) exp_shift = 0; + FALLTHROUGH; case COMPAT_R_AARCH64_LDST16_ABS_LO12_NC: if(exp_shift == -1) exp_shift = 1; + FALLTHROUGH; case COMPAT_R_AARCH64_LDST32_ABS_LO12_NC: if(exp_shift == -1) exp_shift = 2; + FALLTHROUGH; case COMPAT_R_AARCH64_LDST64_ABS_LO12_NC: if(exp_shift == -1) exp_shift = 3; + FALLTHROUGH; case COMPAT_R_AARCH64_LDST128_ABS_LO12_NC: if(exp_shift == -1) exp_shift = 4; + FALLTHROUGH; case COMPAT_R_AARCH64_LD64_GOT_LO12_NC: { if(exp_shift == -1) { assert( (addend & 7) == 0 ); From git at git.haskell.org Sat Dec 15 00:49:53 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 15 Dec 2018 00:49:53 +0000 (UTC) Subject: [commit: ghc] master: hadrian: Pass integer_backend to testsuite driver (442be69) Message-ID: <20181215004953.94B033ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/442be690e1ca162e22d632df695c29f90625f33e/ghc >--------------------------------------------------------------- commit 442be690e1ca162e22d632df695c29f90625f33e Author: Ben Gamari Date: Fri Dec 14 15:11:54 2018 -0500 hadrian: Pass integer_backend to testsuite driver >--------------------------------------------------------------- 442be690e1ca162e22d632df695c29f90625f33e hadrian/src/Settings/Builders/RunTest.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 6188b64..8312592 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -81,6 +81,7 @@ runTestBuilderArgs = builder RunTest ? do top <- expr $ topDirectory ghcFlags <- expr runTestGhcFlags timeoutProg <- expr buildRoot <&> (-/- timeoutPath) + integerLib <- expr (integerLibrary flav) let asZeroOne s b = s ++ zeroOne b @@ -110,6 +111,7 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic + , arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib) -- Use default value, see: -- https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk From git at git.haskell.org Sat Dec 15 20:08:43 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 15 Dec 2018 20:08:43 +0000 (UTC) Subject: [commit: ghc] ghc-8.6: utils/gen-dll: Bump containers upper bound (ff9ee83) Message-ID: <20181215200843.782C63ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6 Link : http://ghc.haskell.org/trac/ghc/changeset/ff9ee830a31d52f56cf7897371bffe6312b9d250/ghc >--------------------------------------------------------------- commit ff9ee830a31d52f56cf7897371bffe6312b9d250 Author: Ben Gamari Date: Sun Dec 9 15:28:52 2018 -0500 utils/gen-dll: Bump containers upper bound Fixes #16023. (cherry picked from commit e709c8f8d45c699840f5bab7c9ff71373a53b8b0) >--------------------------------------------------------------- ff9ee830a31d52f56cf7897371bffe6312b9d250 utils/gen-dll/gen-dll.cabal.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gen-dll/gen-dll.cabal.in b/utils/gen-dll/gen-dll.cabal.in index 4dd7dc5..7c5c355 100644 --- a/utils/gen-dll/gen-dll.cabal.in +++ b/utils/gen-dll/gen-dll.cabal.in @@ -27,7 +27,7 @@ Executable gen-dll process >= 1.2 && < 1.9, filepath >= 1.3 && < 1.5, directory >= 1.1 && < 1.4, - containers >= 0.5 && < 0.6 + containers >= 0.5 && < 0.7 Extra-Libraries: Shell32 ghc-options: -UGEN_SXS -DHAS_GENLIB=@HAVE_GENLIB@ From git at git.haskell.org Sun Dec 16 00:00:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 16 Dec 2018 00:00:21 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Add aarch64 target (ebb7613) Message-ID: <20181216000021.DE10B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ebb7613a66a784fc0015e13a6379453e6d5af44d/ghc >--------------------------------------------------------------- commit ebb7613a66a784fc0015e13a6379453e6d5af44d Author: Ben Gamari Date: Sat Dec 15 01:20:16 2018 -0500 gitlab-ci: Add aarch64 target >--------------------------------------------------------------- ebb7613a66a784fc0015e13a6379453e6d5af44d .circleci/images/aarch64-linux-deb9/Dockerfile | 69 ++++++++++++++++++++++++++ .gitlab-ci.yml | 11 ++++ 2 files changed, 80 insertions(+) diff --git a/.circleci/images/aarch64-linux-deb9/Dockerfile b/.circleci/images/aarch64-linux-deb9/Dockerfile new file mode 100644 index 0000000..f871f75 --- /dev/null +++ b/.circleci/images/aarch64-linux-deb9/Dockerfile @@ -0,0 +1,69 @@ +FROM aarch64/debian:stretch + +ENV LANG C.UTF-8 + +# Core build utilities +RUN apt-get update -qq +RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \ + ca-certificates g++ git make automake autoconf gcc \ + perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo \ + jq wget curl libnuma-dev + +# Documentation tools +RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra + +# Boot LLVM +ENV PATH /usr/local/bin:$PATH +ENV LLVM_TARBALL http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-aarch64-linux-gnu.tar.xz +RUN curl $LLVM_TARBALL | tar -xJC .. && \ + mkdir /opt/llvm6 && \ + cp -R clang+llvm*/* /opt/llvm6 && \ + rm -R clang+llvm* && \ + /opt/llvm6/bin/llc --version + +# GHC +#RUN curl http://downloads.haskell.org/~ghc/8.6.2/ghc-8.6.2-aarch64-deb8-linux.tar.xz | tar -xJ && \ +COPY ghc-8.6.2-aarch64-unknown-linux.tar.xz . +RUN cat ghc-8.6.2-aarch64-unknown-linux.tar.xz | tar -xJ && \ + cd ghc-8.6.2 && \ + ./configure --prefix=/usr/local LLC=/opt/llvm6/bin/llc OPT=/opt/llvm6/bin/opt && \ + make install && \ + cd .. && \ + rm -Rf ghc-* +RUN ghc --version + +# LLVM +ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-aarch64-linux-gnu.tar.xz +ENV LLC /opt/llvm7/bin/llc +ENV OPT /opt/llvm7/bin/opt +RUN curl $LLVM_TARBALL | tar -xJC .. && \ + mkdir /opt/llvm7 && \ + cp -R clang+llvm*/* /opt/llvm7 && \ + rm -R clang+llvm* && \ + $LLC --version + +# Cabal +RUN git clone https://github.com/haskell/Cabal && \ + cd Cabal && \ + git checkout cabal-install-v2.4.1.0 && \ + cd cabal-install && \ + ./bootstrap.sh --global --no-doc + +RUN ls Cabal/cabal-install/dist/build + +ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH + +# Create a normal user. +RUN adduser ghc --gecos "GHC builds" --disabled-password +RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc +USER ghc + +# Build Haskell tools +RUN cabal update && \ + cabal install hscolour happy alex +ENV PATH /home/ghc/.cabal/bin:$PATH + +WORKDIR /home/ghc/ + +CMD ["bash"] + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ef2ca8..6cd5e55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,6 +134,17 @@ validate-x86_64-darwin: - cabal-cache - toolchain +validate-aarch64-linux-deb9: + extends: .validate-linux + image: ghcci/aarch64-linux-deb9:0.1 + allow_failure: true + artifacts: + when: always + cache: + key: linux-aarch64-deb9 + tags: + - aarch64-linux + validate-x86_64-linux-deb9: extends: .validate-linux image: ghcci/x86_64-linux-deb9:0.2 From git at git.haskell.org Mon Dec 17 04:33:15 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 04:33:15 +0000 (UTC) Subject: [commit: ghc] master: Merge sections in profiling .a to .p_o and use it whenever it exists (de56a67) Message-ID: <20181217043315.9B7533ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/de56a67acf39098dd94693c6e265dfaade867d2f/ghc >--------------------------------------------------------------- commit de56a67acf39098dd94693c6e265dfaade867d2f Author: Zejun Wu Date: Mon Dec 17 00:27:18 2018 +0000 Merge sections in profiling .a to .p_o and use it whenever it exists Summary: We do this for vanilla way already. Let's also merge sections for profiling way and use it instead of the .a library when it exists. Test Plan: ``` $ inplace/bin/ghc-stage2 --interactive -prof -fexternal-interpreter GHCi, version 8.7.20180921: http://www.haskell.org/ghc/ :? for help Prelude> pid <- System.Posix.Process.getProcessID Prelude> maps <- readFile $ "/proc/" ++ show pid ++ "/maps" Prelude> pid 3807346 Prelude> putStrLn $ unlines $ take 20 $ lines maps 00400000-02103000 r-xp 00000000 00:1a 199277344 /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof 02104000-02106000 r--p 01d03000 00:1a 199277344 /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof 02106000-02417000 rw-p 01d05000 00:1a 199277344 /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof 02417000-0280a000 rw-p 00000000 00:00 0 [heap] 40098000-400b0000 rwxp 000d2000 00:1a 199276023 /data/users/watashi/ghc/libraries/bytestring/dist-install/build/HSbytestring-0.10.8.2.p_o 400b7000-400d8000 rwxp 00000000 00:00 0 401d1000-401d2000 rwxp 000e9000 00:1a 199276023 /data/users/watashi/ghc/libraries/bytestring/dist-install/build/HSbytestring-0.10.8.2.p_o 40415000-40419000 rwxp 0000b000 00:1a 199275165 /data/users/watashi/ghc/libraries/deepseq/dist-install/build/HSdeepseq-1.4.4.0.p_o 404f8000-40526000 rwxp 000af000 00:1a 199274234 /data/users/watashi/ghc/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o ``` Reviewers: simonmar, bgamari, austin, hvr Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5169 >--------------------------------------------------------------- de56a67acf39098dd94693c6e265dfaade867d2f compiler/ghci/Linker.hs | 11 ++++------- rules/build-package-way.mk | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 32bf270..3f4264c 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -1469,13 +1469,8 @@ locateLib hsc_env is_hs lib_dirs gcc_dirs lib findDynObject `orElse` assumeDll - | loading_profiled_hs_libs -- only a libHSfoo_p.a archive will do. - = findArchive `orElse` - assumeDll - | otherwise - -- HSfoo.o is the best, but only works for the normal way - -- libHSfoo.a is the backup option. + -- use HSfoo.{o,p_o} if it exists, otherwise fallback to libHSfoo{,_p}.a = findObject `orElse` findArchive `orElse` assumeDll @@ -1486,7 +1481,9 @@ locateLib hsc_env is_hs lib_dirs gcc_dirs lib gcc = False user = True - obj_file = lib <.> "o" + obj_file + | is_hs && loading_profiled_hs_libs = lib <.> "p_o" + | otherwise = lib <.> "o" dyn_obj_file = lib <.> "dyn_o" arch_files = [ "lib" ++ lib ++ lib_tag <.> "a" , lib <.> "a" -- native code has no lib_tag diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 8d14b7a..0a762d3 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -112,7 +112,7 @@ endif endif # Build the GHCi library -ifeq "$3" "v" +ifneq "$(filter $3, v p)" "" $1_$2_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" # Don't put bootstrapping packages in the bindist @@ -132,7 +132,7 @@ ifneq "$4" "0" $(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) endif endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES" -endif # "$3" "v" +endif # "$(filter $3, v p)" "" $(call profEnd, build-package-way($1,$2,$3)) endef # build-package-way From git at git.haskell.org Mon Dec 17 06:15:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 06:15:20 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Enable Windows builds (205762b) Message-ID: <20181217061520.0AD303ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/205762bd1b7c7bcd7fb041f19f56c9ec08f1cdcc/ghc >--------------------------------------------------------------- commit 205762bd1b7c7bcd7fb041f19f56c9ec08f1cdcc Author: Ben Gamari Date: Sat Dec 15 19:40:26 2018 -0500 gitlab-ci: Enable Windows builds >--------------------------------------------------------------- 205762bd1b7c7bcd7fb041f19f56c9ec08f1cdcc .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6cd5e55..4cdfecb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -199,7 +199,7 @@ validate-x86_64-linux-deb9-unreg: # Validation via Pipelines (make, Windows) ############################################################ -.validate-x86_64-windows: +validate-x86_64-windows: stage: build variables: GHC_VERSION: "8.6.2" From git at git.haskell.org Mon Dec 17 06:16:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 06:16:48 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: introduce userDefaultFlavour, making default flavour overridable (c42eb2e) Message-ID: <20181217061648.10C443ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c42eb2e67ae7f1e77c7bf365b7a41f808bc606cc/ghc >--------------------------------------------------------------- commit c42eb2e67ae7f1e77c7bf365b7a41f808bc606cc Author: Alp Mestanogullari Date: Mon Dec 17 01:15:45 2018 -0500 Hadrian: introduce userDefaultFlavour, making default flavour overridable This patch introduces the `userDefaultFlavour` user setting. It should be the name of the default flavour to use when no --flavour argument is passed. Before this patch, we would just always default to... the `default` flavour. With this patch, we default to whatever Flavour whose name is `userDefaultFlavour`, therefore providing a way for users to "persist" their choice of flavour, not having to repeat --flavour=[...] in every hadrian command. Test Plan: Set `userDefaultFlavour = "quickest"`, run `hadrian/build.sh`, check that the quickest flavour is indeed picked. Reviewers: snowleopard, bgamari Reviewed By: snowleopard Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #15890 Differential Revision: https://phabricator.haskell.org/D5454 >--------------------------------------------------------------- c42eb2e67ae7f1e77c7bf365b7a41f808bc606cc hadrian/doc/user-settings.md | 21 +++++++++++++++++++-- hadrian/src/Settings.hs | 4 ++-- hadrian/src/UserSettings.hs | 9 +++++++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/hadrian/doc/user-settings.md b/hadrian/doc/user-settings.md index b81c0dc..0c6d4ba 100644 --- a/hadrian/doc/user-settings.md +++ b/hadrian/doc/user-settings.md @@ -34,7 +34,7 @@ data Flavour = Flavour { -- | Build GHC with debug information. ghcDebugged :: Bool } ``` -Hadrian provides several built-in flavours (`defaultFlavour`, `quickFlavour`, and a few +Hadrian provides several built-in flavours (`default`, `quick`, and a few others; see `hadrian/doc/flavours.md`), which can be activated from the command line, e.g. by passing `--flavour=quick`. Users can define new build flavours by adding them to `userFlavours` list: @@ -48,7 +48,24 @@ userFlavours = [userFlavour] -- Add more build flavours if need be. userFlavour :: Flavour userFlavour = defaultFlavour { name = "user" } -- Modify other settings here. ``` -Now `--flavour=user` will run Hadrian with `userFlavour` settings. In the +Now `--flavour=user` will run Hadrian with `userFlavour` settings. + +When no `--flavour` argument is passed to hadrian, it will use the +`default` one. You can however change this, and for example make +the "fallback" flavour be `user`, by changing `userDefaultFlavour`: + +``` haskell +userDefaultFlavour :: String +-- before: +-- userDefaultFlavour = "default" +-- now: +userDefaultFlavour = "user" +``` + +This saves you from having to type `build --flavour=user [...]` +every time, allowing you to _persist_ the choice of flavour. + +In the following sections we look at specific fields of the `Flavour` record in more detail. Note: `defaultFlavour`, as well as its individual fields such as `defaultArgs`, `defaultPackages`, etc. that we use below, are defined in module diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs index 3497f43..99a58db 100755 --- a/hadrian/src/Settings.hs +++ b/hadrian/src/Settings.hs @@ -8,7 +8,7 @@ import CommandLine import Expression import Flavour import Packages -import UserSettings +import UserSettings (userFlavours, userPackages, userDefaultFlavour) import {-# SOURCE #-} Settings.Default import Settings.Flavours.Development @@ -40,7 +40,7 @@ hadrianFlavours = flavour :: Action Flavour flavour = do - flavourName <- fromMaybe "default" <$> cmdFlavour + flavourName <- fromMaybe userDefaultFlavour <$> cmdFlavour let unknownFlavour = error $ "Unknown build flavour: " ++ flavourName flavours = hadrianFlavours ++ userFlavours return $ fromMaybe unknownFlavour $ find ((== flavourName) . name) flavours diff --git a/hadrian/src/UserSettings.hs b/hadrian/src/UserSettings.hs index 9246806..e029dad 100644 --- a/hadrian/src/UserSettings.hs +++ b/hadrian/src/UserSettings.hs @@ -3,8 +3,8 @@ -- If you don't copy the file your changes will be tracked by git and you can -- accidentally commit them. module UserSettings ( - userFlavours, userPackages, verboseCommand, buildProgressColour, - successColour, stage1Only + userFlavours, userPackages, userDefaultFlavour, + verboseCommand, buildProgressColour, successColour, stage1Only ) where import Flavour @@ -14,6 +14,11 @@ import {-# SOURCE #-} Settings.Default -- See doc/user-settings.md for instructions. -- Please update doc/user-settings.md when committing changes to this file. +-- | Name of the default flavour, i.e the one used when no --flavour= +-- argument is passed to Hadrian. +userDefaultFlavour :: String +userDefaultFlavour = "default" + -- | User-defined build flavours. See 'userFlavour' as an example. userFlavours :: [Flavour] userFlavours = [userFlavour] -- Add more build flavours if need be. From git at git.haskell.org Mon Dec 17 06:17:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 06:17:55 +0000 (UTC) Subject: [commit: ghc] master: Handle :cd in external interpreter in a more robust way (f99d898) Message-ID: <20181217061755.C31523ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f99d898ba384b7d3ace7aae71b0125ba645e09cb/ghc >--------------------------------------------------------------- commit f99d898ba384b7d3ace7aae71b0125ba645e09cb Author: Zejun Wu Date: Mon Dec 17 01:16:00 2018 -0500 Handle :cd in external interpreter in a more robust way We used to enqueue another command to change directory in the external interpreter subprocess, this is not as robust as: * it can fail with -fno-implict-import-qualified; * it doesn't work when we `setGHCiMonad` to something other than `IO`. Neither of them works if `directory` package is hidden though. Test Plan: ``` $ inplace/bin/ghc-stage2 --interactive # -fexternal-interpreter GHCi, version 8.7.20181213: http://www.haskell.org/ghc/ :? for help Prelude> :cd .. Prelude> System.Directory.getCurrentDirectory "/data/users/watashi" Prelude> :!pwd /data/users/watashi Prelude> Leaving GHCi. ``` ./validate Reviewers: simonmar, bgamari, RyanGlScott Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5453 >--------------------------------------------------------------- f99d898ba384b7d3ace7aae71b0125ba645e09cb ghc/GHCi/UI.hs | 7 +++++-- ghc/GHCi/UI/Monad.hs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 13275f8..105324f 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -1430,8 +1430,11 @@ changeDirectory dir = do dflags <- getDynFlags -- With -fexternal-interpreter, we have to change the directory of the subprocess too. -- (this gives consistent behaviour with and without -fexternal-interpreter) - when (gopt Opt_ExternalInterpreter dflags) $ - lift $ enqueueCommands ["System.Directory.setCurrentDirectory " ++ show dir'] + when (gopt Opt_ExternalInterpreter dflags) $ do + hsc_env <- GHC.getSession + fhv <- compileGHCiExpr $ + "System.Directory.setCurrentDirectory " ++ show dir' + liftIO $ evalIO hsc_env fhv trySuccess :: GHC.GhcMonad m => m SuccessFlag -> m SuccessFlag trySuccess act = diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 45a5271..a3c21d8 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -24,6 +24,8 @@ module GHCi.UI.Monad ( printForUserNeverQualify, printForUserModInfo, printForUser, printForUserPartWay, prettyLocations, + + compileGHCiExpr, initInterpBuffering, turnOffBuffering, turnOffBuffering_, flushInterpBuffers, From git at git.haskell.org Mon Dec 17 14:11:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 14:11:55 +0000 (UTC) Subject: [commit: ghc] master: Stomp a few typos and grammaros (caf50f6) Message-ID: <20181217141155.ED20C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/caf50f631f0216fc11b653b1d0f34e7ca578ec45/ghc >--------------------------------------------------------------- commit caf50f631f0216fc11b653b1d0f34e7ca578ec45 Author: Gabor Greif Date: Sat Dec 15 12:44:59 2018 +0100 Stomp a few typos and grammaros Also use 'id' >--------------------------------------------------------------- caf50f631f0216fc11b653b1d0f34e7ca578ec45 compiler/coreSyn/CoreUtils.hs | 2 +- compiler/deSugar/DsMonad.hs | 2 +- compiler/simplCore/FloatOut.hs | 4 ++-- compiler/simplCore/OccurAnal.hs | 2 +- compiler/simplCore/SetLevels.hs | 12 ++++++------ compiler/simplCore/SimplUtils.hs | 4 ++-- compiler/specialise/Specialise.hs | 10 +++++----- compiler/stranal/WwLib.hs | 4 ++-- compiler/typecheck/TcCanonical.hs | 2 +- compiler/utils/Pretty.hs | 2 +- testsuite/tests/driver/pragma001.hs | 3 +-- testsuite/tests/driver/pragma002.hs | 3 +-- testsuite/tests/typecheck/should_compile/T3018.hs | 4 ++-- 13 files changed, 26 insertions(+), 28 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc caf50f631f0216fc11b653b1d0f34e7ca578ec45 From git at git.haskell.org Mon Dec 17 17:45:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:17 +0000 (UTC) Subject: [commit: ghc] master: StgCRun: Disable unwinding on Darwin (1ebe843) Message-ID: <20181217174517.9B8D93ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1ebe8438cd29448291229d5ce23c9f73216e9650/ghc >--------------------------------------------------------------- commit 1ebe8438cd29448291229d5ce23c9f73216e9650 Author: Ben Gamari Date: Sun Dec 16 19:10:07 2018 -0500 StgCRun: Disable unwinding on Darwin See #15207. >--------------------------------------------------------------- 1ebe8438cd29448291229d5ce23c9f73216e9650 rts/StgCRun.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 92b0696..e1b9a09 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -405,9 +405,13 @@ StgRunIsImplementedInAssembler(void) "movq %%xmm15,136(%%rax)\n\t" #endif +#if !defined(darwin_HOST_OS) /* * Let the unwinder know where we saved the registers * See Note [Unwinding foreign exports on x86-64]. + * + * N.B. We don't support unwinding on Darwin due to + * various toolchain insanity. */ ".cfi_def_cfa rsp, 0\n\t" ".cfi_offset rbx, %c2\n\t" @@ -440,6 +444,7 @@ StgRunIsImplementedInAssembler(void) #error "RSP_DELTA too big" #endif "\n\t" +#endif /* !defined(darwin_HOST_OS) */ /* * Set BaseReg @@ -512,8 +517,10 @@ StgRunIsImplementedInAssembler(void) "i"(RESERVED_C_STACK_BYTES + 32 /* r14 relative to cfa (rsp) */), "i"(RESERVED_C_STACK_BYTES + 40 /* r15 relative to cfa (rsp) */), "i"(RESERVED_C_STACK_BYTES + STG_RUN_STACK_FRAME_SIZE - /* rip relative to cfa */), - "i"((RSP_DELTA & 127) | (128 * ((RSP_DELTA >> 7) > 0))) + /* rip relative to cfa */) + +#if !defined(darwin_HOST_OS) + , "i"((RSP_DELTA & 127) | (128 * ((RSP_DELTA >> 7) > 0))) /* signed LEB128-encoded delta from rsp - byte 1 */ #if (RSP_DELTA >> 7) > 0 , "i"(((RSP_DELTA >> 7) & 127) | (128 * ((RSP_DELTA >> 14) > 0))) @@ -530,6 +537,9 @@ StgRunIsImplementedInAssembler(void) /* signed LEB128-encoded delta from rsp - byte 4 */ #endif #undef RSP_DELTA + +#endif /* !defined(darwin_HOST_OS) */ + ); /* * See Note [Stack Alignment on X86] From git at git.haskell.org Mon Dec 17 17:45:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:20 +0000 (UTC) Subject: [commit: ghc] master: ghci: Fix unused binder warnings when building with integer-simple (825ce3a) Message-ID: <20181217174520.987213ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/825ce3af0470abe48e33e6297ca60a7c3aee32f8/ghc >--------------------------------------------------------------- commit 825ce3af0470abe48e33e6297ca60a7c3aee32f8 Author: Ben Gamari Date: Sun Dec 16 14:10:54 2018 -0500 ghci: Fix unused binder warnings when building with integer-simple >--------------------------------------------------------------- 825ce3af0470abe48e33e6297ca60a7c3aee32f8 compiler/ghci/RtClosureInspect.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index f4d09cc..a61d776 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -327,9 +327,7 @@ cPprTermBase y = , ifTerm' (isTyCon charTyCon . ty) ppr_char , ifTerm' (isTyCon floatTyCon . ty) ppr_float , ifTerm' (isTyCon doubleTyCon . ty) ppr_double -#if defined(INTEGER_GMP) , ifTerm' (isIntegerTy . ty) ppr_integer -#endif ] where ifTerm :: (Term -> Bool) From git at git.haskell.org Mon Dec 17 17:45:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:23 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Use cabal-install 2.4 on Darwin (f61fc50) Message-ID: <20181217174523.D10153ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f61fc508bd5216fe325c23b32dfbb65c62a49060/ghc >--------------------------------------------------------------- commit f61fc508bd5216fe325c23b32dfbb65c62a49060 Author: Ben Gamari Date: Sun Dec 16 20:32:45 2018 -0500 gitlab-ci: Use cabal-install 2.4 on Darwin >--------------------------------------------------------------- f61fc508bd5216fe325c23b32dfbb65c62a49060 .gitlab/darwin-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/darwin-init.sh b/.gitlab/darwin-init.sh index 5561ca8..e17c7c7 100644 --- a/.gitlab/darwin-init.sh +++ b/.gitlab/darwin-init.sh @@ -21,7 +21,7 @@ if [ ! -e $toolchain/bin/ghc ]; then fi if [ ! -e $toolchain/bin/cabal ]; then - cabal_tarball="https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-apple-darwin-sierra.tar.gz" + cabal_tarball="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-apple-darwin-sierra.tar.xz" curl $cabal_tarball | tar -xz mv cabal $toolchain/bin fi From git at git.haskell.org Mon Dec 17 17:45:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:27 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Introduce nightly builds (850b136) Message-ID: <20181217174527.114143ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/850b136bdf3f04536580257feb9ce22677ece9d4/ghc >--------------------------------------------------------------- commit 850b136bdf3f04536580257feb9ce22677ece9d4 Author: Ben Gamari Date: Sun Dec 16 10:13:01 2018 -0500 gitlab-ci: Introduce nightly builds These run slowtest and their artifacts are preserved for two years. >--------------------------------------------------------------- 850b136bdf3f04536580257feb9ce22677ece9d4 .gitlab-ci.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5fb2ec..bcbcc30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,6 +62,8 @@ validate-x86_64-linux-deb8-hadrian: .validate: stage: build + variables: + TEST_TYPE: test script: - make clean || true - ./boot @@ -74,7 +76,7 @@ validate-x86_64-linux-deb8-hadrian: mv ghc-*.tar.xz ghc.tar.xz - | THREADS=`mk/detect-cpu-count.sh` - make test THREADS=$THREADS JUNIT_FILE=../../junit.xml + make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml artifacts: reports: junit: junit.xml @@ -147,6 +149,16 @@ validate-aarch64-linux-deb9: tags: - aarch64-linux +nightly-aarch64-linux-deb9: + extends: validate-aarch64-linux-deb9 + artifacts: + expire_in: 2 year + variables: + TEST_TYPE: slowtest + only: + variables: + - $NIGHTLY + validate-x86_64-linux-deb9: extends: .validate-linux image: ghcci/x86_64-linux-deb9:0.2 @@ -156,6 +168,16 @@ validate-x86_64-linux-deb9: cache: key: linux-x86_64-deb9 +nightly-x86_64-linux-deb9: + extends: validate-x86_64-linux-deb9 + artifacts: + expire_in: 2 year + variables: + TEST_TYPE: slowtest + only: + variables: + - $NIGHTLY + validate-x86_64-linux-deb9-llvm: extends: .validate-linux allow_failure: true @@ -192,6 +214,16 @@ validate-x86_64-linux-deb9-integer-simple: cache: key: linux-x86_64-deb9 +nightly-x86_64-linux-deb9-integer-simple: + extends: validate-x86_64-linux-deb9-integer-simple + artifacts: + expire_in: 2 year + variables: + TEST_TYPE: slowtest + only: + variables: + - $NIGHTLY + validate-x86_64-linux-deb9-unreg: extends: .validate-linux variables: From git at git.haskell.org Mon Dec 17 17:45:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:30 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Run Windows builds via make as well (554ffe9) Message-ID: <20181217174530.1F43C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/554ffe9688a69d8866e6fa379860631d1b633342/ghc >--------------------------------------------------------------- commit 554ffe9688a69d8866e6fa379860631d1b633342 Author: Ben Gamari Date: Sun Dec 16 11:30:30 2018 -0500 gitlab-ci: Run Windows builds via make as well >--------------------------------------------------------------- 554ffe9688a69d8866e6fa379860631d1b633342 .gitlab-ci.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a48c195..fd0afa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -233,10 +233,10 @@ validate-x86_64-linux-deb9-unreg: key: linux-x86_64-deb9 ############################################################ -# Validation via Pipelines (make, Windows) +# Validation via Pipelines (Windows) ############################################################ -validate-x86_64-windows: +validate-x86_64-windows-hadrian: stage: build variables: GHC_VERSION: "8.6.2" @@ -255,7 +255,7 @@ validate-x86_64-windows: - bash -c 'make V=0 -j`mk/detect-cpu-count.sh` HADDOCK_DOCS=NO test THREADS=$THREADS JUNIT_FILE=../../junit.xml' - cp -Rf $APPDATA/cabal cabal-cache cache: - key: windows + key: windows-hadrian paths: - cabal-cache - ghc-8.6.2 @@ -263,6 +263,28 @@ validate-x86_64-windows: tags: - x86_64-windows +validate-x86_64-windows: + stage: build + variables: + GHC_VERSION: "8.6.2" + script: + - bash -e .gitlab/win32-init.sh + - | + set MSYSTEM=MINGW64 + python boot + bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' + - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" + - mv ghc-*.tar.xz ghc.tar.xz + - bash -c 'make V=0 -j`mk/detect-cpu-count.sh` HADDOCK_DOCS=NO test THREADS=$THREADS JUNIT_FILE=../../junit.xml' + - cp -Rf $APPDATA/cabal cabal-cache + cache: + key: windows + paths: + - cabal-cache + - ghc-8.6.2 + - ghc-tarballs + tags: + - x86_64-windows ############################################################ # Validation via CircleCI From git at git.haskell.org Mon Dec 17 17:45:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:33 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Disable Hadrian linting on Windows (22c2865) Message-ID: <20181217174533.141593ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/22c2865ad5417b94ffd24ea55882722d7b5d19c4/ghc >--------------------------------------------------------------- commit 22c2865ad5417b94ffd24ea55882722d7b5d19c4 Author: Ben Gamari Date: Sun Dec 16 11:26:46 2018 -0500 gitlab-ci: Disable Hadrian linting on Windows The lint checks currently fail due to #15950. >--------------------------------------------------------------- 22c2865ad5417b94ffd24ea55882722d7b5d19c4 .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bcbcc30..a48c195 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -248,7 +248,8 @@ validate-x86_64-windows: bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' mkdir -p _build cp -R inplace/mingw _build/mingw - - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick" + # FIXME: --no-lint due to #15950 + - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint" - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" - mv ghc-*.tar.xz ghc.tar.xz - bash -c 'make V=0 -j`mk/detect-cpu-count.sh` HADDOCK_DOCS=NO test THREADS=$THREADS JUNIT_FILE=../../junit.xml' From git at git.haskell.org Mon Dec 17 17:45:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 17 Dec 2018 17:45:36 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Expire artifacts more aggressively (8eaf733) Message-ID: <20181217174536.0EFFE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8eaf733f5bfe6c8c2db31542abe1f8a7c45b59a5/ghc >--------------------------------------------------------------- commit 8eaf733f5bfe6c8c2db31542abe1f8a7c45b59a5 Author: Ben Gamari Date: Sun Dec 16 10:12:39 2018 -0500 gitlab-ci: Expire artifacts more aggressively Namely after 2 weeks >--------------------------------------------------------------- 8eaf733f5bfe6c8c2db31542abe1f8a7c45b59a5 .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4cdfecb..e5fb2ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,7 @@ validate-x86_64-linux-deb8-hadrian: artifacts: reports: junit: junit.xml + expire_in: 2 week paths: - ghc.tar.xz - junit.xml @@ -106,13 +107,13 @@ validate-x86_64-darwin: - cp -Rf $HOME/.cabal cabal-cache artifacts: when: always + expire_in: 2 week cache: key: darwin paths: - cabal-cache - toolchain - .validate-linux: extends: .validate tags: @@ -140,6 +141,7 @@ validate-aarch64-linux-deb9: allow_failure: true artifacts: when: always + expire_in: 2 week cache: key: linux-aarch64-deb9 tags: @@ -150,6 +152,7 @@ validate-x86_64-linux-deb9: image: ghcci/x86_64-linux-deb9:0.2 artifacts: when: always + expire_in: 2 week cache: key: linux-x86_64-deb9 @@ -169,6 +172,7 @@ validate-x86_64-linux-deb8: key: linux-x86_64-deb8 artifacts: when: always + expire_in: 2 week validate-x86_64-linux-fedora27: extends: .validate-linux @@ -177,6 +181,7 @@ validate-x86_64-linux-fedora27: key: linux-x86_64-fedora27 artifacts: when: always + expire_in: 2 week validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux @@ -235,6 +240,7 @@ validate-x86_64-windows: image: ghcci/x86_64-linux-deb8:0.1 artifacts: when: always + expire_in: 2 week reports: junit: junit.xml paths: From git at git.haskell.org Tue Dec 18 03:15:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 03:15:54 +0000 (UTC) Subject: [commit: ghc] master: gitlab: Drop submodules hack (90ceafa) Message-ID: <20181218031554.AEB7D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/90ceafa8b9ad60e3c7b72cdd2dacdbeb96bdcddc/ghc >--------------------------------------------------------------- commit 90ceafa8b9ad60e3c7b72cdd2dacdbeb96bdcddc Author: Ben Gamari Date: Mon Dec 17 19:41:22 2018 -0500 gitlab: Drop submodules hack >--------------------------------------------------------------- 90ceafa8b9ad60e3c7b72cdd2dacdbeb96bdcddc .gitlab-ci.yml | 21 +-------------------- .gitlab/fix-submodules.py | 8 -------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e9c51a2..d41f05b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,6 @@ variables: GIT_SSL_NO_VERIFY: "1" - -before_script: - - python3 .gitlab/fix-submodules.py - - git submodule sync --recursive - - git submodule update --init --recursive - - git checkout .gitmodules + GIT_SUBMODULES_STRATEGY: "recursive" stages: - lint @@ -53,10 +48,6 @@ validate-x86_64-linux-deb8-hadrian: before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . - - python3 .gitlab/fix-submodules.py - - git submodule sync --recursive - - git submodule update --init --recursive - - git checkout .gitmodules tags: - x86_64-linux @@ -100,11 +91,6 @@ validate-x86_64-darwin: # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" before_script: - - python .gitlab/fix-submodules.py - - git submodule sync --recursive - - git submodule update --init --recursive - - git checkout .gitmodules - - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex @@ -125,11 +111,6 @@ validate-x86_64-darwin: tags: - x86_64-linux before_script: - - python3 .gitlab/fix-submodules.py - - git submodule sync --recursive - - git submodule update --init --recursive - - git checkout .gitmodules - - bash .circleci/prepare-system.sh # workaround for docker permissions - sudo chown ghc:ghc -R . diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py deleted file mode 100644 index 51c9b06..0000000 --- a/.gitlab/fix-submodules.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python - -import re - -x = open('.gitmodules').read() -x = re.sub(r"url *= *\.\.", "url = https://git.haskell.org", x) -open('.gitmodules', 'w').write(x) - From git at git.haskell.org Tue Dec 18 03:15:57 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 03:15:57 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci/deb8-hadrian: Fix submodule paths (f109865) Message-ID: <20181218031557.A6E853ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f109865fba14112d7cb3840111bdfd985d81c0c3/ghc >--------------------------------------------------------------- commit f109865fba14112d7cb3840111bdfd985d81c0c3 Author: Ben Gamari Date: Mon Dec 17 19:39:32 2018 -0500 gitlab-ci/deb8-hadrian: Fix submodule paths >--------------------------------------------------------------- f109865fba14112d7cb3840111bdfd985d81c0c3 .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd0afa7..e9c51a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,10 @@ validate-x86_64-linux-deb8-hadrian: before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . + - python3 .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules tags: - x86_64-linux From git at git.haskell.org Tue Dec 18 03:16:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 03:16:00 +0000 (UTC) Subject: [commit: ghc] master: darwin: Build with in-tree GMP (de115f9) Message-ID: <20181218031600.A17C43ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/de115f90158b23eeff5c1d35f377a407c582eb79/ghc >--------------------------------------------------------------- commit de115f90158b23eeff5c1d35f377a407c582eb79 Author: Ben Gamari Date: Mon Dec 17 19:56:08 2018 -0500 darwin: Build with in-tree GMP >--------------------------------------------------------------- de115f90158b23eeff5c1d35f377a407c582eb79 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d41f05b..37f62ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,6 +95,7 @@ validate-x86_64-darwin: - PATH="`pwd`/toolchain/bin:$PATH" # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex - echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk + - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache artifacts: From git at git.haskell.org Tue Dec 18 03:42:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 03:42:44 +0000 (UTC) Subject: [commit: ghc] master: circleci: Don't use xlarge instances (098a3c7) Message-ID: <20181218034244.A7E6C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/098a3c7679641ce9ac02fe818fae2e80c611a22e/ghc >--------------------------------------------------------------- commit 098a3c7679641ce9ac02fe818fae2e80c611a22e Author: Ben Gamari Date: Mon Dec 17 22:38:39 2018 -0500 circleci: Don't use xlarge instances As discussed on ghc-devops, CircleCI is changing their billing policy to require users of instances larger than `medium` to use a paid account. Consequently these instances will no longer be available to us starting tomorrow. >--------------------------------------------------------------- 098a3c7679641ce9ac02fe818fae2e80c611a22e .circleci/config.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ed10d21..dedb281 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,7 +104,6 @@ aliases: jobs: "validate-x86_64-freebsd": - resource_class: xlarge docker: - image: ghcci/x86_64-freebsd environment: @@ -155,7 +154,6 @@ jobs: - *push_perf_note "validate-x86_64-linux-deb8": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: @@ -178,7 +176,6 @@ jobs: - *push_perf_note "validate-x86_64-linux-deb9-integer-simple": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb9:0.2 environment: @@ -201,7 +198,6 @@ jobs: - *push_perf_note "validate-x86_64-linux-deb9": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb9:0.1 environment: @@ -224,7 +220,6 @@ jobs: - *push_perf_note "validate-hadrian-x86_64-linux-deb8": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: @@ -239,7 +234,6 @@ jobs: - *build_hadrian "validate-x86_64-linux-deb8-unreg": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: @@ -259,7 +253,6 @@ jobs: - *store_test_artifacts "validate-x86_64-linux-deb8-llvm": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: @@ -288,7 +281,6 @@ jobs: # Nightly build with -DDEBUG using devel2 flavour "validate-x86_64-linux-deb8-debug": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: @@ -310,7 +302,6 @@ jobs: - *push_perf_note "validate-i386-linux-deb9": - resource_class: xlarge docker: - image: ghcci/i386-linux-deb9:0.2 environment: @@ -333,7 +324,6 @@ jobs: - *push_perf_note "validate-i386-linux-deb8": - resource_class: xlarge docker: - image: ghcci/i386-linux-deb8:0.1 environment: @@ -356,7 +346,6 @@ jobs: - *push_perf_note "validate-x86_64-linux-centos7": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-centos7:0.1 environment: @@ -382,7 +371,6 @@ jobs: - *push_perf_note "validate-x86_64-linux-fedora27": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-fedora27:0.1 environment: @@ -405,7 +393,6 @@ jobs: - *push_perf_note "slow-validate-x86_64-linux-deb8": - resource_class: xlarge docker: - image: ghcci/x86_64-linux-deb8:0.1 environment: From git at git.haskell.org Tue Dec 18 03:59:25 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 03:59:25 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix spelling of GIT_SUBMODULE_STRATEGY (ed69f8b) Message-ID: <20181218035925.233F33ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ed69f8bd1fd4b84b62bb4f10eef7f76e537be07b/ghc >--------------------------------------------------------------- commit ed69f8bd1fd4b84b62bb4f10eef7f76e537be07b Author: Ben Gamari Date: Mon Dec 17 22:58:43 2018 -0500 gitlab-ci: Fix spelling of GIT_SUBMODULE_STRATEGY >--------------------------------------------------------------- ed69f8bd1fd4b84b62bb4f10eef7f76e537be07b .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37f62ab..20a88dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ variables: GIT_SSL_NO_VERIFY: "1" - GIT_SUBMODULES_STRATEGY: "recursive" + GIT_SUBMODULE_STRATEGY: "recursive" stages: - lint From git at git.haskell.org Tue Dec 18 04:37:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 04:37:19 +0000 (UTC) Subject: [commit: ghc] master: Fix ghci crash when starting with -fno-implicit-import-qualified (a0fb20b) Message-ID: <20181218043719.3C3093ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a0fb20bae31ed7a50d1a6e4e15c42ba25d836bfc/ghc >--------------------------------------------------------------- commit a0fb20bae31ed7a50d1a6e4e15c42ba25d836bfc Author: Zejun Wu Date: Mon Dec 17 23:35:44 2018 -0500 Fix ghci crash when starting with -fno-implicit-import-qualified `ghci -fno-implicit-import-qualified` didn't start with error message: ``` GHCi, version 8.6.2: http://www.haskell.org/ghc/ :? for help :1:6: error: Not in scope: ‘System.IO.hSetBuffering’ No module named ‘System.IO’ is imported. ... ``` This change fixes it and update test T2452 to cover this. Test Plan: TEST=T2452 make accept harbormaster build runs Reviewers: simonmar, bgamari, RyanGlScott Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5452 >--------------------------------------------------------------- a0fb20bae31ed7a50d1a6e4e15c42ba25d836bfc ghc/GHCi/UI/Monad.hs | 25 +++++++++++++------------ testsuite/tests/ghci/scripts/T2452.script | 3 +++ testsuite/tests/ghci/scripts/T2452.stderr | 4 ++++ testsuite/tests/ghci/scripts/T2452.stdout | 2 ++ testsuite/tests/ghci/scripts/all.T | 3 ++- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index a3c21d8..969111b 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -458,15 +458,16 @@ mkEvalWrapper progname args = "(System.Environment.withArgs " ++ show args ++ " m)" compileGHCiExpr :: GhcMonad m => String -> m ForeignHValue -compileGHCiExpr expr = do - hsc_env <- getSession - let dflags = hsc_dflags hsc_env - -- RebindableSyntax can wreak havoc with GHCi in several ways - -- (see #13385 and #14342 for examples), so we take care to disable it - -- for the duration of running expressions that are internal to GHCi. - no_rb_hsc_env = - hsc_env { hsc_dflags = xopt_unset dflags LangExt.RebindableSyntax } - setSession no_rb_hsc_env - res <- GHC.compileExprRemote expr - setSession hsc_env - pure res +compileGHCiExpr expr = + withTempSession mkTempSession $ GHC.compileExprRemote expr + where + mkTempSession hsc_env = hsc_env + { hsc_dflags = (hsc_dflags hsc_env) + -- RebindableSyntax can wreak havoc with GHCi in several ways + -- (see #13385 and #14342 for examples), so we take care to disable it + -- for the duration of running expressions that are internal to GHCi. + `xopt_unset` LangExt.RebindableSyntax + -- We heavily depend on -fimplicit-import-qualified to compile expr + -- with fully qualified names without imports. + `gopt_set` Opt_ImplicitImportQualified + } diff --git a/testsuite/tests/ghci/scripts/T2452.script b/testsuite/tests/ghci/scripts/T2452.script index 28d2bdc..ef60f82 100644 --- a/testsuite/tests/ghci/scripts/T2452.script +++ b/testsuite/tests/ghci/scripts/T2452.script @@ -1,2 +1,5 @@ +:t System.IO.hPutStrLn +:set -fimplicit-import-qualified +:t System.IO.hPutStrLn :set -fno-implicit-import-qualified :t System.IO.hPutStrLn diff --git a/testsuite/tests/ghci/scripts/T2452.stderr b/testsuite/tests/ghci/scripts/T2452.stderr index 663742f..99b0acb 100644 --- a/testsuite/tests/ghci/scripts/T2452.stderr +++ b/testsuite/tests/ghci/scripts/T2452.stderr @@ -2,3 +2,7 @@ :1:1: error: Not in scope: ‘System.IO.hPutStrLn’ No module named ‘System.IO’ is imported. + +:1:1: error: + Not in scope: ‘System.IO.hPutStrLn’ + No module named ‘System.IO’ is imported. diff --git a/testsuite/tests/ghci/scripts/T2452.stdout b/testsuite/tests/ghci/scripts/T2452.stdout new file mode 100644 index 0000000..b2dc3f6 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T2452.stdout @@ -0,0 +1,2 @@ +System.IO.hPutStrLn + :: GHC.IO.Handle.Types.Handle -> String -> IO () diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index c58f587..13753cd 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -108,7 +108,8 @@ test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']), ghci_script, ['ghci062.script']) test('ghci063', normal, ghci_script, ['ghci063.script']) -test('T2452', normal, ghci_script, ['T2452.script']) +test('T2452', [extra_hc_opts("-fno-implicit-import-qualified")], + ghci_script, ['T2452.script']) test('T2766', normal, ghci_script, ['T2766.script']) test('T1914', [], ghci_script, ['T1914.script']) From git at git.haskell.org Tue Dec 18 04:37:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 04:37:35 +0000 (UTC) Subject: [commit: ghc] master: Add missing comma in 'libdw' configure check (126aa79) Message-ID: <20181218043735.4A4793ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/126aa794743b807b7447545697b96dd165ec3e16/ghc >--------------------------------------------------------------- commit 126aa794743b807b7447545697b96dd165ec3e16 Author: Alec Theriault Date: Mon Dec 17 23:36:31 2018 -0500 Add missing comma in 'libdw' configure check Fix a bug from cb882fc993b4972f7f212b291229ef9e9ade0af9. Without the comma, all non-diverging codepaths set 'UseLibdw=NO'. Reviewers: bgamari, nh2 Reviewed By: nh2 Subscribers: rwbarton, erikd, carter GHC Trac Issues: #15968 Differential Revision: https://phabricator.haskell.org/D5459 >--------------------------------------------------------------- 126aa794743b807b7447545697b96dd165ec3e16 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0ff192a..021ef94 100644 --- a/configure.ac +++ b/configure.ac @@ -1250,7 +1250,7 @@ AC_ARG_ENABLE(dwarf-unwind, [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])], [AC_CHECK_LIB(dw, dwfl_attach_state, [UseLibdw=YES], - [AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])] + [AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])], [UseLibdw=NO] ) AC_SUBST(UseLibdw) From git at git.haskell.org Tue Dec 18 04:37:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 04:37:38 +0000 (UTC) Subject: [commit: ghc] master: make QSem and QSemN newtypes (f5e98bb) Message-ID: <20181218043738.4E0333ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f5e98bb31cf4dae740c8dc598ef207aa79d5a179/ghc >--------------------------------------------------------------- commit f5e98bb31cf4dae740c8dc598ef207aa79d5a179 Author: chessai Date: Mon Dec 17 23:36:20 2018 -0500 make QSem and QSemN newtypes Reviewers: RyanGlScott, ekmett, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15995 Differential Revision: https://phabricator.haskell.org/D5456 >--------------------------------------------------------------- f5e98bb31cf4dae740c8dc598ef207aa79d5a179 libraries/base/Control/Concurrent/QSem.hs | 3 +-- libraries/base/Control/Concurrent/QSemN.hs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libraries/base/Control/Concurrent/QSem.hs b/libraries/base/Control/Concurrent/QSem.hs index ea39625..133d6e2 100644 --- a/libraries/base/Control/Concurrent/QSem.hs +++ b/libraries/base/Control/Concurrent/QSem.hs @@ -1,6 +1,5 @@ {-# LANGUAGE Safe #-} {-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | @@ -39,7 +38,7 @@ import Data.Maybe -- -- is safe; it never loses a unit of the resource. -- -data QSem = QSem !(MVar (Int, [MVar ()], [MVar ()])) +newtype QSem = QSem (MVar (Int, [MVar ()], [MVar ()])) -- The semaphore state (i, xs, ys): -- diff --git a/libraries/base/Control/Concurrent/QSemN.hs b/libraries/base/Control/Concurrent/QSemN.hs index b8c9274..8b3ce55 100644 --- a/libraries/base/Control/Concurrent/QSemN.hs +++ b/libraries/base/Control/Concurrent/QSemN.hs @@ -1,6 +1,4 @@ {-# LANGUAGE Safe #-} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | @@ -41,7 +39,7 @@ import Data.Maybe -- -- is safe; it never loses any of the resource. -- -data QSemN = QSemN !(MVar (Int, [(Int, MVar ())], [(Int, MVar ())])) +newtype QSemN = QSemN (MVar (Int, [(Int, MVar ())], [(Int, MVar ())])) -- The semaphore state (i, xs, ys): -- From git at git.haskell.org Tue Dec 18 04:39:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 04:39:28 +0000 (UTC) Subject: [commit: ghc] master: hadrian: introduce make-user-oriented docs (b007410) Message-ID: <20181218043928.3253C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b00741030596f921486ea98a4956ff79a8caac1c/ghc >--------------------------------------------------------------- commit b00741030596f921486ea98a4956ff79a8caac1c Author: Alp Mestanogullari Date: Mon Dec 17 23:38:20 2018 -0500 hadrian: introduce make-user-oriented docs This commit introduces Hadrian docs specifically targeted at GHC devs who are used to building GHC with the make build system, adapting a good chunk of the following quickstart page we wrote over the last few months: https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart Reviewers: snowleopard, bgamari Reviewed By: snowleopard Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5446 >--------------------------------------------------------------- b00741030596f921486ea98a4956ff79a8caac1c hadrian/README.md | 77 +++++++++++----------- hadrian/doc/make.md | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+), 39 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b00741030596f921486ea98a4956ff79a8caac1c From git at git.haskell.org Tue Dec 18 11:40:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 11:40:19 +0000 (UTC) Subject: [commit: packages/array] tag 'v0.5.3.0' created Message-ID: <20181218114019.547973ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/array New tag : v0.5.3.0 Referencing: 127e73a62e75f1d435f6efa2e4bd6e9bcaa10415 From git at git.haskell.org Tue Dec 18 14:47:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 14:47:19 +0000 (UTC) Subject: [commit: ghc] master: Add some complexities to Data.List documentation (#15003) (ae4e4ba) Message-ID: <20181218144719.6E0E23ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ae4e4ba655f2d0d8a5cc8488ada628726e9cc147/ghc >--------------------------------------------------------------- commit ae4e4ba655f2d0d8a5cc8488ada628726e9cc147 Author: Sven Tennie Date: Sun Dec 16 17:25:24 2018 +0100 Add some complexities to Data.List documentation (#15003) Namely for: - stripPrefix - isPrefixOf - intersperse - tails - map - scanl - scanl1 - scanl' - scanr - scanr1 - zip - zipWith Add examples to `zipWith` and `map`. >--------------------------------------------------------------- ae4e4ba655f2d0d8a5cc8488ada628726e9cc147 libraries/base/Data/OldList.hs | 12 ++++++------ libraries/base/GHC/Base.hs | 5 ++++- libraries/base/GHC/List.hs | 26 ++++++++++++++++---------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index 99ad914..559823c 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -241,9 +241,9 @@ infix 5 \\ -- comment to fool cpp: https://downloads.haskell.org/~ghc/latest/doc dropWhileEnd :: (a -> Bool) -> [a] -> [a] dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) [] --- | The 'stripPrefix' function drops the given prefix from a list. --- It returns 'Nothing' if the list did not start with the prefix --- given, or 'Just' the list after the prefix, if it does. +-- | /O(min(m,n))/. The 'stripPrefix' function drops the given prefix from a +-- list. It returns 'Nothing' if the list did not start with the prefix given, +-- or 'Just' the list after the prefix, if it does. -- -- >>> stripPrefix "foo" "foobar" -- Just "bar" @@ -319,7 +319,7 @@ findIndices p ls = build $ \c n -> in foldr go (\_ -> n) ls 0# #endif /* USE_REPORT_PRELUDE */ --- | The 'isPrefixOf' function takes two lists and returns 'True' +-- | /O(min(m,n))/. The 'isPrefixOf' function takes two lists and returns 'True' -- iff the first list is a prefix of the second. -- -- >>> "Hello" `isPrefixOf` "Hello World!" @@ -509,7 +509,7 @@ intersectBy _ [] _ = [] intersectBy _ _ [] = [] intersectBy eq xs ys = [x | x <- xs, any (eq x) ys] --- | The 'intersperse' function takes an element and a list and +-- | /O(n)/. The 'intersperse' function takes an element and a list and -- \`intersperses\' that element between the elements of the list. -- For example, -- @@ -1001,7 +1001,7 @@ inits = map toListSB . scanl' snocSB emptySB -- if it fuses with a consumer, and it would generally lead to serious -- loss of sharing if allowed to fuse with a producer. --- | The 'tails' function returns all final segments of the argument, +-- | /O(n)/. The 'tails' function returns all final segments of the argument, -- longest first. For example, -- -- >>> tails "abc" diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 924a1ff..8b14d48 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -1095,11 +1095,14 @@ augment g xs = g (:) xs -- map ---------------------------------------------- --- | 'map' @f xs@ is the list obtained by applying @f@ to each element +-- | /O(n)/. 'map' @f xs@ is the list obtained by applying @f@ to each element -- of @xs@, i.e., -- -- > map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] -- > map f [x1, x2, ...] == [f x1, f x2, ...] +-- +-- >>> map (+1) [1, 2, 3] +--- [2,3,4] map :: (a -> b) -> [a] -> [b] {-# NOINLINE [0] map #-} diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs index fced329..df2c19a 100644 --- a/libraries/base/GHC/List.hs +++ b/libraries/base/GHC/List.hs @@ -262,7 +262,7 @@ product :: (Num a) => [a] -> a {-# INLINE product #-} product = foldl (*) 1 --- | 'scanl' is similar to 'foldl', but returns a list of successive +-- | /O(n)/. 'scanl' is similar to 'foldl', but returns a list of successive -- reduced values from the left: -- -- > scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] @@ -300,7 +300,8 @@ constScanl :: a -> b -> a constScanl = const --- | 'scanl1' is a variant of 'scanl' that has no starting value argument: +-- | /O(n)/. 'scanl1' is a variant of 'scanl' that has no starting value +-- argument: -- -- > scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] @@ -308,7 +309,7 @@ scanl1 :: (a -> a -> a) -> [a] -> [a] scanl1 f (x:xs) = scanl f x xs scanl1 _ [] = [] --- | A strictly accumulating version of 'scanl' +-- | /O(n)/. A strictly accumulating version of 'scanl' {-# NOINLINE [1] scanl' #-} scanl' :: (b -> a -> b) -> b -> [a] -> [b] -- This peculiar form is needed to prevent scanl' from being rewritten @@ -380,7 +381,7 @@ foldr1 f = go go [] = errorEmptyList "foldr1" {-# INLINE [0] foldr1 #-} --- | 'scanr' is the right-to-left dual of 'scanl'. +-- | /O(n)/. 'scanr' is the right-to-left dual of 'scanl'. -- Note that -- -- > head (scanr f z xs) == foldr f z xs. @@ -407,7 +408,8 @@ scanrFB f c = \x (r, est) -> (f x r, r `c` est) scanr f q0 ls #-} --- | 'scanr1' is a variant of 'scanr' that has no starting value argument. +-- | /O(n)/. 'scanr1' is a variant of 'scanr' that has no starting value +-- argument. scanr1 :: (a -> a -> a) -> [a] -> [a] scanr1 _ [] = [] scanr1 _ [x] = [x] @@ -975,7 +977,8 @@ foldr3_left _ z _ _ _ _ = z -- Zips for larger tuples are in the List module. ---------------------------------------------- --- | 'zip' takes two lists and returns a list of corresponding pairs. +-- | /O(min(m,n))/. 'zip' takes two lists and returns a list of corresponding +-- pairs. -- -- > zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')] -- @@ -1032,10 +1035,13 @@ zip3FB cons = \a b c r -> (a,b,c) `cons` r -- function given as the first argument, instead of a tupling function. ---------------------------------------------- --- | 'zipWith' generalises 'zip' by zipping with the function given --- as the first argument, instead of a tupling function. --- For example, @'zipWith' (+)@ is applied to two lists to produce the --- list of corresponding sums. +-- | /O(min(m,n))/. 'zipWith' generalises 'zip' by zipping with the function +-- given as the first argument, instead of a tupling function. For example, +-- @'zipWith' (+)@ is applied to two lists to produce the list of corresponding +-- sums: +-- +-- >>> zipWith (+) [1, 2, 3] [4, 5, 6] +-- [5,7,9] -- -- 'zipWith' is right-lazy: -- From git at git.haskell.org Tue Dec 18 22:37:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 22:37:37 +0000 (UTC) Subject: [commit: ghc] master: circleci: Fix LLVM build (6318d87) Message-ID: <20181218223737.B9AB43ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6318d874995f3243f1845409aea402414c5806cd/ghc >--------------------------------------------------------------- commit 6318d874995f3243f1845409aea402414c5806cd Author: Ben Gamari Date: Tue Dec 18 17:35:43 2018 -0500 circleci: Fix LLVM build Might as well make sure it works before we retire it. >--------------------------------------------------------------- 6318d874995f3243f1845409aea402414c5806cd .circleci/config.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dedb281..31b64a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,19 +252,15 @@ jobs: - *push_perf_note - *store_test_artifacts - "validate-x86_64-linux-deb8-llvm": + "validate-x86_64-linux-deb9-llvm": docker: - - image: ghcci/x86_64-linux-deb8:0.1 + - image: ghcci/x86_64-linux-deb9:0.2 environment: <<: *buildenv BUILD_FLAVOUR: perf-llvm - TEST_ENV: x86_64-linux-deb8-llvm + TEST_ENV: x86_64-linux-deb9-llvm steps: - run: - name: Install LLVM - command: | - echo "export PATH=`pwd`/../clang+llvm-6.0.0-x86_64-linux-gnu-debian8/bin:\$PATH" >> $BASH_ENV - - run: name: Verify that llc works command: llc - checkout From git at git.haskell.org Tue Dec 18 22:37:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 22:37:40 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Try fixing Windows build (9d92212) Message-ID: <20181218223740.B3C7B3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9d92212cd7a7de263af127cf1debef227c2ef3bb/ghc >--------------------------------------------------------------- commit 9d92212cd7a7de263af127cf1debef227c2ef3bb Author: Ben Gamari Date: Tue Dec 18 17:36:55 2018 -0500 gitlab-ci: Try fixing Windows build For some reason curl isn't found on the new builder. >--------------------------------------------------------------- 9d92212cd7a7de263af127cf1debef227c2ef3bb .gitlab-ci.yml | 2 +- .gitlab/win32-init.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a88dd..5efbfe5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -227,7 +227,7 @@ validate-x86_64-windows-hadrian: variables: GHC_VERSION: "8.6.2" script: - - bash -e .gitlab/win32-init.sh + - bash .gitlab/win32-init.sh - | set MSYSTEM=MINGW64 python boot diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh index 9141404..dce9be8 100644 --- a/.gitlab/win32-init.sh +++ b/.gitlab/win32-init.sh @@ -3,7 +3,7 @@ set -e toolchain=`pwd`/toolchain -PATH="$toolchain/bin:$PATH" +PATH="$toolchain/bin:/mingw64/bin:$PATH" if [ -d "`pwd`/cabal-cache" ]; then cp -Rf cabal-cache $APPDATA/cabal From git at git.haskell.org Tue Dec 18 22:38:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 18 Dec 2018 22:38:58 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Remove CircleCI configuration (548becd) Message-ID: <20181218223858.A02593ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/548becddb9a515c7c3925adda674bbd6ad6102a3/ghc >--------------------------------------------------------------- commit 548becddb9a515c7c3925adda674bbd6ad6102a3 Author: Ben Gamari Date: Tue Dec 18 17:38:07 2018 -0500 gitlab-ci: Remove CircleCI configuration Our CircleCI builds will fail anyways without large instances. >--------------------------------------------------------------- 548becddb9a515c7c3925adda674bbd6ad6102a3 .gitlab-ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5efbfe5..1aa2cc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -296,18 +296,6 @@ validate-x86_64-windows: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. -circleci-validate-x86_64-linux-deb8: - extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-x86_64-linux-deb8" - -circleci-validate-i386-linux-deb8: - extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-i386-linux-deb8" - -# circleci-validate-x86_64-freebsd: -# extends: .circleci -# script: ".gitlab/circle-ci-job.sh validate-x86_64-freebsd" - circleci-validate-x86_64-darwin: extends: .circleci script: ".gitlab/circle-ci-job.sh validate-x86_64-darwin" From git at git.haskell.org Wed Dec 19 03:37:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 03:37:48 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Make Windows PATH more robust (1e149bb) Message-ID: <20181219033748.045673ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1e149bb2aeabd36d17622eedbb0ef273d465130d/ghc >--------------------------------------------------------------- commit 1e149bb2aeabd36d17622eedbb0ef273d465130d Author: Ben Gamari Date: Tue Dec 18 18:51:27 2018 -0500 gitlab-ci: Make Windows PATH more robust >--------------------------------------------------------------- 1e149bb2aeabd36d17622eedbb0ef273d465130d .gitlab-ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1aa2cc8..8ddabfc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -227,6 +227,7 @@ validate-x86_64-windows-hadrian: variables: GHC_VERSION: "8.6.2" script: + - PATH=C:\msys64\usr\bin;%PATH% - bash .gitlab/win32-init.sh - | set MSYSTEM=MINGW64 @@ -254,7 +255,8 @@ validate-x86_64-windows: variables: GHC_VERSION: "8.6.2" script: - - bash -e .gitlab/win32-init.sh + - PATH=C:\msys64\usr\bin;%PATH% + - bash .gitlab/win32-init.sh - | set MSYSTEM=MINGW64 python boot @@ -296,6 +298,18 @@ validate-x86_64-windows: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. +circleci-validate-x86_64-linux-deb8: + extends: .circleci + script: ".gitlab/circle-ci-job.sh validate-x86_64-linux-deb8" + +circleci-validate-i386-linux-deb8: + extends: .circleci + script: ".gitlab/circle-ci-job.sh validate-i386-linux-deb8" + +# circleci-validate-x86_64-freebsd: +# extends: .circleci +# script: ".gitlab/circle-ci-job.sh validate-x86_64-freebsd" + circleci-validate-x86_64-darwin: extends: .circleci script: ".gitlab/circle-ci-job.sh validate-x86_64-darwin" From git at git.haskell.org Wed Dec 19 03:37:50 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 03:37:50 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Ensure that locale is set (074eae2) Message-ID: <20181219033750.F121F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/074eae255793de6a94e8172015e7022c80a5cd15/ghc >--------------------------------------------------------------- commit 074eae255793de6a94e8172015e7022c80a5cd15 Author: Ben Gamari Date: Tue Dec 18 19:50:06 2018 -0500 gitlab-ci: Ensure that locale is set >--------------------------------------------------------------- 074eae255793de6a94e8172015e7022c80a5cd15 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ddabfc..09f3be2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ variables: GIT_SSL_NO_VERIFY: "1" GIT_SUBMODULE_STRATEGY: "recursive" + LANG: "en_US.UTF-8" stages: - lint From git at git.haskell.org Wed Dec 19 07:59:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 07:59:37 +0000 (UTC) Subject: [commit: packages/array] master: Declare support for base-4.13 (8593a10) Message-ID: <20181219075937.5B76E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/array On branch : master Link : http://git.haskell.org/packages/array.git/commitdiff/8593a10f65020da3854b1c8478082d454b416118 >--------------------------------------------------------------- commit 8593a10f65020da3854b1c8478082d454b416118 Author: Herbert Valerio Riedel Date: Tue Dec 18 22:57:05 2018 +0100 Declare support for base-4.13 >--------------------------------------------------------------- 8593a10f65020da3854b1c8478082d454b416118 array.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array.cabal b/array.cabal index b47538e..cacd6b0 100644 --- a/array.cabal +++ b/array.cabal @@ -36,7 +36,7 @@ library Trustworthy, UnboxedTuples, UnliftedFFITypes - build-depends: base >= 4.9 && < 4.13 + build-depends: base >= 4.9 && < 4.14 ghc-options: -Wall exposed-modules: Data.Array From git at git.haskell.org Wed Dec 19 09:05:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 09:05:48 +0000 (UTC) Subject: [commit: packages/hpc] master: Declare support for base-4.13 (75f898b) Message-ID: <20181219090548.B37603ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/hpc On branch : master Link : http://git.haskell.org/packages/hpc.git/commitdiff/75f898badf40cddba7b3bcf149648e49095a52f9 >--------------------------------------------------------------- commit 75f898badf40cddba7b3bcf149648e49095a52f9 Author: Herbert Valerio Riedel Date: Wed Dec 19 00:05:07 2018 +0100 Declare support for base-4.13 >--------------------------------------------------------------- 75f898badf40cddba7b3bcf149648e49095a52f9 hpc.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpc.cabal b/hpc.cabal index 7a37bfb..63653ea 100644 --- a/hpc.cabal +++ b/hpc.cabal @@ -35,7 +35,7 @@ Library Trace.Hpc.Reflect Build-Depends: - base >= 4.4.1 && < 4.13, + base >= 4.4.1 && < 4.14, containers >= 0.4.1 && < 0.7, directory >= 1.1 && < 1.4, filepath >= 1 && < 1.5, From git at git.haskell.org Wed Dec 19 10:49:31 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 10:49:31 +0000 (UTC) Subject: [commit: ghc] master: Fix warning that 'hugs-options' isn't supported any more (909580c) Message-ID: <20181219104931.283A43ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/909580cc9d4e14ba331a9af612d3f2f3dbeab994/ghc >--------------------------------------------------------------- commit 909580cc9d4e14ba331a9af612d3f2f3dbeab994 Author: Gabor Greif Date: Wed Dec 12 13:56:50 2018 +0100 Fix warning that 'hugs-options' isn't supported any more >--------------------------------------------------------------- 909580cc9d4e14ba331a9af612d3f2f3dbeab994 rts/package.conf.in | 1 - 1 file changed, 1 deletion(-) diff --git a/rts/package.conf.in b/rts/package.conf.in index b5ed26d..dc44b74 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -71,7 +71,6 @@ include-dirs: TOP"/rts/dist/build" TOP"/includes" TOP"/includes/dist-d #endif includes: Stg.h -hugs-options: cc-options: ld-options: From git at git.haskell.org Wed Dec 19 15:41:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 15:41:58 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix locale on Darwin only (9fe3041) Message-ID: <20181219154158.D67AD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9fe304180472da17f1c1d67b24ab12281cc9fd70/ghc >--------------------------------------------------------------- commit 9fe304180472da17f1c1d67b24ab12281cc9fd70 Author: Ben Gamari Date: Wed Dec 19 09:06:01 2018 -0500 gitlab-ci: Fix locale on Darwin only Setting LANG causes trouble on Debian. >--------------------------------------------------------------- 9fe304180472da17f1c1d67b24ab12281cc9fd70 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09f3be2..b766092 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,6 +91,7 @@ validate-x86_64-darwin: MACOSX_DEPLOYMENT_TARGET: "10.7" # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" + LANG: "en_US.UTF-8" before_script: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" From git at git.haskell.org Wed Dec 19 19:06:32 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 19:06:32 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Split build into two halves (68d6a71) Message-ID: <20181219190632.BC5173ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/68d6a71646de52096ebc196320332a2d98daeb47/ghc >--------------------------------------------------------------- commit 68d6a71646de52096ebc196320332a2d98daeb47 Author: Ben Gamari Date: Wed Dec 19 11:49:25 2018 -0500 gitlab-ci: Split build into two halves Currently we are having quite some trouble keeping up with our build volume due to the number of configurations we have. I've split the pipeline into two halves: * build, which builds just vanilla deb9-linux with make and hadrian * full-build, which builds everything else This will trade-off some latency to more efficient use of our builders. >--------------------------------------------------------------- 68d6a71646de52096ebc196320332a2d98daeb47 .gitlab-ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b766092..0fb8192 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ variables: stages: - lint - build + - full-build ############################################################ # Linting @@ -30,7 +31,6 @@ ghc-linters: ############################################################ .validate-hadrian: - stage: build allow_failure: true script: - bash .circleci/prepare-system.sh @@ -45,6 +45,7 @@ ghc-linters: validate-x86_64-linux-deb8-hadrian: extends: .validate-hadrian + stage: build image: ghcci/x86_64-linux-deb8:0.1 before_script: # workaround for docker permissions @@ -57,7 +58,6 @@ validate-x86_64-linux-deb8-hadrian: ############################################################ .validate: - stage: build variables: TEST_TYPE: test script: @@ -83,6 +83,7 @@ validate-x86_64-linux-deb8-hadrian: validate-x86_64-darwin: extends: .validate + stage: full-build allow_failure: true tags: - x86_64-darwin @@ -127,6 +128,7 @@ validate-x86_64-darwin: validate-aarch64-linux-deb9: extends: .validate-linux + stage: full-build image: ghcci/aarch64-linux-deb9:0.1 allow_failure: true artifacts: @@ -139,6 +141,7 @@ validate-aarch64-linux-deb9: nightly-aarch64-linux-deb9: extends: validate-aarch64-linux-deb9 + stage: full-build artifacts: expire_in: 2 year variables: @@ -149,6 +152,7 @@ nightly-aarch64-linux-deb9: validate-x86_64-linux-deb9: extends: .validate-linux + stage: build image: ghcci/x86_64-linux-deb9:0.2 artifacts: when: always @@ -158,6 +162,7 @@ validate-x86_64-linux-deb9: nightly-x86_64-linux-deb9: extends: validate-x86_64-linux-deb9 + stage: build artifacts: expire_in: 2 year variables: @@ -168,6 +173,7 @@ nightly-x86_64-linux-deb9: validate-x86_64-linux-deb9-llvm: extends: .validate-linux + stage: full-build allow_failure: true image: ghcci/x86_64-linux-deb9:0.2 variables: @@ -177,6 +183,7 @@ validate-x86_64-linux-deb9-llvm: validate-x86_64-linux-deb8: extends: .validate-linux + stage: full-build image: ghcci/x86_64-linux-deb8:0.1 cache: key: linux-x86_64-deb8 @@ -186,6 +193,7 @@ validate-x86_64-linux-deb8: validate-x86_64-linux-fedora27: extends: .validate-linux + stage: full-build image: ghcci/x86_64-linux-fedora27:0.1 cache: key: linux-x86_64-fedora27 @@ -195,6 +203,7 @@ validate-x86_64-linux-fedora27: validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux + stage: full-build allow_failure: true variables: INTEGER_LIBRARY: integer-simple @@ -204,6 +213,7 @@ validate-x86_64-linux-deb9-integer-simple: nightly-x86_64-linux-deb9-integer-simple: extends: validate-x86_64-linux-deb9-integer-simple + stage: full-build artifacts: expire_in: 2 year variables: @@ -214,6 +224,7 @@ nightly-x86_64-linux-deb9-integer-simple: validate-x86_64-linux-deb9-unreg: extends: .validate-linux + stage: full-build variables: CONFIGURE_ARGS: --enable-unregisterised image: ghcci/x86_64-linux-deb9:0.2 @@ -225,7 +236,7 @@ validate-x86_64-linux-deb9-unreg: ############################################################ validate-x86_64-windows-hadrian: - stage: build + stage: full-build variables: GHC_VERSION: "8.6.2" script: @@ -253,7 +264,7 @@ validate-x86_64-windows-hadrian: - x86_64-windows validate-x86_64-windows: - stage: build + stage: full-build variables: GHC_VERSION: "8.6.2" script: From git at git.haskell.org Wed Dec 19 19:57:46 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 19:57:46 +0000 (UTC) Subject: [commit: ghc] master: Fix #16030 by refactoring IfaceSyn's treatment of GADT constructors (9d9e355) Message-ID: <20181219195746.2818C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9d9e35574a92773d872efd58a67339a9e054a9f1/ghc >--------------------------------------------------------------- commit 9d9e35574a92773d872efd58a67339a9e054a9f1 Author: Ryan Scott Date: Wed Dec 19 19:17:58 2018 +0100 Fix #16030 by refactoring IfaceSyn's treatment of GADT constructors Summary: GHCi's `:info` command was pretty-printined GADT constructors suboptimally in the following ways: 1. Sometimes, fields were parenthesized when they did not need it, e.g., ```lang=haskell data Foo a where MkFoo :: (Maybe a) -> Foo a ``` I fixed this by refactoring some code in `pprIfaceConDecl` to be a little smarter with respect to GADT syntax. See `pprFieldArgTy` and `pprArgTy`. 2. With `-fprint-explicit-kinds` enabled, there would be times when specified arguments would be printed without a leading `@` in GADT return types, e.g., ```lang=haskell data Bar @k (a :: k) where MkBar :: Bar k a ``` It turns out that `ppr_tc_app`, the function which pretty-prints these return types, was not using the proper machinery to print out the arguments, which caused the visibilities to be forgotten entirely. I refactored `ppr_tc_app` to do this correctly. Test Plan: make test TEST=T16030 Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter GHC Trac Issues: #16030 Differential Revision: https://phabricator.haskell.org/D5440 >--------------------------------------------------------------- 9d9e35574a92773d872efd58a67339a9e054a9f1 compiler/iface/IfaceSyn.hs | 101 ++++++++++++++++++++--------- compiler/iface/IfaceType.hs | 2 +- testsuite/tests/ghci/scripts/T16030.hs | 15 +++++ testsuite/tests/ghci/scripts/T16030.script | 4 ++ testsuite/tests/ghci/scripts/T16030.stdout | 22 +++++++ testsuite/tests/ghci/scripts/all.T | 1 + 6 files changed, 114 insertions(+), 31 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9d9e35574a92773d872efd58a67339a9e054a9f1 From git at git.haskell.org Wed Dec 19 19:57:49 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 19:57:49 +0000 (UTC) Subject: [commit: ghc] master: Use unicode arrows with -fprint-unicode-syntax (d555d4b) Message-ID: <20181219195749.22C493ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d555d4beb457f485aa122d118903f6f926f054f8/ghc >--------------------------------------------------------------- commit d555d4beb457f485aa122d118903f6f926f054f8 Author: Krzysztof Gogolewski Date: Wed Dec 19 19:17:20 2018 +0100 Use unicode arrows with -fprint-unicode-syntax Summary: See #8959, this is one more place where we can pretty-print Unicode syntax. Test Plan: validate Reviewers: nomeata, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #8959 Differential Revision: https://phabricator.haskell.org/D5439 >--------------------------------------------------------------- d555d4beb457f485aa122d118903f6f926f054f8 compiler/hsSyn/HsTypes.hs | 2 +- testsuite/tests/ghci/scripts/T8959b.stderr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 993b020..4ab15b2 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -1444,7 +1444,7 @@ ppr_fun_ty ty1 ty2 = let p1 = ppr_mono_lty ty1 p2 = ppr_mono_lty ty2 in - sep [p1, text "->" <+> p2] + sep [p1, arrow <+> p2] -------------------------- ppr_tylit :: HsTyLit -> SDoc diff --git a/testsuite/tests/ghci/scripts/T8959b.stderr b/testsuite/tests/ghci/scripts/T8959b.stderr index 28b48fd..a814d2e 100644 --- a/testsuite/tests/ghci/scripts/T8959b.stderr +++ b/testsuite/tests/ghci/scripts/T8959b.stderr @@ -12,5 +12,5 @@ T8959b.hs:8:7: error: T8959b.hs:10:7: error: • Couldn't match expected type ‘(∀ a2. a2 → a2) → a1’ with actual type ‘()’ - • In the expression: () ∷ (∀ a. a -> a) -> a - In an equation for ‘baz’: baz = () ∷ (∀ a. a -> a) -> a + • In the expression: () ∷ (∀ a. a → a) → a + In an equation for ‘baz’: baz = () ∷ (∀ a. a → a) → a From git at git.haskell.org Wed Dec 19 19:57:52 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 19 Dec 2018 19:57:52 +0000 (UTC) Subject: [commit: ghc] master: don't suggest Rank2Types in error messages (Fixed #16000) (de50f8f) Message-ID: <20181219195752.1FDD53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/de50f8fd432f88d26a08b07c7bf08c5bff25472e/ghc >--------------------------------------------------------------- commit de50f8fd432f88d26a08b07c7bf08c5bff25472e Author: chessai Date: Wed Dec 19 19:16:49 2018 +0100 don't suggest Rank2Types in error messages (Fixed #16000) Summary: Rank2Types is deprecated. Don't suggest to users to use it. Reviewers: bgamari, RyanGlScott, simonpj Reviewed By: RyanGlScott, simonpj Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #16000 Differential Revision: https://phabricator.haskell.org/D5447 >--------------------------------------------------------------- de50f8fd432f88d26a08b07c7bf08c5bff25472e compiler/typecheck/TcValidity.hs | 4 ++-- testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr | 2 +- testsuite/tests/typecheck/should_fail/T12083a.stderr | 2 +- testsuite/tests/typecheck/should_fail/T12083b.stderr | 2 +- testsuite/tests/typecheck/should_fail/T2538.stderr | 2 +- testsuite/tests/typecheck/should_fail/T5957.stderr | 2 +- testsuite/tests/typecheck/should_fail/tcfail184.stderr | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index ca5db45..867e202 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -427,7 +427,7 @@ data Rank = ArbitraryRank -- Any rank ok rankZeroMonoType, tyConArgMonoType, synArgMonoType, constraintMonoType :: Rank -rankZeroMonoType = MonoType (text "Perhaps you intended to use RankNTypes or Rank2Types") +rankZeroMonoType = MonoType (text "Perhaps you intended to use RankNTypes") tyConArgMonoType = MonoType (text "GHC doesn't yet support impredicative polymorphism") synArgMonoType = MonoType (text "Perhaps you intended to use LiberalTypeSynonyms") constraintMonoType = MonoType (vcat [ text "A constraint must be a monotype" @@ -618,7 +618,7 @@ forAllTyErr env rank ty herald | null tvs = text "Illegal qualified type:" | otherwise = text "Illegal polymorphic type:" suggestion = case rank of - LimitedRank {} -> text "Perhaps you intended to use RankNTypes or Rank2Types" + LimitedRank {} -> text "Perhaps you intended to use RankNTypes" MonoType d -> d _ -> Outputable.empty -- Polytype is always illegal diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr index 13a0dff..55d0358 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr @@ -1,5 +1,5 @@ SimpleFail15.hs:5:8: error: • Illegal qualified type: (a ~ b) => t - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b) diff --git a/testsuite/tests/typecheck/should_fail/T12083a.stderr b/testsuite/tests/typecheck/should_fail/T12083a.stderr index 910d4c3..fe126f9 100644 --- a/testsuite/tests/typecheck/should_fail/T12083a.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083a.stderr @@ -1,7 +1,7 @@ T12083a.hs:5:1: error: • Illegal qualified type: Num a => a - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • In the type synonym declaration for ‘Constrd’ T12083a.hs:9:26: error: diff --git a/testsuite/tests/typecheck/should_fail/T12083b.stderr b/testsuite/tests/typecheck/should_fail/T12083b.stderr index ae9d487..87649ec 100644 --- a/testsuite/tests/typecheck/should_fail/T12083b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12083b.stderr @@ -1,7 +1,7 @@ T12083b.hs:6:5: error: • Illegal qualified type: Eq a => r - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • When checking the class method: test :: forall a r. Class a => a -> (Eq a => r) -> r In the class declaration for ‘Class’ diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr index dc87c5d..18c82bd 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.stderr +++ b/testsuite/tests/typecheck/should_fail/T2538.stderr @@ -1,7 +1,7 @@ T2538.hs:6:6: error: • Illegal qualified type: Eq a => a -> a - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • In the type signature: f :: (Eq a => a -> a) -> Int diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr index 8239d56..66bc0c1 100644 --- a/testsuite/tests/typecheck/should_fail/T5957.stderr +++ b/testsuite/tests/typecheck/should_fail/T5957.stderr @@ -1,6 +1,6 @@ T5957.hs:3:9: error: • Illegal qualified type: Show a => a -> String - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • In the type signature: flex :: Int -> Show a => a -> String diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.stderr b/testsuite/tests/typecheck/should_fail/tcfail184.stderr index 930ef27..fd6f1fd 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail184.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail184.stderr @@ -1,6 +1,6 @@ tcfail184.hs:8:19: error: • Illegal polymorphic type: forall a. Ord a => [a] -> [a] - Perhaps you intended to use RankNTypes or Rank2Types + Perhaps you intended to use RankNTypes • In the definition of data constructor ‘MkSwizzle’ In the newtype declaration for ‘Swizzle’ From git at git.haskell.org Thu Dec 20 12:37:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 20 Dec 2018 12:37:51 +0000 (UTC) Subject: [commit: ghc] master: Remove an old OPTIONS_GHC (5571786) Message-ID: <20181220123751.538FC3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/557178619aa20d7c7789fe2c6225396429c77f70/ghc >--------------------------------------------------------------- commit 557178619aa20d7c7789fe2c6225396429c77f70 Author: Ömer Sinan Ağacan Date: Thu Dec 20 15:36:54 2018 +0300 Remove an old OPTIONS_GHC >--------------------------------------------------------------- 557178619aa20d7c7789fe2c6225396429c77f70 compiler/main/GhcMake.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 8b2bc01..ae27d4e 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -1,9 +1,5 @@ {-# LANGUAGE BangPatterns, CPP, NondecreasingIndentation, ScopedTypeVariables #-} {-# LANGUAGE NamedFieldPuns #-} -{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} --- NB: we specifically ignore deprecations. GHC 7.6 marks the .QSem module as --- deprecated, although it became un-deprecated later. As a result, using 7.6 --- as your bootstrap compiler throws annoying warnings. -- ----------------------------------------------------------------------------- -- From git at git.haskell.org Thu Dec 20 13:00:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 20 Dec 2018 13:00:45 +0000 (UTC) Subject: [commit: ghc] branch 'wip/cabal-submod-update' created Message-ID: <20181220130045.F127C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/cabal-submod-update Referencing: 81c86f285283527450de5d68ed24b73faaa75d1b From git at git.haskell.org Thu Dec 20 13:00:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 20 Dec 2018 13:00:48 +0000 (UTC) Subject: [commit: ghc] wip/cabal-submod-update: Update `Cabal` submodule (81c86f2) Message-ID: <20181220130048.EF6AB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/cabal-submod-update Link : http://ghc.haskell.org/trac/ghc/changeset/81c86f285283527450de5d68ed24b73faaa75d1b/ghc >--------------------------------------------------------------- commit 81c86f285283527450de5d68ed24b73faaa75d1b Author: Herbert Valerio Riedel Date: Thu Dec 20 00:16:09 2018 +0100 Update `Cabal` submodule While at it, also remove some old cruft >--------------------------------------------------------------- 81c86f285283527450de5d68ed24b73faaa75d1b ghc.mk | 3 --- libraries/Cabal | 2 +- utils/ghc-cabal/ghc.mk | 10 +++++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ghc.mk b/ghc.mk index e0d5837..7292e4e 100644 --- a/ghc.mk +++ b/ghc.mk @@ -451,9 +451,6 @@ PACKAGES_STAGE1 += text PACKAGES_STAGE1 += transformers PACKAGES_STAGE1 += mtl PACKAGES_STAGE1 += parsec -# temporary until Cabal switches to parsec mode by default -libraries/Cabal/Cabal_dist-boot_CONFIGURE_OPTS += --flag parsec -libraries/Cabal/Cabal_dist-install_CONFIGURE_OPTS += --flag parsec PACKAGES_STAGE1 += Cabal/Cabal PACKAGES_STAGE1 += ghc-boot-th PACKAGES_STAGE1 += ghc-boot diff --git a/libraries/Cabal b/libraries/Cabal index 064d9e9..889dd2e 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit 064d9e9082c825f538655db1868108c48240377e +Subproject commit 889dd2e8cef26c738d0dbd7c045f5103a285c996 diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index 70e418e..9e40375 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -37,15 +37,15 @@ $(ghc-cabal_INPLACE) : $(ghc-cabal_DIST_BINARY) | $$(dir $$@)/. "$(CP)" $< $@ # Minor hack, since we can't reuse the `hs-suffix-rules-srcdir` macro -ifneq ($(wildcard libraries/Cabal/Cabal/Distribution/Parsec/Lexer.x),) +ifneq ($(wildcard libraries/Cabal/Cabal/Distribution/Fields/Lexer.x),) # Lexer.x exists so we have to call Alex ourselves -CABAL_LEXER_DEP := bootstrapping/Cabal/Distribution/Parsec/Lexer.hs +CABAL_LEXER_DEP := bootstrapping/Cabal/Distribution/Fields/Lexer.hs -bootstrapping/Cabal/Distribution/Parsec/Lexer.hs: libraries/Cabal/Cabal/Distribution/Parsec/Lexer.x - mkdir -p bootstrapping/Cabal/Distribution/Parsec +bootstrapping/Cabal/Distribution/Fields/Lexer.hs: libraries/Cabal/Cabal/Distribution/Fields/Lexer.x + mkdir -p bootstrapping/Cabal/Distribution/Fields $(call cmd,ALEX) $< -o $@ else -CABAL_LEXER_DEP := libraries/Cabal/Cabal/Distribution/Parsec/Lexer.hs +CABAL_LEXER_DEP := libraries/Cabal/Cabal/Distribution/Fields/Lexer.hs endif $(ghc-cabal_DIST_BINARY): $(wildcard libraries/Cabal/Cabal/Distribution/*/*/*.hs) From git at git.haskell.org Thu Dec 20 15:02:18 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 20 Dec 2018 15:02:18 +0000 (UTC) Subject: [commit: ghc] master: Add solveLocalEqualities to tcHsPatSigType (a1c3ad0) Message-ID: <20181220150218.CDEF03ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a1c3ad0450baedadc223969dd2b09f59872a38e7/ghc >--------------------------------------------------------------- commit a1c3ad0450baedadc223969dd2b09f59872a38e7 Author: Simon Peyton Jones Date: Thu Dec 20 12:42:46 2018 +0000 Add solveLocalEqualities to tcHsPatSigType This call plain missing, and as a result the casts messed up deep-skolemisation in tcSubType Fixes Trac #16033 >--------------------------------------------------------------- a1c3ad0450baedadc223969dd2b09f59872a38e7 compiler/typecheck/TcHsType.hs | 6 +++++- testsuite/tests/typecheck/should_compile/T16033.hs | 7 +++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 3b36281..56a0ea0 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -2323,7 +2323,11 @@ tcHsPatSigType ctxt sig_ty = addSigCtxt ctxt hs_ty $ do { sig_tkvs <- mapM new_implicit_tv sig_vars ; (wcs, sig_ty) - <- tcWildCardBinders sig_wcs $ \ wcs -> + <- solveLocalEqualities "tcHsPatSigType" $ + -- Always solve local equalities if possible, + -- else casts get in the way of deep skolemisation + -- (Trac #16033) + tcWildCardBinders sig_wcs $ \ wcs -> tcExtendTyVarEnv sig_tkvs $ do { sig_ty <- tcHsOpenType hs_ty ; return (wcs, sig_ty) } diff --git a/testsuite/tests/typecheck/should_compile/T16033.hs b/testsuite/tests/typecheck/should_compile/T16033.hs new file mode 100644 index 0000000..09be024 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16033.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} +module T16033 where + +f :: (forall x. x -> forall y. y -> c) -> () +f (_ :: forall a. a -> forall b. b -> c) = () diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index a8e8cfe..3fed2a9 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -657,3 +657,4 @@ test('T15645', normal, compile, ['-Wwarn=missing-monadfail-instances']) test('T15778', normal, compile, ['']) test('T14761c', normal, compile, ['']) test('T16008', normal, compile, ['']) +test('T16033', normal, compile, ['']) From git at git.haskell.org Thu Dec 20 15:02:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 20 Dec 2018 15:02:23 +0000 (UTC) Subject: [commit: ghc] master: Refine the suppression of RuntimeRep variables (5f2a879) Message-ID: <20181220150223.2098A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5f2a8793514918eaa670347ce0d95dfdbbdd4f4d/ghc >--------------------------------------------------------------- commit 5f2a8793514918eaa670347ce0d95dfdbbdd4f4d Author: Simon Peyton Jones Date: Thu Dec 20 14:05:27 2018 +0000 Refine the suppression of RuntimeRep variables When we pretty-print types, we suppress RuntimeRep variables, but we were being too aggressive in doing so, resulting in Trac #16074. This patch makes the suppression a bit less aggressive. See Note [Defaulting RuntimeRep variables] >--------------------------------------------------------------- 5f2a8793514918eaa670347ce0d95dfdbbdd4f4d compiler/iface/IfaceType.hs | 133 ++++++++++++--------- testsuite/tests/typecheck/should_fail/T16074.hs | 10 ++ .../tests/typecheck/should_fail/T16074.stderr | 17 +++ testsuite/tests/typecheck/should_fail/all.T | 1 + 4 files changed, 105 insertions(+), 56 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5f2a8793514918eaa670347ce0d95dfdbbdd4f4d From git at git.haskell.org Fri Dec 21 04:29:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 04:29:23 +0000 (UTC) Subject: [commit: ghc] master: Fix #16002 by moving a validity check to the renamer (28f41f1) Message-ID: <20181221042923.355B63ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7/ghc >--------------------------------------------------------------- commit 28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7 Author: Ryan Scott Date: Thu Dec 20 23:00:21 2018 -0500 Fix #16002 by moving a validity check to the renamer Summary: The validity check which rejected things like: ```lang=haskell type family B x where A x = x ``` Used to live in the typechecker. But it turns out that this validity check was //only// being run on closed type families without CUSKs! This meant that GHC would silently accept something like this: ```lang=haskell type family B (x :: *) :: * where A x = x ``` This patch fixes the issue by moving this validity check to the renamer, where we can be sure that the check will //always// be run. Test Plan: make test TEST=T16002 Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: goldfire, rwbarton, carter GHC Trac Issues: #16002 Differential Revision: https://phabricator.haskell.org/D5420 >--------------------------------------------------------------- 28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7 compiler/rename/RnSource.hs | 57 ++++++++++++++++------ compiler/typecheck/TcTyClsDecls.hs | 9 ---- .../indexed-types/should_fail/Overlap5.stderr | 4 +- testsuite/tests/rename/should_fail/T16002.hs | 6 +++ testsuite/tests/rename/should_fail/T16002.stderr | 6 +++ testsuite/tests/rename/should_fail/all.T | 1 + .../tests/typecheck/should_fail/T11623.stderr | 8 +-- 7 files changed, 62 insertions(+), 29 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7 From git at git.haskell.org Fri Dec 21 11:37:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 11:37:17 +0000 (UTC) Subject: [commit: ghc] master: Make candidateQTvs contain tyvar with zonked kinds (71e26a7) Message-ID: <20181221113717.C5BA83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/71e26a74da5e5e9a61163b87ab4d22de88a2d04a/ghc >--------------------------------------------------------------- commit 71e26a74da5e5e9a61163b87ab4d22de88a2d04a Author: Simon Peyton Jones Date: Fri Dec 21 11:11:31 2018 +0000 Make candidateQTvs contain tyvar with zonked kinds candidateQTyVars was failing to return fully-zonked tyvars, and that made things fall over chaotically when we try to sort them into a well-scoped telescope. Result: Trac #15795 So I made candidateQTvs guarantee to have fully-zonked tyvars (i.e. with zonked kinds). That's a bit annoying but not really difficult. >--------------------------------------------------------------- 71e26a74da5e5e9a61163b87ab4d22de88a2d04a compiler/typecheck/TcMType.hs | 150 +++++++++++++++++++---------------- testsuite/tests/polykinds/T15795.hs | 15 ++++ testsuite/tests/polykinds/T15795a.hs | 9 +++ testsuite/tests/polykinds/all.T | 3 + 4 files changed, 109 insertions(+), 68 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 71e26a74da5e5e9a61163b87ab4d22de88a2d04a From git at git.haskell.org Fri Dec 21 13:24:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 13:24:28 +0000 (UTC) Subject: [commit: nofib] master: Fix parsing of maximum residency in runstdtest (f352131) Message-ID: <20181221132428.43F993ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f3521319e2c5390e8076fd379ddeeea9d3e7ce12/nofib >--------------------------------------------------------------- commit f3521319e2c5390e8076fd379ddeeea9d3e7ce12 Author: Sebastian Graf Date: Fri Dec 21 14:24:11 2018 +0100 Fix parsing of maximum residency in runstdtest Summary: `runstdtest` switched from `-S` to `-s` output a while ago. That broke parsing of maximum and average residency numbers. This commit makes sure that at least maximum residency is parsed correctly from `-s` output, while leaving the logic for `-S` output. Reviewers: simonmar, bgamari, simonpj, osa1, AndreasK, O26 nofib Reviewed By: bgamari GHC Trac Issues: #16003 Differential Revision: https://phabricator.haskell.org/D5418 >--------------------------------------------------------------- f3521319e2c5390e8076fd379ddeeea9d3e7ce12 runstdtest/runstdtest.prl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/runstdtest/runstdtest.prl b/runstdtest/runstdtest.prl index 648f381..78da420 100644 --- a/runstdtest/runstdtest.prl +++ b/runstdtest/runstdtest.prl @@ -401,6 +401,10 @@ sub process_stats_file { $Balance = 1; while () { if (! /Gen:\s+0/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+/ ) { + # This is only hit for -S and will override the residency + # numbers from -s if found. + # -S is needed for average residency numbers, which is 0 + # otherwise. $max_live = $1 if $max_live < $1; $tot_live += $1; $tot_samples += 1; @@ -414,9 +418,10 @@ sub process_stats_file { $GCWork += $tmp; } -# if ( /^\s*([0-9,]+) bytes maximum residency .* (\d+) sample/ ) { -# $MaxResidency = $1; $ResidencySamples = $2; -# } + if ( /^\s*([0-9,]+) bytes maximum residency.*(\d+) sample/ ) { + $MaxResidency = $1; + $ResidencySamples = $2; + } if ( /^\s+([0-9]+)\s+M[Bb] total memory/ ) { $TotMem = $1; @@ -501,6 +506,7 @@ sub process_stats_file { } close(STATS) || die "Failed when closing $StatsFile\n"; if ( $tot_samples > 0 ) { + # This is only hit for -S $ResidencySamples = $tot_samples; $MaxResidency = $max_live; $AvgResidency = int ($tot_live / $tot_samples) ; From git at git.haskell.org Fri Dec 21 16:55:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 16:55:14 +0000 (UTC) Subject: [commit: ghc] master: Comments only (28188e0) Message-ID: <20181221165514.7E8083ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/28188e06b4953f589c7cd442ae14787bc74cabf8/ghc >--------------------------------------------------------------- commit 28188e06b4953f589c7cd442ae14787bc74cabf8 Author: Simon Peyton Jones Date: Mon Dec 10 17:32:34 2018 +0000 Comments only >--------------------------------------------------------------- 28188e06b4953f589c7cd442ae14787bc74cabf8 compiler/rename/RnSource.hs | 6 ++++-- compiler/simplCore/SetLevels.hs | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 78444ba..c76eb31 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -698,7 +698,7 @@ rnFamInstEqn :: HsDocContext -> Maybe (Name, [Name]) -- Nothing => not associated -- Just (cls,tvs) => associated, -- and gives class and tyvars of the - -- parent instance delc + -- parent instance decl -> [Located RdrName] -- Kind variables from the equation's RHS -> FamInstEqn GhcPs rhs -> (HsDocContext -> rhs -> RnM (rhs', FreeVars)) @@ -801,7 +801,9 @@ rnFamInstEqn doc mb_cls rhs_kvars rnFamInstEqn _ _ _ (HsIB _ (XFamEqn _)) _ = panic "rnFamInstEqn" rnFamInstEqn _ _ _ (XHsImplicitBndrs _) _ = panic "rnFamInstEqn" -rnTyFamInstDecl :: Maybe (Name, [Name]) +rnTyFamInstDecl :: Maybe (Name, [Name]) -- Just (cls,tvs) => associated, + -- and gives class and tyvars of + -- the parent instance decl -> TyFamInstDecl GhcPs -> RnM (TyFamInstDecl GhcRn, FreeVars) rnTyFamInstDecl mb_cls (TyFamInstDecl { tfid_eqn = eqn }) diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index e685b3a..2f993b7 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -462,7 +462,7 @@ lvlCase :: LevelEnv -- Level of in-scope names/tyvars lvlCase env scrut_fvs scrut' case_bndr ty alts -- See Note [Floating single-alternative cases] | [(con@(DataAlt {}), bs, body)] <- alts - , exprIsHNF (deTagExpr scrut') -- See Note [Check the output scrutinee for okForSpec] + , exprIsHNF (deTagExpr scrut') -- See Note [Check the output scrutinee for exprIsHNF] , not (isTopLvl dest_lvl) -- Can't have top-level cases , not (floatTopLvlOnly env) -- Can float anywhere = -- Always float the case if possible @@ -535,21 +535,25 @@ Things to note: * We only do this with a single-alternative case -Note [Check the output scrutinee for okForSpec] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Check the output scrutinee for exprIsHNF] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: case x of y { A -> ....(case y of alts).... } + Because of the binder-swap, the inner case will get substituted to -(case x of ..). So when testing whether the scrutinee is -okForSpeculation we must be careful to test the *result* scrutinee ('x' -in this case), not the *input* one 'y'. The latter *is* ok for -speculation here, but the former is not -- and indeed we can't float -the inner case out, at least not unless x is also evaluated at its -binding site. See Trac #5453. +(case x of ..). So when testing whether the scrutinee is in HNF we +must be careful to test the *result* scrutinee ('x' in this case), not +the *input* one 'y'. The latter *is* in HNF here (because y is +evaluated), but the former is not -- and indeed we can't float the +inner case out, at least not unless x is also evaluated at its binding +site. See Trac #5453. That's why we apply exprIsHNF to scrut' and not to scrut. + +See Note [Floating single-alternative cases] for why +we use exprIsHNF in the first place. -} lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars From git at git.haskell.org Fri Dec 21 16:55:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 16:55:17 +0000 (UTC) Subject: [commit: ghc] master: Tiny refactor to tcExtendRecEnv (66ce7de) Message-ID: <20181221165517.79F203ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/66ce7de15dbc594e6890b5651dba3aa669c8d5fc/ghc >--------------------------------------------------------------- commit 66ce7de15dbc594e6890b5651dba3aa669c8d5fc Author: Simon Peyton Jones Date: Thu Dec 20 12:41:14 2018 +0000 Tiny refactor to tcExtendRecEnv In tcExtendRecEnv, there is no need to us setGlobalTypeEnv (which side-effects the tcg_type_env_var). tcExtendRecEnv is used only when kind-checking a group of type/class decls and no knot-tying via tcg_type_env_var is needed. There is no change in functionality. >--------------------------------------------------------------- 66ce7de15dbc594e6890b5651dba3aa669c8d5fc compiler/typecheck/TcEnv.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs index d32272b..7337345 100644 --- a/compiler/typecheck/TcEnv.hs +++ b/compiler/typecheck/TcEnv.hs @@ -378,8 +378,13 @@ tcExtendRecEnv :: [(Name,TyThing)] -> TcM r -> TcM r -- Just like tcExtendGlobalEnv, except the argument is a list of pairs tcExtendRecEnv gbl_stuff thing_inside = do { tcg_env <- getGblEnv - ; let ge' = extendNameEnvList (tcg_type_env tcg_env) gbl_stuff - ; tcg_env' <- setGlobalTypeEnv tcg_env ge' + ; let ge' = extendNameEnvList (tcg_type_env tcg_env) gbl_stuff + tcg_env' = tcg_env { tcg_type_env = ge' } + -- No need for setGlobalTypeEnv (which side-effects the + -- tcg_type_env_var); tcExtendRecEnv is used just + -- when kind-check a group of type/class decls. It would + -- in any case be wrong for an interface-file decl to end up + -- with a TcTyCon in it! ; setGblEnv tcg_env' thing_inside } {- From git at git.haskell.org Fri Dec 21 16:55:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 16:55:20 +0000 (UTC) Subject: [commit: ghc] master: Fix treatment of hi-boot files and dfuns (a57d5c4) Message-ID: <20181221165520.7FE973ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a57d5c4d3e39ab9ac2c31431b5e38818359fa5b5/ghc >--------------------------------------------------------------- commit a57d5c4d3e39ab9ac2c31431b5e38818359fa5b5 Author: Simon Peyton Jones Date: Thu Dec 20 17:49:34 2018 +0000 Fix treatment of hi-boot files and dfuns Trac #16038 exposed the fact that TcRnDriver.checkHiBootIface was creating a binding, in the module being compiled, for $fxBlah = $fBlah but $fxBlah was a /GlobalId/. But all bindings should be for /LocalIds/ else dependency analysis goes down the tubes. * I added a CoreLint check that an occurrence of a GlobalId is not bound by an binding of a LocalId. (There is already a binding-site check that no binding binds a GlobalId.) * I refactored (and actually signficantly simplified) the tricky code for dfuns in checkHiBootIface to ensure that we get LocalIds for those boot-dfuns. Alas, I then got "duplicate instance" messages when compiling HsExpr. It turns out that this is a long-standing, but extremely delicate, bug: even before this patch, if you compile HsExpr with -ddump-tc-trace, you get "duplicate instance". Without -ddump-tc-trace, it's OK. What a mess! The reason for the duplicate-instance is now explained in Note [Loading your own hi-boot file] in LoadIface. I fixed it by a Gross Hack in LoadIface.loadInterface. This is at least no worse than before. But there should be a better way. I have opened #16081 for this. >--------------------------------------------------------------- a57d5c4d3e39ab9ac2c31431b5e38818359fa5b5 compiler/coreSyn/CoreLint.hs | 61 ++++---- compiler/iface/LoadIface.hs | 93 ++++++++---- compiler/typecheck/FamInst.hs | 78 +++++----- compiler/typecheck/TcRnDriver.hs | 215 +++++++++++++++------------- testsuite/tests/driver/T14075/T14075.stderr | 8 +- 5 files changed, 257 insertions(+), 198 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc a57d5c4d3e39ab9ac2c31431b5e38818359fa5b5 From git at git.haskell.org Fri Dec 21 16:55:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 16:55:23 +0000 (UTC) Subject: [commit: ghc] master: Improve documention of TypeInType (e9346b5) Message-ID: <20181221165523.801AA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e9346b539a3ba2e99baaa4d6daec704c95727f50/ghc >--------------------------------------------------------------- commit e9346b539a3ba2e99baaa4d6daec704c95727f50 Author: Simon Peyton Jones Date: Fri Dec 21 16:54:26 2018 +0000 Improve documention of TypeInType >--------------------------------------------------------------- e9346b539a3ba2e99baaa4d6daec704c95727f50 docs/users_guide/glasgow_exts.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index ea93cda..0ef0d05 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -8788,8 +8788,9 @@ Kind polymorphism :implies: :extension:`PolyKinds`, :extension:`DataKinds`, :extension:`KindSignatures` :since: 8.0.1 - In the past this extension used to enable advanced type-level programming - techniques. Now it's a shorthand for a couple of other extensions. + The extension :extension:`TypeInType` is now deprecated: its sole effect is + to switch on :extension:`PolyKinds` + (and hence :extension:`KindSignatures`) and :extension:`DataKinds`. .. extension:: PolyKinds :shortdesc: Enable kind polymorphism. From git at git.haskell.org Fri Dec 21 21:56:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:30 +0000 (UTC) Subject: [commit: ghc] master: remove option (59f2924) Message-ID: <20181221215630.F00373ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/59f292424c6e5fa198aa33c18470168a3b60a12d/ghc >--------------------------------------------------------------- commit 59f292424c6e5fa198aa33c18470168a3b60a12d Author: Gabor Greif Date: Fri Dec 14 20:01:43 2018 +0100 remove option >--------------------------------------------------------------- 59f292424c6e5fa198aa33c18470168a3b60a12d compiler/simplCore/FloatOut.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs index 0be1a9e..0aa4854 100644 --- a/compiler/simplCore/FloatOut.hs +++ b/compiler/simplCore/FloatOut.hs @@ -7,7 +7,6 @@ -} {-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} module FloatOut ( floatOutwards ) where From git at git.haskell.org Fri Dec 21 21:56:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:34 +0000 (UTC) Subject: [commit: ghc] master: Revert "gitlab: Drop submodules hack" (a3c6f5e) Message-ID: <20181221215634.875DB3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a3c6f5e4f16301cb4b9bb1629108ce8525026eb9/ghc >--------------------------------------------------------------- commit a3c6f5e4f16301cb4b9bb1629108ce8525026eb9 Author: Ben Gamari Date: Wed Dec 19 10:57:11 2018 -0500 Revert "gitlab: Drop submodules hack" It turns out that the submodules hack is useful to ensure that CI works in forks. This reverts commit 90ceafa8b9ad60e3c7b72cdd2dacdbeb96bdcddc. >--------------------------------------------------------------- a3c6f5e4f16301cb4b9bb1629108ce8525026eb9 .gitlab-ci.yml | 22 ++++++++++++++++++++-- .gitlab/fix-submodules.py | 8 ++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fb8192..9c97baa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,11 @@ variables: GIT_SSL_NO_VERIFY: "1" - GIT_SUBMODULE_STRATEGY: "recursive" - LANG: "en_US.UTF-8" + +before_script: + - python3 .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules stages: - lint @@ -50,6 +54,10 @@ validate-x86_64-linux-deb8-hadrian: before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . + - python3 .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules tags: - x86_64-linux @@ -94,6 +102,11 @@ validate-x86_64-darwin: ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" before_script: + - python .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules + - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex @@ -115,6 +128,11 @@ validate-x86_64-darwin: tags: - x86_64-linux before_script: + - python3 .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules + - bash .circleci/prepare-system.sh # workaround for docker permissions - sudo chown ghc:ghc -R . diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py new file mode 100644 index 0000000..2ff8e41 --- /dev/null +++ b/.gitlab/fix-submodules.py @@ -0,0 +1,8 @@ +#!/usr/bin/python + +import re + +x = open('.gitmodules').read() +x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x) +open('.gitmodules', 'w').write(x) + From git at git.haskell.org Fri Dec 21 21:56:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:37 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Allow Hadrian build on Windows to fail (4147df3) Message-ID: <20181221215637.8815F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4147df3a83e9dc8ad5015e8d5439de9269f6c20c/ghc >--------------------------------------------------------------- commit 4147df3a83e9dc8ad5015e8d5439de9269f6c20c Author: Ben Gamari Date: Wed Dec 19 11:42:56 2018 -0500 gitlab-ci: Allow Hadrian build on Windows to fail Due to #16073. >--------------------------------------------------------------- 4147df3a83e9dc8ad5015e8d5439de9269f6c20c .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c97baa..b803358 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -257,6 +257,8 @@ validate-x86_64-windows-hadrian: stage: full-build variables: GHC_VERSION: "8.6.2" + # due to #16073 + allow_failure: true script: - PATH=C:\msys64\usr\bin;%PATH% - bash .gitlab/win32-init.sh From git at git.haskell.org Fri Dec 21 21:56:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:40 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Remove CircleCI configuration (b1e029a) Message-ID: <20181221215640.92E593ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b1e029a9548090f4fa3e2a6a93814822b928561f/ghc >--------------------------------------------------------------- commit b1e029a9548090f4fa3e2a6a93814822b928561f Author: Ben Gamari Date: Tue Dec 18 17:38:07 2018 -0500 gitlab-ci: Remove CircleCI configuration Our CircleCI builds will fail anyways without large instances. >--------------------------------------------------------------- b1e029a9548090f4fa3e2a6a93814822b928561f .gitlab-ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b803358..5266d37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,18 +331,6 @@ validate-x86_64-windows: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. -circleci-validate-x86_64-linux-deb8: - extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-x86_64-linux-deb8" - -circleci-validate-i386-linux-deb8: - extends: .circleci - script: ".gitlab/circle-ci-job.sh validate-i386-linux-deb8" - -# circleci-validate-x86_64-freebsd: -# extends: .circleci -# script: ".gitlab/circle-ci-job.sh validate-x86_64-freebsd" - circleci-validate-x86_64-darwin: extends: .circleci script: ".gitlab/circle-ci-job.sh validate-x86_64-darwin" From git at git.haskell.org Fri Dec 21 21:56:43 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:43 +0000 (UTC) Subject: [commit: ghc] master: CircleCI: Fix check for git push retry limit. (95fbf87) Message-ID: <20181221215643.9966F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/95fbf87886c4a3c076d71d37e1306f64e0e98b57/ghc >--------------------------------------------------------------- commit 95fbf87886c4a3c076d71d37e1306f64e0e98b57 Author: David Eichmann Date: Wed Dec 19 11:46:13 2018 -0500 CircleCI: Fix check for git push retry limit. Test Plan: Observe CircleCI Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5464 >--------------------------------------------------------------- 95fbf87886c4a3c076d71d37e1306f64e0e98b57 .circleci/push-test-metrics.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/push-test-metrics.sh b/.circleci/push-test-metrics.sh index d8222b7..e383a4c 100755 --- a/.circleci/push-test-metrics.sh +++ b/.circleci/push-test-metrics.sh @@ -42,9 +42,9 @@ function reset_append_note_push { # Push the metrics file as a git note. This may fail if another task pushes a note first. In that case # the latest note is fetched and appended. MAX_RETRY=20 -until reset_append_note_push || [ MAX_RETRY = 0 ] +until reset_append_note_push || [ $MAX_RETRY -le 0 ] do ((MAX_RETRY--)) echo "" - echo "Failed to push git notes. Fetching, appending, and retrying..." + echo "Failed to push git notes. Fetching, appending, and retrying... $MAX_RETRY retries left." done From git at git.haskell.org Fri Dec 21 21:56:46 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:46 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Tag linter stage (4cb59c1) Message-ID: <20181221215646.9C1453ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4cb59c19ffbda68283327fa2a3fc1232fb4cfd97/ghc >--------------------------------------------------------------- commit 4cb59c19ffbda68283327fa2a3fc1232fb4cfd97 Author: Ben Gamari Date: Wed Dec 19 14:25:49 2018 -0500 gitlab-ci: Tag linter stage Previously the linters were tagged with x86_64-linux, meaning that linting jobs would often get stuck behind builds in the queue. Given that linting jobs are fairly low-cost they hold up later build stages it is important that we reduce this latency. >--------------------------------------------------------------- 4cb59c19ffbda68283327fa2a3fc1232fb4cfd97 .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 897047e..f6f6a93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,18 @@ stages: - full-build ############################################################ +# Tags +############################################################ +# +# * x86_64-linux: Any Docker-capable x86_64 Linux machine +# * aarch64-linux: Any Docker-capable AArch64 Linux machine +# * x86_64-windows: A x86_64 Windows machine +# * lint: Any Docker-capable x86_64 Linux machine; distinct from +# x86_64-linux to ensure low-latency availability. +# + + +############################################################ # Linting ############################################################ @@ -29,6 +41,8 @@ ghc-linters: .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA fi + tags: + - lint ############################################################ # Validation via Pipelines (hadrian) From git at git.haskell.org Fri Dec 21 21:56:49 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:49 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Set locale (306ad5c) Message-ID: <20181221215649.9DD2D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/306ad5c9d688ad1b9652cf5609ddcb987d91b446/ghc >--------------------------------------------------------------- commit 306ad5c9d688ad1b9652cf5609ddcb987d91b446 Author: Ben Gamari Date: Fri Dec 21 10:10:28 2018 -0500 gitlab-ci: Set locale >--------------------------------------------------------------- 306ad5c9d688ad1b9652cf5609ddcb987d91b446 .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da3c209..f0d15f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -286,6 +286,7 @@ validate-x86_64-windows-hadrian: stage: full-build variables: GHC_VERSION: "8.6.2" + LANG: "en_US.UTF-8" # due to #16073 allow_failure: true script: @@ -310,6 +311,7 @@ validate-x86_64-windows: stage: full-build variables: GHC_VERSION: "8.6.2" + LANG: "en_US.UTF-8" script: - | set MSYSTEM=MINGW64 From git at git.haskell.org Fri Dec 21 21:56:52 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:52 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Set thread count properly on Windows (46c575a) Message-ID: <20181221215652.9828A3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/46c575a8b6221def3fd9b8b932d95930a448446f/ghc >--------------------------------------------------------------- commit 46c575a8b6221def3fd9b8b932d95930a448446f Author: Ben Gamari Date: Fri Dec 21 10:10:09 2018 -0500 gitlab-ci: Set thread count properly on Windows >--------------------------------------------------------------- 46c575a8b6221def3fd9b8b932d95930a448446f .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6f6a93..da3c209 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -298,7 +298,7 @@ validate-x86_64-windows-hadrian: # FIXME: --no-lint due to #15950 - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint" - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" - - bash -c 'make V=0 test THREADS=$THREADS JUNIT_FILE=../../junit.xml' + - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cp -Rf $APPDATA/cabal cabal-cache cache: key: x86_64-windows @@ -316,7 +316,7 @@ validate-x86_64-windows: python boot bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - - bash -c 'make V=0 test THREADS=$THREADS JUNIT_FILE=../../junit.xml' + - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cp -Rf $APPDATA/cabal cabal-cache cache: key: x86_64-windows From git at git.haskell.org Fri Dec 21 21:56:55 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:55 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix Windows build (6c50508) Message-ID: <20181221215655.919B73ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6c5050874762c2f8da44b3bafd67f236832b2030/ghc >--------------------------------------------------------------- commit 6c5050874762c2f8da44b3bafd67f236832b2030 Author: Ben Gamari Date: Wed Dec 19 12:47:43 2018 -0500 gitlab-ci: Fix Windows build >--------------------------------------------------------------- 6c5050874762c2f8da44b3bafd67f236832b2030 .gitlab-ci.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5266d37..897047e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -253,15 +253,28 @@ validate-x86_64-linux-deb9-unreg: # Validation via Pipelines (Windows) ############################################################ +.validate-windows: + before_script: + - PATH=C:\msys64\usr\bin;%PATH% + - python .gitlab/fix-submodules.py + - git submodule sync --recursive + - git submodule update --init --recursive + - git checkout .gitmodules + - bash .gitlab/win32-init.sh + cache: + paths: + - cabal-cache + - ghc-8.6.2 + - ghc-tarballs + validate-x86_64-windows-hadrian: + extends: .validate-windows stage: full-build variables: GHC_VERSION: "8.6.2" # due to #16073 allow_failure: true script: - - PATH=C:\msys64\usr\bin;%PATH% - - bash .gitlab/win32-init.sh - | set MSYSTEM=MINGW64 python boot @@ -271,39 +284,28 @@ validate-x86_64-windows-hadrian: # FIXME: --no-lint due to #15950 - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint" - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" - - mv ghc-*.tar.xz ghc.tar.xz - - bash -c 'make V=0 -j`mk/detect-cpu-count.sh` HADDOCK_DOCS=NO test THREADS=$THREADS JUNIT_FILE=../../junit.xml' + - bash -c 'make V=0 test THREADS=$THREADS JUNIT_FILE=../../junit.xml' - cp -Rf $APPDATA/cabal cabal-cache cache: - key: windows-hadrian - paths: - - cabal-cache - - ghc-8.6.2 - - ghc-tarballs + key: x86_64-windows tags: - x86_64-windows validate-x86_64-windows: + extends: .validate-windows stage: full-build variables: GHC_VERSION: "8.6.2" script: - - PATH=C:\msys64\usr\bin;%PATH% - - bash .gitlab/win32-init.sh - | set MSYSTEM=MINGW64 python boot bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - - mv ghc-*.tar.xz ghc.tar.xz - - bash -c 'make V=0 -j`mk/detect-cpu-count.sh` HADDOCK_DOCS=NO test THREADS=$THREADS JUNIT_FILE=../../junit.xml' + - bash -c 'make V=0 test THREADS=$THREADS JUNIT_FILE=../../junit.xml' - cp -Rf $APPDATA/cabal cabal-cache cache: - key: windows - paths: - - cabal-cache - - ghc-8.6.2 - - ghc-tarballs + key: x86_64-windows tags: - x86_64-windows From git at git.haskell.org Fri Dec 21 21:56:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:56:58 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Ensure that build environment is clean (290cb9b) Message-ID: <20181221215658.8B2C83ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/290cb9bc527ee4fd33ffc1169eb6b521f6f94003/ghc >--------------------------------------------------------------- commit 290cb9bc527ee4fd33ffc1169eb6b521f6f94003 Author: Ben Gamari Date: Fri Dec 21 14:49:57 2018 -0500 gitlab-ci: Ensure that build environment is clean >--------------------------------------------------------------- 290cb9bc527ee4fd33ffc1169eb6b521f6f94003 .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f0d15f0..fbc8409 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,6 +51,7 @@ ghc-linters: .validate-hadrian: allow_failure: true script: + - git clean -xdf - bash .circleci/prepare-system.sh - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi - ./boot @@ -83,7 +84,7 @@ validate-x86_64-linux-deb8-hadrian: variables: TEST_TYPE: test script: - - make clean || true + - git clean -xdf - ./boot - ./configure $CONFIGURE_ARGS - | @@ -269,6 +270,7 @@ validate-x86_64-linux-deb9-unreg: .validate-windows: before_script: + - git clean -xdf - PATH=C:\msys64\usr\bin;%PATH% - python .gitlab/fix-submodules.py - git submodule sync --recursive From git at git.haskell.org Fri Dec 21 21:57:01 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 21:57:01 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Add i386 Debian 9 builds (dd561e1) Message-ID: <20181221215701.8A38C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/dd561e151af7de6840d79f4a5f523bfe6a751bed/ghc >--------------------------------------------------------------- commit dd561e151af7de6840d79f4a5f523bfe6a751bed Author: Ben Gamari Date: Fri Dec 21 16:51:37 2018 -0500 gitlab-ci: Add i386 Debian 9 builds >--------------------------------------------------------------- dd561e151af7de6840d79f4a5f523bfe6a751bed .gitlab-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbc8409..199148a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -183,6 +183,30 @@ nightly-aarch64-linux-deb9: variables: - $NIGHTLY +validate-i386-linux-deb9: + extends: .validate-linux + stage: full-build + image: ghcci/i386-linux-deb9:0.1 + allow_failure: true + artifacts: + when: always + expire_in: 2 week + cache: + key: linux-i386-deb9 + +nightly-i386-linux-deb9: + extends: .validate-linux + stage: full-build + image: ghcci/i386-linux-deb9:0.1 + allow_failure: true + variables: + TEST_TYPE: slowtest + artifacts: + when: always + expire_in: 2 week + cache: + key: linux-i386-deb9 + validate-x86_64-linux-deb9: extends: .validate-linux stage: build From git at git.haskell.org Fri Dec 21 23:41:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 23:41:30 +0000 (UTC) Subject: [commit: ghc] master: TcRnDriver: Fix haddock-like comment (348cb21) Message-ID: <20181221234130.A9A193ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/348cb218e4ca1d2853fd94bf80c372eef60e9306/ghc >--------------------------------------------------------------- commit 348cb218e4ca1d2853fd94bf80c372eef60e9306 Author: Ben Gamari Date: Fri Dec 21 18:04:51 2018 -0500 TcRnDriver: Fix haddock-like comment >--------------------------------------------------------------- 348cb218e4ca1d2853fd94bf80c372eef60e9306 compiler/typecheck/TcRnDriver.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs index 524fa11..54948e0 100644 --- a/compiler/typecheck/TcRnDriver.hs +++ b/compiler/typecheck/TcRnDriver.hs @@ -820,12 +820,12 @@ checkHiBootIface' = return (Just (local_boot_dfun, real_dfun)) -- Two tricky points here: -- - -- * The local_boot_fun should have a Name from the /boot-file/, - -- but type from the dfun defined in /this module/. - -- That ensures that the TyCon etc inside the type are - -- the ones defined in this module, not the ones gotten - -- from the hi-boot file, which may have a lot less info - -- (Trac #T8743, comment:10). + -- * The local_boot_fun should have a Name from the /boot-file/, + -- but type from the dfun defined in /this module/. + -- That ensures that the TyCon etc inside the type are + -- the ones defined in this module, not the ones gotten + -- from the hi-boot file, which may have a lot less info + -- (Trac #8743, comment:10). -- -- * The DFunIds from boot_details are /GlobalIds/, because -- they come from typechecking M.hi-boot. From git at git.haskell.org Fri Dec 21 23:42:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 21 Dec 2018 23:42:37 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Only run CircleCI Darwin build in full-build stage (015f6ec) Message-ID: <20181221234237.134673ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/015f6ecc5af1be55a59ec7e016c658448dd47dfd/ghc >--------------------------------------------------------------- commit 015f6ecc5af1be55a59ec7e016c658448dd47dfd Author: Ben Gamari Date: Fri Dec 21 18:42:04 2018 -0500 gitlab-ci: Only run CircleCI Darwin build in full-build stage >--------------------------------------------------------------- 015f6ecc5af1be55a59ec7e016c658448dd47dfd .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 199148a..cb7c927 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -377,4 +377,5 @@ validate-x86_64-windows: circleci-validate-x86_64-darwin: extends: .circleci + stage: full-build script: ".gitlab/circle-ci-job.sh validate-x86_64-darwin" From git at git.haskell.org Sat Dec 22 02:28:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 02:28:34 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: More aggressive cleaning (11a89c0) Message-ID: <20181222022834.9AB003ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/11a89c0d59c31ede5496a3118de9c1134989c941/ghc >--------------------------------------------------------------- commit 11a89c0d59c31ede5496a3118de9c1134989c941 Author: Ben Gamari Date: Fri Dec 21 21:28:09 2018 -0500 gitlab-ci: More aggressive cleaning >--------------------------------------------------------------- 11a89c0d59c31ede5496a3118de9c1134989c941 .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb7c927..7427f44 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ ghc-linters: .validate-hadrian: allow_failure: true script: - - git clean -xdf + - git clean -xdf && git submodule foreach git clean -xdf - bash .circleci/prepare-system.sh - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi - ./boot @@ -84,7 +84,7 @@ validate-x86_64-linux-deb8-hadrian: variables: TEST_TYPE: test script: - - git clean -xdf + - git clean -xdf && git submodule foreach git clean -xdf - ./boot - ./configure $CONFIGURE_ARGS - | @@ -295,6 +295,7 @@ validate-x86_64-linux-deb9-unreg: .validate-windows: before_script: - git clean -xdf + - git submodule foreach git clean -xdf - PATH=C:\msys64\usr\bin;%PATH% - python .gitlab/fix-submodules.py - git submodule sync --recursive From git at git.haskell.org Sat Dec 22 02:30:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 02:30:21 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Only run nightly-i386-linux-deb9 when NIGHTLY is set (b154838) Message-ID: <20181222023021.F16E43ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b154838b5f3e773cf95ab91937b7ad44354fd279/ghc >--------------------------------------------------------------- commit b154838b5f3e773cf95ab91937b7ad44354fd279 Author: Ben Gamari Date: Fri Dec 21 21:29:54 2018 -0500 gitlab-ci: Only run nightly-i386-linux-deb9 when NIGHTLY is set >--------------------------------------------------------------- b154838b5f3e773cf95ab91937b7ad44354fd279 .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7427f44..527966a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -204,6 +204,9 @@ nightly-i386-linux-deb9: artifacts: when: always expire_in: 2 week + only: + variables: + - $NIGHTLY cache: key: linux-i386-deb9 From git at git.haskell.org Sat Dec 22 04:25:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 04:25:14 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix Darwin build (4ae6aa3) Message-ID: <20181222042514.DEFAA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4ae6aa398d05f764563e95d77a5e3e9961fb73ac/ghc >--------------------------------------------------------------- commit 4ae6aa398d05f764563e95d77a5e3e9961fb73ac Author: Ben Gamari Date: Fri Dec 21 23:23:56 2018 -0500 gitlab-ci: Fix Darwin build Previously the toolchain directory was wiped away by git clean. >--------------------------------------------------------------- 4ae6aa398d05f764563e95d77a5e3e9961fb73ac .gitlab-ci.yml | 5 ++++- .gitlab/darwin-init.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 527966a..5eff228 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,8 +83,9 @@ validate-x86_64-linux-deb8-hadrian: .validate: variables: TEST_TYPE: test - script: + before_script: - git clean -xdf && git submodule foreach git clean -xdf + script: - ./boot - ./configure $CONFIGURE_ARGS - | @@ -117,6 +118,7 @@ validate-x86_64-darwin: ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" before_script: + - git clean -xdf && git submodule foreach git clean -xdf - python .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive @@ -143,6 +145,7 @@ validate-x86_64-darwin: tags: - x86_64-linux before_script: + - git clean -xdf && git submodule foreach git clean -xdf - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive diff --git a/.gitlab/darwin-init.sh b/.gitlab/darwin-init.sh index e17c7c7..ba5de9d 100644 --- a/.gitlab/darwin-init.sh +++ b/.gitlab/darwin-init.sh @@ -12,7 +12,9 @@ fi if [ ! -e $toolchain/bin/ghc ]; then mkdir -p tmp cd tmp - curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz | tar -xJ + ghc_tarball="https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-apple-darwin.tar.xz" + echo "Fetching GHC from $ghc_tarball" + curl $ghc_tarball | tar -xJ cd ghc-$GHC_VERSION ./configure --prefix=$toolchain make install @@ -22,6 +24,7 @@ fi if [ ! -e $toolchain/bin/cabal ]; then cabal_tarball="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-apple-darwin-sierra.tar.xz" + echo "Fetching cabal-install from $cabal_tarball" curl $cabal_tarball | tar -xz mv cabal $toolchain/bin fi From git at git.haskell.org Sat Dec 22 05:54:22 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 05:54:22 +0000 (UTC) Subject: [commit: ghc] master: LoadIface: Fix another CPP/Clang issue (3ba520c) Message-ID: <20181222055422.3282D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3ba520c5e36c8da61f35d7b4c3482766f034ae33/ghc >--------------------------------------------------------------- commit 3ba520c5e36c8da61f35d7b4c3482766f034ae33 Author: Ben Gamari Date: Sat Dec 22 00:53:00 2018 -0500 LoadIface: Fix another CPP/Clang issue >--------------------------------------------------------------- 3ba520c5e36c8da61f35d7b4c3482766f034ae33 compiler/iface/LoadIface.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 87a6beb..927c49b 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -486,7 +486,7 @@ loadInterface doc_str mod from -- See Note [Loading your own hi-boot file] -- in MkIface. - ; WARN ( bad_boot, ppr mod ) + ; WARN( bad_boot, ppr mod ) updateEps_ $ \ eps -> if elemModuleEnv mod (eps_PIT eps) || is_external_sig dflags iface then eps From git at git.haskell.org Sat Dec 22 05:54:25 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 05:54:25 +0000 (UTC) Subject: [commit: ghc] master: linters: Check for WARN macro with space separating it from its paren (6d2f6df) Message-ID: <20181222055425.2F9F93ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6d2f6df3543bc287e59151e823b7a62c245c27b0/ghc >--------------------------------------------------------------- commit 6d2f6df3543bc287e59151e823b7a62c245c27b0 Author: Ben Gamari Date: Sat Dec 22 00:53:45 2018 -0500 linters: Check for WARN macro with space separating it from its paren >--------------------------------------------------------------- 6d2f6df3543bc287e59151e823b7a62c245c27b0 .gitlab/linters/check-cpp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/linters/check-cpp.py b/.gitlab/linters/check-cpp.py index 144ab7d..c894513 100755 --- a/.gitlab/linters/check-cpp.py +++ b/.gitlab/linters/check-cpp.py @@ -6,6 +6,8 @@ from linter import run_linters, RegexpLinter linters = [ + RegexpLinter(r'WARN\s+\(', + message='CPP macros should not have a space between the macro name and their argument list'), RegexpLinter(r'ASSERT\s+\(', message='CPP macros should not have a space between the macro name and their argument list'), RegexpLinter(r'ASSERT2\s+\(', From git at git.haskell.org Sat Dec 22 07:22:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 07:22:26 +0000 (UTC) Subject: [commit: ghc] master: Add test for #16038 (8adef36) Message-ID: <20181222072226.6BE3E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8adef36cb16b244a81dfb54ead924e00069f33ae/ghc >--------------------------------------------------------------- commit 8adef36cb16b244a81dfb54ead924e00069f33ae Author: Ömer Sinan Ağacan Date: Sat Dec 22 10:11:49 2018 +0300 Add test for #16038 >--------------------------------------------------------------- 8adef36cb16b244a81dfb54ead924e00069f33ae testsuite/tests/simplCore/should_compile/T16038/A.hs | 9 +++++++++ testsuite/tests/simplCore/should_compile/T16038/A.hs-boot | 6 ++++++ testsuite/tests/simplCore/should_compile/T16038/B.hs | 7 +++++++ testsuite/tests/simplCore/should_compile/T16038/Makefile | 10 ++++++++++ testsuite/tests/simplCore/should_compile/T16038/T16038.stdout | 8 ++++++++ .../T13710/all.T => simplCore/should_compile/T16038/test.T} | 4 ++-- 6 files changed, 42 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/simplCore/should_compile/T16038/A.hs b/testsuite/tests/simplCore/should_compile/T16038/A.hs new file mode 100644 index 0000000..3e5137b --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16038/A.hs @@ -0,0 +1,9 @@ +module A where + +import B + +data HsExpr id + = HsOverLit (HsOverLit id) + | HsBracketOut (HsExpr id) + deriving Eq + diff --git a/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot b/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot new file mode 100644 index 0000000..48f6768 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16038/A.hs-boot @@ -0,0 +1,6 @@ +module A where + +data HsExpr i + +instance Eq i => Eq (HsExpr i) + diff --git a/testsuite/tests/simplCore/should_compile/T16038/B.hs b/testsuite/tests/simplCore/should_compile/T16038/B.hs new file mode 100644 index 0000000..9eb315a --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16038/B.hs @@ -0,0 +1,7 @@ +module B where + +import {-# SOURCE #-} A (HsExpr) + +data HsOverLit id + = OverLit (HsExpr id) + deriving Eq diff --git a/testsuite/tests/simplCore/should_compile/T16038/Makefile b/testsuite/tests/simplCore/should_compile/T16038/Makefile new file mode 100644 index 0000000..73ddc7b --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16038/Makefile @@ -0,0 +1,10 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T16038: + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c A.hs-boot + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c B.hs + # All `fEqHsExpr` bindings should be in one recursive group: + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c A.hs -ddump-simpl -dsuppress-all | \ + grep -e "^\$$fEqHsExpr" -e "Rec" diff --git a/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout b/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout new file mode 100644 index 0000000..f52fd1b --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout @@ -0,0 +1,8 @@ +Rec { +$fEqHsExpr_$c/= +$fEqHsExpr_$c/= +$fEqHsExpr +$fEqHsExpr +$fEqHsExpr_$c== +$fEqHsExpr_$c== +end Rec } diff --git a/testsuite/tests/driver/T13710/all.T b/testsuite/tests/simplCore/should_compile/T16038/test.T similarity index 52% copy from testsuite/tests/driver/T13710/all.T copy to testsuite/tests/simplCore/should_compile/T16038/test.T index 64daacc..be525b2 100644 --- a/testsuite/tests/driver/T13710/all.T +++ b/testsuite/tests/simplCore/should_compile/T16038/test.T @@ -1,4 +1,4 @@ -test('T13710', +test('T16038', [extra_files(['A.hs', 'A.hs-boot', 'B.hs'])], run_command, - ['$MAKE -s --no-print-directory T13710']) + ['$MAKE -s --no-print-directory T16038']) From git at git.haskell.org Sat Dec 22 11:05:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 11:05:35 +0000 (UTC) Subject: [commit: nofib] master: Fix some broken links (#15733) (44fc21a) Message-ID: <20181222110535.768CC3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/44fc21a315d0da2377aa8fae93c48ba0b961dd9a/nofib >--------------------------------------------------------------- commit 44fc21a315d0da2377aa8fae93c48ba0b961dd9a Author: Fangyi Zhou Date: Sat Dec 22 12:00:41 2018 +0100 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, O26 nofib, osa1 Reviewed By: osa1 GHC Trac Issues: #15733 Differential Revision: https://phabricator.haskell.org/D5260 >--------------------------------------------------------------- 44fc21a315d0da2377aa8fae93c48ba0b961dd9a parallel/gray/Makefile | 4 ++-- parallel/warshall/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parallel/gray/Makefile b/parallel/gray/Makefile index 6321edf..fc10ed5 100644 --- a/parallel/gray/Makefile +++ b/parallel/gray/Makefile @@ -5,8 +5,8 @@ # This file is part of the GHC build system. # # To understand how the build system works and how to modify it, see -# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture -# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture +# http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying # # ----------------------------------------------------------------------------- diff --git a/parallel/warshall/Makefile b/parallel/warshall/Makefile index 2048760..e389643 100644 --- a/parallel/warshall/Makefile +++ b/parallel/warshall/Makefile @@ -5,8 +5,8 @@ # This file is part of the GHC build system. # # To understand how the build system works and how to modify it, see -# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture -# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture +# http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying # # ----------------------------------------------------------------------------- From git at git.haskell.org Sat Dec 22 15:56:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 15:56:48 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Allow Darwin CircleCI build to fail (e1c5ab0) Message-ID: <20181222155648.5CF623ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e1c5ab0a308c698745adf7cb6218b74ad8ba3164/ghc >--------------------------------------------------------------- commit e1c5ab0a308c698745adf7cb6218b74ad8ba3164 Author: Ben Gamari Date: Sat Dec 22 01:09:20 2018 -0500 gitlab-ci: Allow Darwin CircleCI build to fail This is currently spuriously failing. Moreover, we have the Mac Mini builder running again so this is much less necessary now. >--------------------------------------------------------------- e1c5ab0a308c698745adf7cb6218b74ad8ba3164 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5eff228..4c2f2a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -385,4 +385,5 @@ validate-x86_64-windows: circleci-validate-x86_64-darwin: extends: .circleci stage: full-build + allow_failure: true script: ".gitlab/circle-ci-job.sh validate-x86_64-darwin" From git at git.haskell.org Sat Dec 22 15:56:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 15:56:51 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark objcpp-hi and T13366 as broken on Darwin due to #16083 (1c0c5e8) Message-ID: <20181222155651.8D5733ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1c0c5e844226f3d77af31d97b21ffb8b14b55740/ghc >--------------------------------------------------------------- commit 1c0c5e844226f3d77af31d97b21ffb8b14b55740 Author: Ben Gamari Date: Sat Dec 22 10:01:46 2018 -0500 testsuite: Mark objcpp-hi and T13366 as broken on Darwin due to #16083 >--------------------------------------------------------------- 1c0c5e844226f3d77af31d97b21ffb8b14b55740 testsuite/tests/driver/objc/all.T | 1 + testsuite/tests/th/all.T | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/driver/objc/all.T b/testsuite/tests/driver/objc/all.T index 68b7628..894de0c 100644 --- a/testsuite/tests/driver/objc/all.T +++ b/testsuite/tests/driver/objc/all.T @@ -15,5 +15,6 @@ test('objc-hi', test('objcpp-hi', [ skip_if_not_osx, objcpp_src, + when(opsys('darwin'), expect_broken(16083)), expect_fail_for(['ghci']) ], compile_and_run, ['-framework Foundation -lstdc++']) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 0ab7dba..96c7e1e 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -387,7 +387,10 @@ test('T13018', normal, compile, ['-v0']) test('T13123', normal, compile, ['-v0']) test('T13098', normal, compile, ['-v0']) test('T11046', normal, multimod_compile, ['T11046','-v0']) -test('T13366', expect_broken_for(13366, ['ghci']), compile_and_run, ['-lstdc++ -v0']) +test('T13366', + [expect_broken_for(13366, ['ghci']), when(opsys('darwin'), expect_broken(16083))], + compile_and_run, + ['-lstdc++ -v0']) test('T13473', normal, multimod_compile_and_run, ['T13473.hs', '-v0 ' + config.ghc_th_way_flags]) test('T13587', expect_broken(13587), compile_and_run, ['-v0']) From git at git.haskell.org Sat Dec 22 15:56:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 15:56:54 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Remove expect_broken on readFail032 and readFail048 (7e1d214) Message-ID: <20181222155654.909E93ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7e1d214fce064c42df70ae121cedf27ebea853f8/ghc >--------------------------------------------------------------- commit 7e1d214fce064c42df70ae121cedf27ebea853f8 Author: Ben Gamari Date: Sat Dec 22 09:49:28 2018 -0500 testsuite: Remove expect_broken on readFail032 and readFail048 As noted in #15662, these used to be broken on Darwin due to a Clang toolchain bug. However, this bug appears to be fixed in the Clang shipped with macOS Mojave. Unfortunately, we don't really have any way to only mark it as broken on certain operation system releases so I am just removing the expect_broken entirely. >--------------------------------------------------------------- 7e1d214fce064c42df70ae121cedf27ebea853f8 testsuite/tests/parser/should_fail/all.T | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T index d5c40c1..f1f5122 100644 --- a/testsuite/tests/parser/should_fail/all.T +++ b/testsuite/tests/parser/should_fail/all.T @@ -35,8 +35,10 @@ test('readFail028', normal, compile_fail, ['']) test('readFail029', normal, compile_fail, ['']) test('readFail030', normal, compile_fail, ['']) test('readFail031', normal, compile_fail, ['']) -test('readFail032', when(opsys('darwin'), expect_broken(15662)), - compile_fail, ['-cpp']) +# N.B. readFail032 and readFail048 used to fail on Darwin +# due to a toolchain bug (#15662). This appears to be fixed in +# Mojave but will likely still fail on earlier releases. +test('readFail032', normal, compile_fail, ['-cpp']) test('readFail033', normal, compile_fail, ['']) test('readFail034', normal, compile_fail, ['']) test('readFail035', normal, compile_fail, ['']) @@ -51,8 +53,8 @@ test('readFail043', normal, compile_fail, ['']) test('readFail044', normal, compile_fail, ['']) test('readFail046', normal, compile_fail, ['']) test('readFail047', normal, compile_fail, ['']) -test('readFail048', when(opsys('darwin'), expect_broken(15662)), - compile_fail, ['-cpp -haddock']) +# See comment attached to readFail032 above. +test('readFail048', normal, compile_fail, ['-cpp -haddock']) test('T3095', normal, compile_fail, ['']) test('T3153', normal, compile_fail, ['']) test('T3751', normal, compile_fail, ['']) From git at git.haskell.org Sat Dec 22 18:07:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 22 Dec 2018 18:07:28 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark heapprof001 as broken in prof_hc_hb way on i386 (8fd3f9a) Message-ID: <20181222180728.18F3D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8fd3f9a67f9c7b447a5bfcb3aefd8986794918ce/ghc >--------------------------------------------------------------- commit 8fd3f9a67f9c7b447a5bfcb3aefd8986794918ce Author: Ben Gamari Date: Sat Dec 22 13:02:08 2018 -0500 testsuite: Mark heapprof001 as broken in prof_hc_hb way on i386 As documented in #15382, this is known to fail in prof_hc_hb on i386. Concerningly, I have also seen this test non-deterministically fail in prof_hc_hb on amd64. We should really investigate this. >--------------------------------------------------------------- 8fd3f9a67f9c7b447a5bfcb3aefd8986794918ce testsuite/tests/profiling/should_run/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 8d605f2..c3d34af 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,9 @@ expect_broken_for_10037 = expect_broken_for( # e.g. prof and profllvm test('heapprof001', - [when(have_profiling(), extra_ways(extra_prof_ways)), extra_run_opts('7')], + [when(have_profiling(), extra_ways(extra_prof_ways)), + when(arch('i386'), expect_broken_for(15382, ['prof_hc_hb'])), + extra_run_opts('7')], compile_and_run, ['']) test('T2592', From git at git.haskell.org Sun Dec 23 06:36:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 06:36:30 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix broken_without_gmp (e59439a) Message-ID: <20181223063630.92AAD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e59439af3222d151918ad1ad2a03942ce9e6a1ff/ghc >--------------------------------------------------------------- commit e59439af3222d151918ad1ad2a03942ce9e6a1ff Author: Ben Gamari Date: Sun Dec 23 06:34:00 2018 +0000 testsuite: Fix broken_without_gmp The lack of types made the previous failure silent, sadly. Improves situation of #16043. >--------------------------------------------------------------- e59439af3222d151918ad1ad2a03942ce9e6a1ff testsuite/driver/testlib.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 1c6668d..f26f9e0 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -213,11 +213,6 @@ def record_broken(name, opts, bug): if not me in brokens: brokens.append(me) -def broken_without_gmp(name, opts): - # Many tests sadly break with integer-simple due to GHCi's ignorance of it. - when(config.integer_backend != "integer-gmp", - expect_broken(16043)) - def _expect_pass(way): # Helper function. Not intended for use in .T files. opts = getTestOpts() @@ -465,6 +460,10 @@ def have_gdb( ): def have_readelf( ): return config.have_readelf +# Many tests sadly break with integer-simple due to GHCi's ignorance of it. +broken_without_gmp = when(config.integer_backend != "integer-gmp", + expect_broken(16043)) + # --- def high_memory_usage(name, opts): From git at git.haskell.org Sun Dec 23 18:46:28 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:28 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Drop custom apple handling (7b6a6a7) Message-ID: <20181223184628.0322D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/7b6a6a78ed2df75e171b1a07fee0066a5d2b90ad/ghc >--------------------------------------------------------------- commit 7b6a6a78ed2df75e171b1a07fee0066a5d2b90ad Author: Moritz Angermann Date: Thu May 11 18:15:22 2017 +0800 Drop custom apple handling We know that *-apple-* is leading_underscores, and .dylib. It is also better to test for TargetVendor being apple, rather than relying on targetOS, which could be macOS, iOS, tvOS, watchOS, or any other glorious name apple could come up with. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3557 (cherry picked from commit 6ef6e7c6a74729a6a6bae4f9ba39e216ad13ac70) >--------------------------------------------------------------- 7b6a6a78ed2df75e171b1a07fee0066a5d2b90ad aclocal.m4 | 50 +++++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index d5078de..ba178e2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -20,14 +20,8 @@ AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS], $2='.exe' $3='.dll' ;; - i386-apple-darwin|powerpc-apple-darwin) - $3='.dylib' - ;; - x86_64-apple-darwin) - $3='.dylib' - ;; - arm-apple-darwin10|i386-apple-darwin11|aarch64-apple-darwin14|x86_64-apple-darwin14) - $2='.a' + # apple platform uses .dylib (macOS, iOS, ...) + *-apple-*) $3='.dylib' ;; esac @@ -865,20 +859,17 @@ AC_CACHE_CHECK([leading underscore in symbol names], [fptools_cv_leading_undersc # Hack!: nlist() under Digital UNIX insist on there being an _, # but symbol table listings shows none. What is going on here?!? case $TargetPlatform in -*linux-android*) fptools_cv_leading_underscore=no;; -*openbsd*) # x86 openbsd is ELF from 3.4 >, meaning no leading uscore - case $build in - i386-*2\.@<:@0-9@:>@ | i386-*3\.@<:@0-3@:>@ ) fptools_cv_leading_underscore=yes ;; - *) fptools_cv_leading_underscore=no ;; - esac ;; -i386-unknown-mingw32) fptools_cv_leading_underscore=yes;; -x86_64-unknown-mingw32) fptools_cv_leading_underscore=no;; - - # HACK: Apple doesn't seem to provide nlist in the 64-bit-libraries -x86_64-apple-darwin*) fptools_cv_leading_underscore=yes;; -*-apple-ios) fptools_cv_leading_underscore=yes;; - -*) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H + # Apples mach-o platforms use leading underscores + *-apple-*) fptools_cv_leading_underscore=yes;; + *linux-android*) fptools_cv_leading_underscore=no;; + *openbsd*) # x86 openbsd is ELF from 3.4 >, meaning no leading uscore + case $build in + i386-*2\.@<:@0-9@:>@ | i386-*3\.@<:@0-3@:>@ ) fptools_cv_leading_underscore=yes ;; + *) fptools_cv_leading_underscore=no ;; + esac ;; + i386-unknown-mingw32) fptools_cv_leading_underscore=yes;; + x86_64-unknown-mingw32) fptools_cv_leading_underscore=no;; + *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H #include struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}}; struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}}; @@ -1214,7 +1205,7 @@ AC_DEFUN([FP_PROG_AR_NEEDS_RANLIB],[ if test $fp_prog_ar_is_gnu = yes then fp_cv_prog_ar_needs_ranlib=no - elif test "$TargetOS_CPP" = "darwin" + elif test "$TargetVendor_CPP" = "apple" then # It's quite tedious to check for Apple's crazy timestamps in # .a files, so we hardcode it. @@ -1951,12 +1942,11 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[ # -------------------------------- # converts os from gnu to ghc naming, and assigns the result to $target_var AC_DEFUN([GHC_CONVERT_OS],[ -case "$1-$2" in - darwin10-arm|darwin11-i386|darwin14-aarch64|darwin14-x86_64) - $3="ios" - ;; - *) case "$1" in + # watchos and tvos are ios variant as of May 2017. + ios|watchos|tvos) + $3="ios" + ;; linux-android*) $3="linux-android" ;; @@ -1983,8 +1973,6 @@ case "$1-$2" in exit 1 ;; esac - ;; - esac ]) # BOOTSTRAPPING_GHC_INFO_FIELD @@ -2016,7 +2004,7 @@ AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION) # -------------------------------- # Gets the version number of XCode, if on a Mac AC_DEFUN([XCODE_VERSION],[ - if test "$TargetOS_CPP" = "darwin" + if test "$TargetVendor_CPP" = "apple" then AC_MSG_CHECKING(XCode version) XCodeVersion=`xcodebuild -version | grep Xcode | sed "s/Xcode //"` From git at git.haskell.org Sun Dec 23 18:46:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:30 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: gen-data-layout.sh: Use bash array for readability (8853620) Message-ID: <20181223184630.D771F3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/8853620a343585a84bf5fbe9fa4774f7eee49894/ghc >--------------------------------------------------------------- commit 8853620a343585a84bf5fbe9fa4774f7eee49894 Author: John Ericson Date: Mon Mar 19 13:24:46 2018 -0400 gen-data-layout.sh: Use bash array for readability Reviewers: angerman, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4511 (cherry picked from commit b3b394b44e42f19ab7c23668a4008e4f728b51ba) >--------------------------------------------------------------- 8853620a343585a84bf5fbe9fa4774f7eee49894 utils/llvm-targets/gen-data-layout.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 6f2aafc..51fc4e9 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -16,17 +16,28 @@ # Add missing targets to the list below to have them included in # llvm-targets file. -# Target sets -WINDOWS_x86="i386-unknown-windows i686-unknown-windows x86_64-unknown-windows" -LINUX_ARM="arm-unknown-linux-gnueabihf armv6-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf aarch64-unknown-linux-gnu aarch64-unknown-linux armv7a-unknown-linux-gnueabi" -LINUX_x86="i386-unknown-linux-gnu i386-unknown-linux x86_64-unknown-linux-gnu x86_64-unknown-linux" -ANDROID="armv7-unknown-linux-androideabi aarch64-unknown-linux-android" -QNX="arm-unknown-nto-qnx-eabi" -MACOS="i386-apple-darwin x86_64-apple-darwin" -IOS="armv7-apple-ios arm64-apple-ios i386-apple-ios x86_64-apple-ios" +# Target sets for which to generate the llvm-targets file +TARGETS=( + # Windows x86 + "i386-unknown-windows" "i686-unknown-windows" "x86_64-unknown-windows" -# targets for which to generate the llvm-targets file -TARGETS="${WINDOWS_x86} ${LINUX_ARM} ${LINUX_x86} ${ANDROID} ${QNX} ${MACOS} ${IOS}" + # Linux ARM + "arm-unknown-linux-gnueabihf" "armv6-unknown-linux-gnueabihf" + "armv7-unknown-linux-gnueabihf" "armv7a-unknown-linux-gnueabi" + "aarch64-unknown-linux-gnu" "aarch64-unknown-linux" + # Linux x86 + "i386-unknown-linux-gnu" "i386-unknown-linux" "x86_64-unknown-linux-gnu" "x86_64-unknown-linux" + # Linux Android + "armv7-unknown-linux-androideabi" "aarch64-unknown-linux-android" + + # QNX + "arm-unknown-nto-qnx-eabi" + + # macOS + "i386-apple-darwin" "x86_64-apple-darwin" + # iOS + "armv7-apple-ios arm64-apple-ios" "i386-apple-ios x86_64-apple-ios" +) # given the call to clang -c11 that clang --target -v generates, # parse the -target-cpu and -target-feature from @@ -61,7 +72,7 @@ FST=1 FILE=_____dummy.c touch $FILE -for target in $TARGETS; do +for target in "${TARGETS[@]}"; do # find the cpu and attributes emitte by clang for the given $target CPU="" ATTR=() From git at git.haskell.org Sun Dec 23 18:46:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:33 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Support iOS variants elsewhere when configuring (7ce9ead) Message-ID: <20181223184633.A265D3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/7ce9ead4fddfbffb5cb63cce0f1b4533b7bcc0ad/ghc >--------------------------------------------------------------- commit 7ce9ead4fddfbffb5cb63cce0f1b4533b7bcc0ad Author: John Ericson Date: Sun Mar 25 14:00:26 2018 -0400 Support iOS variants elsewhere when configuring Reviewers: hvr, bgamari, angerman Reviewed By: angerman Subscribers: rwbarton, thomie, erikd, carter, angerman Differential Revision: https://phabricator.haskell.org/D4513 (cherry picked from commit 10566a814fc07072385fc72c25158d79f25a8a36) >--------------------------------------------------------------- 7ce9ead4fddfbffb5cb63cce0f1b4533b7bcc0ad aclocal.m4 | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 45f9c0b..6d7616e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -242,7 +242,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], linux|linux-android) test -z "[$]2" || eval "[$]2=OSLinux" ;; - darwin|ios) + darwin|ios|watchos|tvos) test -z "[$]2" || eval "[$]2=OSDarwin" ;; solaris2) diff --git a/configure.ac b/configure.ac index 91eb1c0..81de981 100644 --- a/configure.ac +++ b/configure.ac @@ -1105,7 +1105,7 @@ case ${TargetOS} in linux|linux-android|freebsd|dragonfly|netbsd|openbsd|kfreebsdgnu|gnu|solaris2) RtsLinkerUseMmap=1 ;; - darwin) + darwin|ios|watchos|tvos) # Don't use mmap on powerpc/darwin as the mmap there doesn't support # reallocating. Reallocating is needed to allocate jump islands just # after each object image. Jumps to these jump islands use relative From git at git.haskell.org Sun Dec 23 18:46:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:36 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Pass LLVMTarget (identical to --target) (64d0dac) Message-ID: <20181223184636.6D39E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/64d0daca7fb425fbdfa2a00e425a04ae246108a8/ghc >--------------------------------------------------------------- commit 64d0daca7fb425fbdfa2a00e425a04ae246108a8 Author: Moritz Angermann Date: Thu May 11 18:17:02 2017 +0800 Pass LLVMTarget (identical to --target) Sometimes it might be of interest to have access to the raw target value when calling subcommands (e.g. llvm tools with --target), as such we forward the specified (or inferred) --target for later consumption. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3559 (cherry picked from commit 1345c7cc42c45e63ab1726a8fd24a7e4d4222467) >--------------------------------------------------------------- 64d0daca7fb425fbdfa2a00e425a04ae246108a8 aclocal.m4 | 5 +++++ compiler/ghc.mk | 2 ++ mk/project.mk.in | 37 +++++++++++++++++++------------------ 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index ba178e2..7f58547 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -136,9 +136,13 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], TargetVendor_CPP=` echo "$TargetVendor" | sed -e 's/\./_/g' -e 's/-/_/g'` TargetOS_CPP=` echo "$TargetOS" | sed -e 's/\./_/g' -e 's/-/_/g'` + # we intend to pass trough --targets to llvm as is. + LLVMTarget_CPP=` echo "$target"` + echo "GHC build : $BuildPlatform" echo "GHC host : $HostPlatform" echo "GHC target : $TargetPlatform" + echo "LLVM target: $target" AC_SUBST(BuildPlatform) AC_SUBST(HostPlatform) @@ -154,6 +158,7 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], AC_SUBST(HostOS_CPP) AC_SUBST(BuildOS_CPP) AC_SUBST(TargetOS_CPP) + AC_SUBST(LLVMTarget_CPP) AC_SUBST(HostVendor_CPP) AC_SUBST(BuildVendor_CPP) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 614d193..e5b3d20 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -170,6 +170,7 @@ compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@ @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@ @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ + @echo "#define LLVM_TARGET \"$(LLVMTarget_CPP)\"" >> $@ @echo >> $@ @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@ @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@ @@ -211,6 +212,7 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. @echo "#define BUILD_ARCH \"$(HostArch_CPP)\"" >> $@ @echo "#define HOST_ARCH \"$(TargetArch_CPP)\"" >> $@ @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ + @echo "#define LLVM_TARGET \"$(LLVMTarget_CPP)\"" >> $@ @echo >> $@ @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@ @echo "#define $(TargetOS_CPP)_HOST_OS 1" >> $@ diff --git a/mk/project.mk.in b/mk/project.mk.in index 03bd744..d620ed5 100644 --- a/mk/project.mk.in +++ b/mk/project.mk.in @@ -12,7 +12,7 @@ # Versioning scheme: A.B.C # A: major version, decimal, any number of digits # B: minor version, decimal, any number of digits -# C: patchlevel, one digit, omitted if zero. +# C: patchlevel, one digit, omitted if zero. # # ProjectVersionInt does *not* contain the patchlevel (rationale: this # figure is used for conditional compilations, and library interfaces @@ -35,7 +35,7 @@ ProjectGitCommitId = @ProjectGitCommitId@ ################################################################################ # -# Platform variables +# Platform variables # ################################################################################ @@ -81,24 +81,25 @@ ProjectGitCommitId = @ProjectGitCommitId@ # You have to do a lot of work by hand to cross compile: see the # section on "Porting GHC" in the Building Guide. -HOSTPLATFORM = @HostPlatform@ -TARGETPLATFORM = @TargetPlatform@ -BUILDPLATFORM = @BuildPlatform@ +HOSTPLATFORM = @HostPlatform@ +TARGETPLATFORM = @TargetPlatform@ +BUILDPLATFORM = @BuildPlatform@ -HostPlatform_CPP = @HostPlatform_CPP@ -HostArch_CPP = @HostArch_CPP@ -HostOS_CPP = @HostOS_CPP@ -HostVendor_CPP = @HostVendor_CPP@ +HostPlatform_CPP = @HostPlatform_CPP@ +HostArch_CPP = @HostArch_CPP@ +HostOS_CPP = @HostOS_CPP@ +HostVendor_CPP = @HostVendor_CPP@ -TargetPlatform_CPP = @TargetPlatform_CPP@ -TargetArch_CPP = @TargetArch_CPP@ -TargetOS_CPP = @TargetOS_CPP@ -TargetVendor_CPP = @TargetVendor_CPP@ +TargetPlatform_CPP = @TargetPlatform_CPP@ +TargetArch_CPP = @TargetArch_CPP@ +TargetOS_CPP = @TargetOS_CPP@ +TargetVendor_CPP = @TargetVendor_CPP@ +LLVMTarget_CPP = @LLVMTarget_CPP@ -BuildPlatform_CPP = @BuildPlatform_CPP@ -BuildArch_CPP = @BuildArch_CPP@ -BuildOS_CPP = @BuildOS_CPP@ -BuildVendor_CPP = @BuildVendor_CPP@ +BuildPlatform_CPP = @BuildPlatform_CPP@ +BuildArch_CPP = @BuildArch_CPP@ +BuildOS_CPP = @BuildOS_CPP@ +BuildVendor_CPP = @BuildVendor_CPP@ @HostPlatform_CPP at _HOST = 1 @TargetPlatform_CPP at _TARGET = 1 @@ -118,7 +119,7 @@ BuildVendor_CPP = @BuildVendor_CPP@ ################################################################################ # -# Global configuration options +# Global configuration options # ################################################################################ From git at git.haskell.org Sun Dec 23 18:46:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:39 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Catch a few more typos in comments (27d6ee3) Message-ID: <20181223184639.3B4843ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/27d6ee36337c2da060c74f17e7a63f5f57b8639f/ghc >--------------------------------------------------------------- commit 27d6ee36337c2da060c74f17e7a63f5f57b8639f Author: Gabor Greif Date: Mon Oct 30 12:21:49 2017 +0100 Catch a few more typos in comments (cherry picked from commit 201b5aa65109e09953caa1dc1774b75fabbf61b0) >--------------------------------------------------------------- 27d6ee36337c2da060c74f17e7a63f5f57b8639f compiler/specialise/SpecConstr.hs | 4 ++-- compiler/typecheck/TcCanonical.hs | 2 +- compiler/typecheck/TcInteract.hs | 4 ++-- ghc/Main.hs | 2 +- libraries/base/configure.ac | 2 +- utils/llvm-targets/gen-data-layout.sh | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs index f686f0f..647f696 100644 --- a/compiler/specialise/SpecConstr.hs +++ b/compiler/specialise/SpecConstr.hs @@ -514,7 +514,7 @@ for nested bindings. (So really it should be passed around explicitly and not stored in ScEnv.) Trac #14379 turned out to be caused by f SPEC x = let g1 x = ... in ... -We force-specialise f (becuase of the SPEC), but that generates a specialised +We force-specialise f (because of the SPEC), but that generates a specialised copy of g1 (as well as the original). Alas g1 has a nested binding g2; and in each copy of g1 we get an unspecialised and specialised copy of g2; and so on. Result, exponential. So the force-spec flag now only applies to one @@ -524,7 +524,7 @@ Mechanism for this one-level-only thing: - Switch it on at the call to specRec, in scExpr and scTopBinds - Switch it off when doing the RHSs; - this can be done very conveneniently in decreaseSpecCount + this can be done very conveniently in decreaseSpecCount What alternatives did I consider? diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs index 0221a3e..0635b4a 100644 --- a/compiler/typecheck/TcCanonical.hs +++ b/compiler/typecheck/TcCanonical.hs @@ -1575,7 +1575,7 @@ canEqTyVarTyVar, are these Note [Avoid unnecessary swaps] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If we swap without actually improving matters, we can get an infnite loop. +If we swap without actually improving matters, we can get an infinite loop. Consider work item: a ~ b inert item: b ~ c diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs index 5bbc5f8..9af7198 100644 --- a/compiler/typecheck/TcInteract.hs +++ b/compiler/typecheck/TcInteract.hs @@ -2009,9 +2009,9 @@ favour of alpha. If we instead had then we would unify alpha := gamma1; and kick out the wanted constraint. But when we grough it back in, it'd look like [W] TF (gamma1, beta) ~ fuv -and exactly the same thing would happen again! Infnite loop. +and exactly the same thing would happen again! Infinite loop. -This all sesms fragile, and it might seem more robust to avoid +This all seems fragile, and it might seem more robust to avoid introducing gamma1 in the first place, in the case where the actual argument (alpha, beta) partly matches the improvement template. But that's a bit tricky, esp when we remember that the diff --git a/ghc/Main.hs b/ghc/Main.hs index cc6d08e..5926718 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -804,7 +804,7 @@ dumpFastStringStats dflags = do ]) -- we usually get more "has z-encoding" than "z-encoded", because -- when we z-encode a string it might hash to the exact same string, - -- which will is not counted as "z-encoded". Only strings whose + -- which is not counted as "z-encoded". Only strings whose -- Z-encoding is different from the original string are counted in -- the "z-encoded" total. putMsg dflags msg diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac index 69ea800..f472319 100644 --- a/libraries/base/configure.ac +++ b/libraries/base/configure.ac @@ -69,7 +69,7 @@ if test "$ac_cv_header_poll_h" = yes && test "$ac_cv_func_poll" = yes; then AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.]) fi -# Linux open file description locks +# Linux open file descriptor locks AC_CHECK_DECL([F_OFD_SETLK], [ AC_DEFINE([HAVE_OFD_LOCKING], [1], [Define if you have open file descriptor lock support.]) ]) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 95c629c..6f2aafc 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -44,7 +44,7 @@ function get_cpu_and_attr() { # additional columns for opt and llc flags, we could # pass -float-abi=soft; However ghc will use float # registers unconditionally on arm, and as such true - # soft float with the registered llvm backed will is + # soft float with the registerised llvm backend is # currently not possible. +soft-float-abi) shift 2;; *) ATTR+=("$2"); shift 2;; From git at git.haskell.org Sun Dec 23 18:46:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:42 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Drop special handling of iOS (065babc) Message-ID: <20181223184642.151A53ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/065babc7a1346886e369743a68a5367bf503fb72/ghc >--------------------------------------------------------------- commit 065babc7a1346886e369743a68a5367bf503fb72 Author: Moritz Angermann Date: Wed Apr 12 14:12:33 2017 -0400 Drop special handling of iOS iOS at least since iOS8 (we are currently at iOS10.3), allows for dynamic libaries, hence any artificail restriction on dyanmic libraries should be lifted. Please ping me with any iOS related issues that should potentially resurface. The iOS toolchain has considerably changed over the years, and I'm willing to drop work arounds in good faith. Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13559, #7722 Differential Revision: https://phabricator.haskell.org/D3451 (cherry picked from commit 68c00a1b38707b2a5c813cbe3da3ffb7d97893b6) >--------------------------------------------------------------- 065babc7a1346886e369743a68a5367bf503fb72 compiler/main/DriverPipeline.hs | 9 +-------- compiler/main/SysTools.hs | 3 +-- compiler/utils/Platform.hs | 9 +-------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 40e6a8d..f1038cf 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -378,7 +378,7 @@ link' dflags batch_attempt_linking hpt let staticLink = case ghcLink dflags of LinkStaticLib -> True - _ -> platformBinariesAreStaticLibs (targetPlatform dflags) + _ -> False home_mod_infos = eltsHpt hpt @@ -1952,13 +1952,6 @@ linkBinary' staticLink dflags o_files dep_packages = do then ["-Wl,-no_compact_unwind"] else []) - -- '-no_pie' - -- iOS uses 'dynamic-no-pic', so we must pass this to ld to suppress a warning; see #7722 - ++ (if platformOS platform == OSiOS && - not staticLink - then ["-Wl,-no_pie"] - else []) - -- '-Wl,-read_only_relocs,suppress' -- ld gives loads of warnings like: -- ld: warning: text reloc in _base_GHCziArr_unsafeArray_info to _base_GHCziArr_unsafeArray_closure diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index b2d85a7..93927b4 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -1666,7 +1666,7 @@ linkDynLib dflags0 o_files dep_packages ++ pkg_lib_path_opts ++ pkg_link_opts )) - OSDarwin -> do + _ | os `elem` [OSDarwin, OSiOS] -> do ------------------------------------------------------------------- -- Making a darwin dylib ------------------------------------------------------------------- @@ -1726,7 +1726,6 @@ linkDynLib dflags0 o_files dep_packages ++ map Option pkg_link_opts ++ map Option pkg_framework_opts ) - OSiOS -> throwGhcExceptionIO (ProgramError "dynamic libraries are not supported on iOS target") _ -> do ------------------------------------------------------------------- -- Making a DSO diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 86c70a9..7f74970 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -16,7 +16,6 @@ module Platform ( osMachOTarget, osSubsectionsViaSymbols, platformUsesFrameworks, - platformBinariesAreStaticLibs, ) where @@ -148,6 +147,7 @@ osElfTarget OSUnknown = False -- | This predicate tells us whether the OS support Mach-O shared libraries. osMachOTarget :: OS -> Bool osMachOTarget OSDarwin = True +osMachOTarget OSiOS = True osMachOTarget _ = False osUsesFrameworks :: OS -> Bool @@ -158,15 +158,8 @@ osUsesFrameworks _ = False platformUsesFrameworks :: Platform -> Bool platformUsesFrameworks = osUsesFrameworks . platformOS -osBinariesAreStaticLibs :: OS -> Bool -osBinariesAreStaticLibs OSiOS = True -osBinariesAreStaticLibs _ = False - osSubsectionsViaSymbols :: OS -> Bool osSubsectionsViaSymbols OSDarwin = True osSubsectionsViaSymbols OSiOS = True osSubsectionsViaSymbols _ = False -platformBinariesAreStaticLibs :: Platform -> Bool -platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS - From git at git.haskell.org Sun Dec 23 18:46:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:45 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Clean up opt and llc (be30d37) Message-ID: <20181223184645.69B393ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/be30d37b2e8bd6b76525e20a0131314492fa4cc2/ghc >--------------------------------------------------------------- commit be30d37b2e8bd6b76525e20a0131314492fa4cc2 Author: Moritz Angermann Date: Wed Sep 6 11:31:01 2017 -0400 Clean up opt and llc The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean up introduces a shared data structure to carry the arguments we pass to each tool so that corresponding flags are next to each other. It drops the hard coded data layouts in favor of using `-mtriple` and have LLVM infer them. Furthermore we add `clang` as a proper tool, so we don't rely on assuming that `clang` is called `clang` on the `PATH` when using `clang` as the assembler. Finally this diff also changes the type of `optLevel` from `Int` to `Word`, as we do not have negative optimization levels. Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon Reviewed By: kavon Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj, kavon, simonmar, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3352 (cherry picked from commit 22733532171330136d87533d523f565f2a4f102f) >--------------------------------------------------------------- be30d37b2e8bd6b76525e20a0131314492fa4cc2 aclocal.m4 | 7 + compiler/llvmGen/LlvmCodeGen.hs | 11 +- compiler/llvmGen/LlvmCodeGen/Ppr.hs | 63 +------- compiler/main/DriverPipeline.hs | 237 ++++++++++++++++++----------- compiler/main/DynFlags.hs | 36 ++++- compiler/main/GHC.hs | 3 +- compiler/main/SysTools.hs | 21 ++- compiler/nativeGen/RegAlloc/Linear/Main.hs | 2 +- configure.ac | 7 + ghc.mk | 7 +- ghc/GHCi/UI.hs | 4 +- ghc/ghc.mk | 5 + llvm-targets | 22 +++ mk/config.mk.in | 1 + settings.in | 3 +- testsuite/mk/ghc-config.hs | 1 + testsuite/tests/perf/compiler/all.T | 6 +- utils/llvm-targets/gen-data-layout.sh | 80 ++++++++++ 18 files changed, 342 insertions(+), 174 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc be30d37b2e8bd6b76525e20a0131314492fa4cc2 From git at git.haskell.org Sun Dec 23 18:46:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:48 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: llvm-targets: drop soft-float (b41efd6) Message-ID: <20181223184648.365AF3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/b41efd63faea40cb2b9ec40462adb5aba9e913a8/ghc >--------------------------------------------------------------- commit b41efd63faea40cb2b9ec40462adb5aba9e913a8 Author: Moritz Angermann Date: Mon Sep 25 14:17:11 2017 +0800 llvm-targets: drop soft-float Summary: The llvm-targets file records `mattr` values, and while interrogating `clang` for the target, we might stumble upon `+soft-float-abi`, however ghc does not support full soft-float, and as such passing `+soft-float` to `llc` will result in segfaults for any function passing float registers F1, ... in the ARM Instruction Selection Pass. Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4030 (cherry picked from commit 60b06456ddef08bd8a8a47497a6cbefbb5e359fb) >--------------------------------------------------------------- b41efd63faea40cb2b9ec40462adb5aba9e913a8 llvm-targets | 8 ++++---- utils/llvm-targets/gen-data-layout.sh | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/llvm-targets b/llvm-targets index 2ac0f87..3c9da1e 100644 --- a/llvm-targets +++ b/llvm-targets @@ -6,17 +6,17 @@ ,("armv7-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("aarch64-unknown-linux-gnu", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("aarch64-unknown-linux", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) -,("armv7a-unknown-linux-gnueabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+soft-float-abi")) +,("armv7a-unknown-linux-gnueabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("i386-unknown-linux-gnu", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("i386-unknown-linux", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("x86_64-unknown-linux-gnu", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) ,("x86_64-unknown-linux", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) -,("armv7-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+soft-float-abi")) +,("armv7-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("aarch64-unknown-linux-android", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) -,("arm-unknown-nto-qnx-eabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm7tdmi", "+soft-float-abi +strict-align")) +,("arm-unknown-nto-qnx-eabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm7tdmi", "+strict-align")) ,("i386-apple-darwin", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) ,("x86_64-apple-darwin", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) -,("armv7-apple-ios", ("e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32", "generic", "+soft-float-abi")) +,("armv7-apple-ios", ("e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32", "generic", "")) ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("i386-apple-ios", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) ,("x86_64-apple-ios", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 79068e9..95c629c 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -36,7 +36,20 @@ function get_cpu_and_attr() { while [ "$#" -gt 0 ]; do case "$1" in -target-cpu) CPU=$2; shift 2;; - -target-feature) ATTR+=("$2"); shift 2;; + -target-feature) + # translate clang to opt/llc target features + case "$2" in + # we don't have support in GHC for proper soft-float. + # if we extend the `llvm-target` file to contain two + # additional columns for opt and llc flags, we could + # pass -float-abi=soft; However ghc will use float + # registers unconditionally on arm, and as such true + # soft float with the registered llvm backed will is + # currently not possible. + +soft-float-abi) shift 2;; + *) ATTR+=("$2"); shift 2;; + esac + ;; *) shift 1;; esac done From git at git.haskell.org Sun Dec 23 18:46:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:51 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Drop special handling of iOS and Android (bb6c7f3) Message-ID: <20181223184651.0440E3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/bb6c7f345b284ec1fade421bbb38a1bf334b2c9f/ghc >--------------------------------------------------------------- commit bb6c7f345b284ec1fade421bbb38a1bf334b2c9f Author: Moritz Angermann Date: Thu Sep 7 22:52:27 2017 -0400 Drop special handling of iOS and Android As far as GHC is concerned, iOS **is** Darwin, and Android **is** Linux. Depends on D3352 Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3579 (cherry picked from commit cb4878ffd18a3c70f98bdbb413cd3c4d1f054e1f) >--------------------------------------------------------------- bb6c7f345b284ec1fade421bbb38a1bf334b2c9f aclocal.m4 | 10 ++-------- compiler/main/DriverPipeline.hs | 2 +- compiler/main/HscTypes.hs | 1 - compiler/main/SysTools.hs | 5 +---- compiler/utils/Platform.hs | 7 ------- 5 files changed, 4 insertions(+), 21 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 678c838..e21e7dc 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -237,13 +237,10 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], checkOS() { case [$]1 in - linux) + linux|linux-android) test -z "[$]2" || eval "[$]2=OSLinux" ;; - ios) - test -z "[$]2" || eval "[$]2=OSiOS" - ;; - darwin) + darwin|ios) test -z "[$]2" || eval "[$]2=OSDarwin" ;; solaris2) @@ -279,9 +276,6 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], aix) test -z "[$]2" || eval "[$]2=OSAIX" ;; - linux-android) - test -z "[$]2" || eval "[$]2=OSAndroid" - ;; *) echo "Unknown OS '[$]1'" exit 1 diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index c23d55e..4cfc48e 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1990,7 +1990,7 @@ linkBinary' staticLink dflags o_files dep_packages = do -- on x86. ++ (if sLdSupportsCompactUnwind mySettings && not staticLink && - (platformOS platform == OSDarwin || platformOS platform == OSiOS) && + (platformOS platform == OSDarwin) && case platformArch platform of ArchX86 -> True ArchX86_64 -> True diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 56d2ac5..e16452b 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -2578,7 +2578,6 @@ soExt :: Platform -> FilePath soExt platform = case platformOS platform of OSDarwin -> "dylib" - OSiOS -> "dylib" OSMinGW32 -> "dll" _ -> "so" diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index bed4d68..61cc24e 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -835,9 +835,6 @@ getLinkerInfo' dflags = do -- that doesn't support --version. We can just assume that's -- what we're using. return $ DarwinLD [] - OSiOS -> - -- Ditto for iOS - return $ DarwinLD [] OSMinGW32 -> -- GHC doesn't support anything but GNU ld on Windows anyway. -- Process creation is also fairly expensive on win32, so @@ -1683,7 +1680,7 @@ linkDynLib dflags0 o_files dep_packages ++ pkg_lib_path_opts ++ pkg_link_opts )) - _ | os `elem` [OSDarwin, OSiOS] -> do + _ | os == OSDarwin -> do ------------------------------------------------------------------- -- Making a darwin dylib ------------------------------------------------------------------- diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 7f74970..8cd1fa7 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -75,7 +75,6 @@ data OS = OSUnknown | OSLinux | OSDarwin - | OSiOS | OSSolaris2 | OSMinGW32 | OSFreeBSD @@ -85,7 +84,6 @@ data OS | OSKFreeBSD | OSHaiku | OSQNXNTO - | OSAndroid | OSAIX deriving (Read, Show, Eq) @@ -131,12 +129,10 @@ osElfTarget OSOpenBSD = True osElfTarget OSNetBSD = True osElfTarget OSSolaris2 = True osElfTarget OSDarwin = False -osElfTarget OSiOS = False osElfTarget OSMinGW32 = False osElfTarget OSKFreeBSD = True osElfTarget OSHaiku = True osElfTarget OSQNXNTO = False -osElfTarget OSAndroid = True osElfTarget OSAIX = False osElfTarget OSUnknown = False -- Defaulting to False is safe; it means don't rely on any @@ -147,12 +143,10 @@ osElfTarget OSUnknown = False -- | This predicate tells us whether the OS support Mach-O shared libraries. osMachOTarget :: OS -> Bool osMachOTarget OSDarwin = True -osMachOTarget OSiOS = True osMachOTarget _ = False osUsesFrameworks :: OS -> Bool osUsesFrameworks OSDarwin = True -osUsesFrameworks OSiOS = True osUsesFrameworks _ = False platformUsesFrameworks :: Platform -> Bool @@ -160,6 +154,5 @@ platformUsesFrameworks = osUsesFrameworks . platformOS osSubsectionsViaSymbols :: OS -> Bool osSubsectionsViaSymbols OSDarwin = True -osSubsectionsViaSymbols OSiOS = True osSubsectionsViaSymbols _ = False From git at git.haskell.org Sun Dec 23 18:46:53 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:53 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Additional LLVM_TARGET logic. (a491b8c) Message-ID: <20181223184653.D59BE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/a491b8cb7069b3656f0a2b9c77b6830bb65f6528/ghc >--------------------------------------------------------------- commit a491b8cb7069b3656f0a2b9c77b6830bb65f6528 Author: Moritz Angermann Date: Thu Sep 21 21:28:29 2017 +0800 Additional LLVM_TARGET logic. Summary: This should help resolve the compilcation that came up in Trac #14261 Test Plan: validate on various platforms Reviewers: trofi, bgamari, austin, hvr Reviewed By: trofi Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #14261 Differential Revision: https://phabricator.haskell.org/D4004 (cherry picked from commit c2373b7b09939027742626e4a7bbba05ea1f6850) >--------------------------------------------------------------- a491b8cb7069b3656f0a2b9c77b6830bb65f6528 aclocal.m4 | 24 ++++++++++++++++++++++-- llvm-targets | 7 ++++--- utils/llvm-targets/gen-data-layout.sh | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index e21e7dc..45f9c0b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -109,6 +109,8 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], GHC_CONVERT_OS([$target_os], [$TargetArch], [TargetOS]) fi + GHC_LLVM_TARGET([$target_cpu],[$target_vendor],[$target_os],[LlvmTarget]) + GHC_SELECT_FILE_EXTENSIONS([$host], [exeext_host], [soext_host]) GHC_SELECT_FILE_EXTENSIONS([$target], [exeext_target], [soext_target]) windows=NO @@ -137,12 +139,12 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], TargetOS_CPP=` echo "$TargetOS" | sed -e 's/\./_/g' -e 's/-/_/g'` # we intend to pass trough --targets to llvm as is. - LLVMTarget_CPP=` echo "$target"` + LLVMTarget_CPP=` echo "$LlvmTarget"` echo "GHC build : $BuildPlatform" echo "GHC host : $HostPlatform" echo "GHC target : $TargetPlatform" - echo "LLVM target: $target" + echo "LLVM target: $LlvmTarget" AC_SUBST(BuildPlatform) AC_SUBST(HostPlatform) @@ -1923,6 +1925,24 @@ case "$1" in esac ]) +# GHC_LLVM_TARGET(target_cpu, target_vendor, target_os, llvm_target_var) +# -------------------------------- +# converts the canonicalized target into someting llvm can understand +AC_DEFUN([GHC_LLVM_TARGET], [ + case "$2-$3" in + hardfloat-*eabi) + llvm_target_vendor="unknown" + llvm_target_os="$3""hf" + ;; + *) + GHC_CONVERT_VENDOR([$2],[llvm_target_vendor]) + GHC_CONVERT_OS([$3],[$1],[llvm_target_os]) + ;; + esac + $4="$1-$llvm_target_vendor-$llvm_target_os" +]) + + # GHC_CONVERT_VENDOR(vendor, target_var) # -------------------------------- # converts vendor from gnu to ghc naming, and assigns the result to $target_var diff --git a/llvm-targets b/llvm-targets index 0f717b7..2ac0f87 100644 --- a/llvm-targets +++ b/llvm-targets @@ -3,19 +3,20 @@ ,("x86_64-unknown-windows", ("e-m:w-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) ,("arm-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align")) ,("armv6-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1136jf-s", "+strict-align")) -,("armv7-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", "")) +,("armv7-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("aarch64-unknown-linux-gnu", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("aarch64-unknown-linux", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) +,("armv7a-unknown-linux-gnueabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+soft-float-abi")) ,("i386-unknown-linux-gnu", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("i386-unknown-linux", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("x86_64-unknown-linux-gnu", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) ,("x86_64-unknown-linux", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) -,("armv7-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", "+soft-float-abi")) +,("armv7-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+soft-float-abi")) ,("aarch64-unknown-linux-android", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("arm-unknown-nto-qnx-eabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm7tdmi", "+soft-float-abi +strict-align")) ,("i386-apple-darwin", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) ,("x86_64-apple-darwin", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) -,("armv7-apple-ios", ("e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32", "cortex-a8", "+soft-float-abi")) +,("armv7-apple-ios", ("e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32", "generic", "+soft-float-abi")) ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("i386-apple-ios", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) ,("x86_64-apple-ios", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 315222f..79068e9 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -18,7 +18,7 @@ # Target sets WINDOWS_x86="i386-unknown-windows i686-unknown-windows x86_64-unknown-windows" -LINUX_ARM="arm-unknown-linux-gnueabihf armv6-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf aarch64-unknown-linux-gnu aarch64-unknown-linux" +LINUX_ARM="arm-unknown-linux-gnueabihf armv6-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf aarch64-unknown-linux-gnu aarch64-unknown-linux armv7a-unknown-linux-gnueabi" LINUX_x86="i386-unknown-linux-gnu i386-unknown-linux x86_64-unknown-linux-gnu x86_64-unknown-linux" ANDROID="armv7-unknown-linux-androideabi aarch64-unknown-linux-android" QNX="arm-unknown-nto-qnx-eabi" From git at git.haskell.org Sun Dec 23 18:46:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:56 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: llvm-targets: Add versioned ARM targets (082ea31) Message-ID: <20181223184656.A25FE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/082ea3124b57883f01e6f84926983921557b11a6/ghc >--------------------------------------------------------------- commit 082ea3124b57883f01e6f84926983921557b11a6 Author: Guillaume GARDET Date: Fri May 18 08:56:28 2018 +0200 llvm-targets: Add versioned ARM targets Namely armv6l-unknown-linux-gnueabihf and armv7l-unknown-linux-gnueabihf. (cherry picked from commit e4003b6dc6a84d870116de9f47057c15b1576f36) (cherry picked from commit f0f162b1cca33aeef8ff96caab3672b1059f537b) >--------------------------------------------------------------- 082ea3124b57883f01e6f84926983921557b11a6 llvm-targets | 4 +++- utils/llvm-targets/gen-data-layout.sh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/llvm-targets b/llvm-targets index 3c9da1e..b67ee6c 100644 --- a/llvm-targets +++ b/llvm-targets @@ -3,10 +3,12 @@ ,("x86_64-unknown-windows", ("e-m:w-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) ,("arm-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align")) ,("armv6-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1136jf-s", "+strict-align")) +,("armv6l-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align")) ,("armv7-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) +,("armv7a-unknown-linux-gnueabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) +,("armv7l-unknown-linux-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("aarch64-unknown-linux-gnu", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) ,("aarch64-unknown-linux", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) -,("armv7a-unknown-linux-gnueabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "")) ,("i386-unknown-linux-gnu", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("i386-unknown-linux", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "pentium4", "")) ,("x86_64-unknown-linux-gnu", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 51fc4e9..3d9ded1 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # llvm-target generator # @@ -22,8 +22,8 @@ TARGETS=( "i386-unknown-windows" "i686-unknown-windows" "x86_64-unknown-windows" # Linux ARM - "arm-unknown-linux-gnueabihf" "armv6-unknown-linux-gnueabihf" - "armv7-unknown-linux-gnueabihf" "armv7a-unknown-linux-gnueabi" + "arm-unknown-linux-gnueabihf" "armv6-unknown-linux-gnueabihf" "armv6l-unknown-linux-gnueabihf" + "armv7-unknown-linux-gnueabihf" "armv7a-unknown-linux-gnueabi" "armv7l-unknown-linux-gnueabihf" "aarch64-unknown-linux-gnu" "aarch64-unknown-linux" # Linux x86 "i386-unknown-linux-gnu" "i386-unknown-linux" "x86_64-unknown-linux-gnu" "x86_64-unknown-linux" From git at git.haskell.org Sun Dec 23 18:46:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:46:59 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Use NEED_PTHREAD_LIB (627dda2) Message-ID: <20181223184659.6F9923ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/627dda2a2995d640bf85b970e0f3a619036b84c4/ghc >--------------------------------------------------------------- commit 627dda2a2995d640bf85b970e0f3a619036b84c4 Author: Moritz Angermann Date: Thu May 11 18:17:31 2017 +0800 Use NEED_PTHREAD_LIB we do the same for the rts already. And using the configure script should be more robust than hand-picking the OSs here. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3563 (cherry picked from commit c0872bf99ff891e440f118bf9eea20b980c2cfca) >--------------------------------------------------------------- 627dda2a2995d640bf85b970e0f3a619036b84c4 compiler/main/DriverPipeline.hs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f1038cf..b301ece 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1892,22 +1892,19 @@ linkBinary' staticLink dflags o_files dep_packages = do -- Here are some libs that need to be linked at the *end* of -- the command line, because they contain symbols that are referred to -- by the RTS. We can't therefore use the ordinary way opts for these. - let - debug_opts | WayDebug `elem` ways dflags = [ + let debug_opts | WayDebug `elem` ways dflags = [ #if defined(HAVE_LIBBFD) "-lbfd", "-liberty" #endif ] - | otherwise = [] + | otherwise = [] - let thread_opts - | WayThreaded `elem` ways dflags = - let os = platformOS (targetPlatform dflags) - in if os `elem` [OSMinGW32, OSFreeBSD, OSOpenBSD, OSAndroid, - OSNetBSD, OSHaiku, OSQNXNTO, OSiOS, OSDarwin] - then [] - else ["-lpthread"] - | otherwise = [] + thread_opts | WayThreaded `elem` ways dflags = [ +#if NEED_PTHREAD_LIB + "-lpthread" +#endif + ] + | otherwise = [] rc_objs <- maybeCreateManifest dflags output_fn From git at git.haskell.org Sun Dec 23 18:47:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:47:02 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Always allow -staticlib (f9f8f81) Message-ID: <20181223184702.43F173ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/f9f8f8173daa28af6b6b863d2761c89a0a98b568/ghc >--------------------------------------------------------------- commit f9f8f8173daa28af6b6b863d2761c89a0a98b568 Author: Moritz Angermann Date: Tue Jul 11 11:57:48 2017 -0400 Always allow -staticlib the `-staticlib` flag is currently only supported on apple platforms, due to the avaiablity of libtool (the apple version, which is unlike the gnu version). This however prevents the use of -staticlib in cases where it would be beneficial as well. The functionality that `-staticlib` uses from `libtool` can be stubbed with a small script like the following: ``` name=${0##*/} target=${name%-*} set -e ldflags_L=() ldflags_l=() output="" inputs=() STATIC=0 DYNAMIC=1 mode=$DYNAMIC verbose=0 function find_lib () { lib=$1; shift 1; for dir in $@; do if [ -f "$dir/$lib" ]; then echo "$dir/$lib" break fi done } while [ "$#" -gt 0 ]; do case "$1" in -v|--verbose) verbose=1; shift 1;; -o) output="$2"; shift 2;; -L*) ldflags_L+=("${1:2:${#1}-2}"); shift 1;; -l*) ldflags_l+=("lib${1:2:${#1}-2}.a"); shift 1;; -static) mode=$STATIC; shift 1;; -dynamic) mode=$DYNAMIC; shift 1;; -Wl,*) ldflags+=("${1#*,}"); shift 1;; -*) echo "unknown option: $1" >&2; exit 1;; *) inputs+=("$1"); shift 1;; esac done if [ ! $mode == $STATIC ]; then echo "-dynamic not supported!" >&2; exit 1; fi MRI="create ${output}\n" for input in "${ldflags_l[@]}"; do lib=$(find_lib $input ${ldflags_L[@]}) if [ -z $lib ]; then echo "Failed to find lib $input" >&2 exit 1 else MRI+="addlib $lib\n" continue fi done for input in "${inputs[@]}"; do MRI+="addmod $input\n" done MRI+="save\nend\n" echo -e "$MRI" | $target-ar -M $target-ranlib $output ``` if `ar` supports MRI scripts. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3706 (cherry picked from commit b8f33bc6b738b0378976e42b79369f0e53b680c7) >--------------------------------------------------------------- f9f8f8173daa28af6b6b863d2761c89a0a98b568 compiler/main/DriverPipeline.hs | 5 +---- docs/users_guide/phases.rst | 8 +++----- utils/mkUserGuidePart/Options/Linking.hs | 7 ++++--- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index b301ece..a4fe735 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -2063,10 +2063,7 @@ linkDynLibCheck dflags o_files dep_packages linkStaticLibCheck :: DynFlags -> [String] -> [InstalledUnitId] -> IO () linkStaticLibCheck dflags o_files dep_packages - = do - when (platformOS (targetPlatform dflags) `notElem` [OSiOS, OSDarwin]) $ - throwGhcExceptionIO (ProgramError "Static archive creation only supported on Darwin/OS X/iOS") - linkBinary' True dflags o_files dep_packages + = linkBinary' True dflags o_files dep_packages -- ----------------------------------------------------------------------------- -- Running CPP diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index afb3a8b..6288961 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -551,11 +551,9 @@ for example). .. ghc-flag:: -staticlib - On Darwin/OS X/iOS only, link all passed files into a static library - suitable for linking into an iOS (when using a cross-compiler) or - Mac Xcode project. To control the name, use the :ghc-flag:`-o ⟨file⟩` option - as usual. The default name is ``liba.a``. This should nearly always - be passed when compiling for iOS with a cross-compiler. + Link all passed files into a static library suitable for linking. + To control the name, use the :ghc-flag:`-o` ⟨name⟩ option + as usual. The default name is ``liba.a``. .. ghc-flag:: -L ⟨dir⟩ diff --git a/utils/mkUserGuidePart/Options/Linking.hs b/utils/mkUserGuidePart/Options/Linking.hs index 23e32fa..f0b6ea5 100644 --- a/utils/mkUserGuidePart/Options/Linking.hs +++ b/utils/mkUserGuidePart/Options/Linking.hs @@ -11,9 +11,10 @@ linkingOptions = } , flag { flagName = "-staticlib" , flagDescription = - "On Darwin/OS X/iOS only, generate a standalone static library " ++ - "(as opposed to an executable). This is the usual way to " ++ - "compile for iOS." + "Generate a standalone static library (as opposed to an " ++ + "executable). This is useful when cross compiling. The " ++ + "library together with all its dependencies ends up in in a " ++ + "single static library that can be linked against." , flagType = DynamicFlag } , flag { flagName = "-fPIC" From git at git.haskell.org Sun Dec 23 18:47:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:47:05 +0000 (UTC) Subject: [commit: ghc] ghc-8.2: Merge commit '7ce9ead4fddfbffb5cb63cce0f1b4533b7bcc0ad' into ghc-8.2 (52b5140) Message-ID: <20181223184705.7EEBE3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.2 Link : http://ghc.haskell.org/trac/ghc/changeset/52b514003c60492f21790a823c488c49ec5fc89d/ghc >--------------------------------------------------------------- commit 52b514003c60492f21790a823c488c49ec5fc89d Merge: 2fc8ce5 7ce9ead Author: Ben Gamari Date: Thu Oct 11 10:31:58 2018 -0400 Merge commit '7ce9ead4fddfbffb5cb63cce0f1b4533b7bcc0ad' into ghc-8.2 John Ericson from Obsidian Systems proposed that we merge these backports, which Obsidian bases its cross-compiled builds on, to the upstream stable branch. I don't see why not. >--------------------------------------------------------------- 52b514003c60492f21790a823c488c49ec5fc89d aclocal.m4 | 92 +++++----- compiler/ghc.mk | 2 + compiler/llvmGen/LlvmCodeGen.hs | 11 +- compiler/llvmGen/LlvmCodeGen/Ppr.hs | 63 +------ compiler/main/DriverPipeline.hs | 272 ++++++++++++++++------------- compiler/main/DynFlags.hs | 36 +++- compiler/main/GHC.hs | 3 +- compiler/main/HscTypes.hs | 1 - compiler/main/SysTools.hs | 27 ++- compiler/nativeGen/RegAlloc/Linear/Main.hs | 2 +- compiler/specialise/SpecConstr.hs | 4 +- compiler/typecheck/TcCanonical.hs | 2 +- compiler/typecheck/TcInteract.hs | 4 +- compiler/utils/Platform.hs | 14 -- configure.ac | 9 +- docs/users_guide/phases.rst | 8 +- ghc.mk | 7 +- ghc/GHCi/UI.hs | 4 +- ghc/Main.hs | 2 +- ghc/ghc.mk | 5 + libraries/base/configure.ac | 2 +- llvm-targets | 25 +++ mk/config.mk.in | 1 + mk/project.mk.in | 37 ++-- settings.in | 3 +- testsuite/mk/ghc-config.hs | 1 + testsuite/tests/perf/compiler/all.T | 6 +- utils/llvm-targets/gen-data-layout.sh | 104 +++++++++++ utils/mkUserGuidePart/Options/Linking.hs | 7 +- 29 files changed, 463 insertions(+), 291 deletions(-) From git at git.haskell.org Sun Dec 23 18:47:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:47:08 +0000 (UTC) Subject: [commit: ghc] wip/fix-i386-1: circleci: Store test results of slow validation builds (1c1fe8a) Message-ID: <20181223184708.4F8993ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-i386-1 Link : http://ghc.haskell.org/trac/ghc/changeset/1c1fe8a9fdfd3e91b3c1ae8e5cf4d1a352ec2be2/ghc >--------------------------------------------------------------- commit 1c1fe8a9fdfd3e91b3c1ae8e5cf4d1a352ec2be2 Author: Ben Gamari Date: Tue Oct 30 13:47:53 2018 -0400 circleci: Store test results of slow validation builds >--------------------------------------------------------------- 1c1fe8a9fdfd3e91b3c1ae8e5cf4d1a352ec2be2 .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5be4fd5..21960b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -282,6 +282,7 @@ jobs: - *configure_unix - *make - *slowtest + - *store_test_results workflows: version: 2 From git at git.haskell.org Sun Dec 23 18:47:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 18:47:11 +0000 (UTC) Subject: [commit: ghc] master: Revert "testsuite: Fix broken_without_gmp" (a0b9d42) Message-ID: <20181223184711.498483ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a0b9d42be3ae65860d5187918891344a611ca2ac/ghc >--------------------------------------------------------------- commit a0b9d42be3ae65860d5187918891344a611ca2ac Author: Ben Gamari Date: Sun Dec 23 13:45:24 2018 -0500 Revert "testsuite: Fix broken_without_gmp" This reverts commit e59439af3222d151918ad1ad2a03942ce9e6a1ff. This is causing unexpected failures in some test ways. Further proof that no change is too trivial for CI. >--------------------------------------------------------------- a0b9d42be3ae65860d5187918891344a611ca2ac testsuite/driver/testlib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index f26f9e0..1c6668d 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -213,6 +213,11 @@ def record_broken(name, opts, bug): if not me in brokens: brokens.append(me) +def broken_without_gmp(name, opts): + # Many tests sadly break with integer-simple due to GHCi's ignorance of it. + when(config.integer_backend != "integer-gmp", + expect_broken(16043)) + def _expect_pass(way): # Helper function. Not intended for use in .T files. opts = getTestOpts() @@ -460,10 +465,6 @@ def have_gdb( ): def have_readelf( ): return config.have_readelf -# Many tests sadly break with integer-simple due to GHCi's ignorance of it. -broken_without_gmp = when(config.integer_backend != "integer-gmp", - expect_broken(16043)) - # --- def high_memory_usage(name, opts): From git at git.haskell.org Sun Dec 23 21:53:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 23 Dec 2018 21:53:09 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Disable CircleCI Darwin builds (bd8a6bd) Message-ID: <20181223215309.791DA3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bd8a6bde2ee73e599800137b9428a401bc105985/ghc >--------------------------------------------------------------- commit bd8a6bde2ee73e599800137b9428a401bc105985 Author: Ben Gamari Date: Sun Dec 23 16:52:27 2018 -0500 gitlab-ci: Disable CircleCI Darwin builds They aren't finishing correctly anyways. >--------------------------------------------------------------- bd8a6bde2ee73e599800137b9428a401bc105985 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c2f2a4..6b1a22f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -382,7 +382,7 @@ validate-x86_64-windows: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. -circleci-validate-x86_64-darwin: +.circleci-validate-x86_64-darwin: extends: .circleci stage: full-build allow_failure: true From git at git.haskell.org Mon Dec 24 05:24:25 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 24 Dec 2018 05:24:25 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours (5499f12) Message-ID: <20181224052425.0D83C3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5499f12f32a8deaa2a30c13359473b1178236341/ghc >--------------------------------------------------------------- commit 5499f12f32a8deaa2a30c13359473b1178236341 Author: Ben Gamari Date: Sun Dec 23 02:24:17 2018 -0500 testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours This is due to the failures documented in #16087. The condition here could be improved as it matches on `BUILD_FLAVOUR` instead of looking at the compiler flags. However, it's better than nothing and I hope we will be able to fix these issues before long. >--------------------------------------------------------------- 5499f12f32a8deaa2a30c13359473b1178236341 hadrian/src/Settings/Builders/RunTest.hs | 4 ++++ testsuite/mk/test.mk | 7 +++++++ testsuite/tests/th/all.T | 2 ++ 3 files changed, 13 insertions(+) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 8312592..908668b 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -83,6 +83,9 @@ runTestBuilderArgs = builder RunTest ? do timeoutProg <- expr buildRoot <&> (-/- timeoutPath) integerLib <- expr (integerLibrary flav) + -- See #16087 + let ghcBuiltByLlvm = False -- TODO: Implement this check + let asZeroOne s b = s ++ zeroOne b -- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD @@ -112,6 +115,7 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic , arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib) + , arg "-e", arg $ "config.ghc_built_by_llvm=" ++ show ghcBuiltByLlvm -- Use default value, see: -- https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index 1bac4fd..cead469 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -240,6 +240,13 @@ else RUNTEST_OPTS += -e config.local=True endif +# Some tests in ext-interp fail when ghc-stage2 is built using LLVM. See #16087 +ifeq "$(findstring llvm,$(BUILD_FLAVOUR))" "" +RUNTEST_OPTS += -e config.ghc_built_by_llvm=False +else +RUNTEST_OPTS += -e config.ghc_built_by_llvm=True +endif + RUNTEST_OPTS += -e 'config.integer_backend="$(INTEGER_LIBRARY)"' RUNTEST_OPTS += \ diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 96c7e1e..1bea110 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -12,6 +12,8 @@ setTestOpts(req_interp) if config.have_ext_interp : setTestOpts(extra_ways(['ext-interp'])) setTestOpts(only_ways(['normal','ghci','ext-interp'])) + if config.ghc_built_by_llvm: + setTestOpts(expect_broken_for(16087, ['ext-interp'])) test('TH_mkName', normal, compile, ['-v0']) test('TH_overloadedlabels', normal, compile, ['-v0']) From git at git.haskell.org Mon Dec 24 12:02:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 24 Dec 2018 12:02:59 +0000 (UTC) Subject: [commit: ghc] master: Simplify Core output with -dsuppress-type-signatures (8a0fca0) Message-ID: <20181224120259.C05DD3ABA8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8a0fca09565df99474568888253415f9bbe0fb68/ghc >--------------------------------------------------------------- commit 8a0fca09565df99474568888253415f9bbe0fb68 Author: Ömer Sinan Ağacan Date: Mon Dec 24 15:02:27 2018 +0300 Simplify Core output with -dsuppress-type-signatures Currently we duplicate top-level binder ids for no reason: $fEqHsExpr_$c/= $fEqHsExpr_$c/= = \ @ id_a27U $dEq_a27V eta_B2 eta1_B1 -> case $fEqHsExpr_$c== $dEq_a27V eta_B2 eta1_B1 of { False -> True; True -> False } with this patch we drop the first line when type signatures are not printed (-dsuppress-type-signatures, which is implied by -dsuppress-all) Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5472 >--------------------------------------------------------------- 8a0fca09565df99474568888253415f9bbe0fb68 compiler/coreSyn/PprCore.hs | 8 +++++++- testsuite/tests/simplCore/should_compile/T16038/T16038.stdout | 3 --- testsuite/tests/simplCore/should_compile/T5996.stdout | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs index f22d803..5fe033b 100644 --- a/compiler/coreSyn/PprCore.hs +++ b/compiler/coreSyn/PprCore.hs @@ -115,7 +115,13 @@ ppr_bind ann (Rec binds) = vcat (map pp binds) ppr_binding :: OutputableBndr b => Annotation b -> (b, Expr b) -> SDoc ppr_binding ann (val_bdr, expr) - = ann expr $$ pprBndr LetBind val_bdr $$ pp_bind + = sdocWithDynFlags $ \dflags -> + vcat [ ann expr + , if gopt Opt_SuppressTypeSignatures dflags + then empty + else pprBndr LetBind val_bdr + , pp_bind + ] where pp_bind = case bndrIsJoin_maybe val_bdr of Nothing -> pp_normal_bind diff --git a/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout b/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout index f52fd1b..eec60ec 100644 --- a/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout +++ b/testsuite/tests/simplCore/should_compile/T16038/T16038.stdout @@ -1,8 +1,5 @@ Rec { $fEqHsExpr_$c/= -$fEqHsExpr_$c/= -$fEqHsExpr $fEqHsExpr $fEqHsExpr_$c== -$fEqHsExpr_$c== end Rec } diff --git a/testsuite/tests/simplCore/should_compile/T5996.stdout b/testsuite/tests/simplCore/should_compile/T5996.stdout index b8a3398..e56cd1f 100644 --- a/testsuite/tests/simplCore/should_compile/T5996.stdout +++ b/testsuite/tests/simplCore/should_compile/T5996.stdout @@ -1,2 +1 @@ -y2 y2 = x2 From git at git.haskell.org Tue Dec 25 03:29:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:29:05 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Enable T11627a on Darwin (6d9d6f9) Message-ID: <20181225032905.221973ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6d9d6f9ab545eb11b4a1b72ea903a0f804109f16/ghc >--------------------------------------------------------------- commit 6d9d6f9ab545eb11b4a1b72ea903a0f804109f16 Author: Ben Gamari Date: Sun Dec 23 12:36:50 2018 -0500 testsuite: Enable T11627a on Darwin The retainer profiler no longer uses the C stack for its mark stack (#14758). Consequently even the small C stack provided on Darwin should be sufficient to run this test. See #11627 >--------------------------------------------------------------- 6d9d6f9ab545eb11b4a1b72ea903a0f804109f16 testsuite/tests/profiling/should_run/all.T | 3 --- 1 file changed, 3 deletions(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index c3d34af..050287e 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -115,10 +115,7 @@ test('T5363', [], compile_and_run, ['']) test('profinline001', [], compile_and_run, ['']) -# Skip T11627a and T11627b on Darwin as it tends to give us a very small stack -# which the retainer profiler tends to overflow. See #15287 and #11627. test('T11627a', [ extra_ways(extra_prof_ways) - , when(opsys('darwin'), skip) ], compile_and_run, ['']) From git at git.haskell.org Tue Dec 25 03:29:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:29:08 +0000 (UTC) Subject: [commit: ghc] master: ghc-compact: Use Char instead of Integer in compact_share test (8a66496) Message-ID: <20181225032908.1FF853ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8a664967375cc872549b21695ee3cc2b5263f3e7/ghc >--------------------------------------------------------------- commit 8a664967375cc872549b21695ee3cc2b5263f3e7 Author: Ben Gamari Date: Sun Dec 23 12:33:12 2018 -0500 ghc-compact: Use Char instead of Integer in compact_share test The representation of Integer depends upon the choice of integer backend whereas Char should be consistent. >--------------------------------------------------------------- 8a664967375cc872549b21695ee3cc2b5263f3e7 libraries/ghc-compact/tests/compact_share.hs | 5 +++-- libraries/ghc-compact/tests/compact_share.stdout-ws-32 | 8 ++++---- libraries/ghc-compact/tests/compact_share.stdout-ws-64 | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libraries/ghc-compact/tests/compact_share.hs b/libraries/ghc-compact/tests/compact_share.hs index 323c179..5dd279c 100644 --- a/libraries/ghc-compact/tests/compact_share.hs +++ b/libraries/ghc-compact/tests/compact_share.hs @@ -1,9 +1,10 @@ +import Data.Char import GHC.Compact import qualified Data.Map as Map main = do - let m1 = Map.fromList [(x,show x) | x <- [1..(10000::Integer)]] - m2 = Map.fromList [(x,y) | x <- [1..(10000::Integer)], + let m1 = Map.fromList [(x,show x) | x <- ['a'..chr 10000]] + m2 = Map.fromList [(x,y) | x <- ['a'..chr 10000], Just y <- [Map.lookup x m1]] c <- compact (m1,m2) print (length (show (getCompact c))) diff --git a/libraries/ghc-compact/tests/compact_share.stdout-ws-32 b/libraries/ghc-compact/tests/compact_share.stdout-ws-32 index a6ac978..0f92940 100644 --- a/libraries/ghc-compact/tests/compact_share.stdout-ws-32 +++ b/libraries/ghc-compact/tests/compact_share.stdout-ws-32 @@ -1,4 +1,4 @@ -275599 -1900544 -275599 -1114112 +411963 +2588672 +411963 +1343488 diff --git a/libraries/ghc-compact/tests/compact_share.stdout-ws-64 b/libraries/ghc-compact/tests/compact_share.stdout-ws-64 index 0969fdf..fffe208 100644 --- a/libraries/ghc-compact/tests/compact_share.stdout-ws-64 +++ b/libraries/ghc-compact/tests/compact_share.stdout-ws-64 @@ -1,4 +1,4 @@ -275599 -3801088 -275599 -2228224 +411963 +5177344 +411963 +2686976 From git at git.haskell.org Tue Dec 25 03:29:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:29:11 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Fix a variety of issues when building with integer-simple (9937820) Message-ID: <20181225032911.270B53ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/993782073c0b380908e9541c40c6c5849dbacfec/ghc >--------------------------------------------------------------- commit 993782073c0b380908e9541c40c6c5849dbacfec Author: Ben Gamari Date: Sun Dec 23 06:34:00 2018 +0000 testsuite: Fix a variety of issues when building with integer-simple * Mark arith011 as broken with integer-simple As noted in #16091, arith011 fails when run against integer-simple with a "divide by zero" exception. This suggests that integer-gmp and integer-simple are handling division by zero differently. * This also fixes broken_without_gmp; the lack of types made the previous failure silent, sadly. Improves situation of #16043. * Mark several tests implicitly depending upon integer-gmp as broken with integer-simple. These expect to see Core coming from integer-gmp, which breaks with integer-simple. * Increase runtime timeout multiplier of T11627a with integer-simple I previously saw that T11627a timed out in all profiling ways when run against integer-simple. I suspect this is due to integer-simple's rather verbose heap representation. Let's see whether increasing the runtime timeout helps. Fixes test for #11627. This is all in service of fixing #16043. >--------------------------------------------------------------- 993782073c0b380908e9541c40c6c5849dbacfec testsuite/driver/testlib.py | 26 ++++++++++++---------- testsuite/mk/test.mk | 2 -- testsuite/tests/numeric/should_compile/all.T | 5 +++-- testsuite/tests/numeric/should_run/all.T | 4 +++- testsuite/tests/perf/space_leaks/all.T | 3 ++- testsuite/tests/profiling/should_run/all.T | 5 ++++- testsuite/tests/rename/should_compile/T3103/test.T | 2 +- testsuite/tests/safeHaskell/check/pkg01/all.T | 3 ++- testsuite/tests/simplCore/should_run/all.T | 3 ++- testsuite/tests/typecheck/should_fail/T5095.stderr | 2 +- 10 files changed, 32 insertions(+), 23 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 993782073c0b380908e9541c40c6c5849dbacfec From git at git.haskell.org Tue Dec 25 03:29:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:29:14 +0000 (UTC) Subject: [commit: ghc] master: Revert "hadrian: Pass integer_backend to testsuite driver" (6fff2d2) Message-ID: <20181225032914.2382A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6fff2d25dbfdda5e6ca6fecddd097cc10538937f/ghc >--------------------------------------------------------------- commit 6fff2d25dbfdda5e6ca6fecddd097cc10538937f Author: Ben Gamari Date: Sun Dec 23 17:57:12 2018 -0500 Revert "hadrian: Pass integer_backend to testsuite driver" This reverts commit 442be690e1ca162e22d632df695c29f90625f33e. >--------------------------------------------------------------- 6fff2d25dbfdda5e6ca6fecddd097cc10538937f hadrian/src/Settings/Builders/RunTest.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 908668b..55a5e58 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -81,7 +81,6 @@ runTestBuilderArgs = builder RunTest ? do top <- expr $ topDirectory ghcFlags <- expr runTestGhcFlags timeoutProg <- expr buildRoot <&> (-/- timeoutPath) - integerLib <- expr (integerLibrary flav) -- See #16087 let ghcBuiltByLlvm = False -- TODO: Implement this check @@ -114,7 +113,6 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic - , arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib) , arg "-e", arg $ "config.ghc_built_by_llvm=" ++ show ghcBuiltByLlvm -- Use default value, see: From git at git.haskell.org Tue Dec 25 03:38:03 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:38:03 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Use robocopy instead of bash to copy cabal cache (f8c18ba) Message-ID: <20181225033803.09EC33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f8c18bacbb8b4334d22fb9cb68e5abbf12e92912/ghc >--------------------------------------------------------------- commit f8c18bacbb8b4334d22fb9cb68e5abbf12e92912 Author: Ben Gamari Date: Sun Dec 23 13:12:46 2018 -0500 gitlab-ci: Use robocopy instead of bash to copy cabal cache >--------------------------------------------------------------- f8c18bacbb8b4334d22fb9cb68e5abbf12e92912 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c906b3e..d86de7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -318,7 +318,7 @@ validate-x86_64-linux-deb9-unreg: - bash .gitlab/win32-init.sh after_script: - rd /s /q tmp - - bash -c 'cp -Rf $APPDATA/cabal cabal-cache' + - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache cache: paths: - cabal-cache From git at git.haskell.org Tue Dec 25 03:38:06 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:38:06 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Use per-build temporary directory on Windows (3aa8c59) Message-ID: <20181225033806.03A913ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3aa8c593ca8647c5a3a05a84819d515ea3a69538/ghc >--------------------------------------------------------------- commit 3aa8c593ca8647c5a3a05a84819d515ea3a69538 Author: Ben Gamari Date: Sun Dec 23 01:19:36 2018 -0500 gitlab-ci: Use per-build temporary directory on Windows I have seen several instances of inexplicable "Access denied" errors on Windows. Using per-build temporary directories avoids any chance of interference between builds and eliminates the possibility of temporary files leaking beyond the life of the build. >--------------------------------------------------------------- 3aa8c593ca8647c5a3a05a84819d515ea3a69538 .gitlab-ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b1a22f..c906b3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -302,12 +302,23 @@ validate-x86_64-linux-deb9-unreg: before_script: - git clean -xdf - git submodule foreach git clean -xdf - - PATH=C:\msys64\usr\bin;%PATH% + + # Use a local temporary directory to ensure that concurrent builds don't + # interfere with one another + - | + mkdir tmp + set TMP=%cd%\tmp + set TEMP=%cd%\tmp + + - set PATH=C:\msys64\usr\bin;%PATH% - python .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules - bash .gitlab/win32-init.sh + after_script: + - rd /s /q tmp + - bash -c 'cp -Rf $APPDATA/cabal cabal-cache' cache: paths: - cabal-cache @@ -333,7 +344,6 @@ validate-x86_64-windows-hadrian: - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint" - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - - cp -Rf $APPDATA/cabal cabal-cache cache: key: x86_64-windows tags: @@ -352,7 +362,6 @@ validate-x86_64-windows: bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - - cp -Rf $APPDATA/cabal cabal-cache cache: key: x86_64-windows tags: From git at git.haskell.org Tue Dec 25 03:38:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 03:38:08 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Clean tree on Windows after job (9c908fc) Message-ID: <20181225033808.F00F23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9c908fc7b312bdd3dbcb25d36c688b421558de78/ghc >--------------------------------------------------------------- commit 9c908fc7b312bdd3dbcb25d36c688b421558de78 Author: Ben Gamari Date: Mon Dec 24 15:34:00 2018 -0500 gitlab-ci: Clean tree on Windows after job It seems like currently the runner doesn't delete the working tree after finishing a job. At least we can delete the binary artifacts for now. >--------------------------------------------------------------- 9c908fc7b312bdd3dbcb25d36c688b421558de78 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d86de7a..25771c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -319,6 +319,7 @@ validate-x86_64-linux-deb9-unreg: after_script: - rd /s /q tmp - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache + - bash -c 'make clean || true' cache: paths: - cabal-cache From git at git.haskell.org Tue Dec 25 16:17:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 16:17:59 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Skip ffi018_ghci when unregisterised (7bfc1e8) Message-ID: <20181225161759.C4F443ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7bfc1e81377d1e37069cf52bd090530124dcd871/ghc >--------------------------------------------------------------- commit 7bfc1e81377d1e37069cf52bd090530124dcd871 Author: Ben Gamari Date: Tue Dec 25 05:03:21 2018 -0500 testsuite: Skip ffi018_ghci when unregisterised As noted in #16085 this test is fragile in unregisterised compilers. >--------------------------------------------------------------- 7bfc1e81377d1e37069cf52bd090530124dcd871 testsuite/tests/ffi/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index 7255c91..3a3dfd7 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -87,6 +87,8 @@ test('ffi018', [omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c']) test('ffi018_ghci', [extra_files(['ffi018.h']), only_ways(['ghci']), + # This test is fragile when unregisterised; see #16085 + when(unregisterised(), skip), pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup')], compile_and_run, ['ffi018_ghci_c.o']) From git at git.haskell.org Tue Dec 25 16:19:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 16:19:42 +0000 (UTC) Subject: [commit: ghc] master: rts: Turn ASSERT in LDV_recordDead into a normal if (9b65ae6) Message-ID: <20181225161942.B5A463ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9b65ae69fbeddcb9df7c70b71c9cf62be1e03dbd/ghc >--------------------------------------------------------------- commit 9b65ae69fbeddcb9df7c70b71c9cf62be1e03dbd Author: Ben Gamari Date: Sat Dec 22 19:43:41 2018 -0500 rts: Turn ASSERT in LDV_recordDead into a normal if As reported in #15382 the `ASSERT(ctr != NULL)` is currently getting routinely hit during testsuite runs. While this is certainly a bug I would far prefer getting a proper error message than a segmentation fault. Consequently I'm turning the `ASSERT` into a proper `if` so we get a proper error in non-debug builds. >--------------------------------------------------------------- 9b65ae69fbeddcb9df7c70b71c9cf62be1e03dbd rts/ProfHeap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 517702f..9ab4ff1 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -201,7 +201,9 @@ LDV_recordDead( const StgClosure *c, uint32_t size ) } else { id = closureIdentity(c); ctr = lookupHashTable(censuses[t].hash, (StgWord)id); - ASSERT( ctr != NULL ); + if (ctr == NULL) + barf("LDV_recordDead: Failed to find counter for closure %p", c); + ctr->c.ldv.void_total += size; ctr = lookupHashTable(censuses[era].hash, (StgWord)id); if (ctr == NULL) { From git at git.haskell.org Tue Dec 25 21:58:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 21:58:59 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Allow Windows to fail for now (bb06c6b) Message-ID: <20181225215859.910923ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bb06c6b12c4a24c049fa8fbc9c470f12d625ca18/ghc >--------------------------------------------------------------- commit bb06c6b12c4a24c049fa8fbc9c470f12d625ca18 Author: Ben Gamari Date: Tue Dec 25 16:54:25 2018 -0500 gitlab-ci: Allow Windows to fail for now While we sort out #16084. >--------------------------------------------------------------- bb06c6b12c4a24c049fa8fbc9c470f12d625ca18 .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e471d99..6d8276f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -328,11 +328,11 @@ validate-x86_64-linux-deb9-unreg: validate-x86_64-windows-hadrian: extends: .validate-windows stage: full-build + # due to #16073 + allow_failure: true variables: GHC_VERSION: "8.6.2" LANG: "en_US.UTF-8" - # due to #16073 - allow_failure: true script: - | set MSYSTEM=MINGW64 @@ -352,6 +352,8 @@ validate-x86_64-windows-hadrian: validate-x86_64-windows: extends: .validate-windows stage: full-build + # due to #16084 + allow_failure: true variables: GHC_VERSION: "8.6.2" LANG: "en_US.UTF-8" From git at git.haskell.org Tue Dec 25 21:59:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 25 Dec 2018 21:59:02 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Require that integer-simple configuration passes (5569eef) Message-ID: <20181225215902.8B8CF3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5569eefff5aabaa53b7e7e50b9ea4b177559deb1/ghc >--------------------------------------------------------------- commit 5569eefff5aabaa53b7e7e50b9ea4b177559deb1 Author: Ben Gamari Date: Tue Dec 25 16:52:59 2018 -0500 gitlab-ci: Require that integer-simple configuration passes The last step of #15915. >--------------------------------------------------------------- 5569eefff5aabaa53b7e7e50b9ea4b177559deb1 .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25771c2..e471d99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ stages: - full-build ############################################################ -# Tags +# Runner Tags ############################################################ # # * x86_64-linux: Any Docker-capable x86_64 Linux machine @@ -267,7 +267,6 @@ validate-x86_64-linux-fedora27: validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux stage: full-build - allow_failure: true variables: INTEGER_LIBRARY: integer-simple image: ghcci/x86_64-linux-deb9:0.2 From git at git.haskell.org Wed Dec 26 02:58:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 26 Dec 2018 02:58:44 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Try only building Windows in the quick flavour (942b501) Message-ID: <20181226025844.52CB43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/942b501972139ed95b49b75cb8c0523b460f6d10/ghc >--------------------------------------------------------------- commit 942b501972139ed95b49b75cb8c0523b460f6d10 Author: Ben Gamari Date: Tue Dec 25 05:12:40 2018 -0500 gitlab-ci: Try only building Windows in the quick flavour It seems no matter how many machines I throw at Windows it's constantly behind. Perhaps the quick build flavour will be fast enough to allow us to keep until while we sort out our toolchain issues (#16084). >--------------------------------------------------------------- 942b501972139ed95b49b75cb8c0523b460f6d10 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d8276f..87a5333 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -362,6 +362,7 @@ validate-x86_64-windows: set MSYSTEM=MINGW64 python boot bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' + - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: From git at git.haskell.org Wed Dec 26 13:15:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 26 Dec 2018 13:15:39 +0000 (UTC) Subject: [commit: nofib] master: Compare results of compress by hashing (042cf0b) Message-ID: <20181226131539.90F1A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/042cf0be9e6f78a3b1474b568350916575202719/nofib >--------------------------------------------------------------- commit 042cf0be9e6f78a3b1474b568350916575202719 Author: Sebastian Graf Date: Wed Dec 26 13:45:33 2018 +0100 Compare results of compress by hashing Summary: We don't want the result in the repo as it's a sizeable binary file that doesn't compress well. Storing the output file in the repository becomes infeasible for large inputs. There are two possible remedies: 1. Generate the result files during `make boot` (Phab:D5426). We discovered some drawbacks (like missing dependency files to build `compress` during boot) to this approach which make it infeasible. 2. Shrink the output files, for example by hashing the string that we would normally output and compare that instead. This patch implements the second alternative. This somewhat distorts the runtime profile, so we might want to consider doing hashing within the benchmark runner in the future. Test Plan: make boot Reviewers: AndreasK, nomeata, O26 nofib, osa1 Reviewed By: AndreasK, osa1 Subscribers: osa1 Differential Revision: https://phabricator.haskell.org/D5469 >--------------------------------------------------------------- 042cf0be9e6f78a3b1474b568350916575202719 .gitignore | 1 - real/compress/Main.hs | 8 ++++++-- real/compress/Makefile | 9 ++------- real/compress/compress.faststdout | Bin 94848 -> 19 bytes real/compress/compress.stdout | 1 + 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index c69af58..f1fae44 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,6 @@ real/bspt/bspt real/cacheprof/cacheprof real/compress/compress real/compress/compress.stdin -real/compress/compress.stdout real/compress2/compress2 real/compress2/compress2.stdin real/compress2/compress2.stdout diff --git a/real/compress/Main.hs b/real/compress/Main.hs index 28ff58c..ec43fbb 100644 --- a/real/compress/Main.hs +++ b/real/compress/Main.hs @@ -16,13 +16,17 @@ module Main (main) where import Defaults import BinConv -- binary conversion routines import Encode -- coding routine +import Data.Char +import Data.List (foldl') import System.IO +hash :: String -> Int +hash = foldl' (\acc c -> ord c + acc*31) 0 + main = do hSetBinaryMode stdin True - hSetBinaryMode stdout True inp <- getContents - putStr (compress inp) + print (hash (compress inp)) {- To compress a string we first encode it, then convert it to n-bit binaries - convert back to decimal as ascii-bit values and then to characters diff --git a/real/compress/Makefile b/real/compress/Makefile index f366d2c..ba4074e 100644 --- a/real/compress/Makefile +++ b/real/compress/Makefile @@ -1,20 +1,15 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk -SRC_RUNTEST_OPTS += -stdout-binary - SRCS = BinConv.hs BinTest.hs Decode.hs Defaults.hs Encode.hs Main.hs PTTrees.hs Uncompress.hs -CLEAN_FILES += compress.stdin compress.stdout +CLEAN_FILES += compress.stdin Lzw_HC_OPTS = -cpp include $(TOP)/mk/target.mk -boot :: compress.stdin compress.faststdin compress.stdout +boot :: compress.stdin compress.stdin : compress.faststdin cat compress.faststdin *.hs *.c compress.faststdin *.hs *.c compress.faststdin > compress.stdin - -compress.stdout : compress.stdin compress - ./compress < compress.stdin > compress.stdout diff --git a/real/compress/compress.faststdout b/real/compress/compress.faststdout index 3bfe8cb..ac69d34 100644 Binary files a/real/compress/compress.faststdout and b/real/compress/compress.faststdout differ diff --git a/real/compress/compress.stdout b/real/compress/compress.stdout new file mode 100644 index 0000000..86e4101 --- /dev/null +++ b/real/compress/compress.stdout @@ -0,0 +1 @@ +-172666309241294456 From git at git.haskell.org Thu Dec 27 16:58:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:30 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15155a' created Message-ID: <20181227165830.DC8203ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15155a Referencing: 1b6b2632fb44562986d6907a8d807af5e84f772f From git at git.haskell.org Thu Dec 27 16:58:32 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/quick-validate-for-windows' created Message-ID: <20181227165832.DD09A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/quick-validate-for-windows Referencing: 8c10e531c9431b32c7b43df5e013f7b4dce8a8c2 From git at git.haskell.org Thu Dec 27 16:58:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:34 +0000 (UTC) Subject: [commit: ghc] branch 'ppc-update-sp' created Message-ID: <20181227165834.DE3E43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : ppc-update-sp Referencing: 93385cd882241d150bdc593e4c9d92e28747480f From git at git.haskell.org Thu Dec 27 16:58:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:36 +0000 (UTC) Subject: [commit: ghc] branch 'wip/gitlab-disable-circleci' created Message-ID: <20181227165836.DF2B03ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/gitlab-disable-circleci Referencing: 77e4f731f17ed336d70ed147b740084839f211d7 From git at git.haskell.org Thu Dec 27 16:58:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:38 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16042' created Message-ID: <20181227165838.DFE3A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16042 Referencing: b8ef54f90c7171f023fb311db6d74d1864911b69 From git at git.haskell.org Thu Dec 27 16:58:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:40 +0000 (UTC) Subject: [commit: ghc] branch 'wip/llvm-th-tests-broken' created Message-ID: <20181227165840.E0C6B3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/llvm-th-tests-broken Referencing: 1c229def93ad4d44e5d24644be94ea7faf4946f1 From git at git.haskell.org Thu Dec 27 16:58:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16085' created Message-ID: <20181227165842.E1A873ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16085 Referencing: 7bfc1e81377d1e37069cf52bd090530124dcd871 From git at git.haskell.org Thu Dec 27 16:58:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:44 +0000 (UTC) Subject: [commit: ghc] branch 'D5451' created Message-ID: <20181227165844.E2A5F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : D5451 Referencing: 29fc289449adc6af3abd12f66bda98e0a1bad388 From git at git.haskell.org Thu Dec 27 16:58:46 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:46 +0000 (UTC) Subject: [commit: ghc] branch 'wip/exec-stack-on-error' created Message-ID: <20181227165846.E3C163ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/exec-stack-on-error Referencing: 27b1034cde62a97a7d41714d58ef3f90be4e0997 From git at git.haskell.org Thu Dec 27 16:58:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:48 +0000 (UTC) Subject: [commit: ghc] branch 'D5440' created Message-ID: <20181227165848.E4DC23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : D5440 Referencing: dd561e151af7de6840d79f4a5f523bfe6a751bed From git at git.haskell.org Thu Dec 27 16:58:50 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:50 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-windows-ci' created Message-ID: <20181227165850.E60393ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-windows-ci Referencing: 15fff5bf6e6b5f72a33b02c31565be4afb6a7480 From git at git.haskell.org Thu Dec 27 16:58:52 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:52 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16039' created Message-ID: <20181227165852.E6FAD3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16039 Referencing: f1cc9177b0aa31e23011a93c0b40170775063ddb From git at git.haskell.org Thu Dec 27 16:58:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:54 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-integer-simple-ci' created Message-ID: <20181227165854.E80733ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-integer-simple-ci Referencing: 99ab61681d21f78139d619cf82a3c8909b0a2165 From git at git.haskell.org Thu Dec 27 16:58:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:56 +0000 (UTC) Subject: [commit: ghc] branch 'D5439' created Message-ID: <20181227165856.E8B853ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : D5439 Referencing: ac7d79c1552eb10e90ec1d4866d843b822aadc5d From git at git.haskell.org Thu Dec 27 16:58:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:58:58 +0000 (UTC) Subject: [commit: ghc] branch 'improve-pext-pdep' created Message-ID: <20181227165858.E9A4C3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : improve-pext-pdep Referencing: eec2317e56333b52388037da9c49fe1af86663cc From git at git.haskell.org Thu Dec 27 16:59:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:00 +0000 (UTC) Subject: [commit: ghc] branch 'test' created Message-ID: <20181227165900.EA8F73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : test Referencing: 1993924c9052cdbd523915758dce341f31e40d92 From git at git.haskell.org Thu Dec 27 16:59:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:02 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-8.6-ci' created Message-ID: <20181227165902.EB9E03ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-8.6-ci Referencing: 27019e9ff7b75e34998333dc02c2462589e21a1d From git at git.haskell.org Thu Dec 27 16:59:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:04 +0000 (UTC) Subject: [commit: ghc] branch 'wip/carter/remove_x87Registers' created Message-ID: <20181227165904.ECCC23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/carter/remove_x87Registers Referencing: a1b1ba3fc271f0fd6898e2ae3941653369d0b851 From git at git.haskell.org Thu Dec 27 16:59:06 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:06 +0000 (UTC) Subject: [commit: ghc] branch 'wip/revert-windows-big-pe' created Message-ID: <20181227165906.ED86F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/revert-windows-big-pe Referencing: 427bd016cbc9c286a3f2098df50a5b8e5d29065d From git at git.haskell.org Thu Dec 27 16:59:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:09 +0000 (UTC) Subject: [commit: ghc] wip/exec-stack-on-error: base: Shoe execution stack on error calls (27b1034) Message-ID: <20181227165909.EFA983ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/exec-stack-on-error Link : http://ghc.haskell.org/trac/ghc/changeset/27b1034cde62a97a7d41714d58ef3f90be4e0997/ghc >--------------------------------------------------------------- commit 27b1034cde62a97a7d41714d58ef3f90be4e0997 Author: Ben Gamari Date: Tue Dec 18 09:27:53 2018 -0500 base: Shoe execution stack on error calls >--------------------------------------------------------------- 27b1034cde62a97a7d41714d58ef3f90be4e0997 libraries/base/GHC/Exception.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs index 3b32e23..ec564be 100644 --- a/libraries/base/GHC/Exception.hs +++ b/libraries/base/GHC/Exception.hs @@ -77,10 +77,12 @@ errorCallException s = toException (ErrorCall s) errorCallWithCallStackException :: String -> CallStack -> SomeException errorCallWithCallStackException s stk = unsafeDupablePerformIO $ do ccsStack <- currentCallStack + execStack <- ExecutionStack.showStackTrace let implicitParamCallStack = prettyCallStackLines stk ccsCallStack = showCCSStack ccsStack - stack = intercalate "\n" $ implicitParamCallStack ++ ccsCallStack + stack = intercalate "\n" + $ implicitParamCallStack ++ ccsCallStack ++ [ "Execution Stack:" ] ++ execStack return $ toException (ErrorCallWithLocation s stack) showCCSStack :: [String] -> [String] From git at git.haskell.org Thu Dec 27 16:59:12 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:12 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-disable-circleci: gitlab: Disable Linux CircleCI builds (77e4f73) Message-ID: <20181227165912.E73A53ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-disable-circleci Link : http://ghc.haskell.org/trac/ghc/changeset/77e4f731f17ed336d70ed147b740084839f211d7/ghc >--------------------------------------------------------------- commit 77e4f731f17ed336d70ed147b740084839f211d7 Author: Ben Gamari Date: Tue Dec 18 09:37:19 2018 -0500 gitlab: Disable Linux CircleCI builds They can't complete now anyways now since we have lost access to larger builders. >--------------------------------------------------------------- 77e4f731f17ed336d70ed147b740084839f211d7 .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a88dd..b37dcc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -296,17 +296,17 @@ validate-x86_64-windows: # This requires updating the maximum artifacts size limit in Gitlab to # something like 200MB. -circleci-validate-x86_64-linux-deb8: +.circleci-validate-x86_64-linux-deb8: extends: .circleci script: ".gitlab/circle-ci-job.sh validate-x86_64-linux-deb8" -circleci-validate-i386-linux-deb8: +.circleci-validate-i386-linux-deb8: extends: .circleci script: ".gitlab/circle-ci-job.sh validate-i386-linux-deb8" -# circleci-validate-x86_64-freebsd: -# extends: .circleci -# script: ".gitlab/circle-ci-job.sh validate-x86_64-freebsd" +.circleci-validate-x86_64-freebsd: + extends: .circleci + script: ".gitlab/circle-ci-job.sh validate-x86_64-freebsd" circleci-validate-x86_64-darwin: extends: .circleci From git at git.haskell.org Thu Dec 27 16:59:15 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:15 +0000 (UTC) Subject: [commit: ghc] D5439: Use unicode arrows with -fprint-unicode-syntax (ac7d79c) Message-ID: <20181227165915.E22833ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : D5439 Link : http://ghc.haskell.org/trac/ghc/changeset/ac7d79c1552eb10e90ec1d4866d843b822aadc5d/ghc >--------------------------------------------------------------- commit ac7d79c1552eb10e90ec1d4866d843b822aadc5d Author: Krzysztof Gogolewski Date: Tue Dec 18 00:14:16 2018 -0500 Use unicode arrows with -fprint-unicode-syntax See #8959, this is one more place where we can pretty-print Unicode syntax. Test Plan: validate Reviewers: nomeata, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #8959 Differential Revision: https://phabricator.haskell.org/D5439 >--------------------------------------------------------------- ac7d79c1552eb10e90ec1d4866d843b822aadc5d compiler/hsSyn/HsTypes.hs | 2 +- testsuite/tests/ghci/scripts/T8959b.stderr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 993b020..4ab15b2 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -1444,7 +1444,7 @@ ppr_fun_ty ty1 ty2 = let p1 = ppr_mono_lty ty1 p2 = ppr_mono_lty ty2 in - sep [p1, text "->" <+> p2] + sep [p1, arrow <+> p2] -------------------------- ppr_tylit :: HsTyLit -> SDoc diff --git a/testsuite/tests/ghci/scripts/T8959b.stderr b/testsuite/tests/ghci/scripts/T8959b.stderr index 28b48fd..a814d2e 100644 --- a/testsuite/tests/ghci/scripts/T8959b.stderr +++ b/testsuite/tests/ghci/scripts/T8959b.stderr @@ -12,5 +12,5 @@ T8959b.hs:8:7: error: T8959b.hs:10:7: error: • Couldn't match expected type ‘(∀ a2. a2 → a2) → a1’ with actual type ‘()’ - • In the expression: () ∷ (∀ a. a -> a) -> a - In an equation for ‘baz’: baz = () ∷ (∀ a. a -> a) -> a + • In the expression: () ∷ (∀ a. a → a) → a + In an equation for ‘baz’: baz = () ∷ (∀ a. a → a) → a From git at git.haskell.org Thu Dec 27 16:59:18 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:18 +0000 (UTC) Subject: [commit: ghc] wip/T16042: testsuite: Warn if test will never be run (b8ef54f) Message-ID: <20181227165918.E22E93ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16042 Link : http://ghc.haskell.org/trac/ghc/changeset/b8ef54f90c7171f023fb311db6d74d1864911b69/ghc >--------------------------------------------------------------- commit b8ef54f90c7171f023fb311db6d74d1864911b69 Author: Ben Gamari Date: Sun Dec 16 10:43:11 2018 -0500 testsuite: Warn if test will never be run We currently use the test's func to determine whether it is a compile-time or a run-time test. This means that run_command tests and the like are considered to be neither run-time nor compile-time tests and only get run in the normal way. This is quite surprising (see #16042) and has meant that some tests have gone silently un-run in the past. Warn when this happens. Frankly, this design is a bit unfortunate but changing it is a bit more work than I have time to invest at the moment. >--------------------------------------------------------------- b8ef54f90c7171f023fb311db6d74d1864911b69 testsuite/driver/testlib.py | 13 +++++++++++++ testsuite/tests/codeGen/should_compile/all.T | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 1c6668d..0d37358 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -762,6 +762,19 @@ def test_common_work(watcher, name, opts, func, args): else: all_ways = [] else: + if getTestOpts().only_ways is not None and getTestOpts().only_ways != ['normal']: + # This is all a bit unfortunate: We use the test's func to determine + # whether it is a compile-time or a run-time test. This means that + # run_command tests and the like are considered to be neither + # run-time nor compile-time tests and only get run in the normal way. + # This is quite surprising (see #16042) and has meant that some + # tests have gone silently un-run in the past. Warn when this happens. + err = ''' + this test is neither a run-time nor a compile-time test yet and + consequently can only run in the 'normal' testsuite way. + However, it is configured to run only in the %s ways. + ''' % getTestOpts().only_ways + framework_fail(name, 'whole-test', err) all_ways = ['normal'] # A test itself can request extra ways by setting opts.extra_ways diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 7217d93..e3d0bbc 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -45,7 +45,7 @@ test('T14999', # Verify that we optimize away redundant jumps for unordered comparisons. test('T15196', [ unless(arch('x86_64'),skip), - only_ways('normal'), + only_ways(['normal']), ], run_command, ['$MAKE -s --no-print-directory T15196']) test('T15723', From git at git.haskell.org Thu Dec 27 16:59:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:21 +0000 (UTC) Subject: [commit: ghc] improve-pext-pdep: Efficient pdep implementation (eec2317) Message-ID: <20181227165921.DA5453ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/eec2317e56333b52388037da9c49fe1af86663cc/ghc >--------------------------------------------------------------- commit eec2317e56333b52388037da9c49fe1af86663cc Author: Peter Trommler Date: Sat Oct 27 22:46:17 2018 +0200 Efficient pdep implementation >--------------------------------------------------------------- eec2317e56333b52388037da9c49fe1af86663cc libraries/ghc-prim/cbits/pdep.c | 107 +++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 17 deletions(-) diff --git a/libraries/ghc-prim/cbits/pdep.c b/libraries/ghc-prim/cbits/pdep.c index 58e8611..2769008 100644 --- a/libraries/ghc-prim/cbits/pdep.c +++ b/libraries/ghc-prim/cbits/pdep.c @@ -4,40 +4,113 @@ StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask) { - uint64_t result = 0; + uint64_t m0, mk, mp, mv, t; + uint64_t array[6]; - while (1) { - // Mask out all but the lowest bit - const uint64_t lowest = (-mask & mask); + m0 = mask; + mk = ~mask << 1; - if (lowest == 0) { - break; - } - - const uint64_t lsb = (uint64_t)((int64_t)(src << 63) >> 63); - - result |= lsb & lowest; - mask &= ~lowest; - src >>= 1; + for (int i = 0; i < 6 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mp = mp ^ (mp << 32); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; } - return result; + for (int i = 5; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep32(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint32_t m0, mk, mp, mv, t; + uint32_t array[5]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 5 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 4; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep16(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint16_t m0, mk, mp, mv, t; + uint16_t array[4]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 4 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 3; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep8(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint8_t m0, mk, mp, mv, t; + uint8_t array[3]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 3 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 2; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } From git at git.haskell.org Thu Dec 27 16:59:24 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:24 +0000 (UTC) Subject: [commit: ghc] improve-pext-pdep: Improve code for pext primop (c9884bc) Message-ID: <20181227165924.D46933ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/c9884bcb3ac691f25d55704c9ae01c6099229d3f/ghc >--------------------------------------------------------------- commit c9884bcb3ac691f25d55704c9ae01c6099229d3f Author: Peter Trommler Date: Wed Jun 20 20:03:17 2018 +0200 Improve code for pext primop >--------------------------------------------------------------- c9884bcb3ac691f25d55704c9ae01c6099229d3f libraries/ghc-prim/cbits/pext.c | 81 ++++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/libraries/ghc-prim/cbits/pext.c b/libraries/ghc-prim/cbits/pext.c index 9cddede..2cac9a4 100644 --- a/libraries/ghc-prim/cbits/pext.c +++ b/libraries/ghc-prim/cbits/pext.c @@ -4,36 +4,89 @@ StgWord64 hs_pext64(StgWord64 src, StgWord64 mask) { - uint64_t result = 0; - int offset = 0; + uint64_t mk, mp, mv, t; - for (int bit = 0; bit != sizeof(uint64_t) * 8; ++bit) { - const uint64_t src_bit = (src >> bit) & 1; - const uint64_t mask_bit = (mask >> bit) & 1; + src = src & mask; + mk = ~mask << 1; - if (mask_bit) { - result |= (uint64_t)(src_bit) << offset; - ++offset; - } + for (int i = 0; i < 6 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mp = mp ^ (mp << 32); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; } - - return result; + return src; } StgWord hs_pext32(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint32_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 5 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } StgWord hs_pext16(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint16_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 4 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } StgWord hs_pext8(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint8_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 3 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } From git at git.haskell.org Thu Dec 27 16:59:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:27 +0000 (UTC) Subject: [commit: ghc] test: gitlab-ci: Add a devel2 build (1993924) Message-ID: <20181227165927.D5F4D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : test Link : http://ghc.haskell.org/trac/ghc/changeset/1993924c9052cdbd523915758dce341f31e40d92/ghc >--------------------------------------------------------------- commit 1993924c9052cdbd523915758dce341f31e40d92 Author: Ben Gamari Date: Sat Dec 22 00:59:43 2018 -0500 gitlab-ci: Add a devel2 build >--------------------------------------------------------------- 1993924c9052cdbd523915758dce341f31e40d92 .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5eff228..a7026f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,6 +213,16 @@ nightly-i386-linux-deb9: cache: key: linux-i386-deb9 +# N.B. Has DEBUG assertions enabled in stage2 +validate-x86_64-linux-deb9-debug: + extends: .validate-linux + stage: build + image: ghcci/x86_64-linux-deb9:0.2 + variables: + BUILD_FLAVOUR: devel2 + cache: + key: linux-x86_64-deb9 + validate-x86_64-linux-deb9: extends: .validate-linux stage: build From git at git.haskell.org Thu Dec 27 16:59:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:30 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: more fixes for CDECL float return support and fixing some typoes etc. (1c792fa) Message-ID: <20181227165930.DA02E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/1c792fac68ed143c6eb22a4f5a9ae3741e59417e/ghc >--------------------------------------------------------------- commit 1c792fac68ed143c6eb22a4f5a9ae3741e59417e Author: Carter Tazio Schonwald Date: Fri Dec 21 18:50:54 2018 -0500 more fixes for CDECL float return support and fixing some typoes etc. >--------------------------------------------------------------- 1c792fac68ed143c6eb22a4f5a9ae3741e59417e compiler/nativeGen/X86/CodeGen.hs | 37 ++++++++++++++++++++----------------- compiler/nativeGen/X86/Instr.hs | 14 +++++++++++++- compiler/nativeGen/X86/Ppr.hs | 32 ++++++++++++++++++++++++++++---- compiler/nativeGen/X86/RegInfo.hs | 4 +++- 4 files changed, 64 insertions(+), 23 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1c792fac68ed143c6eb22a4f5a9ae3741e59417e From git at git.haskell.org Thu Dec 27 16:59:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:33 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: Preliminary work to remove x87 registers from x86/x86_64 native code gen. (e892a77) Message-ID: <20181227165933.F20363ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/e892a77bd13faed99e1e1910287fd6850ec41030/ghc >--------------------------------------------------------------- commit e892a77bd13faed99e1e1910287fd6850ec41030 Author: Carter Tazio Schonwald Date: Fri Dec 21 14:32:16 2018 -0500 Preliminary work to remove x87 registers from x86/x86_64 native code gen. >--------------------------------------------------------------- e892a77bd13faed99e1e1910287fd6850ec41030 compiler/cmm/CmmCallConv.hs | 7 +- compiler/cmm/CmmExpr.hs | 5 + compiler/cmm/CmmType.hs | 13 +- compiler/codeGen/StgCmmPrim.hs | 4 + compiler/main/DynFlags.hs | 20 +- compiler/nativeGen/Format.hs | 7 +- compiler/nativeGen/PPC/CodeGen.hs | 5 +- compiler/nativeGen/PPC/Regs.hs | 2 +- compiler/nativeGen/Reg.hs | 16 +- compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | 28 +-- compiler/nativeGen/RegClass.hs | 3 - compiler/nativeGen/X86/CodeGen.hs | 257 +++++++-------------- compiler/nativeGen/X86/Instr.hs | 18 +- compiler/nativeGen/X86/Ppr.hs | 247 +------------------- compiler/nativeGen/X86/RegInfo.hs | 15 +- compiler/nativeGen/X86/Regs.hs | 88 +++---- 16 files changed, 184 insertions(+), 551 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e892a77bd13faed99e1e1910287fd6850ec41030 From git at git.haskell.org Thu Dec 27 16:59:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:36 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: adding some fall throughs for earlier termination (e3130c7) Message-ID: <20181227165936.F3D783ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/e3130c7c80ad24daf451229197c6d6840d823809/ghc >--------------------------------------------------------------- commit e3130c7c80ad24daf451229197c6d6840d823809 Author: Carter Tazio Schonwald Date: Fri Dec 21 19:57:31 2018 -0500 adding some fall throughs for earlier termination >--------------------------------------------------------------- e3130c7c80ad24daf451229197c6d6840d823809 compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs | 5 +++++ compiler/nativeGen/X86/Regs.hs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs index 3a6e340..07b0e56 100644 --- a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs @@ -39,10 +39,15 @@ getFreeRegs platform cls (FreeRegs f) = go f 0 | n .&. 1 /= 0 && classOfRealReg platform (RealRegSingle m) == cls = RealRegSingle m : (go (n `shiftR` 1) $! (m+1)) + | m > finalRegister = [] + | otherwise = go (n `shiftR` 1) $! (m+1) -- ToDo: there's no point looking through all the integer registers -- in order to find a floating-point one. + -- Because they're seperate subintervals. A problem for another day. + + finalRegister = lastxmm platform allocateReg :: RealReg -> FreeRegs -> FreeRegs allocateReg (RealRegSingle r) (FreeRegs f) diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs index ef55d18..14870b4 100644 --- a/compiler/nativeGen/X86/Regs.hs +++ b/compiler/nativeGen/X86/Regs.hs @@ -254,6 +254,7 @@ classOfRealReg platform reg _ -> panic "X86.Regs.classOfRealReg: RegPairs on this arch" -- | Get the name of the register with this number. +-- NOTE: fixme, we dont track which "way" the XMM registers are used showReg :: Platform -> RegNo -> String showReg platform n | n >= firstxmm && n <= lastxmm platform = "%xmm" ++ show (n-firstxmm) @@ -358,7 +359,7 @@ xmm11 = regSingle 27 xmm12 = regSingle 28 xmm13 = regSingle 29 xmm14 = regSingle 30 -xmm15 = regSingle 21 +xmm15 = regSingle 31 ripRel :: Displacement -> AddrMode ripRel imm = AddrBaseIndex EABaseRip EAIndexNone imm From git at git.haskell.org Thu Dec 27 16:59:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:39 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: fixing some bad bugs (a1223a9) Message-ID: <20181227165939.F20D93ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/a1223a931210921aaba003ffe6d5c7bdf5e446c8/ghc >--------------------------------------------------------------- commit a1223a931210921aaba003ffe6d5c7bdf5e446c8 Author: Carter Tazio Schonwald Date: Fri Dec 21 19:30:50 2018 -0500 fixing some bad bugs >--------------------------------------------------------------- a1223a931210921aaba003ffe6d5c7bdf5e446c8 compiler/nativeGen/X86/Regs.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs index 4c667c6..ef55d18 100644 --- a/compiler/nativeGen/X86/Regs.hs +++ b/compiler/nativeGen/X86/Regs.hs @@ -205,6 +205,8 @@ spRel dflags n firstxmm :: RegNo firstxmm = 16 + +-- on 32bit platformOSs, only the first 8 XMM/YMM/ZMM registers are available lastxmm :: Platform -> RegNo lastxmm platform | target32Bit platform = firstxmm + 7 -- xmm0 - xmmm7 @@ -254,9 +256,8 @@ classOfRealReg platform reg -- | Get the name of the register with this number. showReg :: Platform -> RegNo -> String showReg platform n - | n >= firstxmm = "%xmm" ++ show (n-firstxmm) - - | n >= 8 = "%r" ++ show n + | n >= firstxmm && n <= lastxmm platform = "%xmm" ++ show (n-firstxmm) + | n >= 8 && n < firstxmm = "%r" ++ show n | otherwise = regNames platform A.! n regNames :: Platform -> A.Array Int String From git at git.haskell.org Thu Dec 27 16:59:43 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:43 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: a whole pile of little fixes. Also need to keep *just* enough x87 support around that c calling convention support still works (1887acf) Message-ID: <20181227165943.0490E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/1887acf010a4d00ed91be4a1a8fbdeb29b08a577/ghc >--------------------------------------------------------------- commit 1887acf010a4d00ed91be4a1a8fbdeb29b08a577 Author: Carter Tazio Schonwald Date: Fri Dec 21 17:02:02 2018 -0500 a whole pile of little fixes. Also need to keep *just* enough x87 support around that c calling convention support still works >--------------------------------------------------------------- 1887acf010a4d00ed91be4a1a8fbdeb29b08a577 compiler/llvmGen/LlvmCodeGen/Base.hs | 1 - compiler/nativeGen/PPC/Ppr.hs | 2 +- compiler/nativeGen/SPARC/Ppr.hs | 2 +- compiler/nativeGen/X86/CodeGen.hs | 27 ++++---- compiler/nativeGen/X86/Instr.hs | 121 +---------------------------------- compiler/nativeGen/X86/Ppr.hs | 36 ++--------- compiler/nativeGen/X86/RegInfo.hs | 2 +- compiler/nativeGen/X86/Regs.hs | 10 +-- compiler/types/TyCon.hs | 4 +- includes/CodeGen.Platform.hs | 102 ++++++++++++++--------------- 10 files changed, 77 insertions(+), 230 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1887acf010a4d00ed91be4a1a8fbdeb29b08a577 From git at git.haskell.org Thu Dec 27 16:59:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:45 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: simplify some logic in x86/codegen.hs that now seems redundant (8839ed6) Message-ID: <20181227165945.F27EA3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/8839ed6afc3647bdc175da10da32757563ec261d/ghc >--------------------------------------------------------------- commit 8839ed6afc3647bdc175da10da32757563ec261d Author: Carter Tazio Schonwald Date: Sat Dec 22 12:36:51 2018 -0500 simplify some logic in x86/codegen.hs that now seems redundant >--------------------------------------------------------------- 8839ed6afc3647bdc175da10da32757563ec261d compiler/nativeGen/X86/CodeGen.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 353f293..e9ffa03 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -1244,10 +1244,7 @@ getNonClobberedOperand (CmmLoad mem pk) = do is32Bit <- is32BitPlatform -- this logic could be simplified -- TODO FIXME - if (not (isFloatType pk) || use_sse2) - -- should evaluate to True always because use_sse2 is always true - -- so (not _ )|| True == true - && (if is32Bit then not (isWord64 pk) else True) + if (if is32Bit then not (isWord64 pk) else True) -- if 32bit and pk is at float/double/simd value -- or if 64bit -- this could use some eyeballs or i'll need to stare at it more later @@ -2492,7 +2489,7 @@ genCCall32' dflags target dest_regs args = do roundTo a x | x `mod` a == 0 = x | otherwise = x + a - (x `mod` a) - push_arg :: CmmActual {-current argument-} + push_arg :: CmmActual {-current argument-} -> NatM InstrBlock -- code push_arg arg -- we don't need the hints on x86 From git at git.haskell.org Thu Dec 27 16:59:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:48 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: remove some dead booleans (3570530) Message-ID: <20181227165948.F0E8F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/35705309dd4dbd115a00d88fbea630fbb639aa3e/ghc >--------------------------------------------------------------- commit 35705309dd4dbd115a00d88fbea630fbb639aa3e Author: Carter Tazio Schonwald Date: Fri Dec 21 22:15:15 2018 -0500 remove some dead booleans >--------------------------------------------------------------- 35705309dd4dbd115a00d88fbea630fbb639aa3e compiler/nativeGen/X86/CodeGen.hs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index cdd514f..353f293 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -632,7 +632,6 @@ getRegister' _ is32Bit (CmmMachOp (MO_Add W64) [CmmReg (CmmGlobal PicBaseReg), LEA II64 (OpAddr (ripRel (litToImm displacement))) (OpReg dst)) getRegister' dflags is32Bit (CmmMachOp mop [x]) = do -- unary MachOps - sse2 <- return True case mop of MO_F_Neg w -> sse2NegCode w x @@ -765,7 +764,6 @@ getRegister' dflags is32Bit (CmmMachOp mop [x]) = do -- unary MachOps getRegister' _ is32Bit (CmmMachOp mop [x, y]) = do -- dyadic MachOps - sse2 <- return True case mop of MO_F_Eq _ -> condFltReg is32Bit EQQ x y MO_F_Ne _ -> condFltReg is32Bit NE x y @@ -1244,7 +1242,6 @@ getNonClobberedOperand (CmmLit lit) = do getNonClobberedOperand (CmmLoad mem pk) = do is32Bit <- is32BitPlatform - use_sse2 <- return True -- this logic could be simplified -- TODO FIXME if (not (isFloatType pk) || use_sse2) @@ -1639,7 +1636,6 @@ assignMem_FltCode pk addr src = do -- Floating point assignment to a register/temporary assignReg_FltCode _ reg src = do - use_sse2 <- sse2Enabled src_code <- getAnyReg src dflags <- getDynFlags let platform = targetPlatform dflags @@ -2127,7 +2123,6 @@ genCCall dflags is32Bit (PrimTarget (MO_AtomicRMW width amop)) else getSimpleAmode dflags is32Bit addr -- See genCCall for MO_Cmpxchg arg <- getNewRegNat format arg_code <- getAnyReg n - use_sse2 <- return True let platform = targetPlatform dflags dst_r = getRegisterReg platform (CmmLocal dst) code <- op_code dst_r arg amode @@ -2217,7 +2212,6 @@ genCCall dflags is32Bit (PrimTarget (MO_Cmpxchg width)) [dst] [addr, old, new] _ genCCall _ is32Bit target dest_regs args bid = do dflags <- getDynFlags let platform = targetPlatform dflags - sse2 = True case (target, dest_regs) of -- void return type prim op (PrimTarget op, []) -> @@ -2405,8 +2399,7 @@ genCCall32' dflags target dest_regs args = do delta0 <- getDeltaNat setDeltaNat (delta0 - arg_pad_size) - use_sse2 <- return True - push_codes <- mapM (push_arg use_sse2) (reverse prom_args) + push_codes <- mapM push_arg (reverse prom_args) delta <- getDeltaNat MASSERT(delta == delta0 - tot_arg_size) @@ -2499,10 +2492,10 @@ genCCall32' dflags target dest_regs args = do roundTo a x | x `mod` a == 0 = x | otherwise = x + a - (x `mod` a) - push_arg :: Bool -> CmmActual {-current argument-} + push_arg :: CmmActual {-current argument-} -> NatM InstrBlock -- code - push_arg use_sse2 arg -- we don't need the hints on x86 + push_arg arg -- we don't need the hints on x86 | isWord64 arg_ty = do ChildCode64 code r_lo <- iselExpr64 arg delta <- getDeltaNat From git at git.haskell.org Thu Dec 27 16:59:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:51 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: i incorrectly changed the number of FP arg registers, which made the C abi call handling incorrect also remove some deadcode from SPARC (bcbd879) Message-ID: <20181227165951.EA4E23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/bcbd879d3e4f57e8d27e523adaa14e6442000ee1/ghc >--------------------------------------------------------------- commit bcbd879d3e4f57e8d27e523adaa14e6442000ee1 Author: Carter Tazio Schonwald Date: Sat Dec 22 12:21:30 2018 -0500 i incorrectly changed the number of FP arg registers, which made the C abi call handling incorrect also remove some deadcode from SPARC >--------------------------------------------------------------- bcbd879d3e4f57e8d27e523adaa14e6442000ee1 compiler/nativeGen/SPARC/Regs.hs | 2 -- compiler/nativeGen/X86/Regs.hs | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs index d6aadba..0d7edc3 100644 --- a/compiler/nativeGen/SPARC/Regs.hs +++ b/compiler/nativeGen/SPARC/Regs.hs @@ -104,7 +104,6 @@ virtualRegSqueeze cls vr VirtualRegD{} -> 1 _other -> 0 - _other -> 0 {-# INLINE realRegSqueeze #-} realRegSqueeze :: RegClass -> RealReg -> Int @@ -135,7 +134,6 @@ realRegSqueeze cls rr RealRegPair{} -> 1 - _other -> 0 -- | All the allocatable registers in the machine, -- including register pairs. diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs index 14870b4..dc0996a 100644 --- a/compiler/nativeGen/X86/Regs.hs +++ b/compiler/nativeGen/X86/Regs.hs @@ -412,11 +412,16 @@ allIntArgRegs platform = panic "X86.Regs.allIntArgRegs: not defined for this platform" | otherwise = [rdi,rsi,rdx,rcx,r8,r9] + +-- | on 64bit platforms we pass the first 8 float/double arguments +-- in the xmm registers. allFPArgRegs :: Platform -> [Reg] allFPArgRegs platform | platformOS platform == OSMinGW32 = panic "X86.Regs.allFPArgRegs: not defined for this platform" - | otherwise = map regSingle [firstxmm .. lastxmm platform] + | otherwise = map regSingle [firstxmm .. firstxmm + 7 ] + + -- Machine registers which might be clobbered by instructions that -- generate results into fixed registers, or need arguments in a fixed From git at git.haskell.org Thu Dec 27 16:59:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:54 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: hopefully done debugging registers (db31fea) Message-ID: <20181227165954.E47533ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/db31fea2db6f3ff2a2e80a4832db6d88e6928845/ghc >--------------------------------------------------------------- commit db31fea2db6f3ff2a2e80a4832db6d88e6928845 Author: Carter Tazio Schonwald Date: Fri Dec 21 20:41:41 2018 -0500 hopefully done debugging registers >--------------------------------------------------------------- db31fea2db6f3ff2a2e80a4832db6d88e6928845 compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs | 5 +---- compiler/nativeGen/X86/Ppr.hs | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs index 07b0e56..61e654f 100644 --- a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs @@ -39,15 +39,12 @@ getFreeRegs platform cls (FreeRegs f) = go f 0 | n .&. 1 /= 0 && classOfRealReg platform (RealRegSingle m) == cls = RealRegSingle m : (go (n `shiftR` 1) $! (m+1)) - | m > finalRegister = [] - | otherwise = go (n `shiftR` 1) $! (m+1) -- ToDo: there's no point looking through all the integer registers -- in order to find a floating-point one. - -- Because they're seperate subintervals. A problem for another day. - finalRegister = lastxmm platform + allocateReg :: RealReg -> FreeRegs -> FreeRegs allocateReg (RealRegSingle r) (FreeRegs f) diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 926868a..91196b2 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -412,6 +412,7 @@ ppr_reg_float i = case i of 16 -> sLit "%xmm0" ; 17 -> sLit "%xmm1" 18 -> sLit "%xmm2" ; 19 -> sLit "%xmm3" 20 -> sLit "%xmm4" ; 21 -> sLit "%xmm5" + 22 -> sLit "%xmm6" ; 23 -> sLit "%xmm7" 24 -> sLit "%xmm8" ; 25 -> sLit "%xmm9" 26 -> sLit "%xmm10"; 27 -> sLit "%xmm11" 28 -> sLit "%xmm12"; 29 -> sLit "%xmm13" From git at git.haskell.org Thu Dec 27 16:59:57 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 16:59:57 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: the trig x87 pretty printing code seems dead (b038f65) Message-ID: <20181227165957.DFD073ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/b038f65b7a6557a8779bc8c649dd52497ca8588d/ghc >--------------------------------------------------------------- commit b038f65b7a6557a8779bc8c649dd52497ca8588d Author: Carter Tazio Schonwald Date: Fri Dec 21 21:21:22 2018 -0500 the trig x87 pretty printing code seems dead >--------------------------------------------------------------- b038f65b7a6557a8779bc8c649dd52497ca8588d compiler/nativeGen/X86/Ppr.hs | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 91196b2..097ef23 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -865,50 +865,9 @@ pprInstr (CMPXCHG format src dst) = pprFormatOpOp (sLit "cmpxchg") format src dst -pprTrigOp :: String -> Bool -> CLabel -> CLabel - -> Reg -> Reg -> Format -> SDoc -pprTrigOp op -- fsin, fcos or fptan - isTan -- we need a couple of extra steps if we're doing tan - l1 l2 -- internal labels for us to use - src dst fmt - = -- We'll be needing %eax later on - hcat [gtab, text "pushl %eax;"] $$ - -- tan is going to use an extra space on the FP stack - (if isTan then hcat [gtab, text "ffree %st(6)"] else empty) $$ - -- First put the value in %st(0) and try to apply the op to it - hcat [gpush src 0, text ("; " ++ op)] $$ - -- Now look to see if C2 was set (overflow, |value| >= 2^63) - hcat [gtab, text "fnstsw %ax"] $$ - hcat [gtab, text "test $0x400,%eax"] $$ - -- If we were in bounds then jump to the end - hcat [gtab, text "je " <> ppr l1] $$ - -- Otherwise we need to shrink the value. Start by - -- loading pi, doubleing it (by adding it to itself), - -- and then swapping pi with the value, so the value we - -- want to apply op to is in %st(0) again - hcat [gtab, text "ffree %st(7); fldpi"] $$ - hcat [gtab, text "fadd %st(0),%st"] $$ - hcat [gtab, text "fxch %st(1)"] $$ - -- Now we have a loop in which we make the value smaller, - -- see if it's small enough, and loop if not - (ppr l2 <> char ':') $$ - hcat [gtab, text "fprem1"] $$ - -- My Debian libc uses fstsw here for the tan code, but I can't - -- see any reason why it should need to be different for tan. - hcat [gtab, text "fnstsw %ax"] $$ - hcat [gtab, text "test $0x400,%eax"] $$ - hcat [gtab, text "jne " <> ppr l2] $$ - hcat [gtab, text "fstp %st(1)"] $$ - hcat [gtab, text op] $$ - (ppr l1 <> char ':') $$ - -- Pop the 1.0 tan gave us - (if isTan then hcat [gtab, text "fstp %st(0)"] else empty) $$ - -- Restore %eax - hcat [gtab, text "popl %eax;"] $$ - -- And finally make the result the right size - hcat [gtab, gcoerceto fmt, gpop dst 1] -------------------------- +-- some left over -- coerce %st(0) to the specified size gcoerceto :: Format -> SDoc From git at git.haskell.org Thu Dec 27 17:00:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:00 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: trim spurious white space i accidentally added (b370285) Message-ID: <20181227170000.DBAFE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/b370285e8c9c8eba9b3ab9da7d3a0892487ed2ef/ghc >--------------------------------------------------------------- commit b370285e8c9c8eba9b3ab9da7d3a0892487ed2ef Author: Carter Tazio Schonwald Date: Fri Dec 21 20:58:19 2018 -0500 trim spurious white space i accidentally added >--------------------------------------------------------------- b370285e8c9c8eba9b3ab9da7d3a0892487ed2ef compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs index 61e654f..3a6e340 100644 --- a/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs @@ -44,8 +44,6 @@ getFreeRegs platform cls (FreeRegs f) = go f 0 -- ToDo: there's no point looking through all the integer registers -- in order to find a floating-point one. - - allocateReg :: RealReg -> FreeRegs -> FreeRegs allocateReg (RealRegSingle r) (FreeRegs f) = FreeRegs (f .&. complement (1 `shiftL` r)) From git at git.haskell.org Thu Dec 27 17:00:03 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:03 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: remove unreachable cases in the Sparc pretty Printer (8812e99) Message-ID: <20181227170003.DD4E73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/8812e9991ccee42ccdf44176643b135f25c3c550/ghc >--------------------------------------------------------------- commit 8812e9991ccee42ccdf44176643b135f25c3c550 Author: Carter Tazio Schonwald Date: Sat Dec 22 12:58:14 2018 -0500 remove unreachable cases in the Sparc pretty Printer >--------------------------------------------------------------- 8812e9991ccee42ccdf44176643b135f25c3c550 compiler/nativeGen/SPARC/Ppr.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index 96fcfd5..a0655ff 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -225,7 +225,6 @@ pprFormat x II64 -> sLit "d" FF32 -> sLit "" FF64 -> sLit "d" - _ -> panic "SPARC.Ppr.pprFormat: no match") -- | Pretty print a format for an instruction suffix. @@ -240,7 +239,7 @@ pprStFormat x II64 -> sLit "x" FF32 -> sLit "" FF64 -> sLit "d" - _ -> panic "SPARC.Ppr.pprFormat: no match") + -- | Pretty print a condition code. From git at git.haskell.org Thu Dec 27 17:00:06 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:06 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: fix bad paren deletion (bedd77a) Message-ID: <20181227170006.D88183ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/bedd77aa73af01229eb1de0e478a1dcf73bcc361/ghc >--------------------------------------------------------------- commit bedd77aa73af01229eb1de0e478a1dcf73bcc361 Author: Carter Tazio Schonwald Date: Sat Dec 22 13:03:15 2018 -0500 fix bad paren deletion >--------------------------------------------------------------- bedd77aa73af01229eb1de0e478a1dcf73bcc361 compiler/nativeGen/SPARC/Ppr.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index a0655ff..dbd31a2 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -224,7 +224,7 @@ pprFormat x II32 -> sLit "" II64 -> sLit "d" FF32 -> sLit "" - FF64 -> sLit "d" + FF64 -> sLit "d") -- | Pretty print a format for an instruction suffix. @@ -238,7 +238,7 @@ pprStFormat x II32 -> sLit "" II64 -> sLit "x" FF32 -> sLit "" - FF64 -> sLit "d" + FF64 -> sLit "d") From git at git.haskell.org Thu Dec 27 17:00:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:09 +0000 (UTC) Subject: [commit: ghc] wip/carter/remove_x87Registers: test fix for 32bit :) (a1b1ba3) Message-ID: <20181227170009.D1EF33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/carter/remove_x87Registers Link : http://ghc.haskell.org/trac/ghc/changeset/a1b1ba3fc271f0fd6898e2ae3941653369d0b851/ghc >--------------------------------------------------------------- commit a1b1ba3fc271f0fd6898e2ae3941653369d0b851 Author: Carter Tazio Schonwald Date: Sat Dec 22 18:05:20 2018 -0500 test fix for 32bit :) >--------------------------------------------------------------- a1b1ba3fc271f0fd6898e2ae3941653369d0b851 compiler/cmm/CmmCallConv.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs index f0b7e8c..b4d75fd 100644 --- a/compiler/cmm/CmmCallConv.hs +++ b/compiler/cmm/CmmCallConv.hs @@ -102,7 +102,7 @@ assignArgumentsPos dflags off conv arg_ty reps = (stk_off, assignments) passFloatArgsInXmm :: DynFlags -> Bool passFloatArgsInXmm dflags = case platformArch (targetPlatform dflags) of ArchX86_64 -> True - ArchX86 -> True + ArchX86 -> False -- _ -> False -- We used to spill vector registers to the stack since the LLVM backend didn't From git at git.haskell.org Thu Dec 27 17:00:12 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:12 +0000 (UTC) Subject: [commit: ghc] wip/llvm-th-tests-broken: testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours (1c229de) Message-ID: <20181227170012.D59C83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/llvm-th-tests-broken Link : http://ghc.haskell.org/trac/ghc/changeset/1c229def93ad4d44e5d24644be94ea7faf4946f1/ghc >--------------------------------------------------------------- commit 1c229def93ad4d44e5d24644be94ea7faf4946f1 Author: Ben Gamari Date: Sun Dec 23 02:24:17 2018 -0500 testsuite: Mark th tests as broken in ext-interp way in LLVM build flavours This is due to the failures documented in #16087. The condition here could be improved as it matches on `BUILD_FLAVOUR` instead of looking at the compiler flags. However, it's better than nothing and I hope we will be able to fix these issues before long. >--------------------------------------------------------------- 1c229def93ad4d44e5d24644be94ea7faf4946f1 hadrian/src/Settings/Builders/RunTest.hs | 4 ++++ testsuite/mk/test.mk | 7 +++++++ testsuite/tests/th/all.T | 2 ++ 3 files changed, 13 insertions(+) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 8312592..908668b 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -83,6 +83,9 @@ runTestBuilderArgs = builder RunTest ? do timeoutProg <- expr buildRoot <&> (-/- timeoutPath) integerLib <- expr (integerLibrary flav) + -- See #16087 + let ghcBuiltByLlvm = False -- TODO: Implement this check + let asZeroOne s b = s ++ zeroOne b -- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD @@ -112,6 +115,7 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic , arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib) + , arg "-e", arg $ "config.ghc_built_by_llvm=" ++ show ghcBuiltByLlvm -- Use default value, see: -- https://github.com/ghc/ghc/blob/master/testsuite/mk/boilerplate.mk diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index 1bac4fd..cead469 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -240,6 +240,13 @@ else RUNTEST_OPTS += -e config.local=True endif +# Some tests in ext-interp fail when ghc-stage2 is built using LLVM. See #16087 +ifeq "$(findstring llvm,$(BUILD_FLAVOUR))" "" +RUNTEST_OPTS += -e config.ghc_built_by_llvm=False +else +RUNTEST_OPTS += -e config.ghc_built_by_llvm=True +endif + RUNTEST_OPTS += -e 'config.integer_backend="$(INTEGER_LIBRARY)"' RUNTEST_OPTS += \ diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 96c7e1e..1bea110 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -12,6 +12,8 @@ setTestOpts(req_interp) if config.have_ext_interp : setTestOpts(extra_ways(['ext-interp'])) setTestOpts(only_ways(['normal','ghci','ext-interp'])) + if config.ghc_built_by_llvm: + setTestOpts(expect_broken_for(16087, ['ext-interp'])) test('TH_mkName', normal, compile, ['-v0']) test('TH_overloadedlabels', normal, compile, ['-v0']) From git at git.haskell.org Thu Dec 27 17:00:15 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:15 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-ci: Revert "Windows: Use the "big" PE object format on amd64" (c682701) Message-ID: <20181227170015.AA9943ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-ci Link : http://ghc.haskell.org/trac/ghc/changeset/c68270119b7f215a6d7f30fc020856fa94056dc3/ghc >--------------------------------------------------------------- commit c68270119b7f215a6d7f30fc020856fa94056dc3 Author: Ben Gamari Date: Sun Dec 23 20:09:30 2018 -0500 Revert "Windows: Use the "big" PE object format on amd64" This ended up breaking GHCi due to alignment issues. See #16071. This reverts commit ed86e3b531322f74d2c2d00d7ff8662b08fabde6. >--------------------------------------------------------------- c68270119b7f215a6d7f30fc020856fa94056dc3 compiler/main/DriverPipeline.hs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 6d2e5b7..92e3455 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1337,11 +1337,6 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags - -- See Note [Produce big objects on Windows] - ++ [ SysTools.Option "-Wa,-mbig-obj" - | platformOS (targetPlatform dflags) == OSMinGW32 - , not $ target32Bit (targetPlatform dflags) - ] -- We only support SparcV9 and better because V8 lacks an atomic CAS -- instruction so we have to make sure that the assembler accepts the @@ -2154,32 +2149,6 @@ generateMacros prefix name version = -- --------------------------------------------------------------------------- -- join object files into a single relocatable object file, using ld -r -{- -Note [Produce big objects on Windows] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Windows Portable Executable object format has a limit of 32k sections, which -we tend to blow through pretty easily. Thankfully, there is a "big object" -extension, which raises this limit to 2^32. However, it must be explicitly -enabled in the toolchain: - - * the assembler accepts the -mbig-obj flag, which causes it to produce a - bigobj-enabled COFF object. - - * the linker accepts the --oformat pe-bigobj-x86-64 flag. Despite what the name - suggests, this tells the linker to produce a bigobj-enabled COFF object, no a - PE executable. - -We must enable bigobj output in a few places: - - * When merging object files (DriverPipeline.joinObjectFiles) - - * When assembling (DriverPipeline.runPhase (RealPhase As ...)) - -Unfortunately the big object format is not supported on 32-bit targets so -none of this can be used in that case. --} - joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO () joinObjectFiles dflags o_files output_fn = do let mySettings = settings dflags @@ -2189,7 +2158,7 @@ joinObjectFiles dflags o_files output_fn = do SysTools.Option "-nostdlib", SysTools.Option "-Wl,-r" ] - -- See Note [No PIE while linking] in DynFlags + -- See Note [No PIE while linking] in SysTools ++ (if sGccSupportsNoPie mySettings then [SysTools.Option "-no-pie"] else []) @@ -2208,11 +2177,6 @@ joinObjectFiles dflags o_files output_fn = do && ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] else []) - -- See Note [Produce big objects on Windows] - ++ [ SysTools.Option "-Wl,--oformat,pe-bigobj-x86-64" - | OSMinGW32 == osInfo - , not $ target32Bit (targetPlatform dflags) - ] ++ map SysTools.Option ld_build_id ++ [ SysTools.Option "-o", SysTools.FileOption "" output_fn ] From git at git.haskell.org Thu Dec 27 17:00:18 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:18 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: testsuite: Mark tests depending upon integer-gmp as such (742df54) Message-ID: <20181227170018.A56EB3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/742df54e6896e8b2edd83f2f51faa7081f925970/ghc >--------------------------------------------------------------- commit 742df54e6896e8b2edd83f2f51faa7081f925970 Author: Ben Gamari Date: Sun Dec 23 12:22:54 2018 -0500 testsuite: Mark tests depending upon integer-gmp as such Several of these expect to see Core coming from integer-gmp, which breaks with integer-simple. In service of fixing #16043. >--------------------------------------------------------------- 742df54e6896e8b2edd83f2f51faa7081f925970 testsuite/tests/numeric/should_compile/all.T | 5 +++-- testsuite/tests/perf/space_leaks/all.T | 3 ++- testsuite/tests/rename/should_compile/T3103/test.T | 2 +- testsuite/tests/safeHaskell/check/pkg01/all.T | 3 ++- testsuite/tests/simplCore/should_run/all.T | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T index 5011627..6177c66 100644 --- a/testsuite/tests/numeric/should_compile/all.T +++ b/testsuite/tests/numeric/should_compile/all.T @@ -1,6 +1,7 @@ test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116']) -test('T14170', normal, run_command, ['$MAKE -s --no-print-directory T14170']) -test('T14465', normal, run_command, ['$MAKE -s --no-print-directory T14465']) +# These test Core output that depends upon integer-gmp +test('T14170', reqlib("integer-gmp"), run_command, ['$MAKE -s --no-print-directory T14170']) +test('T14465', reqlib("integer-gmp"), run_command, ['$MAKE -s --no-print-directory T14465']) test('T7895', normal, compile, ['']) test('T7881', normal, compile, ['']) # For T8542, the hpc way adds extra annotations that prevent diff --git a/testsuite/tests/perf/space_leaks/all.T b/testsuite/tests/perf/space_leaks/all.T index 1f69d12..cde592b 100644 --- a/testsuite/tests/perf/space_leaks/all.T +++ b/testsuite/tests/perf/space_leaks/all.T @@ -5,7 +5,8 @@ test('space_leak_001', # 5% possible deviation. [collect_stats(['peak_megabytes_allocated','bytes allocated'],5), collect_stats('max_bytes_used',15), - omit_ways(['profasm','profthreaded','threaded1','threaded2']) + omit_ways(['profasm','profthreaded','threaded1','threaded2']), + reqlib('integer-gmp') ], compile_and_run, ['']) diff --git a/testsuite/tests/rename/should_compile/T3103/test.T b/testsuite/tests/rename/should_compile/T3103/test.T index 43f9fef..38406b0 100644 --- a/testsuite/tests/rename/should_compile/T3103/test.T +++ b/testsuite/tests/rename/should_compile/T3103/test.T @@ -1,5 +1,5 @@ # Args to vtc are: extra compile flags -test('T3103', [extra_files(['Foreign/', 'GHC/'])], multimod_compile, +test('T3103', [reqlib("integer-gmp"), extra_files(['Foreign/', 'GHC/'])], multimod_compile, ['Foreign.Ptr', '-v0 -hide-all-packages -package ghc-prim -package integer-gmp -this-unit-id base']) diff --git a/testsuite/tests/safeHaskell/check/pkg01/all.T b/testsuite/tests/safeHaskell/check/pkg01/all.T index 105ea5f..2b3d21a 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/all.T +++ b/testsuite/tests/safeHaskell/check/pkg01/all.T @@ -30,7 +30,8 @@ test('safePkg01', [extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']), normalise_errmsg_fun(ignoreLdOutput, normalise_errmsg), normalise_version("array", "integer-gmp", "integer-simple", "bytestring", - "base", "deepseq", "ghc-prim")], + "base", "deepseq", "ghc-prim"), + normalise_fun(normalise_errmsg)], run_command, ['$MAKE -s --no-print-directory safePkg01 ' + make_args]) # Fail since we enable package trust diff --git a/testsuite/tests/simplCore/should_run/all.T b/testsuite/tests/simplCore/should_run/all.T index a9edee2..0a74c62 100644 --- a/testsuite/tests/simplCore/should_run/all.T +++ b/testsuite/tests/simplCore/should_run/all.T @@ -46,7 +46,8 @@ test('T3972', [], compile_and_run, ['']) test('T5315', normal, compile_and_run, ['']) test('T5453', normal, compile_and_run, ['']) test('T5441', [], multimod_compile_and_run, ['T5441', '']) -test('T5603', normal, compile_and_run, ['']) +# This compares Core from integer-gmp +test('T5603', reqlib('integer-gmp'), compile_and_run, ['']) test('T2110', normal, compile_and_run, ['']) test('AmapCoerce', normal, compile_and_run, ['']) From git at git.haskell.org Thu Dec 27 17:00:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:21 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: testsuite: Mark arith011 as broken with integer-simple (094fb42) Message-ID: <20181227170021.9FA6E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec/ghc >--------------------------------------------------------------- commit 094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec Author: Ben Gamari Date: Sun Dec 23 12:18:57 2018 -0500 testsuite: Mark arith011 as broken with integer-simple As noted in #16091, arith011 fails when run against integer-simple with a "divide by zero" exception. This suggests that integer-gmp and integer-simple are handling division by zero differently. >--------------------------------------------------------------- 094fb42b33edd7b4a2fb2a8ce3c04cbff2d6bbec testsuite/driver/testlib.py | 7 ++++++- testsuite/tests/numeric/should_run/all.T | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index f26f9e0..b04ecf3 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -460,8 +460,13 @@ def have_gdb( ): def have_readelf( ): return config.have_readelf +def using_integer_backend(backend): + """ A predicate to test which integer backend we are using. """ + assert backend in ["integer-gmp", "integer-simple"] + return config.integer_backend == backend + # Many tests sadly break with integer-simple due to GHCi's ignorance of it. -broken_without_gmp = when(config.integer_backend != "integer-gmp", +broken_without_gmp = when(not(using_integer_backend("integer-gmp")), expect_broken(16043)) # --- diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T index 295e818..ab05048 100644 --- a/testsuite/tests/numeric/should_run/all.T +++ b/testsuite/tests/numeric/should_run/all.T @@ -20,7 +20,9 @@ test('arith008', normal, compile_and_run, [opts]) test('arith009', normal, compile_and_run, ['']) test('arith010', normal, compile_and_run, ['']) -test('arith011', normal, compile_and_run, ['']) +test('arith011', + when(using_integer_backend("integer-simple"), expect_broken(16091)), + compile_and_run, ['']) test('arith012', normal, compile_and_run, [opts]) From git at git.haskell.org Thu Dec 27 17:00:24 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:24 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: testsuite: Increase runtime timeout multiplier of T11627a with integer-simple (c9723b8) Message-ID: <20181227170024.A00363ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/c9723b8fddad5d8f47af48ba76c5f355de7180d9/ghc >--------------------------------------------------------------- commit c9723b8fddad5d8f47af48ba76c5f355de7180d9 Author: Ben Gamari Date: Sun Dec 23 12:40:29 2018 -0500 testsuite: Increase runtime timeout multiplier of T11627a with integer-simple I previously saw that T11627a timed out in all profiling ways when run against integer-simple. I suspect this is due to integer-simple's rather verbose heap representation. Let's see whether increasing the runtime timeout helps. Fixes test for #11627. >--------------------------------------------------------------- c9723b8fddad5d8f47af48ba76c5f355de7180d9 testsuite/tests/profiling/should_run/all.T | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 050287e..1e72e94 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -115,7 +115,11 @@ test('T5363', [], compile_and_run, ['']) test('profinline001', [], compile_and_run, ['']) -test('T11627a', [ extra_ways(extra_prof_ways) +test('T11627a', [ extra_ways(extra_prof_ways), + # integer-simple has an extremely large representation and + # consequently needs more time + when(using_integer_backend('integer-simple'), + run_timeout_multiplier(3)) ], compile_and_run, ['']) From git at git.haskell.org Thu Dec 27 17:00:27 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:27 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: testsuite: Fix broken_without_gmp (1b2b6e5) Message-ID: <20181227170027.A0CBA3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/1b2b6e52a30f57d9f27c74093612cf52795a2c6c/ghc >--------------------------------------------------------------- commit 1b2b6e52a30f57d9f27c74093612cf52795a2c6c Author: Ben Gamari Date: Sun Dec 23 06:34:00 2018 +0000 testsuite: Fix broken_without_gmp The lack of types made the previous failure silent, sadly. Improves situation of #16043. >--------------------------------------------------------------- 1b2b6e52a30f57d9f27c74093612cf52795a2c6c testsuite/driver/testlib.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 1c6668d..f26f9e0 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -213,11 +213,6 @@ def record_broken(name, opts, bug): if not me in brokens: brokens.append(me) -def broken_without_gmp(name, opts): - # Many tests sadly break with integer-simple due to GHCi's ignorance of it. - when(config.integer_backend != "integer-gmp", - expect_broken(16043)) - def _expect_pass(way): # Helper function. Not intended for use in .T files. opts = getTestOpts() @@ -465,6 +460,10 @@ def have_gdb( ): def have_readelf( ): return config.have_readelf +# Many tests sadly break with integer-simple due to GHCi's ignorance of it. +broken_without_gmp = when(config.integer_backend != "integer-gmp", + expect_broken(16043)) + # --- def high_memory_usage(name, opts): From git at git.haskell.org Thu Dec 27 17:00:30 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:30 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: ghc-compact: Use Char instead of Integer in compact_share test (5dfe989) Message-ID: <20181227170030.A66393ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/5dfe989ff19a8a17eb51166e54409c8c3e38b166/ghc >--------------------------------------------------------------- commit 5dfe989ff19a8a17eb51166e54409c8c3e38b166 Author: Ben Gamari Date: Sun Dec 23 12:33:12 2018 -0500 ghc-compact: Use Char instead of Integer in compact_share test The representation of Integer depends upon the choice of integer backend whereas Char should be consistent. >--------------------------------------------------------------- 5dfe989ff19a8a17eb51166e54409c8c3e38b166 libraries/ghc-compact/tests/compact_share.hs | 5 +++-- libraries/ghc-compact/tests/compact_share.stdout-ws-64 | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libraries/ghc-compact/tests/compact_share.hs b/libraries/ghc-compact/tests/compact_share.hs index 323c179..5dd279c 100644 --- a/libraries/ghc-compact/tests/compact_share.hs +++ b/libraries/ghc-compact/tests/compact_share.hs @@ -1,9 +1,10 @@ +import Data.Char import GHC.Compact import qualified Data.Map as Map main = do - let m1 = Map.fromList [(x,show x) | x <- [1..(10000::Integer)]] - m2 = Map.fromList [(x,y) | x <- [1..(10000::Integer)], + let m1 = Map.fromList [(x,show x) | x <- ['a'..chr 10000]] + m2 = Map.fromList [(x,y) | x <- ['a'..chr 10000], Just y <- [Map.lookup x m1]] c <- compact (m1,m2) print (length (show (getCompact c))) diff --git a/libraries/ghc-compact/tests/compact_share.stdout-ws-64 b/libraries/ghc-compact/tests/compact_share.stdout-ws-64 index 0969fdf..fffe208 100644 --- a/libraries/ghc-compact/tests/compact_share.stdout-ws-64 +++ b/libraries/ghc-compact/tests/compact_share.stdout-ws-64 @@ -1,4 +1,4 @@ -275599 -3801088 -275599 -2228224 +411963 +5177344 +411963 +2686976 From git at git.haskell.org Thu Dec 27 17:00:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:33 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: testsuite: Enable T11627a on Darwin (3d21120) Message-ID: <20181227170033.A26C53ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/3d21120203cef0ce9fddb0f6f2f4a7691f3a5c43/ghc >--------------------------------------------------------------- commit 3d21120203cef0ce9fddb0f6f2f4a7691f3a5c43 Author: Ben Gamari Date: Sun Dec 23 12:36:50 2018 -0500 testsuite: Enable T11627a on Darwin The retainer profiler no longer uses the C stack for its mark stack (#14758). Consequently even the small C stack provided on Darwin should be sufficient to run this test. See #11627 >--------------------------------------------------------------- 3d21120203cef0ce9fddb0f6f2f4a7691f3a5c43 testsuite/tests/profiling/should_run/all.T | 3 --- 1 file changed, 3 deletions(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index c3d34af..050287e 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -115,10 +115,7 @@ test('T5363', [], compile_and_run, ['']) test('profinline001', [], compile_and_run, ['']) -# Skip T11627a and T11627b on Darwin as it tends to give us a very small stack -# which the retainer profiler tends to overflow. See #15287 and #11627. test('T11627a', [ extra_ways(extra_prof_ways) - , when(opsys('darwin'), skip) ], compile_and_run, ['']) From git at git.haskell.org Thu Dec 27 17:00:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:36 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: Really fix it (fcf77d1) Message-ID: <20181227170036.A0B063ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/fcf77d161f2e793218dede83c5834ff4e9955e96/ghc >--------------------------------------------------------------- commit fcf77d161f2e793218dede83c5834ff4e9955e96 Author: Ben Gamari Date: Sun Dec 23 17:52:33 2018 -0500 Really fix it >--------------------------------------------------------------- fcf77d161f2e793218dede83c5834ff4e9955e96 testsuite/driver/testlib.py | 24 +++++++++++------------- testsuite/mk/test.mk | 2 -- testsuite/tests/numeric/should_run/all.T | 2 +- testsuite/tests/profiling/should_run/all.T | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index b04ecf3..e0d4e33 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -133,11 +133,12 @@ def stage1(name, opts): # Cache the results of looking to see if we have a library or not. # This makes quite a difference, especially on Windows. -have_lib = {} +have_lib_cache = {} -def _reqlib( name, opts, lib ): - if lib in have_lib: - got_it = have_lib[lib] +def have_library(lib): + """ Test whether the given library is available """ + if lib in have_lib_cache: + got_it = have_lib_cache[lib] else: cmd = strip_quotes(config.ghc_pkg) p = subprocess.Popen([cmd, '--no-user-package-db', 'describe', lib], @@ -149,9 +150,12 @@ def _reqlib( name, opts, lib ): p.communicate() r = p.wait() got_it = r == 0 - have_lib[lib] = got_it + have_lib_cache[lib] = got_it + + return got_it - if not got_it: +def _reqlib( name, opts, lib ): + if not have_library(lib): opts.expect = 'missing-lib' def req_haddock( name, opts ): @@ -460,14 +464,8 @@ def have_gdb( ): def have_readelf( ): return config.have_readelf -def using_integer_backend(backend): - """ A predicate to test which integer backend we are using. """ - assert backend in ["integer-gmp", "integer-simple"] - return config.integer_backend == backend - # Many tests sadly break with integer-simple due to GHCi's ignorance of it. -broken_without_gmp = when(not(using_integer_backend("integer-gmp")), - expect_broken(16043)) +broken_without_gmp = unless(have_library('integer-gmp'), expect_broken(16043)) # --- diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index cead469..a517698 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -247,8 +247,6 @@ else RUNTEST_OPTS += -e config.ghc_built_by_llvm=True endif -RUNTEST_OPTS += -e 'config.integer_backend="$(INTEGER_LIBRARY)"' - RUNTEST_OPTS += \ --rootdir=. \ --config-file=$(CONFIG) \ diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T index ab05048..9d996db 100644 --- a/testsuite/tests/numeric/should_run/all.T +++ b/testsuite/tests/numeric/should_run/all.T @@ -21,7 +21,7 @@ test('arith008', normal, compile_and_run, [opts]) test('arith009', normal, compile_and_run, ['']) test('arith010', normal, compile_and_run, ['']) test('arith011', - when(using_integer_backend("integer-simple"), expect_broken(16091)), + when(have_library("integer-simple"), expect_broken(16091)), compile_and_run, ['']) test('arith012', normal, compile_and_run, [opts]) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 1e72e94..b25cbe6 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -118,7 +118,7 @@ test('profinline001', [], compile_and_run, ['']) test('T11627a', [ extra_ways(extra_prof_ways), # integer-simple has an extremely large representation and # consequently needs more time - when(using_integer_backend('integer-simple'), + when(have_library('integer-simple'), run_timeout_multiplier(3)) ], compile_and_run, ['']) From git at git.haskell.org Thu Dec 27 17:00:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:39 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: Revert "hadrian: Pass integer_backend to testsuite driver" (cd1e1e2) Message-ID: <20181227170039.9A3213ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/cd1e1e2a744a96530bcdf0ff419ba522338d740b/ghc >--------------------------------------------------------------- commit cd1e1e2a744a96530bcdf0ff419ba522338d740b Author: Ben Gamari Date: Sun Dec 23 17:57:12 2018 -0500 Revert "hadrian: Pass integer_backend to testsuite driver" This reverts commit 442be690e1ca162e22d632df695c29f90625f33e. >--------------------------------------------------------------- cd1e1e2a744a96530bcdf0ff419ba522338d740b hadrian/src/Settings/Builders/RunTest.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 908668b..55a5e58 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -81,7 +81,6 @@ runTestBuilderArgs = builder RunTest ? do top <- expr $ topDirectory ghcFlags <- expr runTestGhcFlags timeoutProg <- expr buildRoot <&> (-/- timeoutPath) - integerLib <- expr (integerLibrary flav) -- See #16087 let ghcBuiltByLlvm = False -- TODO: Implement this check @@ -114,7 +113,6 @@ runTestBuilderArgs = builder RunTest ? do , arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault , arg "-e", arg $ "config.ghc_dynamic=" ++ show hasDynamic - , arg "-e", arg $ "config.integer_backend=" ++ show (pkgName integerLib) , arg "-e", arg $ "config.ghc_built_by_llvm=" ++ show ghcBuiltByLlvm -- Use default value, see: From git at git.haskell.org Thu Dec 27 17:00:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:42 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: Update T5095 output (acff728) Message-ID: <20181227170042.98E453ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/acff728477a033b6829e81fc8acc51d8a9151ca6/ghc >--------------------------------------------------------------- commit acff728477a033b6829e81fc8acc51d8a9151ca6 Author: Ben Gamari Date: Mon Dec 24 10:21:09 2018 -0500 Update T5095 output >--------------------------------------------------------------- acff728477a033b6829e81fc8acc51d8a9151ca6 testsuite/tests/typecheck/should_fail/T5095.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/typecheck/should_fail/T5095.stderr b/testsuite/tests/typecheck/should_fail/T5095.stderr index ace7e91..ccf791d 100644 --- a/testsuite/tests/typecheck/should_fail/T5095.stderr +++ b/testsuite/tests/typecheck/should_fail/T5095.stderr @@ -7,7 +7,7 @@ T5095.hs:9:9: error: instance Eq Integer -- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’ ...plus 23 others - ...plus 7 instances involving out-of-scope types + ...plus N instances involving out-of-scope types (use -fprint-potential-instances to see them all) (The choice depends on the instantiation of ‘a’ To pick the first instance above, use IncoherentInstances From git at git.haskell.org Thu Dec 27 17:00:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:45 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: fixup! testsuite: Increase runtime timeout multiplier of T11627a with integer-simple (08c6d75) Message-ID: <20181227170045.933483ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/08c6d7582f286fa392b2ddf22fc5f138c2e2c33e/ghc >--------------------------------------------------------------- commit 08c6d7582f286fa392b2ddf22fc5f138c2e2c33e Author: Ben Gamari Date: Mon Dec 24 10:23:42 2018 -0500 fixup! testsuite: Increase runtime timeout multiplier of T11627a with integer-simple >--------------------------------------------------------------- 08c6d7582f286fa392b2ddf22fc5f138c2e2c33e testsuite/tests/profiling/should_run/all.T | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index b25cbe6..968d678 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -117,9 +117,8 @@ test('profinline001', [], compile_and_run, ['']) test('T11627a', [ extra_ways(extra_prof_ways), # integer-simple has an extremely large representation and - # consequently needs more time - when(have_library('integer-simple'), - run_timeout_multiplier(3)) + # consequently needs significantly more time + when(have_library('integer-simple'), skip) ], compile_and_run, ['']) From git at git.haskell.org Thu Dec 27 17:00:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:48 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: Fix normaliser (cbf4aca) Message-ID: <20181227170048.932833ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/cbf4aca3996964eaeeb3822cf39f562fbec1b6a0/ghc >--------------------------------------------------------------- commit cbf4aca3996964eaeeb3822cf39f562fbec1b6a0 Author: Ben Gamari Date: Mon Dec 24 11:29:02 2018 -0500 Fix normaliser >--------------------------------------------------------------- cbf4aca3996964eaeeb3822cf39f562fbec1b6a0 testsuite/driver/testlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index e0d4e33..5f84863 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1747,7 +1747,7 @@ def normalise_errmsg( str ): # Error messages sometimes contain this blurb which can vary # spuriously depending upon build configuration (e.g. based on integer # backend) - str = re.sub('...plus [a-z]+ instances involving out-of-scope types', + str = re.sub('...plus ([a-z]+|[0-9]+) instances involving out-of-scope types', '...plus N instances involving out-of-scope types', str) # Also filter out bullet characters. This is because bullets are used to From git at git.haskell.org Thu Dec 27 17:00:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:51 +0000 (UTC) Subject: [commit: ghc] wip/fix-integer-simple-ci: Fix 32-bit allocations (99ab616) Message-ID: <20181227170051.A0F433ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-integer-simple-ci Link : http://ghc.haskell.org/trac/ghc/changeset/99ab61681d21f78139d619cf82a3c8909b0a2165/ghc >--------------------------------------------------------------- commit 99ab61681d21f78139d619cf82a3c8909b0a2165 Author: Ben Gamari Date: Mon Dec 24 13:37:21 2018 -0500 Fix 32-bit allocations >--------------------------------------------------------------- 99ab61681d21f78139d619cf82a3c8909b0a2165 libraries/ghc-compact/tests/compact_share.stdout-ws-32 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/ghc-compact/tests/compact_share.stdout-ws-32 b/libraries/ghc-compact/tests/compact_share.stdout-ws-32 index a6ac978..0f92940 100644 --- a/libraries/ghc-compact/tests/compact_share.stdout-ws-32 +++ b/libraries/ghc-compact/tests/compact_share.stdout-ws-32 @@ -1,4 +1,4 @@ -275599 -1900544 -275599 -1114112 +411963 +2588672 +411963 +1343488 From git at git.haskell.org Thu Dec 27 17:00:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:54 +0000 (UTC) Subject: [commit: ghc] wip/quick-validate-for-windows: gitlab-ci: Try only building Windows in the quick flavour (8c10e53) Message-ID: <20181227170054.9FC603ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/quick-validate-for-windows Link : http://ghc.haskell.org/trac/ghc/changeset/8c10e531c9431b32c7b43df5e013f7b4dce8a8c2/ghc >--------------------------------------------------------------- commit 8c10e531c9431b32c7b43df5e013f7b4dce8a8c2 Author: Ben Gamari Date: Tue Dec 25 05:12:40 2018 -0500 gitlab-ci: Try only building Windows in the quick flavour It seems no matter how many machines I throw at Windows it's constantly behind. Perhaps the quick build flavour will be fast enough to allow us to keep until while we sort out our toolchain issues. >--------------------------------------------------------------- 8c10e531c9431b32c7b43df5e013f7b4dce8a8c2 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25771c2..1feaab3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -361,6 +361,7 @@ validate-x86_64-windows: set MSYSTEM=MINGW64 python boot bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' + - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: From git at git.haskell.org Thu Dec 27 17:00:57 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:00:57 +0000 (UTC) Subject: [commit: ghc] wip/fix-windows-ci, wip/revert-windows-big-pe: Try using Tamar's binutils branch (cf76e25) Message-ID: <20181227170057.A48F83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/fix-windows-ci,wip/revert-windows-big-pe Link : http://ghc.haskell.org/trac/ghc/changeset/cf76e25321975ae519002de7bbd234fcb7c3ae25/ghc >--------------------------------------------------------------- commit cf76e25321975ae519002de7bbd234fcb7c3ae25 Author: Ben Gamari Date: Mon Dec 24 12:53:11 2018 -0500 Try using Tamar's binutils branch >--------------------------------------------------------------- cf76e25321975ae519002de7bbd234fcb7c3ae25 mk/get-win32-tarballs.sh | 7 ++++++- mk/win32-tarballs.md5sum | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index 32f2705..c0e5dd7 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -109,7 +109,12 @@ download_tarballs() { download_mingw "${format_url}-isl-0.18-1-any.pkg.tar.xz" download_mingw "${format_url}-mpfr-3.1.6-1-any.pkg.tar.xz" download_mingw "${format_url}-gmp-6.1.2-1-any.pkg.tar.xz" - download_mingw "${format_url}-binutils-2.29.1-1-any.pkg.tar.xz" + if test "$mingw_arch" = "x86_64"; then + # Try using Tamar's branch + download_mingw "${format_url}-binutils-git-2.25.r93824.012da41a23-1-any.pkg.tar.xz" + else + download_mingw "${format_url}-binutils-2.29.1-1-any.pkg.tar.xz" + fi download_mingw "${format_url}-libidn2-2.0.4-1-any.pkg.tar.xz" download_mingw "${format_url}-gcc-7.2.0-1-any.pkg.tar.xz" diff --git a/mk/win32-tarballs.md5sum b/mk/win32-tarballs.md5sum index 2c2d3df..ff155bc 100644 --- a/mk/win32-tarballs.md5sum +++ b/mk/win32-tarballs.md5sum @@ -37,3 +37,4 @@ d15495e807e2a87b917febedbfb3f5b3 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64- c5ffd1a27eb459242b46d76b066e557e ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-winpthreads-git-5.0.0.4850.d1662dc7-1-any.pkg.tar.xz 60c3a388478f411b7a0908441ebeb537 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-zlib-1.2.8-9-any.pkg.tar.xz b21d1681b61cf7a024e854096285b02e ghc-tarballs/perl/ghc-perl-1.tar.gz +aafbf4921f121d79ef57621bb80b4b51 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-binutils-git-2.25.r93824.012da41a23-1-any.pkg.tar.xz From git at git.haskell.org Thu Dec 27 17:01:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:00 +0000 (UTC) Subject: [commit: ghc] wip/fix-windows-ci, wip/revert-windows-big-pe: XXX: gitlab-ci: Always build Windows (dc20f82) Message-ID: <20181227170100.A16F43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/fix-windows-ci,wip/revert-windows-big-pe Link : http://ghc.haskell.org/trac/ghc/changeset/dc20f82cfa836092be630a6403845d442a93d641/ghc >--------------------------------------------------------------- commit dc20f82cfa836092be630a6403845d442a93d641 Author: Ben Gamari Date: Tue Dec 25 22:14:51 2018 -0500 XXX: gitlab-ci: Always build Windows >--------------------------------------------------------------- dc20f82cfa836092be630a6403845d442a93d641 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..06d7589 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -351,7 +351,7 @@ validate-x86_64-windows-hadrian: validate-x86_64-windows: extends: .validate-windows - stage: full-build + stage: build # due to #16084 allow_failure: true variables: From git at git.haskell.org Thu Dec 27 17:01:03 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:03 +0000 (UTC) Subject: [commit: ghc] wip/fix-windows-ci, wip/revert-windows-big-pe: get-win32-tarballs: Fix bash error handling logic (15fff5b) Message-ID: <20181227170103.A04B83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/fix-windows-ci,wip/revert-windows-big-pe Link : http://ghc.haskell.org/trac/ghc/changeset/15fff5bf6e6b5f72a33b02c31565be4afb6a7480/ghc >--------------------------------------------------------------- commit 15fff5bf6e6b5f72a33b02c31565be4afb6a7480 Author: Ben Gamari Date: Tue Dec 25 22:22:40 2018 -0500 get-win32-tarballs: Fix bash error handling logic Due to incorrect parentheses we would previously always download tarballs from both haskell.org and the upstream msys mirror. >--------------------------------------------------------------- 15fff5bf6e6b5f72a33b02c31565be4afb6a7480 mk/get-win32-tarballs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index c0e5dd7..b1f842f 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -37,7 +37,7 @@ download_file() { return else echo "Downloading ${description} to ${dest_dir}..." - $curl_cmd || echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk || { + $curl_cmd || (echo "Checking repo.msys2.org instead of Haskell.org..." && $curl_cmd_bnk) || { rm -f "${dest_file}" fail "ERROR: Download failed." exit 1 From git at git.haskell.org Thu Dec 27 17:01:06 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:06 +0000 (UTC) Subject: [commit: ghc] wip/revert-windows-big-pe: Revert "Windows: Use the "big" PE object format on amd64" (427bd01) Message-ID: <20181227170106.9C9663ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-windows-big-pe Link : http://ghc.haskell.org/trac/ghc/changeset/427bd016cbc9c286a3f2098df50a5b8e5d29065d/ghc >--------------------------------------------------------------- commit 427bd016cbc9c286a3f2098df50a5b8e5d29065d Author: Ben Gamari Date: Tue Dec 25 22:45:44 2018 -0500 Revert "Windows: Use the "big" PE object format on amd64" This reverts commit 1ef90f990da90036d481c830d8832e21b8f1571b. >--------------------------------------------------------------- 427bd016cbc9c286a3f2098df50a5b8e5d29065d compiler/main/DriverPipeline.hs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f1a5cb4..2cc24b9 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1344,11 +1344,6 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags - -- See Note [Produce big objects on Windows] - ++ [ SysTools.Option "-Wa,-mbig-obj" - | platformOS (targetPlatform dflags) == OSMinGW32 - , not $ target32Bit (targetPlatform dflags) - ] -- We only support SparcV9 and better because V8 lacks an atomic CAS -- instruction so we have to make sure that the assembler accepts the @@ -2162,32 +2157,6 @@ generateMacros prefix name version = -- --------------------------------------------------------------------------- -- join object files into a single relocatable object file, using ld -r -{- -Note [Produce big objects on Windows] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Windows Portable Executable object format has a limit of 32k sections, which -we tend to blow through pretty easily. Thankfully, there is a "big object" -extension, which raises this limit to 2^32. However, it must be explicitly -enabled in the toolchain: - - * the assembler accepts the -mbig-obj flag, which causes it to produce a - bigobj-enabled COFF object. - - * the linker accepts the --oformat pe-bigobj-x86-64 flag. Despite what the name - suggests, this tells the linker to produce a bigobj-enabled COFF object, no a - PE executable. - -We must enable bigobj output in a few places: - - * When merging object files (DriverPipeline.joinObjectFiles) - - * When assembling (DriverPipeline.runPhase (RealPhase As ...)) - -Unfortunately the big object format is not supported on 32-bit targets so -none of this can be used in that case. --} - joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO () joinObjectFiles dflags o_files output_fn = do let mySettings = settings dflags @@ -2197,7 +2166,7 @@ joinObjectFiles dflags o_files output_fn = do SysTools.Option "-nostdlib", SysTools.Option "-Wl,-r" ] - -- See Note [No PIE while linking] in DynFlags + -- See Note [No PIE while linking] in SysTools ++ (if sGccSupportsNoPie mySettings then [SysTools.Option "-no-pie"] else []) @@ -2216,11 +2185,6 @@ joinObjectFiles dflags o_files output_fn = do && ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] else []) - -- See Note [Produce big objects on Windows] - ++ [ SysTools.Option "-Wl,--oformat,pe-bigobj-x86-64" - | OSMinGW32 == osInfo - , not $ target32Bit (targetPlatform dflags) - ] ++ map SysTools.Option ld_build_id ++ [ SysTools.Option "-o", SysTools.FileOption "" output_fn ] From git at git.haskell.org Thu Dec 27 17:01:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:09 +0000 (UTC) Subject: [commit: ghc] master: aclocal.m4: drop obsolete -fno-stack-protector (29ecb52) Message-ID: <20181227170109.A34D43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/29ecb52033b951e09b6141aeb92460db2f4c3183/ghc >--------------------------------------------------------------- commit 29ecb52033b951e09b6141aeb92460db2f4c3183 Author: Sergei Trofimovich Date: Wed Dec 19 23:21:28 2018 +0000 aclocal.m4: drop obsolete -fno-stack-protector Summary: Initially -fno-stack-protector was added for openbsd specifically for ghc-6.5: changeset:f638fdfe1d9de1307355c8074fbff9c28342c0ef (2006) and later it was extended to cover osx: changeset:c2cd83e7d85c11e6a33e1cde263eb2312566d535 (2009) None of the reports hint at exact breakage. I guess both happened in -fvia-C mode where GHC's Evil Mangler had a chance to mangle stack canaries generated by fstack-protector. ghc has no evil mangler anymore and the change is not needed at least for C codegen. validated the patch on OpenBSD-6.4. No new failures compared to clean master branch. Signed-off-by: Sergei Trofimovich Test Plan: validated on OpenBSD Reviewers: bgamari Subscribers: rwbarton, erikd, carter GHC Trac Issues: #16046 Differential Revision: https://phabricator.haskell.org/D5465 >--------------------------------------------------------------- 29ecb52033b951e09b6141aeb92460db2f4c3183 aclocal.m4 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 7aa3fb4..03f43d1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -693,15 +693,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], esac - # If gcc knows about the stack protector, turn it off. - # Otherwise the stack-smash handler gets triggered. - echo 'int main(void) {return 0;}' > conftest.c - if $CC -c conftest.c -fno-stack-protector > /dev/null 2>&1 - then - $2="$$2 -fno-stack-protector" - fi - - rm -f conftest.c conftest.o AC_MSG_RESULT([done]) ]) From git at git.haskell.org Thu Dec 27 17:01:13 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:13 +0000 (UTC) Subject: [commit: ghc] D5451: add -Wmissing-deriving-strategies (29fc289) Message-ID: <20181227170113.C47193ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : D5451 Link : http://ghc.haskell.org/trac/ghc/changeset/29fc289449adc6af3abd12f66bda98e0a1bad388/ghc >--------------------------------------------------------------- commit 29fc289449adc6af3abd12f66bda98e0a1bad388 Author: chessai Date: Wed Dec 26 12:12:37 2018 -0500 add -Wmissing-deriving-strategies Warn users when -XDerivingStrategies is enabled but not used, at each potential use site. add -Wmissing-deriving-strategies Reviewers: bgamari, RyanGlScott Subscribers: andrewthad, rwbarton, carter GHC Trac Issues: #15798 Differential Revision: https://phabricator.haskell.org/D5451 >--------------------------------------------------------------- 29fc289449adc6af3abd12f66bda98e0a1bad388 compiler/main/DynFlags.hs | 2 ++ compiler/rename/RnSource.hs | 25 ++++++++++++++++++++++ compiler/typecheck/TcDerivUtils.hs | 2 +- docs/users_guide/8.8.1-notes.rst | 4 ++++ docs/users_guide/using-warnings.rst | 24 +++++++++++++++++++++ testsuite/tests/rename/should_compile/T15798a.hs | 12 +++++++++++ .../tests/rename/should_compile/T15798a.stderr | 3 +++ testsuite/tests/rename/should_compile/T15798b.hs | 9 ++++++++ .../tests/rename/should_compile/T15798b.stderr | 4 ++++ testsuite/tests/rename/should_compile/T15798c.hs | 6 ++++++ .../tests/rename/should_compile/T15798c.stderr | 4 ++++ testsuite/tests/rename/should_compile/all.T | 4 ++++ 12 files changed, 98 insertions(+), 1 deletion(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 29fc289449adc6af3abd12f66bda98e0a1bad388 From git at git.haskell.org Thu Dec 27 17:01:16 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:16 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-ci: Grab CI configuration from master (b623713) Message-ID: <20181227170116.B45053ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-ci Link : http://ghc.haskell.org/trac/ghc/changeset/b6237131cd982ff0dad350422a0b8245a3d63633/ghc >--------------------------------------------------------------- commit b6237131cd982ff0dad350422a0b8245a3d63633 Author: Ben Gamari Date: Wed Dec 26 12:01:10 2018 -0500 Grab CI configuration from master This is awfully ugly but is nevertheless significantly less error-prone than cherry-picking all of the relevant commits manually. >--------------------------------------------------------------- b6237131cd982ff0dad350422a0b8245a3d63633 .circleci/config.yml | 324 ++++++++++++----- .circleci/images/aarch64-linux-deb9/Dockerfile | 69 ++++ .circleci/images/i386-linux-deb8/Dockerfile | 45 +++ .circleci/images/i386-linux-deb9/Dockerfile | 45 +++ .circleci/images/linters/Dockerfile | 30 ++ .../images/powerpc64le-linux-deb9-cross/Dockerfile | 7 + .circleci/images/update-image | 15 +- .circleci/images/x86_64-freebsd/Dockerfile | 1 + .circleci/images/x86_64-linux-centos7/Dockerfile | 54 +++ .circleci/images/x86_64-linux-deb8/Dockerfile | 35 ++ .circleci/images/x86_64-linux-deb9/Dockerfile | 46 +++ .circleci/images/x86_64-linux-fedora27/Dockerfile | 50 +++ .circleci/prepare-system.sh | 23 +- .circleci/push-test-metrics.sh | 50 +++ .gitlab-ci.yml | 401 +++++++++++++++++++++ .gitlab/circle-ci-job.sh | 110 ++++++ .gitlab/darwin-init.sh | 41 +++ .gitlab/fix-submodules.py | 8 + .gitlab/linters/check-cpp.py | 24 ++ .gitlab/linters/check-makefiles.py | 19 + .gitlab/linters/linter.py | 109 ++++++ .gitlab/win32-init.sh | 34 ++ mk/detect-cpu-count.sh | 26 ++ 23 files changed, 1457 insertions(+), 109 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b6237131cd982ff0dad350422a0b8245a3d63633 From git at git.haskell.org Thu Dec 27 17:01:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:19 +0000 (UTC) Subject: [commit: ghc] ppc-update-sp: PPC NCG: Refactor stack allocation code (93385cd) Message-ID: <20181227170119.B56BA3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ppc-update-sp Link : http://ghc.haskell.org/trac/ghc/changeset/93385cd882241d150bdc593e4c9d92e28747480f/ghc >--------------------------------------------------------------- commit 93385cd882241d150bdc593e4c9d92e28747480f Author: Peter Trommler Date: Mon Dec 17 13:27:49 2018 +0100 PPC NCG: Refactor stack allocation code There is only one place where UPDATE_SP was used. Instead of the UPDATE_SP pseudo instruction build the list of instructions directly. >--------------------------------------------------------------- 93385cd882241d150bdc593e4c9d92e28747480f compiler/nativeGen/PPC/Instr.hs | 23 +++++++++++++++-------- compiler/nativeGen/PPC/Ppr.hs | 18 ------------------ 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs index ade3943..89709a2 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -87,11 +87,21 @@ ppc_mkStackDeallocInstr platform amount ppc_mkStackAllocInstr' :: Platform -> Int -> [Instr] ppc_mkStackAllocInstr' platform amount - = case platformArch platform of - ArchPPC -> [UPDATE_SP II32 (ImmInt amount)] - ArchPPC_64 _ -> [UPDATE_SP II64 (ImmInt amount)] - _ -> panic $ "ppc_mkStackAllocInstr' " - ++ show (platformArch platform) + | fits16Bits amount + = [ LD fmt r0 (AddrRegImm sp zero) + , STU fmt r0 (AddrRegImm sp immAmount) + ] + | otherwise + = [ LD fmt r0 (AddrRegImm sp zero) + , ADDIS tmp sp (HA immAmount) + , ADD tmp tmp (RIImm (LO immAmount)) + , STU fmt r0 (AddrRegReg sp tmp) + ] + where + fmt = intFormat $ widthFromBytes ((platformWordSize platform) `quot` 8) + zero = ImmInt 0 + tmp = tmpReg platform + immAmount = ImmInt amount -- -- See note [extra spill slots] in X86/Instr.hs @@ -289,8 +299,6 @@ data Instr | NOP -- no operation, PowerPC 64 bit -- needs this as place holder to -- reload TOC pointer - | UPDATE_SP Format Imm -- expand/shrink spill area on C stack - -- pseudo-instruction -- | Get the registers that are being used by this instruction. -- regUsage doesn't need to do any trickery for jumps and such. @@ -370,7 +378,6 @@ ppc_regUsageOfInstr platform instr MFCR reg -> usage ([], [reg]) MFLR reg -> usage ([], [reg]) FETCHPC reg -> usage ([], [reg]) - UPDATE_SP _ _ -> usage ([], [sp]) _ -> noUsage where usage (src, dst) = RU (filter (interesting platform) src) diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 3d9077d..ad6c205 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -967,24 +967,6 @@ pprInstr LWSYNC = text "\tlwsync" pprInstr NOP = text "\tnop" -pprInstr (UPDATE_SP fmt amount@(ImmInt offset)) - | fits16Bits offset = vcat [ - pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))), - pprInstr (STU fmt r0 (AddrRegImm sp amount)) - ] - -pprInstr (UPDATE_SP fmt amount) - = sdocWithPlatform $ \platform -> - let tmp = tmpReg platform in - vcat [ - pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))), - pprInstr (ADDIS tmp sp (HA amount)), - pprInstr (ADD tmp tmp (RIImm (LO amount))), - pprInstr (STU fmt r0 (AddrRegReg sp tmp)) - ] - --- pprInstr _ = panic "pprInstr (ppc)" - pprLogic :: PtrString -> Reg -> Reg -> RI -> SDoc pprLogic op reg1 reg2 ri = hcat [ From git at git.haskell.org Thu Dec 27 17:01:23 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:23 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: asm-emit-time IND_STATIC elimination (ede2279) Message-ID: <20181227170123.708023ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/ede2279bcd1e4553478c79175677cd7f728ec0d0/ghc >--------------------------------------------------------------- commit ede2279bcd1e4553478c79175677cd7f728ec0d0 Author: Gabor Greif Date: Mon Jan 29 14:34:25 2018 +0100 asm-emit-time IND_STATIC elimination When a new closure identifier is being established to a local or exported closure already emitted into the same module, refrain from adding an IND_STATIC closure, and instead emit ian assembly-language alias. Binary-size savings on nofib are around 0.1% >--------------------------------------------------------------- ede2279bcd1e4553478c79175677cd7f728ec0d0 compiler/cmm/CLabel.hs | 48 +++++++++++++++++++++- compiler/llvmGen/Llvm/Types.hs | 1 + compiler/llvmGen/LlvmCodeGen/Base.hs | 32 +++++++++++++-- compiler/llvmGen/LlvmCodeGen/Data.hs | 34 +++++++++++++-- compiler/llvmGen/LlvmCodeGen/Ppr.hs | 2 +- compiler/nativeGen/PPC/Ppr.hs | 11 +++++ compiler/nativeGen/SPARC/Ppr.hs | 11 ++++- compiler/nativeGen/X86/Ppr.hs | 12 ++++++ testsuite/tests/codeGen/should_compile/Makefile | 15 +++++++ .../T6146.stdin => should_compile/T15155.stdout} | 2 +- testsuite/tests/codeGen/should_compile/T15155l.hs | 8 ++++ .../T6146.stdin => should_compile/T15155l.stdout} | 2 +- testsuite/tests/codeGen/should_compile/all.T | 8 ++++ 13 files changed, 174 insertions(+), 12 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ede2279bcd1e4553478c79175677cd7f728ec0d0 From git at git.haskell.org Thu Dec 27 17:01:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:26 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: take this out for now (c578ed4) Message-ID: <20181227170126.7CD723ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/c578ed433fc7d35ee9dbaffda8646339e6c8d57e/ghc >--------------------------------------------------------------- commit c578ed433fc7d35ee9dbaffda8646339e6c8d57e Author: Gabor Greif Date: Fri Dec 21 11:36:21 2018 +0100 take this out for now >--------------------------------------------------------------- c578ed433fc7d35ee9dbaffda8646339e6c8d57e compiler/llvmGen/LlvmCodeGen/Data.hs | 2 +- compiler/nativeGen/PPC/Ppr.hs | 2 +- compiler/nativeGen/SPARC/Ppr.hs | 2 +- compiler/nativeGen/X86/Ppr.hs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index a936972..a8b977d 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -45,7 +45,7 @@ linkage lbl = if externallyVisibleCLabel lbl genLlvmData :: (Section, CmmStatics) -> LlvmM LlvmData -- See note [emit-time elimination of static indirections] genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) - | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel + | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 5e714df..77c7ee3 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -126,7 +126,7 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) - | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel + | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index dc24d00..a5348e5 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -109,7 +109,7 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) - | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel + | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 8b9e001..b763a32 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -156,7 +156,7 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: (Alignment, CmmStatics) -> SDoc -- See note [emit-time elimination of static indirections] pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) - | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel + | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing From git at git.haskell.org Thu Dec 27 17:01:29 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:29 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: review feedback (dd11c98) Message-ID: <20181227170129.7D2223ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/dd11c98dd8ba44ced48fcce8902d27279f378e69/ghc >--------------------------------------------------------------- commit dd11c98dd8ba44ced48fcce8902d27279f378e69 Author: Gabor Greif Date: Thu Dec 20 18:33:12 2018 +0100 review feedback >--------------------------------------------------------------- dd11c98dd8ba44ced48fcce8902d27279f378e69 compiler/cmm/CLabel.hs | 4 ++-- compiler/llvmGen/LlvmCodeGen/Data.hs | 5 +++-- compiler/nativeGen/PPC/Ppr.hs | 5 +++-- compiler/nativeGen/SPARC/Ppr.hs | 5 +++-- compiler/nativeGen/X86/Ppr.hs | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 1e5e6e9..1de6c6d 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -1449,11 +1449,11 @@ isAliasToLocalOrIntoThisModule alias lab = thismod == mod | Just nam <- hasHaskellName lab - , staticClosureLabel || pprTrace "isAliasToLocal?" (ppr lab) False + , staticClosureLabel , isInternalName nam = True - | otherwise = pprTrace "isAliasToLocal" (ppr alias <+> ppr lab) False + | otherwise = False where staticClosureLabel = isStaticClosureLabel lab diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index c90b338..a936972 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -22,6 +22,7 @@ import Platform import FastString import Outputable +import Util ( debugIsOn ) -- ---------------------------------------------------------------------------- -- * Constants @@ -43,8 +44,8 @@ linkage lbl = if externallyVisibleCLabel lbl -- | Pass a CmmStatic section to an equivalent Llvm code. genLlvmData :: (Section, CmmStatics) -> LlvmM LlvmData -- See note [emit-time elimination of static indirections] -genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 333874d..5e714df 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -34,6 +34,7 @@ import Platform import FastString import Outputable import DynFlags +import Util ( debugIsOn ) import Data.Word import Data.Int @@ -124,8 +125,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index 3861468..dc24d00 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -50,6 +50,7 @@ import Outputable import Platform import FastString import Data.Word +import Util ( debugIsOn ) -- ----------------------------------------------------------------------------- -- Printing this stuff out @@ -107,8 +108,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 71675ad..8b9e001 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -45,6 +45,7 @@ import Unique ( pprUniqueAlways ) import Platform import FastString import Outputable +import Util ( debugIsOn ) import Data.Word @@ -154,8 +155,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: (Alignment, CmmStatics) -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing From git at git.haskell.org Thu Dec 27 17:01:32 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:32 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: better criterion optasm (d49c274) Message-ID: <20181227170132.7EFB83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/d49c274a431f9a7a76c60dc83fbf38b7fa2f7e0d/ghc >--------------------------------------------------------------- commit d49c274a431f9a7a76c60dc83fbf38b7fa2f7e0d Author: Gabor Greif Date: Mon Dec 24 09:39:44 2018 +0100 better criterion optasm >--------------------------------------------------------------- d49c274a431f9a7a76c60dc83fbf38b7fa2f7e0d testsuite/tests/codeGen/should_compile/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 33d9ade..e2fae95 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -54,7 +54,7 @@ test('T15723', ], run_command, ['$MAKE -s --no-print-directory T15723']) test('T15155', - [ [ when(unregisterised(), skip) ], + [ only_ways(['optasm']), ], run_command, ['$MAKE -s --no-print-directory T15155']) test('T15155l', From git at git.haskell.org Thu Dec 27 17:01:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:35 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: curious what is failing (1bdf0fc) Message-ID: <20181227170135.89A4B3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/1bdf0fc6701e958943b93a65ecac6413815c7bd8/ghc >--------------------------------------------------------------- commit 1bdf0fc6701e958943b93a65ecac6413815c7bd8 Author: Gabor Greif Date: Sun Dec 23 13:47:43 2018 +0100 curious what is failing >--------------------------------------------------------------- 1bdf0fc6701e958943b93a65ecac6413815c7bd8 testsuite/tests/codeGen/should_compile/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/Makefile b/testsuite/tests/codeGen/should_compile/Makefile index 60983fa..7723636 100644 --- a/testsuite/tests/codeGen/should_compile/Makefile +++ b/testsuite/tests/codeGen/should_compile/Makefile @@ -47,8 +47,8 @@ T15723: ## check that there are two assembly equates # mentioning T15155.a_closure (def and use) T15155: - '$(TEST_HC)' $(TEST_HC_OPTS) -c -O0 -ddump-asm T15155l.hs | grep -F ".equiv " \ - | grep -F "T15155.a_closure" | wc -l | sed -e 's/ *//g' | grep "2" ; echo $$? + '$(TEST_HC)' $(TEST_HC_OPTS) -c -O0 -ddump-asm T15155l.hs | tee T15155.asm | grep -F ".equiv " \ + | grep -F "T15155.a_closure" | wc -l | sed -e 's/ *//g' | (grep "2" || cat T15155.asm) ; echo $$? ## check that there are two "$def" aliases: # - one that bitcasts to %T15155_a_closure_struct* From git at git.haskell.org Thu Dec 27 17:01:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:38 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: like the cg003 (1b6b263) Message-ID: <20181227170138.848A63ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/1b6b2632fb44562986d6907a8d807af5e84f772f/ghc >--------------------------------------------------------------- commit 1b6b2632fb44562986d6907a8d807af5e84f772f Author: Gabor Greif Date: Mon Dec 24 13:26:54 2018 +0100 like the cg003 >--------------------------------------------------------------- 1b6b2632fb44562986d6907a8d807af5e84f772f testsuite/tests/codeGen/should_compile/all.T | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index e2fae95..f740499 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -53,10 +53,8 @@ test('T15723', unless(have_dynamic(), skip), ], run_command, ['$MAKE -s --no-print-directory T15723']) -test('T15155', - [ only_ways(['optasm']), - ], run_command, ['$MAKE -s --no-print-directory T15155']) +test('T15155', only_ways('optasm'), + run_command, ['$MAKE -s --no-print-directory T15155']) -test('T15155l', - [ only_ways(llvm_ways), - ], run_command, ['$MAKE -s --no-print-directory T15155l']) +test('T15155l', only_ways(llvm_ways), + run_command, ['$MAKE -s --no-print-directory T15155l']) From git at git.haskell.org Thu Dec 27 17:01:41 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:41 +0000 (UTC) Subject: [commit: ghc] wip/T16039: noinline is not worth floating out (6c4fc36) Message-ID: <20181227170141.825FE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/6c4fc3684ddc740abc847de815ffae3c023969ef/ghc >--------------------------------------------------------------- commit 6c4fc3684ddc740abc847de815ffae3c023969ef Author: Gabor Greif Date: Wed Dec 12 11:21:25 2018 +0100 noinline is not worth floating out this can be written more nicely >--------------------------------------------------------------- 6c4fc3684ddc740abc847de815ffae3c023969ef compiler/simplCore/SetLevels.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 2f993b7..e2aa945 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -100,6 +100,8 @@ import UniqDFM import FV import Data.Maybe import MonadUtils ( mapAccumLM ) +import Unique (hasKey) +import PrelNames (noinlineIdKey) {- ************************************************************************ @@ -967,6 +969,8 @@ notWorthFloating :: CoreExpr -> [Var] -> Bool -- we replace e with (lvl79 x y) and then run FloatOut again, don't want -- to replace (lvl79 x y) with (lvl83 x y)! +notWorthFloating (App (App (Var v) Type{}) Var{}) _ | v `hasKey` noinlineIdKey = True + notWorthFloating e abs_vars = go e (count isId abs_vars) where From git at git.haskell.org Thu Dec 27 17:01:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:44 +0000 (UTC) Subject: [commit: ghc] wip/T16039: eta (8342ac0) Message-ID: <20181227170144.804B33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/8342ac081c4cf992a884bea2329d26b9e4f6df91/ghc >--------------------------------------------------------------- commit 8342ac081c4cf992a884bea2329d26b9e4f6df91 Author: Gabor Greif Date: Fri Dec 14 20:23:25 2018 +0100 eta >--------------------------------------------------------------- 8342ac081c4cf992a884bea2329d26b9e4f6df91 compiler/simplCore/SetLevels.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 0a563a1..e64e92b 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -390,8 +390,7 @@ lvlExpr env (_, AnnCase scrut case_bndr ty alts) lvlNonTailExpr :: LevelEnv -- Context -> CoreExprWithFVs -- Input expression -> LvlM LevelledExpr -- Result expression -lvlNonTailExpr env expr - = lvlExpr (placeJoinCeiling env) expr +lvlNonTailExpr = lvlExpr . placeJoinCeiling ------------------------------------------- lvlApp :: LevelEnv @@ -563,8 +562,7 @@ lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars -- or let] -> CoreExprWithFVs -- input expression -> LvlM LevelledExpr -- Result expression -lvlNonTailMFE env - = lvlMFE (placeJoinCeiling env) +lvlNonTailMFE = lvlMFE . placeJoinCeiling lvlMFE :: LevelEnv -- Level of in-scope names/tyvars -> Bool -- True <=> strict context [body of case or let] From git at git.haskell.org Thu Dec 27 17:01:47 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:47 +0000 (UTC) Subject: [commit: ghc] wip/T16039: Minor refactoring (8145e72) Message-ID: <20181227170147.7E6503ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/8145e7236f592ea753911462e7af2e16d7704648/ghc >--------------------------------------------------------------- commit 8145e7236f592ea753911462e7af2e16d7704648 Author: Gabor Greif Date: Mon Dec 17 14:52:53 2018 +0100 Minor refactoring >--------------------------------------------------------------- 8145e7236f592ea753911462e7af2e16d7704648 compiler/coreSyn/PprCore.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs index 5fe033b..812555a 100644 --- a/compiler/coreSyn/PprCore.hs +++ b/compiler/coreSyn/PprCore.hs @@ -62,10 +62,10 @@ pprCoreBindingsWithSize = pprTopBinds sizeAnn pprCoreBindingWithSize = pprTopBind sizeAnn instance OutputableBndr b => Outputable (Bind b) where - ppr bind = ppr_bind noAnn bind + ppr = ppr_bind noAnn instance OutputableBndr b => Outputable (Expr b) where - ppr expr = pprCoreExpr expr + ppr = pprCoreExpr {- ************************************************************************ @@ -363,9 +363,9 @@ instance OutputableBndr Var where bndrIsJoin_maybe = isJoinId_maybe instance Outputable b => OutputableBndr (TaggedBndr b) where - pprBndr _ b = ppr b -- Simple - pprInfixOcc b = ppr b - pprPrefixOcc b = ppr b + pprBndr _ = ppr -- Simple + pprInfixOcc = ppr + pprPrefixOcc = ppr bndrIsJoin_maybe (TB b _) = isJoinId_maybe b pprCoreBinder :: BindingSite -> Var -> SDoc From git at git.haskell.org Thu Dec 27 17:01:50 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:50 +0000 (UTC) Subject: [commit: ghc] wip/T16039: prepare for floating fix (c536a48) Message-ID: <20181227170150.8D41A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/c536a4879889f3f394ab44d4ba3285d9e9793057/ghc >--------------------------------------------------------------- commit c536a4879889f3f394ab44d4ba3285d9e9793057 Author: Gabor Greif Date: Sun Dec 9 22:47:30 2018 +0100 prepare for floating fix >--------------------------------------------------------------- c536a4879889f3f394ab44d4ba3285d9e9793057 compiler/simplCore/FloatOut.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs index 0aa4854..4a1ab68 100644 --- a/compiler/simplCore/FloatOut.hs +++ b/compiler/simplCore/FloatOut.hs @@ -32,6 +32,8 @@ import Type import qualified Data.IntMap as M import Data.List ( partition ) +import Unique (hasKey) +import PrelNames (noinlineIdKey) #include "HsVersions.h" @@ -396,6 +398,11 @@ floatExpr (Type ty) = (zeroStats, emptyFloats, Type ty) floatExpr (Coercion co) = (zeroStats, emptyFloats, Coercion co) floatExpr (Lit lit) = (zeroStats, emptyFloats, Lit lit) +floatExpr (App (App (Var v) _) e) + | v `hasKey` noinlineIdKey + , pprTrace "floatExpr" (ppr e) False + = undefined + floatExpr (App e a) = case (atJoinCeiling $ floatExpr e) of { (fse, floats_e, e') -> case (atJoinCeiling $ floatExpr a) of { (fsa, floats_a, a') -> From git at git.haskell.org Thu Dec 27 17:01:53 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:53 +0000 (UTC) Subject: [commit: ghc] wip/T16039: WIP: refactor and generalise (#16039) (c34e638) Message-ID: <20181227170153.914923ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/c34e638e822aac84c86999a47ea82ded7c05060c/ghc >--------------------------------------------------------------- commit c34e638e822aac84c86999a47ea82ded7c05060c Author: Gabor Greif Date: Wed Dec 12 13:43:09 2018 +0100 WIP: refactor and generalise (#16039) >--------------------------------------------------------------- c34e638e822aac84c86999a47ea82ded7c05060c compiler/simplCore/SetLevels.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index e2aa945..87e0e18 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -969,7 +969,7 @@ notWorthFloating :: CoreExpr -> [Var] -> Bool -- we replace e with (lvl79 x y) and then run FloatOut again, don't want -- to replace (lvl79 x y) with (lvl83 x y)! -notWorthFloating (App (App (Var v) Type{}) Var{}) _ | v `hasKey` noinlineIdKey = True +--notWorthFloating (App (App (Var v) Type{}) Var{}) _ | v `hasKey` noinlineIdKey = True notWorthFloating e abs_vars = go e (count isId abs_vars) @@ -982,6 +982,9 @@ notWorthFloating e abs_vars go (App e arg) n | Type {} <- arg = go e n | Coercion {} <- arg = go e n + | App (Var v) Type {} <- e + , v `hasKey` noinlineIdKey + , is_triv arg = True | n==0 = False | is_triv arg = go e (n-1) | otherwise = False From git at git.haskell.org Thu Dec 27 17:01:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:56 +0000 (UTC) Subject: [commit: ghc] wip/T16039: eta reduce (917078f) Message-ID: <20181227170156.8DE713ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/917078fbaee32aea575df31a33b9197687774518/ghc >--------------------------------------------------------------- commit 917078fbaee32aea575df31a33b9197687774518 Author: Gabor Greif Date: Fri Dec 14 20:01:11 2018 +0100 eta reduce >--------------------------------------------------------------- 917078fbaee32aea575df31a33b9197687774518 compiler/simplCore/SetLevels.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 87e0e18..0a563a1 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -563,8 +563,8 @@ lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars -- or let] -> CoreExprWithFVs -- input expression -> LvlM LevelledExpr -- Result expression -lvlNonTailMFE env strict_ctxt ann_expr - = lvlMFE (placeJoinCeiling env) strict_ctxt ann_expr +lvlNonTailMFE env + = lvlMFE (placeJoinCeiling env) lvlMFE :: LevelEnv -- Level of in-scope names/tyvars -> Bool -- True <=> strict context [body of case or let] From git at git.haskell.org Thu Dec 27 17:01:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:01:59 +0000 (UTC) Subject: [commit: ghc] wip/T16039: implement exprIsTrivial too (f1cc917) Message-ID: <20181227170159.8B41D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/f1cc9177b0aa31e23011a93c0b40170775063ddb/ghc >--------------------------------------------------------------- commit f1cc9177b0aa31e23011a93c0b40170775063ddb Author: Gabor Greif Date: Wed Dec 19 16:49:20 2018 +0100 implement exprIsTrivial too >--------------------------------------------------------------- f1cc9177b0aa31e23011a93c0b40170775063ddb compiler/coreSyn/CoreUtils.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index ea76f6d..ea3fe01 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -960,7 +960,11 @@ exprIsTrivial (Var _) = True -- See Note [Variables are trivial] exprIsTrivial (Type _) = True exprIsTrivial (Coercion _) = True exprIsTrivial (Lit lit) = litIsTrivial lit -exprIsTrivial (App e arg) = not (isRuntimeArg arg) && exprIsTrivial e +exprIsTrivial (App e arg) + | App (Var f) Type {} <- e + , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial" (ppr arg) exprIsTrivial arg + | not (isRuntimeArg arg) = exprIsTrivial e + | otherwise = False exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e exprIsTrivial (Tick t e) = not (tickishIsCode t) && exprIsTrivial e -- See Note [Tick trivial] @@ -1240,7 +1244,7 @@ exprIsCheapX ok_app e | otherwise = go n e go n (App f e) | App (Var v) Type {} <- f , v `hasKey` noinlineIdKey - , isRuntimeArg e = go n e + , isRuntimeArg e = pprTrace "exprIsCheapX" (ppr e) go n e go n (App f e) | isRuntimeArg e = go (n+1) f && ok e | otherwise = go n f go n (Let (NonRec _ r) e) = go n e && ok r From git at git.haskell.org Thu Dec 27 17:02:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:02:02 +0000 (UTC) Subject: [commit: ghc] wip/T16039: tinker with exprIsCheapX (ceca8ef) Message-ID: <20181227170202.A60CE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/ceca8ef33715572ea5e5c4e84ddc11558fffa3ee/ghc >--------------------------------------------------------------- commit ceca8ef33715572ea5e5c4e84ddc11558fffa3ee Author: Gabor Greif Date: Tue Dec 18 21:52:05 2018 +0100 tinker with exprIsCheapX >--------------------------------------------------------------- ceca8ef33715572ea5e5c4e84ddc11558fffa3ee compiler/coreSyn/CoreUtils.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 9c425e7..ea76f6d 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -62,7 +62,7 @@ module CoreUtils ( import GhcPrelude import CoreSyn -import PrelNames ( makeStaticName ) +import PrelNames ( makeStaticName, absentErrorIdKey, noinlineIdKey ) import PprCore import CoreFVs( exprFreeVars ) import Var @@ -75,7 +75,6 @@ import DataCon import PrimOp import Id import IdInfo -import PrelNames( absentErrorIdKey ) import Type import TyCoRep( TyCoBinder(..), TyBinder ) import Coercion @@ -1239,6 +1238,9 @@ exprIsCheapX ok_app e | otherwise = go n e go n (Lam x e) | isRuntimeVar x = n==0 || go (n-1) e | otherwise = go n e + go n (App f e) | App (Var v) Type {} <- f + , v `hasKey` noinlineIdKey + , isRuntimeArg e = go n e go n (App f e) | isRuntimeArg e = go (n+1) f && ok e | otherwise = go n f go n (Let (NonRec _ r) e) = go n e && ok r From git at git.haskell.org Thu Dec 27 17:02:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:02:05 +0000 (UTC) Subject: [commit: ghc] wip/T16039: more eta (6dafb70) Message-ID: <20181227170205.AD2903ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/6dafb70a4f6fafd63c2cbdf7ab6ef599f1eed446/ghc >--------------------------------------------------------------- commit 6dafb70a4f6fafd63c2cbdf7ab6ef599f1eed446 Author: Gabor Greif Date: Wed Dec 19 14:24:08 2018 +0100 more eta >--------------------------------------------------------------- 6dafb70a4f6fafd63c2cbdf7ab6ef599f1eed446 compiler/coreSyn/PprCore.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs index 812555a..d7bd2e7 100644 --- a/compiler/coreSyn/PprCore.hs +++ b/compiler/coreSyn/PprCore.hs @@ -147,11 +147,11 @@ ppr_binding ann (val_bdr, expr) lhs_bndrs = take join_arity bndrs rhs = mkLams (drop join_arity bndrs) body -pprParendExpr expr = ppr_expr parens expr -pprCoreExpr expr = ppr_expr noParens expr +pprParendExpr = ppr_expr parens +pprCoreExpr = ppr_expr noParens noParens :: SDoc -> SDoc -noParens pp = pp +noParens = id pprOptCo :: Coercion -> SDoc -- Print a coercion optionally; i.e. honouring -dsuppress-coercions From git at git.haskell.org Thu Dec 27 17:02:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 17:02:08 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-ci: gitlab-ci: Skip performance tests (27019e9) Message-ID: <20181227170208.8E8F43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-ci Link : http://ghc.haskell.org/trac/ghc/changeset/27019e9ff7b75e34998333dc02c2462589e21a1d/ghc >--------------------------------------------------------------- commit 27019e9ff7b75e34998333dc02c2462589e21a1d Author: Ben Gamari Date: Thu Dec 27 10:26:43 2018 -0500 gitlab-ci: Skip performance tests These are just too fragile on ghc-8.6 which lacks #12758. >--------------------------------------------------------------- 27019e9ff7b75e34998333dc02c2462589e21a1d .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06d7589..830250e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ validate-x86_64-linux-deb8-hadrian: mv ghc-*.tar.xz ghc.tar.xz - | THREADS=`mk/detect-cpu-count.sh` - make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml + make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml SKIP_PERF_TESTS=YES artifacts: reports: junit: junit.xml From git at git.haskell.org Thu Dec 27 20:20:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 20:20:34 +0000 (UTC) Subject: [commit: ghc] branch 'wip/testsuite-cpu-features' created Message-ID: <20181227202034.66CB33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/testsuite-cpu-features Referencing: 2d9bb67e0a42e1cfb0737de00a4a8fe2e9cc5636 From git at git.haskell.org Thu Dec 27 20:20:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 20:20:37 +0000 (UTC) Subject: [commit: ghc] wip/testsuite-cpu-features: testsuite: Add predicate for CPU feature availability (2d9bb67) Message-ID: <20181227202037.B9D2A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/testsuite-cpu-features Link : http://ghc.haskell.org/trac/ghc/changeset/2d9bb67e0a42e1cfb0737de00a4a8fe2e9cc5636/ghc >--------------------------------------------------------------- commit 2d9bb67e0a42e1cfb0737de00a4a8fe2e9cc5636 Author: Ben Gamari Date: Thu Dec 27 14:41:01 2018 -0500 testsuite: Add predicate for CPU feature availability Previously testing code-generation for ISA extensions was nearly impossible since we had no ability to determine whether the host supports the needed extension. Here we fix this by introducing a simple /proc/cpuinfo-based testsuite predicate. We really ought to >--------------------------------------------------------------- 2d9bb67e0a42e1cfb0737de00a4a8fe2e9cc5636 testsuite/driver/cpu_features.py | 71 ++++++++++++++++++++++++++++++++++++++++ testsuite/driver/testlib.py | 1 + 2 files changed, 72 insertions(+) diff --git a/testsuite/driver/cpu_features.py b/testsuite/driver/cpu_features.py new file mode 100644 index 0000000..b9e4347 --- /dev/null +++ b/testsuite/driver/cpu_features.py @@ -0,0 +1,71 @@ +import os +from testglobals import config + +# Feature names generally follow the naming used by Linux's /proc/cpuinfo. +SUPPORTED_CPU_FEATURES = { + # These aren't comprehensive; they are only CPU features that we care about + + # x86: + 'sse', 'sse2', 'sse3', 'ssse3', 'sse4_1', 'sse4_2', + 'avx1', 'avx2', + 'popcnt', 'bmi1', 'bmi2' +} + +cpu_feature_cache = None + +def get_cpu_features(): + if config.os == 'Linux' and os.path.exists('/proc/cpuinfo'): + import re + f = open('/proc/cpuinfo').read() + flags = re.search(r'flags\s*:\s*.*$', f, re.M) + if flags is None: + print('get_cpu_features: failed to find cpu features') + return {} + flags = set(flags[0].split()) + if 'pni' in flags: + flags.add('sse3') + flags.remove('pni') + return flags + + elif config.os == 'Darwin': + import subprocess + out, err = subprocess.check_output(['sysctl', 'hw']) + features = {} + def check_feature(darwin_name, our_name=None): + if re.find(r'hw\.optional.%s:\s*1' % darwin_name, out): + features.add(darwin_name if our_name is None else our_name) + + for feature in SUPPORTED_CPU_FEATURES: + check_feature(feature) + + # A few annoying cases + check_feature('avx1_0', 'avx1') + check_feature('avx2_0', 'avx2') + return features + + else: + # TODO: Add Windows support + print('get_cpu_features: Lacking support for your platform') + + return {} + +def have_cpu_feature(feature): + """ + A testsuite predicate for testing the availability of CPU features. + """ + assert feature in SUPPORTED_CPU_FEATURES + if cpu_feature_cache is None: + cpu_feature_cache = get_cpu_features() + print('Found CPU features:', ' '.join(cpu_feature_cache)) + # Sanity checking + assert all(feat in SUPPORTED_CPU_FEATURES + for feat in cpu_feature_cache) + + return feature in cpu_feature_cache + + +if __name__ == '__main__': + import sys + config.os = sys.argv[1] + print(get_cpu_features()) + diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 5f84863..df56d1d 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -20,6 +20,7 @@ import subprocess from testglobals import config, ghc_env, default_testopts, brokens, t from testutil import strip_quotes, lndir, link_or_copy_file, passed, failBecause, str_fail, str_pass +from cpu_features import have_cpu_feature import perf_notes as Perf from perf_notes import MetricChange extra_src_files = {'T4198': ['exitminus1.c']} # TODO: See #12223 From git at git.haskell.org Thu Dec 27 20:28:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 20:28:33 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5451' created Message-ID: <20181227202833.C40603ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5451 Referencing: ad8e5318b67acc7905a46cf3cf5286b57d66e87c From git at git.haskell.org Thu Dec 27 20:28:37 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 20:28:37 +0000 (UTC) Subject: [commit: ghc] wip/D5451: Add -Wmissing-deriving-strategies (ad8e531) Message-ID: <20181227202837.DEF103ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5451 Link : http://ghc.haskell.org/trac/ghc/changeset/ad8e5318b67acc7905a46cf3cf5286b57d66e87c/ghc >--------------------------------------------------------------- commit ad8e5318b67acc7905a46cf3cf5286b57d66e87c Author: chessai Date: Wed Dec 26 12:12:37 2018 -0500 Add -Wmissing-deriving-strategies Warn users when -XDerivingStrategies is enabled but not used, at each potential use site. add -Wmissing-deriving-strategies Reviewers: bgamari, RyanGlScott Subscribers: andrewthad, rwbarton, carter GHC Trac Issues: #15798 Differential Revision: https://phabricator.haskell.org/D5451 >--------------------------------------------------------------- ad8e5318b67acc7905a46cf3cf5286b57d66e87c compiler/main/DynFlags.hs | 2 ++ compiler/rename/RnSource.hs | 25 ++++++++++++++++++++++ compiler/typecheck/TcDerivUtils.hs | 2 +- docs/users_guide/8.8.1-notes.rst | 4 ++++ docs/users_guide/extending_ghc.rst | 1 + docs/users_guide/using-warnings.rst | 21 ++++++++++++++++++ testsuite/tests/rename/should_compile/T15798a.hs | 12 +++++++++++ .../tests/rename/should_compile/T15798a.stderr | 3 +++ testsuite/tests/rename/should_compile/T15798b.hs | 9 ++++++++ .../tests/rename/should_compile/T15798b.stderr | 4 ++++ testsuite/tests/rename/should_compile/T15798c.hs | 6 ++++++ .../tests/rename/should_compile/T15798c.stderr | 4 ++++ testsuite/tests/rename/should_compile/all.T | 4 ++++ 13 files changed, 96 insertions(+), 1 deletion(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ad8e5318b67acc7905a46cf3cf5286b57d66e87c From git at git.haskell.org Thu Dec 27 21:18:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 21:18:58 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-ci: gitlab-ci: Disable integer-simple tests (78c7f21) Message-ID: <20181227211858.203ED3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-ci Link : http://ghc.haskell.org/trac/ghc/changeset/78c7f212fd950297e3ac511933278b28ba0c3010/ghc >--------------------------------------------------------------- commit 78c7f212fd950297e3ac511933278b28ba0c3010 Author: Ben Gamari Date: Thu Dec 27 16:17:07 2018 -0500 gitlab-ci: Disable integer-simple tests >--------------------------------------------------------------- 78c7f212fd950297e3ac511933278b28ba0c3010 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 830250e..58e80a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -264,7 +264,7 @@ validate-x86_64-linux-fedora27: when: always expire_in: 2 week -validate-x86_64-linux-deb9-integer-simple: +.validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux stage: full-build variables: From git at git.haskell.org Thu Dec 27 21:51:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 27 Dec 2018 21:51:26 +0000 (UTC) Subject: [commit: ghc] wip/T16039: begin testing (705e67b) Message-ID: <20181227215126.9A50A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/705e67b3ccc9f41167221fc370116d4aa315c561/ghc >--------------------------------------------------------------- commit 705e67b3ccc9f41167221fc370116d4aa315c561 Author: Gabor Greif Date: Thu Dec 27 15:53:06 2018 +0100 begin testing >--------------------------------------------------------------- 705e67b3ccc9f41167221fc370116d4aa315c561 T16039.hs | 11 +++++++++++ testsuite/tests/simplCore/should_compile/all.T | 2 ++ 2 files changed, 13 insertions(+) diff --git a/T16039.hs b/T16039.hs new file mode 100644 index 0000000..2118d03 --- /dev/null +++ b/T16039.hs @@ -0,0 +1,11 @@ +module T16039 (T16039(..)) where + +import GHC.Magic.noinline + +foo = 7 + 35 + +class T16039 where + method :: Integer + +instance T16039 where + method = noinline foo diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 1f6ef00..6f68ec2 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -327,3 +327,5 @@ test('T15631', run_command, ['$MAKE -s --no-print-directory T15631']) test('T15673', normal, compile, ['-O']) + +test('T16039', normal, compile, ['-O']) From git at git.haskell.org Fri Dec 28 03:44:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 28 Dec 2018 03:44:35 +0000 (UTC) Subject: [commit: ghc] master: arith011 is no longer broken with integer-simple (3748284) Message-ID: <20181228034435.3CD9B3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3748284196d5c68632b6b177c68080a269a9b423/ghc >--------------------------------------------------------------- commit 3748284196d5c68632b6b177c68080a269a9b423 Author: Alec Theriault Date: Wed Dec 26 10:05:47 2018 -0500 arith011 is no longer broken with integer-simple >--------------------------------------------------------------- 3748284196d5c68632b6b177c68080a269a9b423 testsuite/tests/numeric/should_run/all.T | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T index 9d996db..295e818 100644 --- a/testsuite/tests/numeric/should_run/all.T +++ b/testsuite/tests/numeric/should_run/all.T @@ -20,9 +20,7 @@ test('arith008', normal, compile_and_run, [opts]) test('arith009', normal, compile_and_run, ['']) test('arith010', normal, compile_and_run, ['']) -test('arith011', - when(have_library("integer-simple"), expect_broken(16091)), - compile_and_run, ['']) +test('arith011', normal, compile_and_run, ['']) test('arith012', normal, compile_and_run, [opts]) From git at git.haskell.org Fri Dec 28 03:44:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 28 Dec 2018 03:44:38 +0000 (UTC) Subject: [commit: ghc] master: Division fails fast for `divMod` \w integer-simple (bbea972) Message-ID: <20181228034438.3672A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bbea972149882b4f5f6b0a1691488a519ba6aaf9/ghc >--------------------------------------------------------------- commit bbea972149882b4f5f6b0a1691488a519ba6aaf9 Author: Alec Theriault Date: Mon Dec 24 13:35:18 2018 -0500 Division fails fast for `divMod` \w integer-simple We want to match the behaviour of `Integer` as well as `Integer`/`Natural` from `integer-gmp`, namely to have divMod x 0 = _|_ not divMod x 0 = (_|_, _|_) See #16091 for an example of where this matters. >--------------------------------------------------------------- bbea972149882b4f5f6b0a1691488a519ba6aaf9 libraries/base/GHC/Real.hs | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs index da64c8b..7ba4344 100644 --- a/libraries/base/GHC/Real.hs +++ b/libraries/base/GHC/Real.hs @@ -481,22 +481,26 @@ instance Integral Natural where #else -- | @since 4.8.0.0 instance Integral Natural where - quot (Natural a) (Natural b) = Natural (quot a b) - {-# INLINE quot #-} - rem (Natural a) (Natural b) = Natural (rem a b) - {-# INLINE rem #-} - div (Natural a) (Natural b) = Natural (div a b) - {-# INLINE div #-} - mod (Natural a) (Natural b) = Natural (mod a b) - {-# INLINE mod #-} - divMod (Natural a) (Natural b) = (Natural q, Natural r) - where (q,r) = divMod a b - {-# INLINE divMod #-} - quotRem (Natural a) (Natural b) = (Natural q, Natural r) - where (q,r) = quotRem a b - {-# INLINE quotRem #-} - toInteger (Natural a) = a - {-# INLINE toInteger #-} + {-# INLINE toInteger #-} + toInteger (Natural a) = a + + {-# INLINE quot #-} + Natural a `quot` Natural b = Natural (a `quot` b) + + {-# INLINE rem #-} + Natural a `rem` Natural b = Natural (a `rem` b) + + {-# INLINE div #-} + Natural a `div` Natural b = Natural (a `div` b) + + {-# INLINE mod #-} + Natural a `mod` Natural b = Natural (a `mod` b) + + {-# INLINE divMod #-} + Natural a `divMod` Natural b = coerce (a `divMod` b) + + {-# INLINE quotRem #-} + Natural a `quotRem` Natural b = coerce (a `quotRem` b) #endif -------------------------------------------------------------- From git at git.haskell.org Fri Dec 28 12:54:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 28 Dec 2018 12:54:54 +0000 (UTC) Subject: [commit: ghc] master: Skip test when external interpreter missing (0702229) Message-ID: <20181228125454.9CD503ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/07022297749b8091af58a3302581ad90e9ca329b/ghc >--------------------------------------------------------------- commit 07022297749b8091af58a3302581ad90e9ca329b Author: Peter Trommler Date: Sat Dec 15 22:22:47 2018 +0100 Skip test when external interpreter missing >--------------------------------------------------------------- 07022297749b8091af58a3302581ad90e9ca329b testsuite/tests/plugins/all.T | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 3b03166..da6294e 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -196,6 +196,7 @@ test('plugin-recomp-change-prof', test('static-plugins', [extra_files(['simple-plugin/']), + unless(config.have_ext_interp, skip), extra_run_opts('"' + config.libdir + '"')], compile_and_run, ['-package ghc -isimple-plugin/']) From git at git.haskell.org Sat Dec 29 00:14:09 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 00:14:09 +0000 (UTC) Subject: [commit: ghc] master: rebindable-clash-warning-fix : correct warning logic (fdf11c9) Message-ID: <20181229001409.EC8DA3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/fdf11c90992762f6f6264b8d8c1678c4ddd53eb8/ghc >--------------------------------------------------------------- commit fdf11c90992762f6f6264b8d8c1678c4ddd53eb8 Author: Shayne Fletcher Date: Fri Dec 28 19:13:51 2018 -0500 rebindable-clash-warning-fix : correct warning logic >--------------------------------------------------------------- fdf11c90992762f6f6264b8d8c1678c4ddd53eb8 compiler/typecheck/TcMatches.hs | 2 +- testsuite/tests/rebindable/all.T | 4 ++++ testsuite/tests/rebindable/rebindable11.hs | 15 +++++++++++++++ .../tests/rebindable/rebindable11.stderr | 0 testsuite/tests/rebindable/rebindable12.hs | 14 ++++++++++++++ .../rebindable12.stderr} | 3 +-- 6 files changed, 35 insertions(+), 3 deletions(-) diff --git a/compiler/typecheck/TcMatches.hs b/compiler/typecheck/TcMatches.hs index 4ddf862..6bc988a 100644 --- a/compiler/typecheck/TcMatches.hs +++ b/compiler/typecheck/TcMatches.hs @@ -944,7 +944,7 @@ tcMonadFailOp orig pat fail_op res_ty rebindableSyntax <- xoptM LangExt.RebindableSyntax ; desugarFlag <- xoptM LangExt.MonadFailDesugaring ; missingWarning <- woptM Opt_WarnMissingMonadFailInstances - ; if | rebindableSyntax && (desugarFlag || missingWarning) + ; if | rebindableSyntax && desugarFlag && missingWarning -> warnRebindableClash pat | not desugarFlag && missingWarning -> emitMonadFailConstraint pat res_ty diff --git a/testsuite/tests/rebindable/all.T b/testsuite/tests/rebindable/all.T index f796a38..1484dd7 100644 --- a/testsuite/tests/rebindable/all.T +++ b/testsuite/tests/rebindable/all.T @@ -21,6 +21,10 @@ test('rebindable8', normal, compile, ['']) test('rebindable9', normal, compile, ['']) test('rebindable10', normal, compile_and_run, ['']) +# Test rebindable clash warnings +test('rebindable11', normal, compile, ['']) +test('rebindable12', normal, compile_fail, ['']) + test('T303', normal, compile, ['']) # Tests from Oleg diff --git a/testsuite/tests/rebindable/rebindable11.hs b/testsuite/tests/rebindable/rebindable11.hs new file mode 100644 index 0000000..13e1b2d --- /dev/null +++ b/testsuite/tests/rebindable/rebindable11.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE RebindableSyntax, MonadFailDesugaring #-} +{-# OPTIONS_GHC -Wno-missing-monadfail-instances #-} + +-- Test that rebindable clash warnings are not displayed. This program +-- should not generate anything on stderr at compile time. + +module Main where + +import Prelude + +catMaybes xs = do + Just x <- xs + return x + +main = return () diff --git a/libraries/ghc-compact/tests/compact_serialize.stderr b/testsuite/tests/rebindable/rebindable11.stderr similarity index 100% copy from libraries/ghc-compact/tests/compact_serialize.stderr copy to testsuite/tests/rebindable/rebindable11.stderr diff --git a/testsuite/tests/rebindable/rebindable12.hs b/testsuite/tests/rebindable/rebindable12.hs new file mode 100644 index 0000000..fd2e1c7 --- /dev/null +++ b/testsuite/tests/rebindable/rebindable12.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RebindableSyntax, MonadFailDesugaring #-} +{-# OPTIONS_GHC -Wmissing-monadfail-instances #-} + +-- Test that rebindable clash warnings are displayed. + +module Main where + +import Prelude + +catMaybes xs = do + Just x <- xs + return x + +main = return () diff --git a/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr b/testsuite/tests/rebindable/rebindable12.stderr similarity index 59% copy from testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr copy to testsuite/tests/rebindable/rebindable12.stderr index 7b6cd1b..722a95c 100644 --- a/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr +++ b/testsuite/tests/rebindable/rebindable12.stderr @@ -1,5 +1,4 @@ - -MonadFailWarningsWithRebindableSyntax.hs:13:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)] +rebindable12.hs:11:5: error: [-Wmissing-monadfail-instances (in -Wcompat), -Werror=missing-monadfail-instances] The failable pattern ‘Just x’ is used together with -XRebindableSyntax. If this is intentional, compile with -Wno-missing-monadfail-instances. From git at git.haskell.org Sat Dec 29 00:22:17 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 00:22:17 +0000 (UTC) Subject: [commit: ghc] branch 'wip/disable-fragile-unreg-tests' created Message-ID: <20181229002217.314C63ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/disable-fragile-unreg-tests Referencing: 9bce364125b55407e632d9a2061d09c6f346fa71 From git at git.haskell.org Sat Dec 29 00:22:20 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 00:22:20 +0000 (UTC) Subject: [commit: ghc] wip/disable-fragile-unreg-tests: testsuite: Disable more tests in unregisterised build (9bce364) Message-ID: <20181229002220.3084D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/disable-fragile-unreg-tests Link : http://ghc.haskell.org/trac/ghc/changeset/9bce364125b55407e632d9a2061d09c6f346fa71/ghc >--------------------------------------------------------------- commit 9bce364125b55407e632d9a2061d09c6f346fa71 Author: Ben Gamari Date: Fri Dec 28 19:19:48 2018 -0500 testsuite: Disable more tests in unregisterised build This disables `ghcilink005`, `foreignInterruptable`, and `T7040_ghci` in the unregisterised build as they tend to fail non-deterministically. See ticket #16085. >--------------------------------------------------------------- 9bce364125b55407e632d9a2061d09c6f346fa71 testsuite/tests/ghci/linking/all.T | 8 ++++++-- testsuite/tests/rts/all.T | 2 ++ testsuite/tests/th/all.T | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T index f9617c5..4f12d27 100644 --- a/testsuite/tests/ghci/linking/all.T +++ b/testsuite/tests/ghci/linking/all.T @@ -19,8 +19,12 @@ test('ghcilink004', when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259))], run_command, ['$MAKE -s --no-print-directory ghcilink004']) -test('ghcilink005', [extra_files(['TestLink.hs', 'f.c']), - unless(doing_ghci, skip)], run_command, +test('ghcilink005', + [extra_files(['TestLink.hs', 'f.c']), + # Fragile when unregisterised; see #16085 + when(unregisterised(), skip), + unless(doing_ghci, skip)], + run_command, ['$MAKE -s --no-print-directory ghcilink005']) test('ghcilink006', [unless(doing_ghci, skip)], run_command, diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 466ee84..4152840 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -247,6 +247,8 @@ test('T7040', [omit_ways(['ghci'])], compile_and_run, ['T7040_c.c']) test('T7040_ghci', [extra_files(['T7040_c.h']), only_ways(['ghci']), + # Fragile when unregisterised; see #16085 + when(unregisterised(), skip), pre_cmd('$MAKE -s --no-print-directory T7040_ghci_setup')], compile_and_run, ['T7040_ghci_c.o']) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 1bea110..881ba81 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -149,7 +149,10 @@ test('T3177', normal, compile, ['-v0']) test('T3177a', normal, compile_fail, ['-v0']) test('T3319', normal, compile, ['-ddump-splices -v0']) -test('TH_foreignInterruptible', normal, compile, ['-ddump-splices -v0']) +test('TH_foreignInterruptible', + # Fragile when unregisterised; see #16085 + when(unregisterised(), skip), + compile, ['-ddump-splices -v0']) test('TH_foreignCallingConventions', normal, compile, ['-ddump-splices -dsuppress-uniques -v0']) From git at git.haskell.org Sat Dec 29 05:19:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 05:19:35 +0000 (UTC) Subject: [commit: ghc] master's head updated: testsuite: Disable more tests in unregisterised build (9bce364) Message-ID: <20181229051935.853993ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 9bce364 testsuite: Disable more tests in unregisterised build From git at git.haskell.org Sat Dec 29 10:38:07 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 10:38:07 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16094' created Message-ID: <20181229103807.734933ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16094 Referencing: da42c43cfcfb29276deb4c0ea2801a1b01d19e12 From git at git.haskell.org Sat Dec 29 10:38:10 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 10:38:10 +0000 (UTC) Subject: [commit: ghc] wip/T16094: PPC NCG: Fix signed 64-bit compare on 32-bit (da42c43) Message-ID: <20181229103810.73C153ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16094 Link : http://ghc.haskell.org/trac/ghc/changeset/da42c43cfcfb29276deb4c0ea2801a1b01d19e12/ghc >--------------------------------------------------------------- commit da42c43cfcfb29276deb4c0ea2801a1b01d19e12 Author: Peter Trommler Date: Wed Dec 26 20:23:44 2018 +0100 PPC NCG: Fix signed 64-bit compare on 32-bit >--------------------------------------------------------------- da42c43cfcfb29276deb4c0ea2801a1b01d19e12 compiler/nativeGen/PPC/CodeGen.hs | 54 +++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index 6c5d7d2..d46bef7 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -911,22 +911,44 @@ condIntCode cond width x y = do condIntCode' :: Bool -> Cond -> Width -> CmmExpr -> CmmExpr -> NatM CondCode -- simple code for 64-bit on 32-bit platforms -condIntCode' True cond W64 x y = do - ChildCode64 code_x x_lo <- iselExpr64 x - ChildCode64 code_y y_lo <- iselExpr64 y - let x_hi = getHiVRegFromLo x_lo - y_hi = getHiVRegFromLo y_lo - cmp = if condUnsigned cond then CMPL else CMP - end_lbl <- getBlockIdNat - let code = code_x `appOL` code_y `appOL` toOL - [ cmp II32 x_hi (RIReg y_hi) - , BCC NE end_lbl Nothing - , cmp II32 x_lo (RIReg y_lo) - , BCC ALWAYS end_lbl Nothing - - , NEWBLOCK end_lbl - ] - return (CondCode False cond code) +condIntCode' True cond W64 x y + | condUnsigned cond + = do + ChildCode64 code_x x_lo <- iselExpr64 x + ChildCode64 code_y y_lo <- iselExpr64 y + let x_hi = getHiVRegFromLo x_lo + y_hi = getHiVRegFromLo y_lo + end_lbl <- getBlockIdNat + let code = code_x `appOL` code_y `appOL` toOL + [ CMPL II32 x_hi (RIReg y_hi) + , BCC NE end_lbl Nothing + , CMPL II32 x_lo (RIReg y_lo) + , BCC ALWAYS end_lbl Nothing + + , NEWBLOCK end_lbl + ] + return (CondCode False cond code) + | otherwise + = do + ChildCode64 code_x x_lo <- iselExpr64 x + ChildCode64 code_y y_lo <- iselExpr64 y + let x_hi = getHiVRegFromLo x_lo + y_hi = getHiVRegFromLo y_lo + end_lbl <- getBlockIdNat + cmp_lo <- getBlockIdNat + let code = code_x `appOL` code_y `appOL` toOL + [ CMP II32 x_hi (RIReg y_hi) + , BCC NE end_lbl Nothing + , CMP II32 x_hi (RIImm (ImmInt 0)) + , BCC LE cmp_lo Nothing + , CMPL II32 x_lo (RIReg y_lo) + , BCC ALWAYS end_lbl Nothing + , CMPL II32 y_lo (RIReg x_lo) + , BCC ALWAYS end_lbl Nothing + + , NEWBLOCK end_lbl + ] + return (CondCode False cond code) -- optimize pointer tag checks. Operation andi. sets condition register -- so cmpi ..., 0 is redundant. From git at git.haskell.org Sat Dec 29 10:38:13 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 10:38:13 +0000 (UTC) Subject: [commit: ghc] wip/T16094: PPC NCG: Simple 64-bit condition code on 32-bit (e29adf0) Message-ID: <20181229103813.6FB003ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16094 Link : http://ghc.haskell.org/trac/ghc/changeset/e29adf0577f59bcd265ac6ff7a73f26d900d66f7/ghc >--------------------------------------------------------------- commit e29adf0577f59bcd265ac6ff7a73f26d900d66f7 Author: Peter Trommler Date: Wed Dec 26 13:15:38 2018 +0100 PPC NCG: Simple 64-bit condition code on 32-bit Fixes #16094. >--------------------------------------------------------------- e29adf0577f59bcd265ac6ff7a73f26d900d66f7 compiler/nativeGen/PPC/CodeGen.hs | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index a716765..6c5d7d2 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -904,10 +904,33 @@ getCondCode _ = panic "getCondCode(2)(powerpc)" -- passed back up the tree. condIntCode :: Cond -> Width -> CmmExpr -> CmmExpr -> NatM CondCode +condIntCode cond width x y = do + dflags <- getDynFlags + condIntCode' (target32Bit (targetPlatform dflags)) cond width x y + +condIntCode' :: Bool -> Cond -> Width -> CmmExpr -> CmmExpr -> NatM CondCode + +-- simple code for 64-bit on 32-bit platforms +condIntCode' True cond W64 x y = do + ChildCode64 code_x x_lo <- iselExpr64 x + ChildCode64 code_y y_lo <- iselExpr64 y + let x_hi = getHiVRegFromLo x_lo + y_hi = getHiVRegFromLo y_lo + cmp = if condUnsigned cond then CMPL else CMP + end_lbl <- getBlockIdNat + let code = code_x `appOL` code_y `appOL` toOL + [ cmp II32 x_hi (RIReg y_hi) + , BCC NE end_lbl Nothing + , cmp II32 x_lo (RIReg y_lo) + , BCC ALWAYS end_lbl Nothing + + , NEWBLOCK end_lbl + ] + return (CondCode False cond code) -- optimize pointer tag checks. Operation andi. sets condition register -- so cmpi ..., 0 is redundant. -condIntCode cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) +condIntCode' _ cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) (CmmLit (CmmInt 0 _)) | not $ condUnsigned cond, Just src2 <- makeImmediate rep False imm @@ -916,7 +939,7 @@ condIntCode cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) let code' = code `snocOL` AND r0 src1 (RIImm src2) return (CondCode False cond code') -condIntCode cond width x (CmmLit (CmmInt y rep)) +condIntCode' _ cond width x (CmmLit (CmmInt y rep)) | Just src2 <- makeImmediate rep (not $ condUnsigned cond) y = do let op_len = max W32 width @@ -927,7 +950,7 @@ condIntCode cond width x (CmmLit (CmmInt y rep)) (if condUnsigned cond then CMPL else CMP) format src1 (RIImm src2) return (CondCode False cond code') -condIntCode cond width x y = do +condIntCode' _ cond width x y = do let op_len = max W32 width let extend = if condUnsigned cond then extendUExpr width op_len else extendSExpr width op_len From git at git.haskell.org Sat Dec 29 14:34:16 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 14:34:16 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ppc-update-sp' created Message-ID: <20181229143416.9E8DC3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ppc-update-sp Referencing: 93385cd882241d150bdc593e4c9d92e28747480f From git at git.haskell.org Sat Dec 29 22:26:14 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 29 Dec 2018 22:26:14 +0000 (UTC) Subject: [commit: ghc] master: rts: fix build failure on OpenBSD (_DYNAMIC symbol collision) (1638350) Message-ID: <20181229222614.671BD3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1638350f0629365f20e97554e872d85b75f48d73/ghc >--------------------------------------------------------------- commit 1638350f0629365f20e97554e872d85b75f48d73 Author: Sergei Trofimovich Date: Tue Dec 18 23:17:45 2018 +0000 rts: fix build failure on OpenBSD (_DYNAMIC symbol collision) Summary: Build failure on OpenBSD-6.4 the the following: ``` rts/RtsSymbols.c:994:1: error: error: redefinition of '_DYNAMIC' as different kind of symbol | 994 | RTS_OPENBSD_ONLY_SYMBOLS | ^ RTS_OPENBSD_ONLY_SYMBOLS ^ ``` On OpenBSD `_DYNAMIC` was always defined in `` headers but used not to be included. The change explicitly includes `` as a source of symbol definition. Signed-off-by: Sergei Trofimovich Test Plan: build-tested on OpenBSD-6.4 Reviewers: bgamari, erikd, simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15945 Differential Revision: https://phabricator.haskell.org/D5461 >--------------------------------------------------------------- 1638350f0629365f20e97554e872d85b75f48d73 rts/RtsSymbols.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index 5091c90..123ee76 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -27,6 +27,10 @@ #include /* SHGetFolderPathW */ #endif +#if defined(openbsd_HOST_OS) +#include /* _DYNAMIC */ +#endif + /* ----------------------------------------------------------------------------- * Symbols to be inserted into the RTS symbol table. */ @@ -280,7 +284,7 @@ #if defined(openbsd_HOST_OS) #define RTS_OPENBSD_ONLY_SYMBOLS \ SymE_NeedsProto(__guard_local) \ - SymE_NeedsProto(_DYNAMIC) + SymE_HasProto(_DYNAMIC) #else #define RTS_OPENBSD_ONLY_SYMBOLS #endif From git at git.haskell.org Sun Dec 30 07:39:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 07:39:40 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Simple 64-bit condition code on 32-bit (ef57272) Message-ID: <20181230073940.76D2E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ef57272e28f5047599249ae457609a079d8aebef/ghc >--------------------------------------------------------------- commit ef57272e28f5047599249ae457609a079d8aebef Author: Peter Trommler Date: Sun Dec 30 02:39:23 2018 -0500 PPC NCG: Simple 64-bit condition code on 32-bit >--------------------------------------------------------------- ef57272e28f5047599249ae457609a079d8aebef compiler/nativeGen/PPC/CodeGen.hs | 51 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index a716765..d46bef7 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -904,10 +904,55 @@ getCondCode _ = panic "getCondCode(2)(powerpc)" -- passed back up the tree. condIntCode :: Cond -> Width -> CmmExpr -> CmmExpr -> NatM CondCode +condIntCode cond width x y = do + dflags <- getDynFlags + condIntCode' (target32Bit (targetPlatform dflags)) cond width x y + +condIntCode' :: Bool -> Cond -> Width -> CmmExpr -> CmmExpr -> NatM CondCode + +-- simple code for 64-bit on 32-bit platforms +condIntCode' True cond W64 x y + | condUnsigned cond + = do + ChildCode64 code_x x_lo <- iselExpr64 x + ChildCode64 code_y y_lo <- iselExpr64 y + let x_hi = getHiVRegFromLo x_lo + y_hi = getHiVRegFromLo y_lo + end_lbl <- getBlockIdNat + let code = code_x `appOL` code_y `appOL` toOL + [ CMPL II32 x_hi (RIReg y_hi) + , BCC NE end_lbl Nothing + , CMPL II32 x_lo (RIReg y_lo) + , BCC ALWAYS end_lbl Nothing + + , NEWBLOCK end_lbl + ] + return (CondCode False cond code) + | otherwise + = do + ChildCode64 code_x x_lo <- iselExpr64 x + ChildCode64 code_y y_lo <- iselExpr64 y + let x_hi = getHiVRegFromLo x_lo + y_hi = getHiVRegFromLo y_lo + end_lbl <- getBlockIdNat + cmp_lo <- getBlockIdNat + let code = code_x `appOL` code_y `appOL` toOL + [ CMP II32 x_hi (RIReg y_hi) + , BCC NE end_lbl Nothing + , CMP II32 x_hi (RIImm (ImmInt 0)) + , BCC LE cmp_lo Nothing + , CMPL II32 x_lo (RIReg y_lo) + , BCC ALWAYS end_lbl Nothing + , CMPL II32 y_lo (RIReg x_lo) + , BCC ALWAYS end_lbl Nothing + + , NEWBLOCK end_lbl + ] + return (CondCode False cond code) -- optimize pointer tag checks. Operation andi. sets condition register -- so cmpi ..., 0 is redundant. -condIntCode cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) +condIntCode' _ cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) (CmmLit (CmmInt 0 _)) | not $ condUnsigned cond, Just src2 <- makeImmediate rep False imm @@ -916,7 +961,7 @@ condIntCode cond _ (CmmMachOp (MO_And _) [x, CmmLit (CmmInt imm rep)]) let code' = code `snocOL` AND r0 src1 (RIImm src2) return (CondCode False cond code') -condIntCode cond width x (CmmLit (CmmInt y rep)) +condIntCode' _ cond width x (CmmLit (CmmInt y rep)) | Just src2 <- makeImmediate rep (not $ condUnsigned cond) y = do let op_len = max W32 width @@ -927,7 +972,7 @@ condIntCode cond width x (CmmLit (CmmInt y rep)) (if condUnsigned cond then CMPL else CMP) format src1 (RIImm src2) return (CondCode False cond code') -condIntCode cond width x y = do +condIntCode' _ cond width x y = do let op_len = max W32 width let extend = if condUnsigned cond then extendUExpr width op_len else extendSExpr width op_len From git at git.haskell.org Sun Dec 30 12:39:05 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 12:39:05 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ncg-test-criterion' created Message-ID: <20181230123905.D08DE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ncg-test-criterion Referencing: 4c939dec6c2e77553d4026dbdcbb91044bece692 From git at git.haskell.org Sun Dec 30 12:39:08 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 12:39:08 +0000 (UTC) Subject: [commit: ghc] wip/ncg-test-criterion: Introduce ncg config flag (91f67f4) Message-ID: <20181230123908.D21C73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ncg-test-criterion Link : http://ghc.haskell.org/trac/ghc/changeset/91f67f479a01c7819a66e2f124bfead985fe29ed/ghc >--------------------------------------------------------------- commit 91f67f479a01c7819a66e2f124bfead985fe29ed Author: Gabor Greif Date: Sun Dec 30 10:57:46 2018 +0100 Introduce ncg config flag >--------------------------------------------------------------- 91f67f479a01c7819a66e2f124bfead985fe29ed testsuite/config/ghc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 247ddb8..24294da 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -158,6 +158,8 @@ def get_compiler_info(): s = re.sub('[\r\n]', '', s) rtsInfoDict = dict(eval(s)) + config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES" + # external interpreter needs RTS linker support # If the field is not present (GHC 8.0 and earlier), assume we don't # have -fexternal-interpreter (though GHC 8.0 actually does) From git at git.haskell.org Sun Dec 30 12:39:11 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 12:39:11 +0000 (UTC) Subject: [commit: ghc] wip/ncg-test-criterion: add helper for ncg (4c939de) Message-ID: <20181230123911.DA6213ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ncg-test-criterion Link : http://ghc.haskell.org/trac/ghc/changeset/4c939dec6c2e77553d4026dbdcbb91044bece692/ghc >--------------------------------------------------------------- commit 4c939dec6c2e77553d4026dbdcbb91044bece692 Author: Gabor Greif Date: Sun Dec 30 13:16:33 2018 +0100 add helper for ncg >--------------------------------------------------------------- 4c939dec6c2e77553d4026dbdcbb91044bece692 testsuite/driver/testlib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 5f84863..96024a9 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -440,6 +440,9 @@ def cygwin( ): def have_vanilla( ): return config.have_vanilla +def have_ncg( ): + return config.have_ncg + def have_dynamic( ): return config.have_dynamic From git at git.haskell.org Sun Dec 30 15:25:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 15:25:36 +0000 (UTC) Subject: [commit: ghc] branch 'wip/devel2-ci' created Message-ID: <20181230152536.35AFF3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/devel2-ci Referencing: c3c72a20113cd7ed7246517a4db5fb24cf0a1212 From git at git.haskell.org Sun Dec 30 15:25:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 15:25:39 +0000 (UTC) Subject: [commit: ghc] wip/devel2-ci: gitlab-ci: Add a devel2 build (c3c72a2) Message-ID: <20181230152539.356703ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/devel2-ci Link : http://ghc.haskell.org/trac/ghc/changeset/c3c72a20113cd7ed7246517a4db5fb24cf0a1212/ghc >--------------------------------------------------------------- commit c3c72a20113cd7ed7246517a4db5fb24cf0a1212 Author: Ben Gamari Date: Sat Dec 22 00:59:43 2018 -0500 gitlab-ci: Add a devel2 build >--------------------------------------------------------------- c3c72a20113cd7ed7246517a4db5fb24cf0a1212 .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..2055911 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,6 +213,16 @@ nightly-i386-linux-deb9: cache: key: linux-i386-deb9 +# N.B. Has DEBUG assertions enabled in stage2 +validate-x86_64-linux-deb9-debug: + extends: .validate-linux + stage: build + image: ghcci/x86_64-linux-deb9:0.2 + variables: + BUILD_FLAVOUR: devel2 + cache: + key: linux-x86_64-deb9 + validate-x86_64-linux-deb9: extends: .validate-linux stage: build From git at git.haskell.org Sun Dec 30 17:49:32 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:49:32 +0000 (UTC) Subject: [commit: nofib] branch 'wip/typos' created Message-ID: <20181230174932.8B4903ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : wip/typos Referencing: 479be5a191a87573cda72bb1c080936aa4d08b28 From git at git.haskell.org Sun Dec 30 17:49:34 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:49:34 +0000 (UTC) Subject: [commit: nofib] wip/typos: Typofix (479be5a) Message-ID: <20181230174934.92E983ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/typos Link : http://ghc.haskell.org/trac/ghc/changeset/479be5a191a87573cda72bb1c080936aa4d08b28/nofib >--------------------------------------------------------------- commit 479be5a191a87573cda72bb1c080936aa4d08b28 Author: Greif Date: Thu Dec 27 16:02:52 2018 +0100 Typofix >--------------------------------------------------------------- 479be5a191a87573cda72bb1c080936aa4d08b28 parallel/transclos/Main.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parallel/transclos/Main.hs b/parallel/transclos/Main.hs index c3cda15..6134c7b 100644 --- a/parallel/transclos/Main.hs +++ b/parallel/transclos/Main.hs @@ -76,7 +76,7 @@ main = do let zs = Data.Set.toList $ {- take n $ -} transcl_set rel_set (Data.Set.fromList seeds) -- set-based with 1-to-n rel #else let zs = {- take n $ -} transcl rel_list seeds -- default: seq, circular, with a 1-to-n list-based relation - -- unused verions + -- unused versions -- let zs = {- take n $ -} transcl_dup rel_one seeds -- no elim of duplicates; good parallelism but stupid -- let zs = {- take n $ -} transcl_simp rel_one seeds -- list-based with 1-to-1 rel #endif @@ -120,4 +120,3 @@ nfib :: Int -> Int nfib 0 = 1 nfib 1 = 1 nfib n = nfib (n-1) + nfib (n-2) + 1 - From git at git.haskell.org Sun Dec 30 17:49:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:49:36 +0000 (UTC) Subject: [commit: nofib] master: CLEAN_FILES for `reverse-complement` (8b3c959) Message-ID: <20181230174936.9A6433ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8b3c9596440ba81db732dcb30b88503ec03c9989/nofib >--------------------------------------------------------------- commit 8b3c9596440ba81db732dcb30b88503ec03c9989 Author: Sebastian Graf Date: Sat Dec 29 20:13:44 2018 +0100 CLEAN_FILES for `reverse-complement` Summary: `reverse-complement` didn't have its `CLEAN_FILES` set. That led to incomplete rebuilds of binaries and changes in i.e. `FAST_OPTS` taking no effect, despite a prior `make clean`. Reviewers: osa1, AndreasK, bgamari, O26 nofib Differential Revision: https://phabricator.haskell.org/D5467 >--------------------------------------------------------------- 8b3c9596440ba81db732dcb30b88503ec03c9989 shootout/reverse-complement/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shootout/reverse-complement/Makefile b/shootout/reverse-complement/Makefile index d9fcc14..e3b72b7 100644 --- a/shootout/reverse-complement/Makefile +++ b/shootout/reverse-complement/Makefile @@ -5,6 +5,8 @@ include $(TOP)/mk/boilerplate.mk # we don't want to include revcomp-c.c SRCS = Main.hs +CLEAN_FILES += fasta-c revcomp-c reverse-complement *stdout *stdin + # These values are only used in this file. They are ignored by the # executable itself. FAST_OPTS = 250000 From git at git.haskell.org Sun Dec 30 17:54:56 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:54:56 +0000 (UTC) Subject: [commit: nofib] branch 'D5437' created Message-ID: <20181230175456.6EE683ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : D5437 Referencing: 1632676ef4699365a0674dfb6249ff3a7117ebab From git at git.haskell.org Sun Dec 30 17:54:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:54:58 +0000 (UTC) Subject: [commit: nofib] D5437: Move required language extensions into pragmas for shootout. (1632676) Message-ID: <20181230175458.76E873ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : D5437 Link : http://ghc.haskell.org/trac/ghc/changeset/1632676ef4699365a0674dfb6249ff3a7117ebab/nofib >--------------------------------------------------------------- commit 1632676ef4699365a0674dfb6249ff3a7117ebab Author: klebinger.andreas at gmx.at Date: Sun Dec 30 12:52:51 2018 -0500 Move required language extensions into pragmas for shootout. Summary: That way they are easier to compile with plain calls to ghc. Test Plan: make clean && make boot && make Reviewers: O26 nofib, bgamari Reviewed By: bgamari Subscribers: bgamari Differential Revision: https://phabricator.haskell.org/D5437 >--------------------------------------------------------------- 1632676ef4699365a0674dfb6249ff3a7117ebab shootout/binary-trees/Main.hs | 1 + shootout/binary-trees/Makefile | 2 +- shootout/fannkuch-redux/Main.hs | 1 + shootout/fannkuch-redux/Makefile | 4 +--- shootout/fasta/Main.hs | 1 + shootout/fasta/Makefile | 2 +- shootout/k-nucleotide/Main.hs | 1 + shootout/k-nucleotide/Makefile | 2 +- shootout/n-body/Main.hs | 1 + shootout/n-body/Makefile | 2 +- shootout/pidigits/Main.hs | 1 + shootout/reverse-complement/Main.hs | 1 + shootout/reverse-complement/Makefile | 3 +-- shootout/spectral-norm/Main.hs | 1 + shootout/spectral-norm/Makefile | 2 +- 15 files changed, 15 insertions(+), 10 deletions(-) diff --git a/shootout/binary-trees/Main.hs b/shootout/binary-trees/Main.hs index 8258c71..9c596d9 100644 --- a/shootout/binary-trees/Main.hs +++ b/shootout/binary-trees/Main.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} -- -- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ diff --git a/shootout/binary-trees/Makefile b/shootout/binary-trees/Makefile index 2d2d321..7731758 100644 --- a/shootout/binary-trees/Makefile +++ b/shootout/binary-trees/Makefile @@ -8,5 +8,5 @@ SLOW_OPTS = 20 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -funbox-strict-fields +HC_OPTS += -funbox-strict-fields SRC_RUNTEST_OPTS += +RTS -K128M -H200m -RTS diff --git a/shootout/fannkuch-redux/Main.hs b/shootout/fannkuch-redux/Main.hs index 157c05d..9b9e817 100644 --- a/shootout/fannkuch-redux/Main.hs +++ b/shootout/fannkuch-redux/Main.hs @@ -7,6 +7,7 @@ and run with: +RTS -N -RTS -} +{-# LANGUAGE BangPatterns #-} import Control.Concurrent import Control.Monad diff --git a/shootout/fannkuch-redux/Makefile b/shootout/fannkuch-redux/Makefile index 729955f..b87fdd2 100644 --- a/shootout/fannkuch-redux/Makefile +++ b/shootout/fannkuch-redux/Makefile @@ -6,7 +6,5 @@ FAST_OPTS = 10 NORM_OPTS = 11 SLOW_OPTS = 12 # official shootout setting -# The benchmark game also uses -fllvm, which we can't since it might +# The benchmark game uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns - diff --git a/shootout/fasta/Main.hs b/shootout/fasta/Main.hs index 070a3f0..3b10ccc 100644 --- a/shootout/fasta/Main.hs +++ b/shootout/fasta/Main.hs @@ -4,6 +4,7 @@ contributed by Bryan O'Sullivan -} +{-# LANGUAGE BangPatterns, OverloadedStrings #-} import Control.Monad import Data.ByteString.Unsafe diff --git a/shootout/fasta/Makefile b/shootout/fasta/Makefile index 14ecb61..19fa17b 100644 --- a/shootout/fasta/Makefile +++ b/shootout/fasta/Makefile @@ -13,7 +13,7 @@ SLOW_OPTS = 25000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -XOverloadedStrings -package bytestring +HC_OPTS += -package bytestring #------------------------------------------------------------------ # Create output to validate against diff --git a/shootout/k-nucleotide/Main.hs b/shootout/k-nucleotide/Main.hs index 6963a4d..6783f0b 100644 --- a/shootout/k-nucleotide/Main.hs +++ b/shootout/k-nucleotide/Main.hs @@ -4,6 +4,7 @@ -- -- contributed by Stephen Blackheath (with some bits taken from Don Stewart's -- version), v1.2 +{-# LANGUAGE BangPatterns #-} import Text.Printf import Data.ByteString.Internal diff --git a/shootout/k-nucleotide/Makefile b/shootout/k-nucleotide/Makefile index 56870ff..6cff15d 100644 --- a/shootout/k-nucleotide/Makefile +++ b/shootout/k-nucleotide/Makefile @@ -11,7 +11,7 @@ CLEAN_FILES += fasta-c k-nucleotide.*stdin # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -package bytestring +HC_OPTS += -package bytestring #------------------------------------------------------------------ # Create input diff --git a/shootout/n-body/Main.hs b/shootout/n-body/Main.hs index d22ddb0..5391020 100644 --- a/shootout/n-body/Main.hs +++ b/shootout/n-body/Main.hs @@ -10,6 +10,7 @@ -- -- Don't enable -optc-mfpmath=sse -optc-msse2, this triggers a gcc bug on x86 -- +{-# LANGUAGE BangPatterns #-} import Foreign (Ptr, Storable(..), plusPtr, mallocBytes) import Foreign.Storable diff --git a/shootout/n-body/Makefile b/shootout/n-body/Makefile index 2290826..0de067a 100644 --- a/shootout/n-body/Makefile +++ b/shootout/n-body/Makefile @@ -8,4 +8,4 @@ SLOW_OPTS = 50000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -fexcess-precision +HC_OPTS += -fexcess-precision diff --git a/shootout/pidigits/Main.hs b/shootout/pidigits/Main.hs index 665641f..137e23a 100644 --- a/shootout/pidigits/Main.hs +++ b/shootout/pidigits/Main.hs @@ -4,6 +4,7 @@ -- modified by Eugene Kirpichov: pidgits only generates -- the result string instead of printing it. For some -- reason, this gives a speedup. +{-# LANGUAGE BangPatterns #-} import System.Environment diff --git a/shootout/reverse-complement/Main.hs b/shootout/reverse-complement/Main.hs index 7f3bdf9..e329dc8 100644 --- a/shootout/reverse-complement/Main.hs +++ b/shootout/reverse-complement/Main.hs @@ -4,6 +4,7 @@ http://benchmarksgame.alioth.debian.org/ contributed by Louis Wasserman -} +{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} import Control.Monad import Foreign diff --git a/shootout/reverse-complement/Makefile b/shootout/reverse-complement/Makefile index e3b72b7..306bab4 100644 --- a/shootout/reverse-complement/Makefile +++ b/shootout/reverse-complement/Makefile @@ -15,8 +15,7 @@ SLOW_OPTS = 25000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -funfolding-use-threshold=32 -XMagicHash \ - -XUnboxedTuples +HC_OPTS += -funfolding-use-threshold=32 #------------------------------------------------------------------ # Create input diff --git a/shootout/spectral-norm/Main.hs b/shootout/spectral-norm/Main.hs index 3a52736..4e83277 100644 --- a/shootout/spectral-norm/Main.hs +++ b/shootout/spectral-norm/Main.hs @@ -13,6 +13,7 @@ -- -fexcess-precision -optc-ffast-math -- Should be run with: -- +RTS -N +{-# LANGUAGE BangPatterns, MagicHash #-} import System.Environment import Foreign.Marshal.Array diff --git a/shootout/spectral-norm/Makefile b/shootout/spectral-norm/Makefile index a0728d9..15cae66 100644 --- a/shootout/spectral-norm/Makefile +++ b/shootout/spectral-norm/Makefile @@ -8,4 +8,4 @@ SLOW_OPTS = 5500 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -XMagicHash -fexcess-precision +HC_OPTS += -fexcess-precision From git at git.haskell.org Sun Dec 30 17:57:31 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:57:31 +0000 (UTC) Subject: [commit: nofib] D5437: Add continuous integration support (c529cb1) Message-ID: <20181230175731.9FBB23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : D5437 Link : http://ghc.haskell.org/trac/ghc/changeset/c529cb178c17b3dbd926d30ff125d7b7889a144a/nofib >--------------------------------------------------------------- commit c529cb178c17b3dbd926d30ff125d7b7889a144a Author: Ben Gamari Date: Sun Dec 30 12:55:46 2018 -0500 Add continuous integration support >--------------------------------------------------------------- c529cb178c17b3dbd926d30ff125d7b7889a144a .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ea59f24 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,7 @@ +validate: + image: ghcci/x86_64-linux-deb9:0.2 + before_script: + - git clean -xdf + script: + - make boot + - make From git at git.haskell.org Sun Dec 30 17:59:41 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 17:59:41 +0000 (UTC) Subject: [commit: nofib] master: Typofix (44bff05) Message-ID: <20181230175941.02C473ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/44bff05de7ad57e15e887d18f97594b7ed0ffc77/nofib >--------------------------------------------------------------- commit 44bff05de7ad57e15e887d18f97594b7ed0ffc77 Author: Greif Date: Thu Dec 27 16:02:52 2018 +0100 Typofix >--------------------------------------------------------------- 44bff05de7ad57e15e887d18f97594b7ed0ffc77 parallel/transclos/Main.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parallel/transclos/Main.hs b/parallel/transclos/Main.hs index c3cda15..6134c7b 100644 --- a/parallel/transclos/Main.hs +++ b/parallel/transclos/Main.hs @@ -76,7 +76,7 @@ main = do let zs = Data.Set.toList $ {- take n $ -} transcl_set rel_set (Data.Set.fromList seeds) -- set-based with 1-to-n rel #else let zs = {- take n $ -} transcl rel_list seeds -- default: seq, circular, with a 1-to-n list-based relation - -- unused verions + -- unused versions -- let zs = {- take n $ -} transcl_dup rel_one seeds -- no elim of duplicates; good parallelism but stupid -- let zs = {- take n $ -} transcl_simp rel_one seeds -- list-based with 1-to-1 rel #endif @@ -120,4 +120,3 @@ nfib :: Int -> Int nfib 0 = 1 nfib 1 = 1 nfib n = nfib (n-1) + nfib (n-2) + 1 - From git at git.haskell.org Sun Dec 30 18:18:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:18:19 +0000 (UTC) Subject: [commit: nofib] branch 'wip/D5470' created Message-ID: <20181230181819.2C0FE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : wip/D5470 Referencing: 5c66e188b50c62178f24d940cdac1c361378da56 From git at git.haskell.org Sun Dec 30 18:18:21 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:18:21 +0000 (UTC) Subject: [commit: nofib] wip/D5470: Disable timer-based context switches (5c66e18) Message-ID: <20181230181821.335B33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/D5470 Link : http://ghc.haskell.org/trac/ghc/changeset/5c66e188b50c62178f24d940cdac1c361378da56/nofib >--------------------------------------------------------------- commit 5c66e188b50c62178f24d940cdac1c361378da56 Author: Sebastian Graf Date: Sun Dec 30 19:17:59 2018 +0100 Disable timer-based context switches Summary: In the past, we repeatedly had problems with non-deterministic allocations due to stack squeezing during context switches (#4450, #8611). This patch adds `+RTS -V0 -RTS` as extra `RUNTEST_OPTS` for every single-threaded benchmark. Is this the right place to add the flags? Should we also do this for all the other benchmarks? Reviewers: simonmar, osa1, nomeata, O26 nofib GHC Trac Issues: #8611 Differential Revision: https://phabricator.haskell.org/D5470 >--------------------------------------------------------------- 5c66e188b50c62178f24d940cdac1c361378da56 mk/opts.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mk/opts.mk b/mk/opts.mk index 80fb957..1f93d07 100644 --- a/mk/opts.mk +++ b/mk/opts.mk @@ -18,6 +18,9 @@ RUNTEST_OPTS = $(SRC_RUNTEST_OPTS) $(WAY$(_way)_RUNTEST_OPTS) \ ifneq "$(way)" "mp" # if testing GUM don't generate a -S style log file; it may well differ SRC_RUNTEST_OPTS += -ghc-timing +# Deactivate context switches to guarantee deterministic allocation +# measurements. See Trac #8611. +SRC_RUNTEST_OPTS += +RTS -V0 -RTS endif # SRC_RUNTEST_OPTS += +RTS -H10m -K10m -RTS From git at git.haskell.org Sun Dec 30 18:35:35 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:35:35 +0000 (UTC) Subject: [commit: ghc] wip/devel2-ci: gitlab-ci: More aggressive artifact expiration (ed913a6) Message-ID: <20181230183535.AC6703ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/devel2-ci Link : http://ghc.haskell.org/trac/ghc/changeset/ed913a6b5e6efbaaf8eb2672259812e7fcb8ae31/ghc >--------------------------------------------------------------- commit ed913a6b5e6efbaaf8eb2672259812e7fcb8ae31 Author: Ben Gamari Date: Sun Dec 30 13:22:38 2018 -0500 gitlab-ci: More aggressive artifact expiration >--------------------------------------------------------------- ed913a6b5e6efbaaf8eb2672259812e7fcb8ae31 .gitlab-ci.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2055911..0fa6ac1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,7 @@ validate-x86_64-linux-deb8-hadrian: artifacts: reports: junit: junit.xml - expire_in: 2 week + expire_in: 3 day paths: - ghc.tar.xz - junit.xml @@ -133,7 +133,7 @@ validate-x86_64-darwin: - cp -Rf $HOME/.cabal cabal-cache artifacts: when: always - expire_in: 2 week + expire_in: 3 day cache: key: darwin paths: @@ -169,7 +169,6 @@ validate-aarch64-linux-deb9: allow_failure: true artifacts: when: always - expire_in: 2 week cache: key: linux-aarch64-deb9 tags: @@ -179,7 +178,7 @@ nightly-aarch64-linux-deb9: extends: validate-aarch64-linux-deb9 stage: full-build artifacts: - expire_in: 2 year + expire_in: 6 month variables: TEST_TYPE: slowtest only: @@ -191,9 +190,6 @@ validate-i386-linux-deb9: stage: full-build image: ghcci/i386-linux-deb9:0.1 allow_failure: true - artifacts: - when: always - expire_in: 2 week cache: key: linux-i386-deb9 @@ -206,7 +202,6 @@ nightly-i386-linux-deb9: TEST_TYPE: slowtest artifacts: when: always - expire_in: 2 week only: variables: - $NIGHTLY @@ -227,9 +222,6 @@ validate-x86_64-linux-deb9: extends: .validate-linux stage: build image: ghcci/x86_64-linux-deb9:0.2 - artifacts: - when: always - expire_in: 2 week cache: key: linux-x86_64-deb9 @@ -237,7 +229,8 @@ nightly-x86_64-linux-deb9: extends: validate-x86_64-linux-deb9 stage: build artifacts: - expire_in: 2 year + when: always + expire_in: 1 year variables: TEST_TYPE: slowtest only: @@ -249,6 +242,8 @@ validate-x86_64-linux-deb9-llvm: stage: full-build allow_failure: true image: ghcci/x86_64-linux-deb9:0.2 + artifacts: + when: never variables: BUILD_FLAVOUR: perf-llvm cache: @@ -260,9 +255,6 @@ validate-x86_64-linux-deb8: image: ghcci/x86_64-linux-deb8:0.1 cache: key: linux-x86_64-deb8 - artifacts: - when: always - expire_in: 2 week validate-x86_64-linux-fedora27: extends: .validate-linux @@ -272,7 +264,7 @@ validate-x86_64-linux-fedora27: key: linux-x86_64-fedora27 artifacts: when: always - expire_in: 2 week + expire_in: 3 day validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux @@ -287,7 +279,7 @@ nightly-x86_64-linux-deb9-integer-simple: extends: validate-x86_64-linux-deb9-integer-simple stage: full-build artifacts: - expire_in: 2 year + expire_in: 1 year variables: TEST_TYPE: slowtest only: From git at git.haskell.org Sun Dec 30 18:35:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:35:38 +0000 (UTC) Subject: [commit: ghc] wip/devel2-ci: testsuite: Mark T11334b as broken in debugged compiler (c2cce33) Message-ID: <20181230183538.B47443ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/devel2-ci Link : http://ghc.haskell.org/trac/ghc/changeset/c2cce3357fd6d9b32765782f77d7483a5f068e5d/ghc >--------------------------------------------------------------- commit c2cce3357fd6d9b32765782f77d7483a5f068e5d Author: Ben Gamari Date: Sun Dec 30 13:28:07 2018 -0500 testsuite: Mark T11334b as broken in debugged compiler As noted in #16112. >--------------------------------------------------------------- c2cce3357fd6d9b32765782f77d7483a5f068e5d testsuite/tests/dependent/should_fail/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T index f127220..a75886e 100644 --- a/testsuite/tests/dependent/should_fail/all.T +++ b/testsuite/tests/dependent/should_fail/all.T @@ -9,7 +9,7 @@ test('SelfDep', normal, compile_fail, ['']) test('BadTelescope4', normal, compile_fail, ['']) test('RenamingStar', normal, compile_fail, ['']) test('T11407', normal, compile_fail, ['']) -test('T11334b', normal, compile_fail, ['']) +test('T11334b', when(compiler_debugged(), expect_broken(16112)), compile_fail, ['']) test('T11473', normal, compile_fail, ['']) test('T11471', normal, compile_fail, ['']) test('T12174', normal, compile_fail, ['']) From git at git.haskell.org Sun Dec 30 18:35:41 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:35:41 +0000 (UTC) Subject: [commit: ghc] wip/devel2-ci: testsuite: Mark recomp007 as broken in debugged compiler (2c45c08) Message-ID: <20181230183541.D2EA63ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/devel2-ci Link : http://ghc.haskell.org/trac/ghc/changeset/2c45c08613f317be75842980220b1ab569f1c313/ghc >--------------------------------------------------------------- commit 2c45c08613f317be75842980220b1ab569f1c313 Author: Ben Gamari Date: Sun Dec 30 13:30:32 2018 -0500 testsuite: Mark recomp007 as broken in debugged compiler As noted in #14759, this triggers a warning in ListSetOps. >--------------------------------------------------------------- 2c45c08613f317be75842980220b1ab569f1c313 testsuite/tests/driver/recomp007/all.T | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/tests/driver/recomp007/all.T b/testsuite/tests/driver/recomp007/all.T index d4283dd..926b103 100644 --- a/testsuite/tests/driver/recomp007/all.T +++ b/testsuite/tests/driver/recomp007/all.T @@ -3,5 +3,6 @@ # "Fix a recompilation checking bug when a package dependency changes" test('recomp007', [extra_files(['Setup.hs', 'a1/', 'a2/', 'b/']), + when(compiler_debugged(), expect_broken(14759)), when(fast(), skip), normalise_slashes], run_command, ['$MAKE -s --no-print-directory recomp007']) From git at git.haskell.org Sun Dec 30 18:35:44 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:35:44 +0000 (UTC) Subject: [commit: ghc] wip/devel2-ci: testsuite: Mark T14740 and tcfail159 as broken in debugged compiler (da0062c) Message-ID: <20181230183544.D73273ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/devel2-ci Link : http://ghc.haskell.org/trac/ghc/changeset/da0062cae1b2814ab59b3e2acaca1c3fc1bda3e1/ghc >--------------------------------------------------------------- commit da0062cae1b2814ab59b3e2acaca1c3fc1bda3e1 Author: Ben Gamari Date: Sun Dec 30 13:32:50 2018 -0500 testsuite: Mark T14740 and tcfail159 as broken in debugged compiler As noted in #16113, these trigger an assertion in isUnliftedRuntimeRep. >--------------------------------------------------------------- da0062cae1b2814ab59b3e2acaca1c3fc1bda3e1 testsuite/tests/parser/should_fail/all.T | 2 +- testsuite/tests/typecheck/should_fail/all.T | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T index f1f5122..ce67d20 100644 --- a/testsuite/tests/parser/should_fail/all.T +++ b/testsuite/tests/parser/should_fail/all.T @@ -114,7 +114,7 @@ test('T12610', normal, compile_fail, ['']) test('T13450', normal, compile_fail, ['']) test('T13450TH', normal, compile_fail, ['']) test('T14588', normal, compile_fail, ['']) -test('T14740', normal, compile_fail, ['']) +test('T14740', when(compiler_debugged(), expect_broken(16113)), compile_fail, ['']) test('T15209', normal, compile_fail, ['']) test('NoNumericUnderscores0', normal, compile_fail, ['']) diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index f0afa0d..27e971f 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -143,7 +143,7 @@ test('tcfail156', normal, compile_fail, ['']) test('tcfail157', normal, compile_fail, ['']) # Skip tcfail158 until Trac ticket #15899 fixes the broken test test('tcfail158', skip, compile_fail, ['']) -test('tcfail159', normal, compile_fail, ['']) +test('tcfail159', when(debugged_compiler(), expect_broken(16113)), compile_fail, ['']) test('tcfail160', normal, compile_fail, ['']) test('tcfail161', normal, compile_fail, ['']) test('tcfail162', normal, compile_fail, ['']) From git at git.haskell.org Sun Dec 30 18:49:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:49:00 +0000 (UTC) Subject: [commit: nofib] branch 'wip/D5438' created Message-ID: <20181230184900.98FF73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : wip/D5438 Referencing: 651416b0b3194f3d3e378125234d948389ce1333 From git at git.haskell.org Sun Dec 30 18:49:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:49:04 +0000 (UTC) Subject: [commit: nofib] wip/D5438: Stabilise benchmarks wrt. GC (651416b) Message-ID: <20181230184904.602E23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/D5438 Link : http://ghc.haskell.org/trac/ghc/changeset/651416b0b3194f3d3e378125234d948389ce1333/nofib >--------------------------------------------------------------- commit 651416b0b3194f3d3e378125234d948389ce1333 Author: Sebastian Graf Date: Sun Dec 30 19:36:23 2018 +0100 Stabilise benchmarks wrt. GC Summary: This is currently a work-in-progress of #15999, a follow-up on #5793 and #15357. As this patch will change some benchmarks (i.e. `wheel-sieve1`, `awards`) rather drastically, I wanted to get some early feedback on this, rather than quietly investing hours of work when this patch would never have had a chance to be accepted to begin with. The general plan is outlined in #15999: Identify GC-sensitive benchmarks by looking at how productivity rates change over different nursery sizes and iterate `main` of these benchmarks often enough for the wibbles to go away. I was paying attention that the benchmarked logic is actually run $n times more often. When I found benchmarks with insignificant runtime (#15357), I made sure that parameters/input files were adjusted so that runtime of the different modes falls within the ranges described in https://ghc.haskell.org/trac/ghc/ticket/15357#comment:4. This is what I did: - Stabilise gen_regexp - Stabilise primes - Stabilise wheel-sieve1 - Stabilise wheel-sieve2 - Adjust running time of x2n1 - Adjust running time of ansi - Adjust running time of atom - Make awards benchmark something other than IO - Adjust running time of banner - Stabilise boyer - Adjust running time of boyer2 - Adjust running time of queens - Adjust running time of calendar - Adjust runtime of cichelli - Stabilise circsim - Stabilise clausify - Stabilise constraints with moderate success - Adjust running time of cryptarithm1 - Adjust running time of cryptarythm2 - Adjust running time of cse - Adjust running time of eliza - Adjust running time of exact-reals - Adjust running time of expert - Stabilise fft2 - Stabilise fibheaps - Stabilise fish - Adjust running time for gcd - Stabilise comp_lab_zift - Stabilise event - Stabilise fft - Stabilise genfft - Stabilise ida - Adjust running time for listcompr - Adjust running time for listcopy - Adjust running time of nucleic2 - Attempt to stabilise parstof - Stabilise sched - Stabilise solid - Adjust running time of transform - Adjust running time of typecheck - Stabilise wang - Stabilise wave4main - Adjust running time of integer - Adjust running time of knights - Stabilise lambda - Stabilise lcss - Stabilise life - Stabilise mandel - Stabilise mandel2 - Adjust running time of mate - Stabilise minimax - Adjust running time of multiplier - Adjust running time of para - Stabilise power - Adjust running time of primetest - Stabilise puzzle with mild success - Adjust running time for rewrite - Stabilise simple with mild success - Stabilise sorting - Stabilise sphere - Stabilise treejoin - Stabilise bspt - Stabilise cacheprof - Stablise compress - Stablise compress2 - Stabilise fem - Adjust running time of fluid - Stabilise fulsom - Stabilise gamteb - Stabilise gg - Stabilise grep - Adjust running time of hidden - Stabilise hpg - Stabilise infer - Stabilise lift - Stabilise linear - Attempt to stabilise maillist - Stabilise mkhprog - Stabilise parser - Stabilise pic - Stabilise prolog - Attempt to stabilise reptile - Adjust running time of rsa - Adjust running time of scs - Stabilise symalg - Stabilise veritas - Stabilise binary-trees - Adjust running time of fasta - Adjust running time of k-nucleotide - Adjust running time of pidigits - Adjust running time of reverse-complement - Adjust running time of spectral-norm - Adjust running time of fannkuch-redux - Adjust running time for n-body Problematic benchmarks: - `last-piece`: Unclear how to stabilise. Runs for 300ms and I can't make up smaller inputs because I don't understand what it does. - `pretty`: It's just much too small to be relevant at all. Maybe we want to get rid of this one? - `scc`: Same as `pretty`. The input graph for which SCC analysis is done is much too small and I can't find good directed example graphs on the internet. - `secretary`: Apparently this needs `-package random` and consequently hasn't been run for a long time. - `simple`: Same as `last-piece`. Decent runtime (70ms), but it's unstable and I see no way to iterate it ~100 times in fast mode. - `eff`: Every benchmark is problematic here. Not from the point of view of allocations, but because the actual logic is vacuous. IMO, these should be performance tests, not actual benchmarks. Alternatively, write an actual application that makes use of algebraic effects. - `maillist`: Too trivial. It's just String/list manipulation, not representative of any Haskell code we would write today (no use of base library functions which could be fused, uses String instead of Text). It's only 75 loc according to `cloc`, that's not a `real` application. Reviewers: simonpj, simonmar, bgamari, AndreasK, osa1, alpmestan, O26 nofib GHC Trac Issues: #15999 Differential Revision: https://phabricator.haskell.org/D5438 >--------------------------------------------------------------- 651416b0b3194f3d3e378125234d948389ce1333 .gitignore | 9 +- imaginary/gen_regexps/Main.hs | 6 +- imaginary/gen_regexps/Makefile | 3 + imaginary/gen_regexps/gen_regexps.faststdin | 1 - imaginary/gen_regexps/gen_regexps.faststdout | 101 +- imaginary/gen_regexps/gen_regexps.slowstdout | 100 + imaginary/gen_regexps/gen_regexps.stdin | 1 - imaginary/gen_regexps/gen_regexps.stdout | 101 +- imaginary/paraffins/Main.hs | 3 +- imaginary/paraffins/Makefile | 7 +- imaginary/paraffins/paraffins.faststdout | 4004 +- imaginary/paraffins/paraffins.slowstdout | 4000 + imaginary/paraffins/paraffins.stdout | 4004 +- imaginary/primes/Main.hs | 12 +- imaginary/primes/Makefile | 6 +- imaginary/primes/primes.faststdout | 101 +- imaginary/primes/primes.slowstdout | 101 +- imaginary/primes/primes.stdout | 101 +- imaginary/queens/Makefile | 4 +- imaginary/queens/queens.faststdout | 2 +- imaginary/queens/queens.slowstdout | 1 + imaginary/wheel-sieve1/Main.hs | 30 +- imaginary/wheel-sieve1/Makefile | 6 +- imaginary/wheel-sieve1/wheel-sieve1.faststdout | 101 +- imaginary/wheel-sieve1/wheel-sieve1.slowstdout | 101 +- imaginary/wheel-sieve1/wheel-sieve1.stdout | 101 +- imaginary/wheel-sieve2/Main.hs | 30 +- imaginary/wheel-sieve2/Makefile | 6 +- imaginary/wheel-sieve2/wheel-sieve2.faststdout | 101 +- imaginary/wheel-sieve2/wheel-sieve2.slowstdout | 100 + imaginary/wheel-sieve2/wheel-sieve2.stdout | 101 +- imaginary/x2n1/Makefile | 6 +- imaginary/x2n1/x2n1.faststdout | 2 +- imaginary/x2n1/x2n1.slowstdout | 1 + imaginary/x2n1/x2n1.stdout | 2 +- real/anna/Main.hs | 26 +- real/anna/Makefile | 6 +- real/anna/anna.faststdin | 268 - real/anna/anna.faststdout | 2000 +- real/anna/{anna.stdin => anna.full} | 0 real/anna/anna.slowstdin | 603 + real/anna/anna.slowstdout | 100 + real/anna/anna.stdin | 1039 - real/anna/anna.stdout | 6101 +- real/bspt/Input.lhs | 3 +- real/bspt/Main.hs | 17 + real/bspt/Main.lhs | 8 - real/bspt/Makefile | 3 + real/bspt/{Prog.lhs => Prog.hs} | 2 - real/bspt/bspt.faststdout | 1000 + real/bspt/bspt.slowstdout | 50000 ++++ real/bspt/bspt.stdout | 10004 +- real/cacheprof/Main.hs | 80 +- real/cacheprof/cacheprof.faststdin | 76 + .../cacheprof/cacheprof.full | 0 real/cacheprof/cacheprof.slowstdin | 3040 + real/cacheprof/cacheprof.stdin | 13108 - real/cacheprof/cacheprof.stdout | 107220 -------- real/compress/Main.hs | 9 +- real/compress/Makefile | 9 +- real/compress/compress.faststdin | 20051 +- real/compress/compress.faststdout | 201 +- real/compress/compress.slowstdin | 298 + real/compress/compress.slowstdout | 200 + real/compress/compress.stdin | 147 + real/compress/compress.stdout | 201 +- real/compress2/Main.hs | 14 +- real/compress2/Makefile | 17 +- real/compress2/compress2.faststdin | 20051 +- real/compress2/compress2.faststdout | Bin 44152 -> 10146 bytes real/compress2/compress2.slowstdin | 298 + real/compress2/compress2.slowstdout | 500 + real/compress2/compress2.stdin | 147 + real/compress2/compress2.stdout | 500 + real/fem/Main.hs | 41 +- real/fem/Makefile | 4 + real/fem/fem.stdout | 257 - real/fem/fem.stdout-linux | 257 - real/fem/fem.stdout-x86-linux | 257 - real/fem/fem.stdout1 | 257 - real/fem/fem.stdout2 | 257 - real/fluid/Main.hs | 62 +- real/fluid/Makefile | 3 + real/fluid/fluid.stdout | 6 - real/fluid/fluid.stdout-freebsd | 6 - real/fluid/fluid.stdout-linux | 6 - real/fluid/fluid.stdout1 | 6 - real/fulsom/Main.hs | 9 +- real/fulsom/Makefile | 6 +- real/fulsom/fulsom.faststdout | Bin 87916 -> 20000 bytes real/fulsom/fulsom.slowstdout | 1000 + real/fulsom/fulsom.stdout | Bin 346864 -> 21000 bytes real/gamteb/Main.hs | 18 +- real/gamteb/Makefile | 3 + real/gamteb/gamteb.faststdin | 1 - real/gamteb/gamteb.faststdout | 2748 +- real/gamteb/gamteb.faststdout1 | 2548 - real/gamteb/gamteb.slowstdout | 200 + real/gamteb/gamteb.stderr | 1 - real/gamteb/gamteb.stdin | 1 - real/gamteb/gamteb.stdout | 80629 +----- real/gg/Main.hs | 26 +- real/gg/Makefile | 4 + real/gg/gg.faststdin | 46 + real/gg/gg.faststdout | 150 + real/gg/{gg.stdin => gg.slowstdin} | 0 real/gg/gg.slowstdout | 1500 + real/gg/gg.stdin | 86 - real/gg/gg.stdout | 1723 +- real/grep/Main.lhs | 22 +- real/grep/Makefile | 7 +- real/grep/grep.faststdin | 174 + real/grep/grep.faststdout | 100 + real/grep/grep.slowstdin | 4000 + real/grep/grep.slowstdout | 250 + real/grep/grep.stdin | 1000 + real/grep/grep.stdout | 169 +- real/hidden/Main.hs | 21 +- real/hidden/Makefile | 4 +- real/hidden/MyIO.hs | 8 +- real/hidden/hidden.stderr | 76 + real/hidden/hidden.stdout | 452 - real/hidden/hidden.stdout-x86-linux | 454 - real/hidden/hidden.stdout2 | 460 - real/hidden/hidden.stdout3 | 448 - real/hidden/hidden.stdout4 | 458 - real/hidden/hidden.stdout5 | 458 - real/hpg/Main.lhs | 5 +- real/hpg/Makefile | 6 +- real/hpg/Utils.lhs | 6 +- real/hpg/hpg.faststdout | 3162 +- real/hpg/hpg.slowstdout | 300 + real/hpg/hpg.stdout | 25744 +- real/infer/Main.hs | 29 +- real/infer/infer.faststdin | 16 + real/infer/infer.faststdout | 200 + real/infer/{infer.stdin => infer.slowstdin} | 0 real/infer/infer.slowstdout | 200 + real/infer/infer.stdin | 2 +- real/infer/infer.stdout | 220 +- real/lift/Main.lhs | 32 +- real/lift/Makefile | 4 + real/lift/lift.faststdout | 400 + real/lift/lift.slowstdout | 20000 ++ real/lift/lift.stdout | 4094 +- real/linear/Main.lhs | 15 +- real/linear/Makefile | 3 + real/linear/linear.faststdout | 200 + real/linear/linear.slowstdout | 200 + real/linear/linear.stdout | 256 +- real/maillist/Main.hs | 8 +- real/maillist/Makefile | 3 + real/maillist/maillist.faststdout | 600 + real/maillist/maillist.slowstdout | 600 + real/maillist/maillist.stdin | 1 - real/maillist/maillist.stdout | 596 +- real/maillist/runtime_files/fast | 4 + real/maillist/runtime_files/norm | 584 + real/maillist/runtime_files/{addresses => slow} | 0 real/mkhprog/Main.lhs | 17 +- real/mkhprog/Makefile | 9 +- real/mkhprog/mkhprog.stdout | 113 - real/parser/Main.hs | 24 +- real/parser/Makefile | 3 - real/parser/parser.faststdin | 40 + real/parser/parser.faststdout | 500 + real/parser/{big_big_test.hs => parser.slowstdin} | 0 real/parser/parser.slowstdout | 500 + real/parser/parser.stdin | 297 + real/parser/parser.stdout | 508 +- real/pic/Main.hs | 26 +- real/pic/Makefile | 6 + real/pic/pic.stderr | 1 - real/pic/pic.stdin | 1 - real/pic/pic.stdout | 1 - real/pic/pic.stdout-linux | 1 - real/pic/pic.stdout-linux2 | 1 - real/pic/pic.stdout-mingw | 1 - real/pic/pic.stdout1 | 1 - real/pic/pic.stdout3 | 1 - real/pic/pic.stdout4 | 1 - real/prolog/Main.hs | 25 +- real/prolog/{prolog.stdin => prolog.faststdin} | 0 real/prolog/prolog.faststdout | 203 + real/prolog/prolog.slowstdin | 1203 + real/prolog/prolog.slowstdout | 203 + real/prolog/prolog.stdin | 252 +- real/prolog/prolog.stdout | 279 +- real/reptile/Main.hs | 43 +- real/reptile/reptile.faststdin | 1 + real/reptile/reptile.faststdout | 500 + real/reptile/reptile.slowstdin | 66 + real/reptile/reptile.slowstdout | 500 + real/reptile/reptile.stdout | 507 +- real/rsa/Main.hs | 24 +- real/rsa/rsa.faststdin | 7 + real/rsa/rsa.faststdout | 100 + real/rsa/rsa.slowstdin | 377 + real/rsa/rsa.slowstdout | 100 + real/rsa/rsa.stdin | 3493 - real/rsa/rsa.stdout | 1443 +- real/scs/Makefile | 4 +- real/symalg/Print.hs | 7 +- real/symalg/symalg.faststdin | 262 +- real/symalg/symalg.faststdout | 266 +- real/symalg/symalg.slowstdin | 263 + real/symalg/symalg.slowstdout | 264 + real/symalg/symalg.stdin | 262 +- real/symalg/symalg.stdout | 266 +- real/veritas/Main.hs | 22 +- real/veritas/Makefile | 7 + real/veritas/veritas.faststdout | 400 + real/veritas/veritas.slowstdout | 20000 ++ real/veritas/veritas.stdout | Bin 1391 -> 80000 bytes shootout/binary-trees/Main.hs | 28 +- shootout/binary-trees/Makefile | 9 +- shootout/binary-trees/binary-trees.faststdout | 97 +- shootout/binary-trees/binary-trees.slowstdout | 491 +- shootout/binary-trees/binary-trees.stdout | 359 +- shootout/fannkuch-redux/Makefile | 9 +- shootout/fannkuch-redux/fannkuch-redux.slowstdout | 2 - shootout/fasta/Makefile | 4 +- shootout/k-nucleotide/Makefile | 9 +- shootout/k-nucleotide/k-nucleotide.faststdout | 50 +- shootout/k-nucleotide/k-nucleotide.slowstdout | 18 +- shootout/k-nucleotide/k-nucleotide.stdout | 40 +- shootout/n-body/Makefile | 8 +- shootout/pidigits/Makefile | 8 +- shootout/pidigits/pidigits.faststdout | 150 + shootout/pidigits/pidigits.slowstdout | 1200 + shootout/pidigits/pidigits.stdout | 300 + shootout/reverse-complement/Makefile | 16 +- shootout/spectral-norm/Makefile | 4 +- shootout/spectral-norm/spectral-norm.faststdout | 2 +- spectral/ansi/Makefile | 6 +- spectral/ansi/ansi.faststdout | 1 + spectral/ansi/ansi.slowstdout | 2 +- spectral/ansi/ansi.stdout | 2 +- spectral/ansi/{ansi.slowstdout => blub} | 2 +- spectral/atom/Makefile | 6 +- spectral/atom/atom.faststdout | 600 + spectral/atom/{atom.stdout => atom.slowstdout} | 2000 + spectral/atom/atom.stdout | 500 + spectral/awards/Main.hs | 17 +- spectral/awards/Makefile | 31 +- spectral/awards/awards.faststdout | 2000 + spectral/awards/awards.stdout | 1 - spectral/banner/Main.hs | 4 +- spectral/banner/Makefile | 34 + .../banner/{banner.stdin => banner.stdin.template} | 0 spectral/banner/banner.stdout | 6 - spectral/banner/banner.stdout.template | 12 + spectral/boyer/Main.lhs | 3 +- spectral/boyer/Makefile | 6 +- spectral/boyer/boyer.faststdout | 100 + spectral/boyer/boyer.slowstdout | 100 + spectral/boyer/boyer.stdout | 99 + spectral/boyer2/Main.hs | 30 +- spectral/boyer2/Makefile | 3 + spectral/boyer2/boyer2.faststdout | 60 + spectral/boyer2/boyer2.slowstdout | 3000 + spectral/boyer2/boyer2.stdout | 599 + spectral/calendar/Main.hs | 24 +- spectral/calendar/Makefile | 6 +- .../{calendar.slowstdout => calendar.faststdout} | 1000 - spectral/calendar/calendar.slowstdout | 48000 ++++ spectral/calendar/calendar.stdout | 9999 + spectral/cichelli/Auxil.hs | 6 +- spectral/cichelli/Main.hs | 12 +- spectral/cichelli/Makefile | 3 + spectral/cichelli/Prog.hs | 12 +- spectral/cichelli/cichelli.faststdout | 1 + spectral/cichelli/cichelli.slowstdout | 1 + spectral/cichelli/cichelli.stdout | 2 +- spectral/circsim/Main.lhs | 6 +- spectral/circsim/Makefile | 6 +- spectral/circsim/circsim.faststdout | 98 +- spectral/circsim/circsim.slowstdout | 98 +- spectral/circsim/circsim.stdout | 98 +- spectral/clausify/Main.hs | 3 +- spectral/clausify/Makefile | 6 +- spectral/clausify/clausify.faststdout | 60 + spectral/clausify/clausify.slowstdout | 2345 + spectral/clausify/clausify.stdout | 269 + spectral/constraints/Main.hs | 13 +- spectral/constraints/Makefile | 7 +- spectral/constraints/constraints.faststdout | 1205 +- spectral/constraints/constraints.slowstdout | 1200 + spectral/constraints/constraints.stdout | 1205 +- spectral/cryptarithm1/Main.hs | 16 +- spectral/cryptarithm1/Makefile | 3 + ...cryptarithm1.stdout => cryptarithm1.faststdout} | 0 spectral/cryptarithm1/cryptarithm1.slowstdout | 15 + spectral/cryptarithm1/cryptarithm1.stdout | 2 + spectral/cryptarithm2/Main.hs | 20 +- spectral/cryptarithm2/Makefile | 4 + spectral/cryptarithm2/cryptarithm2.faststdout | 300 + spectral/cryptarithm2/cryptarithm2.slowstdout | 15000 ++ spectral/cryptarithm2/cryptarithm2.stdout | 2990 + spectral/cse/Main.hs | 34 +- spectral/cse/Makefile | 3 + .../soda7.stdout => spectral/cse/cse.faststdout | 0 .../soda7.stdout => spectral/cse/cse.slowstdout | 0 spectral/cse/cse.stdout | 221 - spectral/eliza/Main.hs | 22 +- spectral/eliza/Makefile | 3 + spectral/eliza/eliza.faststdout | 1300 + spectral/eliza/eliza.slowstdout | 65000 +++++ spectral/eliza/eliza.stdout | 13032 +- spectral/exact-reals/Era.hs | 6 +- spectral/exact-reals/Makefile | 3 + spectral/expert/Main.hs | 20 +- spectral/expert/Makefile | 4 + spectral/expert/expert.faststdout | 1000 + spectral/expert/expert.slowstdout | 50000 ++++ spectral/expert/expert.stdout | 10016 +- spectral/fft2/Main.lhs | 7 +- spectral/fft2/Makefile | 6 +- spectral/fft2/fft2.stdout | 1 - spectral/fibheaps/Main.lhs | 6 +- spectral/fibheaps/Makefile | 6 +- spectral/fibheaps/fibheaps.stdout | 1 - spectral/fish/Main.hs | 9 +- spectral/fish/Makefile | 3 + spectral/fish/fish.stdout | 9345 - spectral/gcd/Makefile | 6 +- spectral/gcd/gcd.faststdout | 2 +- spectral/gcd/gcd.slowstdout | 1 + spectral/gcd/gcd.stdout | 2 +- spectral/hartel/comp_lab_zift/Main.hs | 5 +- spectral/hartel/comp_lab_zift/Makefile | 6 +- .../hartel/comp_lab_zift/comp_lab_zift.faststdout | 101 +- .../hartel/comp_lab_zift/comp_lab_zift.slowstdout | 100 + spectral/hartel/comp_lab_zift/comp_lab_zift.stdout | 101 +- spectral/hartel/event/Main.hs | 5 +- spectral/hartel/event/Makefile | 6 +- spectral/hartel/event/event.faststdout | 100 + spectral/hartel/event/event.slowstdout | 100 + spectral/hartel/event/event.stdout | 99 + spectral/hartel/fft/Main.hs | 5 +- spectral/hartel/fft/Makefile | 6 +- spectral/hartel/fft/fft.faststdout | 361 +- spectral/hartel/fft/fft.slowstdout | 360 + spectral/hartel/fft/fft.stdout | 361 +- spectral/hartel/genfft/Main.hs | 5 +- spectral/hartel/genfft/Makefile | 6 +- spectral/hartel/genfft/genfft.faststdout | 301 +- spectral/hartel/genfft/genfft.slowstdout | 300 + spectral/hartel/genfft/genfft.stdout | 301 +- spectral/hartel/ida/Main.hs | 7 +- spectral/hartel/ida/Makefile | 11 +- spectral/hartel/ida/ida.faststdout | 3002 +- spectral/hartel/ida/ida.slowstdout | 6000 + spectral/hartel/ida/ida.stdout | 1202 +- spectral/hartel/listcompr/Main.hs | 6 +- spectral/hartel/listcompr/Makefile | 7 +- spectral/hartel/listcompr/listcompr.faststdout | 1 + spectral/hartel/listcompr/listcompr.slowstdout | 1 + spectral/hartel/listcompr/listcompr.stdout | 20001 +- spectral/hartel/listcopy/Main.hs | 6 +- spectral/hartel/listcopy/Makefile | 7 +- spectral/hartel/listcopy/listcopy.faststdout | 1 + spectral/hartel/listcopy/listcopy.slowstdout | 1 + spectral/hartel/listcopy/listcopy.stdout | 20001 +- spectral/hartel/nucleic2/Main.hs | 16 +- spectral/hartel/nucleic2/Makefile | 3 + spectral/hartel/nucleic2/nucleic2.stdout1 | 1 - spectral/hartel/nucleic2/nucleic2.stdout2 | 1 - spectral/hartel/nucleic2/nucleic2.stdout3 | 1 - spectral/hartel/nucleic2/nucleic2.stdout4 | 1 - spectral/hartel/nucleic2/nucleic2.stdout5 | 1 - spectral/hartel/nucleic2/nucleic2.stdout6 | 1 - spectral/hartel/parstof/Main.hs | 17 +- spectral/hartel/parstof/Makefile | 7 +- spectral/hartel/parstof/parstof.faststdout | 200 + spectral/hartel/parstof/parstof.slowstdout | 200 + spectral/hartel/parstof/parstof.stdout | 201 +- spectral/hartel/sched/Main.hs | 7 +- spectral/hartel/sched/Makefile | 6 +- spectral/hartel/sched/sched.faststdout | 201 +- spectral/hartel/sched/sched.slowstdout | 500 + spectral/hartel/sched/sched.stdout | 101 +- spectral/hartel/solid/Main.hs | 5 +- spectral/hartel/solid/Makefile | 6 +- spectral/hartel/solid/solid.faststdout | 1990 +- spectral/hartel/solid/solid.slowstdout | 4776 +- spectral/hartel/solid/solid.stdout | 3582 +- spectral/hartel/transform/Makefile | 6 +- spectral/hartel/transform/transform.faststdout | 2 +- spectral/hartel/transform/transform.slowstdout | 1 + spectral/hartel/transform/transform.stdout | 2 +- spectral/hartel/typecheck/Makefile | 6 +- spectral/hartel/typecheck/typecheck.faststdout | 2 +- spectral/hartel/typecheck/typecheck.slowstdout | 1 + spectral/hartel/typecheck/typecheck.stdout | 2 +- spectral/hartel/wang/Main.hs | 5 +- spectral/hartel/wang/Makefile | 6 +- spectral/hartel/wang/wang.faststdout | 501 +- spectral/hartel/wang/wang.slowstdout | 500 + spectral/hartel/wang/wang.stdout | 501 +- spectral/hartel/wave4main/Main.hs | 5 +- spectral/hartel/wave4main/Makefile | 6 +- spectral/hartel/wave4main/wave4main.faststdout | 501 +- spectral/hartel/wave4main/wave4main.slowstdout | 500 + spectral/hartel/wave4main/wave4main.stdout | 501 +- spectral/integer/Makefile | 6 +- spectral/knights/Main.lhs | 5 +- spectral/knights/Makefile | 6 +- spectral/knights/knights.faststdout | 130 +- spectral/knights/knights.slowstdout | 404 +- spectral/knights/knights.stdout | 138 +- spectral/lambda/Main.hs | 3 +- spectral/lambda/Makefile | 7 +- spectral/lambda/lambda.faststdout | 200 + spectral/lambda/lambda.slowstdout | 200 + spectral/lambda/lambda.stdout | 202 +- spectral/lcss/Main.hs | 3 +- spectral/lcss/Makefile | 6 +- spectral/lcss/lcss.faststdout | 501 +- spectral/lcss/lcss.slowstdout | 500 + spectral/lcss/lcss.stdout | 501 +- spectral/life/Main.hs | 16 +- spectral/life/Makefile | 3 + spectral/life/life.faststdout | 250 + spectral/life/life.slowstdout | 250 + spectral/life/life.stdout | 282 +- spectral/mandel/Main.hs | 33 + spectral/mandel/Main.lhs | 37 - spectral/mandel/Makefile | 7 +- spectral/mandel/mandel.slowstdin | 7 - spectral/mandel/mandel.slowstdout | Bin 67602 -> 0 bytes spectral/mandel/mandel.stderr | 1 - spectral/mandel/mandel.stdin | 7 - spectral/mandel/mandel.stdout | Bin 67601 -> 0 bytes spectral/mandel/mandel.stdout-mingw | Bin 67693 -> 0 bytes spectral/mandel2/Main.hs | 16 +- spectral/mandel2/Makefile | 3 + spectral/mandel2/mandel2.stdout | 1 - spectral/mate/Main.hs | 0 spectral/mate/Makefile | 4 +- spectral/mate/mate.faststdout | 20 + spectral/mate/{mate.stdout => mate.slowstdout} | 0 spectral/mate/mate.stdout | 70 +- spectral/minimax/Main.hs | 8 +- spectral/minimax/Makefile | 3 + spectral/minimax/Prog.hs | 6 +- spectral/minimax/minimax.stdout | 36 - spectral/multiplier/Makefile | 6 +- .../{multiplier.stdout => multiplier.faststdout} | 0 .../{multiplier.stdout => multiplier.slowstdout} | 0 spectral/para/Main.lhs | 14 +- spectral/para/Makefile | 5 +- spectral/para/para.stdout | 17253 -- spectral/power/Main.hs | 17 +- spectral/power/Makefile | 6 +- spectral/power/power.faststdout | 4 - spectral/power/power.stdout | 4 - spectral/primetest/primetest.faststdin | 4 + spectral/primetest/primetest.faststdout | 2 +- spectral/primetest/primetest.slowstdin | 300 + spectral/primetest/primetest.slowstdout | 1 + spectral/primetest/primetest.stdin | 30 + spectral/primetest/primetest.stdout | 2 +- spectral/puzzle/Main.hs | 21 +- spectral/puzzle/Makefile | 3 + spectral/puzzle/puzzle.stdout | 86 - spectral/rewrite/Makefile | 6 +- spectral/simple/Main.hs | 21 +- spectral/simple/Makefile | 4 + spectral/simple/simple.stdin | 1 - spectral/simple/simple.stdout | 2 +- spectral/simple/simple.stdout-linux | 2 +- spectral/simple/simple.stdout1 | 2 +- spectral/simple/simple.stdout2 | 2 +- spectral/simple/simple.stdout3 | 2 +- spectral/simple/simple.stdout4 | 2 +- spectral/simple/simple.stdout5 | 2 +- spectral/simple/simple.stdout6 | 2 +- spectral/sorting/Main.hs | 40 +- spectral/sorting/Makefile | 5 +- spectral/sorting/sorting.faststdout | 600 + spectral/sorting/sorting.slowstdout | 3000 + spectral/sorting/sorting.stdout | 740 +- spectral/sphere/Main.lhs | 39 +- spectral/sphere/Makefile | 6 +- spectral/sphere/sphere.faststdout | 10103 +- spectral/sphere/sphere.slowstdout | 100 + spectral/sphere/sphere.stdout | 250103 +----------------- spectral/treejoin/Main.hs | 3 +- spectral/treejoin/Makefile | 3 + spectral/treejoin/runtime_files/1500.1 | 1500 + spectral/treejoin/runtime_files/1500.2 | 1500 + spectral/treejoin/runtime_files/8000.1 | 8000 + spectral/treejoin/runtime_files/8000.2 | 8000 + spectral/treejoin/treejoin.faststdout | 100 + spectral/treejoin/treejoin.slowstdout | 100 + spectral/treejoin/treejoin.stdout | 99 + 497 files changed, 438382 insertions(+), 623487 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 651416b0b3194f3d3e378125234d948389ce1333 From git at git.haskell.org Sun Dec 30 18:52:58 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:52:58 +0000 (UTC) Subject: [commit: ghc] branch 'wip/pdf-docs-on-darwin' created Message-ID: <20181230185258.C36543ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/pdf-docs-on-darwin Referencing: 88e7d935ffb22dbe5b962ab4aff399ce9f6e5bb6 From git at git.haskell.org Sun Dec 30 18:53:01 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 30 Dec 2018 18:53:01 +0000 (UTC) Subject: [commit: ghc] wip/pdf-docs-on-darwin: gitlab-ci: Try reenabling PDF documentation on Darwin (88e7d93) Message-ID: <20181230185301.CBDEB3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/pdf-docs-on-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/88e7d935ffb22dbe5b962ab4aff399ce9f6e5bb6/ghc >--------------------------------------------------------------- commit 88e7d935ffb22dbe5b962ab4aff399ce9f6e5bb6 Author: Ben Gamari Date: Sun Dec 30 13:49:47 2018 -0500 gitlab-ci: Try reenabling PDF documentation on Darwin Carter says that the builder issues have now been sorted. >--------------------------------------------------------------- 88e7d935ffb22dbe5b962ab4aff399ce9f6e5bb6 .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..1ad2771 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,8 +126,6 @@ validate-x86_64-darwin: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" - # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex - - echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache From git at git.haskell.org Mon Dec 31 03:00:26 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 03:00:26 +0000 (UTC) Subject: [commit: ghc] master: Introduce NCG config flag and add helper (ae4f103) Message-ID: <20181231030026.9C17F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ae4f1033cfe131fca9416e2993bda081e1f8c152/ghc >--------------------------------------------------------------- commit ae4f1033cfe131fca9416e2993bda081e1f8c152 Author: Gabor Greif Date: Sun Dec 30 10:57:46 2018 +0100 Introduce NCG config flag and add helper ... for testing presence of NCG This commit adds a criterion for checking whether we can expect sensible output from --ddump-asm. >--------------------------------------------------------------- ae4f1033cfe131fca9416e2993bda081e1f8c152 testsuite/config/ghc | 2 ++ testsuite/driver/testlib.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 247ddb8..24294da 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -158,6 +158,8 @@ def get_compiler_info(): s = re.sub('[\r\n]', '', s) rtsInfoDict = dict(eval(s)) + config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES" + # external interpreter needs RTS linker support # If the field is not present (GHC 8.0 and earlier), assume we don't # have -fexternal-interpreter (though GHC 8.0 actually does) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 5f84863..96024a9 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -440,6 +440,9 @@ def cygwin( ): def have_vanilla( ): return config.have_vanilla +def have_ncg( ): + return config.have_ncg + def have_dynamic( ): return config.have_dynamic From git at git.haskell.org Mon Dec 31 10:01:59 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 10:01:59 +0000 (UTC) Subject: [commit: nofib] branch 'wip/boot-compress2' created Message-ID: <20181231100159.B60BD3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : wip/boot-compress2 Referencing: 2c6e793c4dbe321e64a57870ca7014a174f86c36 From git at git.haskell.org Mon Dec 31 10:02:01 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 10:02:01 +0000 (UTC) Subject: [commit: nofib] wip/boot-compress2: Compare output of compress2 by hashing (2c6e793) Message-ID: <20181231100201.C71343ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/boot-compress2 Link : http://ghc.haskell.org/trac/ghc/changeset/2c6e793c4dbe321e64a57870ca7014a174f86c36/nofib >--------------------------------------------------------------- commit 2c6e793c4dbe321e64a57870ca7014a174f86c36 Author: Sebastian Graf Date: Mon Dec 31 11:00:41 2018 +0100 Compare output of compress2 by hashing This should fix the build in the same way as D5469. >--------------------------------------------------------------- 2c6e793c4dbe321e64a57870ca7014a174f86c36 .gitignore | 1 - real/compress2/Main.hs | 7 ++++++- real/compress2/Makefile | 10 +++------- real/compress2/compress2.faststdout | Bin 44152 -> 20 bytes real/compress2/compress2.stdout | 1 + 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index f1fae44..6730d53 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ real/compress/compress real/compress/compress.stdin real/compress2/compress2 real/compress2/compress2.stdin -real/compress2/compress2.stdout real/eff/CS/CS real/eff/CSD/CSD real/eff/FS/FS diff --git a/real/compress2/Main.hs b/real/compress2/Main.hs index 3562644..71fe22b 100644 --- a/real/compress2/Main.hs +++ b/real/compress2/Main.hs @@ -8,12 +8,17 @@ where import Encode import WriteRoutines import System.IO +import Data.Char +import Data.List (foldl') + +hash :: String -> Int +hash = foldl' (\acc c -> ord c + acc*31) 0 main = do hSetBinaryMode stdin True hSetBinaryMode stdout True i <- getContents - putStr (compress i) + print (hash (compress i)) -- The output is given by a magic header consisting of two fixed numbers, -- and a third representing the maximum number of bits used per code and diff --git a/real/compress2/Makefile b/real/compress2/Makefile index 7a605f6..b969707 100644 --- a/real/compress2/Makefile +++ b/real/compress2/Makefile @@ -7,17 +7,13 @@ SRC_HC_OPTS += -fglasgow-exts SRC_RUNTEST_OPTS += +RTS -H100m -RTS +CLEAN_FILES += compress2.stdin + include $(TOP)/mk/target.mk -boot :: compress2.stdin compress2.faststdin compress2.stdout +boot :: compress2.stdin CAT_FILES = compress2.faststdin *.hs compress2.faststdin *.hs compress2.stdin : compress2.faststdin cat $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) > compress2.stdin - -compress2.stdout : compress2.stdin compress2 - ./compress2 < compress2.stdin > compress2.stdout - -clean :: - rm -f compress2.stdin compress2.stdout diff --git a/real/compress2/compress2.faststdout b/real/compress2/compress2.faststdout index d5c2f00..1d09915 100644 Binary files a/real/compress2/compress2.faststdout and b/real/compress2/compress2.faststdout differ diff --git a/real/compress2/compress2.stdout b/real/compress2/compress2.stdout new file mode 100644 index 0000000..81bb35c --- /dev/null +++ b/real/compress2/compress2.stdout @@ -0,0 +1 @@ +-6634557641809225147 From git at git.haskell.org Mon Dec 31 10:15:00 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 10:15:00 +0000 (UTC) Subject: [commit: nofib] branch 'wip/strict-compress2' created Message-ID: <20181231101500.A767B3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : wip/strict-compress2 Referencing: 70b59f3dee53667d98bbdc60d4591b92711cdbac From git at git.haskell.org Mon Dec 31 10:15:02 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 10:15:02 +0000 (UTC) Subject: [commit: nofib] wip/strict-compress2: Compare output of compress2 by hashing (632f33f) Message-ID: <20181231101502.B2E213ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/strict-compress2 Link : http://ghc.haskell.org/trac/ghc/changeset/632f33f0ade12c19662d8f8697f968e1cc464f06/nofib >--------------------------------------------------------------- commit 632f33f0ade12c19662d8f8697f968e1cc464f06 Author: Sebastian Graf Date: Mon Dec 31 11:00:41 2018 +0100 Compare output of compress2 by hashing This should fix the build in the same way as D5469. >--------------------------------------------------------------- 632f33f0ade12c19662d8f8697f968e1cc464f06 .gitignore | 1 - real/compress2/Main.hs | 8 ++++++-- real/compress2/Makefile | 12 +++--------- real/compress2/compress2.faststdout | Bin 44152 -> 20 bytes real/compress2/compress2.stdout | 1 + 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index f1fae44..6730d53 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ real/compress/compress real/compress/compress.stdin real/compress2/compress2 real/compress2/compress2.stdin -real/compress2/compress2.stdout real/eff/CS/CS real/eff/CSD/CSD real/eff/FS/FS diff --git a/real/compress2/Main.hs b/real/compress2/Main.hs index 3562644..592c00a 100644 --- a/real/compress2/Main.hs +++ b/real/compress2/Main.hs @@ -8,12 +8,16 @@ where import Encode import WriteRoutines import System.IO +import Data.Char +import Data.List (foldl') + +hash :: String -> Int +hash = foldl' (\acc c -> ord c + acc*31) 0 main = do hSetBinaryMode stdin True - hSetBinaryMode stdout True i <- getContents - putStr (compress i) + print (hash (compress i)) -- The output is given by a magic header consisting of two fixed numbers, -- and a third representing the maximum number of bits used per code and diff --git a/real/compress2/Makefile b/real/compress2/Makefile index 7a605f6..3a81e95 100644 --- a/real/compress2/Makefile +++ b/real/compress2/Makefile @@ -1,23 +1,17 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk -SRC_RUNTEST_OPTS += -stdout-binary - SRC_HC_OPTS += -fglasgow-exts SRC_RUNTEST_OPTS += +RTS -H100m -RTS +CLEAN_FILES += compress2.stdin + include $(TOP)/mk/target.mk -boot :: compress2.stdin compress2.faststdin compress2.stdout +boot :: compress2.stdin CAT_FILES = compress2.faststdin *.hs compress2.faststdin *.hs compress2.stdin : compress2.faststdin cat $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) > compress2.stdin - -compress2.stdout : compress2.stdin compress2 - ./compress2 < compress2.stdin > compress2.stdout - -clean :: - rm -f compress2.stdin compress2.stdout diff --git a/real/compress2/compress2.faststdout b/real/compress2/compress2.faststdout index d5c2f00..1d09915 100644 Binary files a/real/compress2/compress2.faststdout and b/real/compress2/compress2.faststdout differ diff --git a/real/compress2/compress2.stdout b/real/compress2/compress2.stdout new file mode 100644 index 0000000..5c949b3 --- /dev/null +++ b/real/compress2/compress2.stdout @@ -0,0 +1 @@ +8522868473445645791 From git at git.haskell.org Mon Dec 31 10:15:04 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 10:15:04 +0000 (UTC) Subject: [commit: nofib] wip/strict-compress2: Replace mentions of {-# STRICT -#} with bangs in compress2 (70b59f3) Message-ID: <20181231101504.BA5EE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : wip/strict-compress2 Link : http://ghc.haskell.org/trac/ghc/changeset/70b59f3dee53667d98bbdc60d4591b92711cdbac/nofib >--------------------------------------------------------------- commit 70b59f3dee53667d98bbdc60d4591b92711cdbac Author: Sebastian Graf Date: Mon Dec 31 11:10:41 2018 +0100 Replace mentions of {-# STRICT -#} with bangs in compress2 The pragma hasn't been recognised for a long time. Replacing it with bangs will change program semantics to how it was intended. The perf CI build is currently broken anyway, so this shouldn't skew numbers too much. >--------------------------------------------------------------- 70b59f3dee53667d98bbdc60d4591b92711cdbac real/compress2/Encode.hs | 12 ++++++------ real/compress2/compress2.stdout | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/real/compress2/Encode.hs b/real/compress2/Encode.hs index 290e2fa..c3c2931 100644 --- a/real/compress2/Encode.hs +++ b/real/compress2/Encode.hs @@ -14,12 +14,12 @@ data CodeEvent = Clear deriving Show{-was:Text-} data CodeState = CS - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} + !Int + !Int + !Int + !Int + !Int + !Int firstEnt = 257 :: Int maxBits = 16 :: Int diff --git a/real/compress2/compress2.stdout b/real/compress2/compress2.stdout index 5c949b3..d62aa2e 100644 --- a/real/compress2/compress2.stdout +++ b/real/compress2/compress2.stdout @@ -1 +1 @@ -8522868473445645791 +-787007679832202299 From git at git.haskell.org Mon Dec 31 12:09:33 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:33 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16106' created Message-ID: <20181231120933.CA05A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16106 Referencing: 51f80e44187afb4addca31736e8a70a3e6d248ec From git at git.haskell.org Mon Dec 31 12:09:36 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:36 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin PPC support for PIC (e0a12ba) Message-ID: <20181231120936.CFC543ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/e0a12bac4ec9faa7c31446404d8762a31317ee7b/ghc >--------------------------------------------------------------- commit e0a12bac4ec9faa7c31446404d8762a31317ee7b Author: Peter Trommler Date: Sun Dec 30 22:23:53 2018 +0100 PPC NCG: Remove Darwin PPC support for PIC >--------------------------------------------------------------- e0a12bac4ec9faa7c31446404d8762a31317ee7b compiler/nativeGen/PIC.hs | 62 ----------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs index 2f300c4..7778729 100644 --- a/compiler/nativeGen/PIC.hs +++ b/compiler/nativeGen/PIC.hs @@ -569,60 +569,6 @@ pprGotDeclaration _ _ _ -- the splitter in driver/split/ghc-split.pl recognizes the new output pprImportedSymbol :: DynFlags -> Platform -> CLabel -> SDoc -pprImportedSymbol dflags platform@(Platform { platformArch = ArchPPC, platformOS = OSDarwin }) importedLbl - | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl - = case positionIndependent dflags of - False -> - vcat [ - text ".symbol_stub", - text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"), - text "\t.indirect_symbol" <+> pprCLabel platform lbl, - text "\tlis r11,ha16(L" <> pprCLabel platform lbl - <> text "$lazy_ptr)", - text "\tlwz r12,lo16(L" <> pprCLabel platform lbl - <> text "$lazy_ptr)(r11)", - text "\tmtctr r12", - text "\taddi r11,r11,lo16(L" <> pprCLabel platform lbl - <> text "$lazy_ptr)", - text "\tbctr" - ] - True -> - vcat [ - text ".section __TEXT,__picsymbolstub1," - <> text "symbol_stubs,pure_instructions,32", - text "\t.align 2", - text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"), - text "\t.indirect_symbol" <+> pprCLabel platform lbl, - text "\tmflr r0", - text "\tbcl 20,31,L0$" <> pprCLabel platform lbl, - text "L0$" <> pprCLabel platform lbl <> char ':', - text "\tmflr r11", - text "\taddis r11,r11,ha16(L" <> pprCLabel platform lbl - <> text "$lazy_ptr-L0$" <> pprCLabel platform lbl <> char ')', - text "\tmtlr r0", - text "\tlwzu r12,lo16(L" <> pprCLabel platform lbl - <> text "$lazy_ptr-L0$" <> pprCLabel platform lbl - <> text ")(r11)", - text "\tmtctr r12", - text "\tbctr" - ] - $+$ vcat [ - text ".lazy_symbol_pointer", - text "L" <> pprCLabel platform lbl <> ptext (sLit "$lazy_ptr:"), - text "\t.indirect_symbol" <+> pprCLabel platform lbl, - text "\t.long dyld_stub_binding_helper"] - - | Just (SymbolPtr, lbl) <- dynamicLinkerLabelInfo importedLbl - = vcat [ - text ".non_lazy_symbol_pointer", - char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr:", - text "\t.indirect_symbol" <+> pprCLabel platform lbl, - text "\t.long\t0"] - - | otherwise - = empty - - pprImportedSymbol dflags platform@(Platform { platformArch = ArchX86, platformOS = OSDarwin }) importedLbl | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl = case positionIndependent dflags of @@ -827,14 +773,6 @@ initializePicBase_ppc ArchPPC os picReg return (CmmProc info lab live (ListGraph blocks') : statics) - -initializePicBase_ppc ArchPPC OSDarwin picReg - (CmmProc info lab live (ListGraph (entry:blocks)) : statics) -- just one entry because of splitting - = return (CmmProc info lab live (ListGraph (b':blocks)) : statics) - - where BasicBlock bID insns = entry - b' = BasicBlock bID (PPC.FETCHPC picReg : insns) - ------------------------------------------------------------------------- -- Load TOC into register 2 -- PowerPC 64-bit ELF ABI 2.0 requires the address of the callee From git at git.haskell.org Mon Dec 31 12:09:39 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:39 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin specific code (c899a9d) Message-ID: <20181231120939.CC02F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/c899a9d7681f27344aa22ad94692b9010e2571f2/ghc >--------------------------------------------------------------- commit c899a9d7681f27344aa22ad94692b9010e2571f2 Author: Peter Trommler Date: Sun Dec 30 22:25:49 2018 +0100 PPC NCG: Remove Darwin specific code >--------------------------------------------------------------- c899a9d7681f27344aa22ad94692b9010e2571f2 includes/CodeGen.Platform.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index 664942d..2545f0a 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -885,12 +885,10 @@ freeRegBase _ = True #elif defined(MACHREGS_powerpc) freeReg 0 = False -- Used by code setting the back chain pointer - -- in stack reallocations on Linux - -- r0 is not usable in all insns so also reserved - -- on Darwin. + -- in stack reallocations on Linux. + -- Moreover r0 is not usable in all insns. freeReg 1 = False -- The Stack Pointer -# if !defined(MACHREGS_darwin) --- most non-darwin powerpc OSes use r2 as a TOC pointer or something like that +-- most ELF PowerPC OSes use r2 as a TOC pointer freeReg 2 = False freeReg 13 = False -- reserved for system thread ID on 64 bit -- at least linux in -fPIC relies on r30 in PLT stubs From git at git.haskell.org Mon Dec 31 12:09:42 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:42 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin support (86f1bfb) Message-ID: <20181231120942.D4E513ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/86f1bfb54c7fccd9714d1709d088fd14fd9d2783/ghc >--------------------------------------------------------------- commit 86f1bfb54c7fccd9714d1709d088fd14fd9d2783 Author: Peter Trommler Date: Mon Dec 31 13:01:40 2018 +0100 PPC NCG: Remove Darwin support >--------------------------------------------------------------- 86f1bfb54c7fccd9714d1709d088fd14fd9d2783 compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs | 11 ---- compiler/nativeGen/PPC/CodeGen.hs | 53 +++------------ compiler/nativeGen/PPC/Instr.hs | 5 +- compiler/nativeGen/PPC/Ppr.hs | 85 ++++--------------------- compiler/nativeGen/PPC/Regs.hs | 2 - 5 files changed, 21 insertions(+), 135 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 86f1bfb54c7fccd9714d1709d088fd14fd9d2783 From git at git.haskell.org Mon Dec 31 12:09:45 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:45 +0000 (UTC) Subject: [commit: ghc] wip/T16106: Cmm: Remove PowerPC Darwin support (703c9c3) Message-ID: <20181231120945.D03053ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/703c9c36aade8e28210cebf224e0f7d4b18e4ce1/ghc >--------------------------------------------------------------- commit 703c9c36aade8e28210cebf224e0f7d4b18e4ce1 Author: Peter Trommler Date: Mon Dec 31 13:02:56 2018 +0100 Cmm: Remove PowerPC Darwin support >--------------------------------------------------------------- 703c9c36aade8e28210cebf224e0f7d4b18e4ce1 compiler/cmm/CmmPipeline.hs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs index 8c4f214..7f7c111 100644 --- a/compiler/cmm/CmmPipeline.hs +++ b/compiler/cmm/CmmPipeline.hs @@ -167,7 +167,6 @@ cpsTop hsc_env proc = usingInconsistentPicReg = case (platformArch platform, platformOS platform, positionIndependent dflags) of (ArchX86, OSDarwin, pic) -> pic - (ArchPPC, OSDarwin, pic) -> pic _ -> False -- Note [Sinking after stack layout] @@ -314,12 +313,6 @@ points, then at the join point we don't have a consistent value for Hence, on x86/Darwin, we have to split proc points, and then each proc point will get its own PIC initialisation sequence. -The situation is the same for ppc/Darwin. We use essentially the same -sequence to load the program counter onto reg: - - bcl 20,31,1f - 1: mflr reg - This isn't an issue on x86/ELF, where the sequence is call 1f From git at git.haskell.org Mon Dec 31 12:09:48 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:48 +0000 (UTC) Subject: [commit: ghc] wip/T16106: CodeGen: Remove PowerPC Darwin support (10865da) Message-ID: <20181231120948.D47E93ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/10865da0c6180b56084681ec7f2e8ba8291ccb88/ghc >--------------------------------------------------------------- commit 10865da0c6180b56084681ec7f2e8ba8291ccb88 Author: Peter Trommler Date: Mon Dec 31 13:05:17 2018 +0100 CodeGen: Remove PowerPC Darwin support >--------------------------------------------------------------- 10865da0c6180b56084681ec7f2e8ba8291ccb88 compiler/codeGen/CodeGen/Platform.hs | 21 +++++---------------- compiler/ghc.cabal.in | 1 - includes/CodeGen.Platform.hs | 1 - includes/stg/MachRegs.h | 16 ---------------- 4 files changed, 5 insertions(+), 34 deletions(-) diff --git a/compiler/codeGen/CodeGen/Platform.hs b/compiler/codeGen/CodeGen/Platform.hs index 3014a05..9d9a0cf 100644 --- a/compiler/codeGen/CodeGen/Platform.hs +++ b/compiler/codeGen/CodeGen/Platform.hs @@ -12,7 +12,6 @@ import Reg import qualified CodeGen.Platform.ARM as ARM import qualified CodeGen.Platform.ARM64 as ARM64 import qualified CodeGen.Platform.PPC as PPC -import qualified CodeGen.Platform.PPC_Darwin as PPC_Darwin import qualified CodeGen.Platform.SPARC as SPARC import qualified CodeGen.Platform.X86 as X86 import qualified CodeGen.Platform.X86_64 as X86_64 @@ -33,9 +32,7 @@ callerSaves platform ArchARM64 -> ARM64.callerSaves arch | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] -> - case platformOS platform of - OSDarwin -> PPC_Darwin.callerSaves - _ -> PPC.callerSaves + PPC.callerSaves | otherwise -> NoRegs.callerSaves @@ -56,9 +53,7 @@ activeStgRegs platform ArchARM64 -> ARM64.activeStgRegs arch | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] -> - case platformOS platform of - OSDarwin -> PPC_Darwin.activeStgRegs - _ -> PPC.activeStgRegs + PPC.activeStgRegs | otherwise -> NoRegs.activeStgRegs @@ -74,9 +69,7 @@ haveRegBase platform ArchARM64 -> ARM64.haveRegBase arch | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] -> - case platformOS platform of - OSDarwin -> PPC_Darwin.haveRegBase - _ -> PPC.haveRegBase + PPC.haveRegBase | otherwise -> NoRegs.haveRegBase @@ -92,9 +85,7 @@ globalRegMaybe platform ArchARM64 -> ARM64.globalRegMaybe arch | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] -> - case platformOS platform of - OSDarwin -> PPC_Darwin.globalRegMaybe - _ -> PPC.globalRegMaybe + PPC.globalRegMaybe | otherwise -> NoRegs.globalRegMaybe @@ -110,9 +101,7 @@ freeReg platform ArchARM64 -> ARM64.freeReg arch | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] -> - case platformOS platform of - OSDarwin -> PPC_Darwin.freeReg - _ -> PPC.freeReg + PPC.freeReg | otherwise -> NoRegs.freeReg diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 7f84cac..5b93d3c 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -272,7 +272,6 @@ Library CodeGen.Platform.ARM64 CodeGen.Platform.NoRegs CodeGen.Platform.PPC - CodeGen.Platform.PPC_Darwin CodeGen.Platform.SPARC CodeGen.Platform.X86 CodeGen.Platform.X86_64 diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index 2545f0a..dbd4cc9 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -901,7 +901,6 @@ freeReg 30 = False Then use r12 as temporary register, which is also what the C ABI does. -} -# endif # if defined(REG_Base) freeReg REG_Base = False # endif diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h index eab4a30..3300580 100644 --- a/includes/stg/MachRegs.h +++ b/includes/stg/MachRegs.h @@ -279,8 +279,6 @@ the stack. See Note [Overlapping global registers] for implications. 1 SP (callee-save, non-volatile) 2 AIX, powerpc64-linux: RTOC (a strange special case) - darwin: - (caller-save, volatile) powerpc32-linux: reserved for use by system @@ -315,18 +313,6 @@ the stack. See Note [Overlapping global registers] for implications. #define REG_R7 r20 #define REG_R8 r21 -#if defined(MACHREGS_darwin) - -#define REG_F1 f14 -#define REG_F2 f15 -#define REG_F3 f16 -#define REG_F4 f17 - -#define REG_D1 f18 -#define REG_D2 f19 - -#else - #define REG_F1 fr14 #define REG_F2 fr15 #define REG_F3 fr16 @@ -341,8 +327,6 @@ the stack. See Note [Overlapping global registers] for implications. #define REG_D5 fr24 #define REG_D6 fr25 -#endif - #define REG_Sp r22 #define REG_SpLim r24 From git at git.haskell.org Mon Dec 31 12:09:51 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:51 +0000 (UTC) Subject: [commit: ghc] wip/T16106: build system: Remove PowerPC Darwin support (9344022) Message-ID: <20181231120951.D09573ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/93440223ea1de192d2f84a36c71e12958c5b0925/ghc >--------------------------------------------------------------- commit 93440223ea1de192d2f84a36c71e12958c5b0925 Author: Peter Trommler Date: Mon Dec 31 13:06:00 2018 +0100 build system: Remove PowerPC Darwin support >--------------------------------------------------------------- 93440223ea1de192d2f84a36c71e12958c5b0925 configure.ac | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 021ef94..874a128 100644 --- a/configure.ac +++ b/configure.ac @@ -1221,16 +1221,7 @@ case ${TargetOS} in RtsLinkerUseMmap=1 ;; darwin|ios|watchos|tvos) - # Don't use mmap on powerpc/darwin as the mmap there doesn't support - # reallocating. Reallocating is needed to allocate jump islands just - # after each object image. Jumps to these jump islands use relative - # branches which are limited to offsets that can be represented in - # 24-bits. - if test "$TargetArch" != "powerpc" ; then - RtsLinkerUseMmap=1 - else - RtsLinkerUseMmap=0 - fi + RtsLinkerUseMmap=1 ;; *) # Windows (which doesn't have mmap) and everything else. From git at git.haskell.org Mon Dec 31 12:09:54 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 12:09:54 +0000 (UTC) Subject: [commit: ghc] wip/T16106: RTS: Remove PowerPC Darwin support (51f80e4) Message-ID: <20181231120954.DF16F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/51f80e44187afb4addca31736e8a70a3e6d248ec/ghc >--------------------------------------------------------------- commit 51f80e44187afb4addca31736e8a70a3e6d248ec Author: Peter Trommler Date: Mon Dec 31 13:08:29 2018 +0100 RTS: Remove PowerPC Darwin support >--------------------------------------------------------------- 51f80e44187afb4addca31736e8a70a3e6d248ec rts/Adjustor.c | 32 +----- rts/AdjustorAsm.S | 102 +++++++----------- rts/RtsSymbols.c | 9 -- rts/StgCRun.c | 40 ------- rts/linker/LoadArchive.c | 8 +- rts/linker/MachO.c | 267 +--------------------------------------------- rts/linker/MachOTypes.h | 5 +- testsuite/tests/rts/all.T | 2 - 8 files changed, 47 insertions(+), 418 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 51f80e44187afb4addca31736e8a70a3e6d248ec From git at git.haskell.org Mon Dec 31 15:47:19 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 15:47:19 +0000 (UTC) Subject: [commit: ghc] wip/T16106: Rewrite comment on C calling convention (d2a0f3a) Message-ID: <20181231154719.AD17F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/d2a0f3ab8438b80663f7977bb6b474c02baffa5c/ghc >--------------------------------------------------------------- commit d2a0f3ab8438b80663f7977bb6b474c02baffa5c Author: Peter Trommler Date: Mon Dec 31 16:46:22 2018 +0100 Rewrite comment on C calling convention >--------------------------------------------------------------- d2a0f3ab8438b80663f7977bb6b474c02baffa5c compiler/nativeGen/PPC/CodeGen.hs | 45 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index a69bd9c..bbc3411 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -1587,48 +1587,49 @@ genCCall' -> [CmmActual] -- arguments (of mixed type) -> NatM InstrBlock -{- TODO: Remove references to Darwin and rewrite to integrate 64-bit ABIs - and AIX. +{- PowerPC Linux uses the System V Release 4 Calling Convention for PowerPC. It is described in the "System V Application Binary Interface PowerPC Processor Supplement". - Both conventions are similar: + PowerPC 64 Linux uses the System V Release 4 Calling Convention for + 64-bit PowerPC. It is specified in + "64-bit PowerPC ELF Application Binary Interface Supplement 1.9" + (PPC64 ELF v1.9). + + PowerPC 64 Linux in little endian mode uses the "Power Architecture 64-Bit + ELF V2 ABI Specification -- OpenPOWER ABI for Linux Supplement" + (PPC64 ELF v2). + + AIX follows the "PowerOpen ABI: Application Binary Interface Big-Endian + 32-Bit Hardware Implementation" + + All four conventions are similar: Parameters may be passed in general-purpose registers starting at r3, in floating point registers starting at f1, or on the stack. But there are substantial differences: * The number of registers used for parameter passing and the exact set of nonvolatile registers differs (see MachRegs.hs). - * On Darwin, stack space is always reserved for parameters, even if they are - passed in registers. The called routine may choose to save parameters from - registers to the corresponding space on the stack. - * On Darwin, a corresponding amount of GPRs is skipped when a floating point - parameter is passed in an FPR. + * On AIX and 64-bit ELF, stack space is always reserved for parameters, + even if they are passed in registers. The called routine may choose to + save parameters from registers to the corresponding space on the stack. + * On AIX and 64-bit ELF, a corresponding amount of GPRs is skipped when + a floating point parameter is passed in an FPR. * SysV insists on either passing I64 arguments on the stack, or in two GPRs, starting with an odd-numbered GPR. It may skip a GPR to achieve this. - Darwin just treats an I64 like two separate II32s (high word first). + AIX just treats an I64 likt two separate I32s (high word first). * I64 and FF64 arguments are 8-byte aligned on the stack for SysV, but only - 4-byte aligned like everything else on Darwin. + 4-byte aligned like everything else on AIX. * The SysV spec claims that FF32 is represented as FF64 on the stack. GCC on PowerPC Linux does not agree, so neither do we. - PowerPC 64 Linux uses the System V Release 4 Calling Convention for - 64-bit PowerPC. It is specified in - "64-bit PowerPC ELF Application Binary Interface Supplement 1.9" - (PPC64 ELF v1.9). - PowerPC 64 Linux in little endian mode uses the "Power Architecture 64-Bit - ELF V2 ABI Specification -- OpenPOWER ABI for Linux Supplement" - (PPC64 ELF v2). - AIX follows the "PowerOpen ABI: Application Binary Interface Big-Endian - 32-Bit Hardware Implementation" - According to all conventions, the parameter area should be part of the caller's stack frame, allocated in the caller's prologue code (large enough to hold the parameter lists for all called routines). The NCG already uses the stack for register spilling, leaving 64 bytes free at the top. - If we need a larger parameter area than that, we just allocate a new stack - frame just before ccalling. + If we need a larger parameter area than that, we increase the size + of the stack frame just before ccalling. -} From git at git.haskell.org Mon Dec 31 16:49:38 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 16:49:38 +0000 (UTC) Subject: [commit: nofib] branch 'ci' created Message-ID: <20181231164938.5BEDD3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : ci Referencing: 0f7f176de8e0c501629dbf5d60a440f1d5faae17 From git at git.haskell.org Mon Dec 31 16:49:40 2018 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 31 Dec 2018 16:49:40 +0000 (UTC) Subject: [commit: nofib] ci: Add continuous integration support (0f7f176) Message-ID: <20181231164940.6EFDE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : ci Link : http://ghc.haskell.org/trac/ghc/changeset/0f7f176de8e0c501629dbf5d60a440f1d5faae17/nofib >--------------------------------------------------------------- commit 0f7f176de8e0c501629dbf5d60a440f1d5faae17 Author: Ben Gamari Date: Sun Dec 30 12:55:46 2018 -0500 Add continuous integration support >--------------------------------------------------------------- 0f7f176de8e0c501629dbf5d60a440f1d5faae17 .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..fd1bfb5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +validate: + image: ghcci/x86_64-linux-deb9:0.2 + before_script: + - git clean -xdf + script: + - make clean + - | + cabal update + cabal install regex-compat html + - make boot + - "make mode=fast NoFibRuns=1 >log 2>&1" + - "nofib-analyse/nofib-analyse << log"