From git at git.haskell.org Fri Mar 1 14:30:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 1 Mar 2019 14:30:00 +0000 (UTC) Subject: [commit: ghc] branch 'wip/head.hackage' created Message-ID: <20190301143000.AD79E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/head.hackage Referencing: 9b3d4d753afe3e328c9a6c1fb42bd52109177efa From git at git.haskell.org Fri Mar 1 14:30:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 1 Mar 2019 14:30:03 +0000 (UTC) Subject: [commit: ghc] wip/head.hackage: gitlab-ci: Implement head.hackage jobs (9b3d4d7) Message-ID: <20190301143003.BFF053A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/head.hackage Link : http://ghc.haskell.org/trac/ghc/changeset/9b3d4d753afe3e328c9a6c1fb42bd52109177efa/ghc >--------------------------------------------------------------- commit 9b3d4d753afe3e328c9a6c1fb42bd52109177efa Author: Ben Gamari Date: Wed Feb 27 23:33:12 2019 -0500 gitlab-ci: Implement head.hackage jobs >--------------------------------------------------------------- 9b3d4d753afe3e328c9a6c1fb42bd52109177efa .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 217b297..4648276 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,7 @@ stages: - build - full-build - cleanup # See Note [Cleanup on Windows] + - hackage ############################################################ # Runner Tags @@ -426,6 +427,10 @@ validate-x86_64-windows: - ghc.tar.xz - junit.xml +############################################################ +# Cleanup +############################################################ + # Note [Cleaning up after shell executor] # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @@ -477,3 +482,37 @@ cleanup-darwin: - rm -Rf $BUILD_DIR/* - exit 0 + +############################################################ +# Testing via head.hackage +############################################################ + + +.hackage: + stage: hackage + script: + # Here we need an access token (namely $HEAD_HACKAGE_ACCESS_TOKEN) so we + # can query the GitLab API to determine the job ID of the fedora27 job of + # the current pipeline. @head.hackage owns this token as well. + - | + job_id=$( \ + curl \ + --header "PRIVATE-TOKEN: $HEAD_HACKAGE_ACCESS_TOKEN" \ + https://gitlab.haskell.org/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID \ + | jq '. | map(select(.name == "validate-x86_64-linux-deb9-llvm")) | .[0].id') + GHC_TARBALL="https://gitlab.haskell.org/ghc/ghc/-/jobs/$job_id/artifacts/raw/ghc.tar.xz" + - | + curl --request POST --form "token=$CI_JOB_TOKEN" \ + -F "ref=gitlab-ci-nix" \ + -F "variables[GHC_TARBALL]=$GHC_TARBALL" \ + https://gitlab.haskell.org/api/v4/projects/78/trigger/pipeline \ + +hackage: + extends: .hackage + when: manual + +nightly-hackage: + extends: .hackage + only: + variables: + - $NIGHTLY From git at git.haskell.org Sat Mar 2 14:51:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:51:45 +0000 (UTC) Subject: [commit: ghc] branch 'wip/heapprof001-fragile' created Message-ID: <20190302145145.D65F43A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/heapprof001-fragile Referencing: 3981c4126954b6bca86afbea2bdb47bdcc31ecf4 From git at git.haskell.org Sat Mar 2 14:51:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:51:49 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: Cleanup iserv/iserv-proxy (f838809) Message-ID: <20190302145149.0C9B23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/f838809f1e73c20bc70926fe98e735297572ac60/ghc >--------------------------------------------------------------- commit f838809f1e73c20bc70926fe98e735297572ac60 Author: Moritz Angermann Date: Wed Jan 30 09:47:20 2019 +0800 Cleanup iserv/iserv-proxy This adds trace messages that include the processes name and as such make debugging and following the communication easier. It also adds a note regarding the fwd*Call proxy-communication logic between the proxy and the slave. The proxy will now also poll for 60s to wait for the remote iserv to come up. (Alternatively you can start the remote process beforehand; and just have iserv-proxy connect to it) >--------------------------------------------------------------- f838809f1e73c20bc70926fe98e735297572ac60 .gitignore | 1 + configure.ac | 2 +- docs/users_guide/ghci.rst | 32 ++++++ libraries/libiserv/libiserv.cabal.in | 2 +- libraries/libiserv/proxy-src/Remote.hs | 3 +- libraries/libiserv/src/Lib.hs | 23 ++++- libraries/libiserv/src/Remote/Slave.hs | 24 +++-- testsuite/tests/iserv-remote/Lib.hs | 7 ++ testsuite/tests/iserv-remote/Main.hs | 5 + testsuite/tests/iserv-remote/Makefile | 38 +++++++ .../cabal/T14304 => iserv-remote}/Setup.hs | 0 testsuite/tests/iserv-remote/all.T | 11 ++ .../tests/iserv-remote/iserv-remote.stderr | 0 .../tests/iserv-remote/iserv-remote.stdout | 0 testsuite/tests/iserv-remote/iserv-wrapper | 12 +++ testsuite/tests/iserv-remote/remote-iserv.stderr | 2 + testsuite/tests/iserv-remote/remote-iserv.stdout | 4 + utils/iserv-proxy/Makefile | 4 +- utils/iserv-proxy/iserv-proxy.cabal.in | 2 +- utils/iserv-proxy/src/Main.hs | 89 ++++++++++++---- utils/{iserv-proxy => remote-iserv}/Makefile | 4 +- utils/remote-iserv/Setup.hs | 2 + utils/remote-iserv/ghc.mk | 113 +++++++++++++++++++++ utils/remote-iserv/remote-iserv.cabal.in | 27 +++++ utils/remote-iserv/src/Cli.hs | 30 ++++++ 25 files changed, 398 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 f838809f1e73c20bc70926fe98e735297572ac60 From git at git.haskell.org Sat Mar 2 14:51:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:51:52 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: Visible dependent quantification (c26d299) Message-ID: <20190302145152.5E1EC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/c26d299dc422f43b8c37da4b26da2067eedcbae8/ghc >--------------------------------------------------------------- commit c26d299dc422f43b8c37da4b26da2067eedcbae8 Author: Ryan Scott Date: Mon Dec 17 20:54:36 2018 -0500 Visible dependent quantification This implements GHC proposal 35 (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0035-forall-arrow.rst) by adding the ability to write kinds with visible dependent quantification (VDQ). Most of the work for supporting VDQ was actually done _before_ this patch. That is, GHC has been able to reason about kinds with VDQ for some time, but it lacked the ability to let programmers directly write these kinds in the source syntax. This patch is primarly about exposing this ability, by: * Changing `HsForAllTy` to add an additional field of type `ForallVisFlag` to distinguish between invisible `forall`s (i.e, with dots) and visible `forall`s (i.e., with arrows) * Changing `Parser.y` accordingly The rest of the patch mostly concerns adding validity checking to ensure that VDQ is never used in the type of a term (as permitting this would require full-spectrum dependent types). This is accomplished by: * Adding a `vdqAllowed` predicate to `TcValidity`. * Introducing `splitLHsSigmaTyInvis`, a variant of `splitLHsSigmaTy` that only splits invisible `forall`s. This function is used in certain places (e.g., in instance declarations) to ensure that GHC doesn't try to split visible `forall`s (e.g., if it tried splitting `instance forall a -> Show (Blah a)`, then GHC would mistakenly allow that declaration!) This also updates Template Haskell by introducing a new `ForallVisT` constructor to `Type`. Fixes #16326. Also fixes #15658 by documenting this feature in the users' guide. >--------------------------------------------------------------- c26d299dc422f43b8c37da4b26da2067eedcbae8 compiler/basicTypes/Var.hs | 57 +++++++-- compiler/deSugar/DsMeta.hs | 17 ++- compiler/hieFile/HieAst.hs | 2 +- compiler/hsSyn/Convert.hs | 20 ++- compiler/hsSyn/HsDecls.hs | 6 +- compiler/hsSyn/HsTypes.hs | 138 +++++++++++++++++---- compiler/hsSyn/HsUtils.hs | 7 +- compiler/iface/IfaceType.hs | 3 +- compiler/parser/Parser.y | 22 +++- compiler/parser/RdrHsSyn.hs | 2 +- compiler/prelude/THNames.hs | 108 ++++++++-------- compiler/prelude/TysWiredIn.hs | 1 - compiler/rename/RnTypes.hs | 15 ++- compiler/typecheck/TcDeriv.hs | 3 +- compiler/typecheck/TcHsType.hs | 8 +- compiler/typecheck/TcRnDriver.hs | 3 +- compiler/typecheck/TcSigs.hs | 4 +- compiler/typecheck/TcSplice.hs | 24 ++-- compiler/typecheck/TcType.hs | 14 ++- compiler/typecheck/TcValidity.hs | 69 ++++++++++- compiler/types/TyCoRep.hs | 2 +- compiler/types/Type.hs | 16 ++- docs/users_guide/8.10.1-notes.rst | 10 ++ docs/users_guide/glasgow_exts.rst | 49 ++++++++ docs/users_guide/index.rst | 1 + .../template-haskell/Language/Haskell/TH/Lib.hs | 8 +- .../Language/Haskell/TH/Lib/Internal.hs | 3 + .../template-haskell/Language/Haskell/TH/Ppr.hs | 22 +++- .../template-haskell/Language/Haskell/TH/Syntax.hs | 1 + libraries/template-haskell/changelog.md | 3 + .../dependent/should_compile/T16326_Compile1.hs | 40 ++++++ .../dependent/should_compile/T16326_Compile2.hs | 13 ++ testsuite/tests/dependent/should_compile/all.T | 2 + .../tests/dependent/should_fail/T15859.stderr | 12 +- .../tests/dependent/should_fail/T16326_Fail1.hs | 10 ++ .../dependent/should_fail/T16326_Fail1.stderr | 13 ++ .../tests/dependent/should_fail/T16326_Fail10.hs | 12 ++ .../dependent/should_fail/T16326_Fail10.stderr | 7 ++ .../tests/dependent/should_fail/T16326_Fail11.hs | 10 ++ .../dependent/should_fail/T16326_Fail11.stderr | 7 ++ .../tests/dependent/should_fail/T16326_Fail12.hs | 6 + .../dependent/should_fail/T16326_Fail12.stderr | 8 ++ .../tests/dependent/should_fail/T16326_Fail2.hs | 6 + .../dependent/should_fail/T16326_Fail2.stderr | 8 ++ .../tests/dependent/should_fail/T16326_Fail3.hs | 7 ++ .../dependent/should_fail/T16326_Fail3.stderr | 5 + .../tests/dependent/should_fail/T16326_Fail4.hs | 6 + .../dependent/should_fail/T16326_Fail4.stderr | 11 ++ .../tests/dependent/should_fail/T16326_Fail5.hs | 8 ++ .../dependent/should_fail/T16326_Fail5.stderr | 9 ++ .../tests/dependent/should_fail/T16326_Fail6.hs | 9 ++ .../dependent/should_fail/T16326_Fail6.stderr | 7 ++ .../tests/dependent/should_fail/T16326_Fail7.hs | 8 ++ .../dependent/should_fail/T16326_Fail7.stderr | 5 + .../tests/dependent/should_fail/T16326_Fail8.hs | 7 ++ .../dependent/should_fail/T16326_Fail8.stderr | 6 + .../tests/dependent/should_fail/T16326_Fail9.hs | 11 ++ .../dependent/should_fail/T16326_Fail9.stderr | 8 ++ testsuite/tests/dependent/should_fail/all.T | 12 ++ .../parser/should_compile/DumpRenamedAst.stderr | 1 + testsuite/tests/th/T16326_TH.hs | 24 ++++ testsuite/tests/th/T16326_TH.stderr | 22 ++++ testsuite/tests/th/all.T | 3 +- utils/haddock | 2 +- 64 files changed, 814 insertions(+), 149 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 c26d299dc422f43b8c37da4b26da2067eedcbae8 From git at git.haskell.org Sat Mar 2 14:51:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:51:55 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: Lexer: turn some fatal errors into non-fatal ones (f37efb1) Message-ID: <20190302145155.63C903A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/f37efb11b957a21f3048f7005a234f96350ff938/ghc >--------------------------------------------------------------- commit f37efb11b957a21f3048f7005a234f96350ff938 Author: Alec Theriault Date: Mon Feb 25 16:39:27 2019 -0800 Lexer: turn some fatal errors into non-fatal ones The following previously fatal lexer errors are now non-fatal: * errors about enabling `LambdaCase` * errors about enabling `NumericUnderscores` * errors about having valid characters in primitive strings See #16270 >--------------------------------------------------------------- f37efb11b957a21f3048f7005a234f96350ff938 compiler/parser/Lexer.x | 42 ++++++++++++---------- .../parser/should_fail/ParserNoLambdaCase.stderr | 2 +- testsuite/tests/parser/should_fail/T16270.hs | 9 ++++- testsuite/tests/parser/should_fail/T16270.stderr | 10 +++++- 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 5fb48eb..d77564e 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1312,9 +1312,11 @@ varid span buf len = keyword <- case lastTk of Just ITlam -> do lambdaCase <- getBit LambdaCaseBit - if lambdaCase - then return ITlcase - else failMsgP "Illegal lambda-case (use -XLambdaCase)" + unless lambdaCase $ do + pState <- getPState + addError (RealSrcSpan (last_loc pState)) $ text + "Illegal lambda-case (use LambdaCase)" + return ITlcase _ -> return ITcase maybe_layout keyword return $ L span keyword @@ -1379,9 +1381,11 @@ tok_integral :: (SourceText -> Integer -> Token) tok_integral itint transint transbuf translen (radix,char_to_int) span buf len = do numericUnderscores <- getBit NumericUnderscoresBit -- #14473 let src = lexemeToString buf len - if (not numericUnderscores) && ('_' `elem` src) - then failMsgP "Use NumericUnderscores to allow underscores in integer literals" - else return $ L span $ itint (SourceText src) + when ((not numericUnderscores) && ('_' `elem` src)) $ do + pState <- getPState + addError (RealSrcSpan (last_loc pState)) $ text + "Use NumericUnderscores to allow underscores in integer literals" + return $ L span $ itint (SourceText src) $! transint $ parseUnsignedInteger (offsetBytes transbuf buf) (subtract translen len) radix char_to_int @@ -1419,9 +1423,11 @@ tok_frac :: Int -> (String -> Token) -> Action tok_frac drop f span buf len = do numericUnderscores <- getBit NumericUnderscoresBit -- #14473 let src = lexemeToString buf (len-drop) - if (not numericUnderscores) && ('_' `elem` src) - then failMsgP "Use NumericUnderscores to allow underscores in floating literals" - else return (L span $! (f $! src)) + when ((not numericUnderscores) && ('_' `elem` src)) $ do + pState <- getPState + addError (RealSrcSpan (last_loc pState)) $ text + "Use NumericUnderscores to allow underscores in floating literals" + return (L span $! (f $! src)) tok_float, tok_primfloat, tok_primdouble :: String -> Token tok_float str = ITrational $! readFractionalLit str @@ -1618,23 +1624,23 @@ lex_string s = do Just ('"',i) -> do setInput i + let s' = reverse s magicHash <- getBit MagicHashBit if magicHash then do i <- getInput case alexGetChar' i of Just ('#',i) -> do - setInput i - if any (> '\xFF') s - then failMsgP "primitive string literal must contain only characters <= \'\\xFF\'" - else let bs = unsafeMkByteString (reverse s) - in return (ITprimstring (SourceText (reverse s)) bs) + setInput i + when (any (> '\xFF') s') $ do + pState <- getPState + addError (RealSrcSpan (last_loc pState)) $ text + "primitive string literal must contain only characters <= \'\\xFF\'" + return (ITprimstring (SourceText s') (unsafeMkByteString s')) _other -> - return (ITstring (SourceText (reverse s)) - (mkFastString (reverse s))) + return (ITstring (SourceText s') (mkFastString s')) else - return (ITstring (SourceText (reverse s)) - (mkFastString (reverse s))) + return (ITstring (SourceText s') (mkFastString s')) Just ('\\',i) | Just ('&',i) <- next -> do diff --git a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr index 24d5cfc..601262c 100644 --- a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr @@ -1,2 +1,2 @@ ParserNoLambdaCase.hs:3:6: - Illegal lambda-case (use -XLambdaCase) + Illegal lambda-case (use LambdaCase) diff --git a/testsuite/tests/parser/should_fail/T16270.hs b/testsuite/tests/parser/should_fail/T16270.hs index 0c5166d..0147f97 100644 --- a/testsuite/tests/parser/should_fail/T16270.hs +++ b/testsuite/tests/parser/should_fail/T16270.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE NoTraditionalRecordSyntax, NoDoAndIfThenElse, NoMultiWayIf #-} +{-# LANGUAGE NoTraditionalRecordSyntax, NoDoAndIfThenElse, NoMultiWayIf, NoLambdaCase, NoNumericUnderscores, MagicHash #-} {-# OPTIONS -Werror=missing-space-after-bang #-} module T16270 where @@ -29,6 +29,13 @@ multiWayIf !i = (a, b) b = if | i -> False | otherwise -> True +w = \case _ : _ -> True + _ -> False + +n = 123_456 + +s = "hello ωorld"# -- note the omega + -- a fatal error. k = let diff --git a/testsuite/tests/parser/should_fail/T16270.stderr b/testsuite/tests/parser/should_fail/T16270.stderr index 7eccd95..f4e90e4 100644 --- a/testsuite/tests/parser/should_fail/T16270.stderr +++ b/testsuite/tests/parser/should_fail/T16270.stderr @@ -57,5 +57,13 @@ T16270.hs:27:9: error: T16270.hs:29:9: error: Multi-way if-expressions need MultiWayIf turned on -T16270.hs:36:1: error: +T16270.hs:32:6: Illegal lambda-case (use LambdaCase) + +T16270.hs:35:5: + Use NumericUnderscores to allow underscores in integer literals + +T16270.hs:37:5: + primitive string literal must contain only characters <= '/xFF' + +T16270.hs:43:1: error: parse error (possibly incorrect indentation or mismatched brackets) From git at git.haskell.org Sat Mar 2 14:51:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:51:58 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: Hadrian: introduce ways to skip some documentation targets (8442103) Message-ID: <20190302145158.818723A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/8442103aa575dc1cd25cb3231e729c6365dc1b5c/ghc >--------------------------------------------------------------- commit 8442103aa575dc1cd25cb3231e729c6365dc1b5c Author: Alp Mestanogullari Date: Wed Feb 27 17:23:48 2019 +0100 Hadrian: introduce ways to skip some documentation targets The initial motivation for this is to have a chance to run the binary distribution rules in our Windows CI without having to install sphinx-build and xelatex there, while retaining the ability to generate haddocks. I just ended up extending this idea a little bit so as to have control over whether we build haddocks, (sphinx) HTML manuals, (sphinx) PDF manuals and (sphinx) manpages. >--------------------------------------------------------------- 8442103aa575dc1cd25cb3231e729c6365dc1b5c hadrian/doc/make.md | 16 ++++++++++++++ hadrian/doc/user-settings.md | 44 +++++++++++++++++++++++++++++++++++++- hadrian/src/CommandLine.hs | 35 +++++++++++++++++++++++++++--- hadrian/src/Flavour.hs | 31 +++++++++++++++++++++++++-- hadrian/src/Rules/Documentation.hs | 39 +++++++++++++++++++++++++++++++-- hadrian/src/Settings/Default.hs | 3 ++- 6 files changed, 159 insertions(+), 9 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 8442103aa575dc1cd25cb3231e729c6365dc1b5c From git at git.haskell.org Sat Mar 2 14:52:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:01 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: use --docs=no-sphinx in both Hadrian CI jobs (9aa2727) Message-ID: <20190302145201.92DFD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/9aa27273afddd3cbf4c03c70954f24ac8ea1a706/ghc >--------------------------------------------------------------- commit 9aa27273afddd3cbf4c03c70954f24ac8ea1a706 Author: Alp Mestanogullari Date: Wed Feb 27 17:41:10 2019 +0100 use --docs=no-sphinx in both Hadrian CI jobs >--------------------------------------------------------------- 9aa27273afddd3cbf4c03c70954f24ac8ea1a706 .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 217b297..3bca1fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,7 @@ ghc-linters: - ./boot - ./configure $CONFIGURE_ARGS - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` - - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` docs-haddock + - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx docs cache: key: hadrian paths: @@ -386,6 +386,7 @@ validate-x86_64-windows-hadrian: 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" + - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx docs # FIXME: Bindist disabled due to #16073 #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" # FIXME: Testsuite disabled due to #16156. From git at git.haskell.org Sat Mar 2 14:52:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:04 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: Fix parsing of expected performance changes for tests with non-alpha characters. (b1c7ffa) Message-ID: <20190302145204.B07713A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/b1c7ffafc64c5e04fe59e1c38fe86693de3498aa/ghc >--------------------------------------------------------------- commit b1c7ffafc64c5e04fe59e1c38fe86693de3498aa Author: David Eichmann Date: Wed Feb 27 18:35:15 2019 +0000 Fix parsing of expected performance changes for tests with non-alpha characters. Python's split() function is used to split on all white space. >--------------------------------------------------------------- b1c7ffafc64c5e04fe59e1c38fe86693de3498aa testsuite/driver/perf_notes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index 2b48353..9362e46 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -140,7 +140,7 @@ def parse_allowed_perf_changes(commitMsg): matches = re.findall(exp, commitMsg, re.M) changes = {} for (direction, metrics_str, opts_str, tests_str) in matches: - tests = re.findall(r"(\w+)", tests_str) + tests = tests_str.split() for test in tests: changes.setdefault(test, []).append({ 'direction': direction, From git at git.haskell.org Sat Mar 2 14:52:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:07 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: testsuite: Introduce fragile modifier (15f27ff) Message-ID: <20190302145207.BFA3D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/15f27ff75bd6786265f89a2d9b861530f8fd3e0f/ghc >--------------------------------------------------------------- commit 15f27ff75bd6786265f89a2d9b861530f8fd3e0f Author: Ben Gamari Date: Tue Feb 26 10:13:44 2019 -0500 testsuite: Introduce fragile modifier Now since we have been a bit more stringent in testsuite cleanliness we have been marking a lot of tests as fragile using the `skip` modifier. However, this unfortunately means that we lose the association with the ticket number documenting the fragility. Here we introduce `fragile` and `fragile_for` to retain this information. >--------------------------------------------------------------- 15f27ff75bd6786265f89a2d9b861530f8fd3e0f testsuite/driver/testlib.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index edd43fb..309a910 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -247,6 +247,30 @@ def _expect_pass(way): # ----- +def fragile( bug ): + """ + Indicates that the test should be skipped due to fragility documented in + the given ticket. + """ + def helper( name, opts, bug=bug ): + record_broken(name, opts, bug) + opts.skip = True + + return helper + +def fragile_for( name, opts, bug, ways ): + """ + Indicates that the test should be skipped due to fragility in the given + test ways as documented in the given ticket. + """ + def helper( name, opts, bug=bug, ways=ways ): + record_broken(name, opts, bug) + opts.omit_ways = ways + + return helper + +# ----- + def omit_ways( ways ): return lambda name, opts, w=ways: _omit_ways( name, opts, w ) From git at git.haskell.org Sat Mar 2 14:52:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:10 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: testsuite: Mark heapprof001 as fragile on i386 (4d09fcf) Message-ID: <20190302145210.CFB5E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/4d09fcf8f4fdf29cde961a5bbd2a120bf4d04121/ghc >--------------------------------------------------------------- commit 4d09fcf8f4fdf29cde961a5bbd2a120bf4d04121 Author: Ben Gamari Date: Tue Feb 26 10:14:02 2019 -0500 testsuite: Mark heapprof001 as fragile on i386 >--------------------------------------------------------------- 4d09fcf8f4fdf29cde961a5bbd2a120bf4d04121 testsuite/tests/profiling/should_run/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 9b6018c..044d4fe 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,7 @@ expect_broken_for_10037 = expect_broken_for( test('heapprof001', [when(have_profiling(), extra_ways(extra_prof_ways)), - when(arch('i386'), expect_broken_for(15382, ['prof_hc_hb'])), + when(arch('i386'), fragile(15382)), extra_run_opts('7')], compile_and_run, ['']) From git at git.haskell.org Sat Mar 2 14:52:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:13 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: testsuite: Use fragile modifier for more tests (edd2108) Message-ID: <20190302145213.E388F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/edd2108ab1156e31720f6e5fe662d26abd5061c6/ghc >--------------------------------------------------------------- commit edd2108ab1156e31720f6e5fe662d26abd5061c6 Author: Ben Gamari Date: Tue Feb 26 10:24:31 2019 -0500 testsuite: Use fragile modifier for more tests >--------------------------------------------------------------- edd2108ab1156e31720f6e5fe662d26abd5061c6 testsuite/tests/concurrent/should_run/all.T | 6 ++---- testsuite/tests/ffi/should_run/all.T | 6 ++---- testsuite/tests/ghci/linking/all.T | 6 ++---- testsuite/tests/ghci/should_run/all.T | 2 +- testsuite/tests/profiling/should_run/all.T | 7 ++----- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 5ba0657..4e60a1d 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -74,8 +74,7 @@ test('T5558', compile_and_run, ['']) test('T5421', normal, compile_and_run, ['']) -# See #12751, the test fails non-deterministically so we skip it. -test('T5611', when ( opsys('darwin'), skip) , compile_and_run, ['']) +test('T5611', when(opsys('darwin'), fragile(12751)) , compile_and_run, ['']) test('T5238', normal, compile_and_run, ['']) test('T5866', exit_code(1), compile_and_run, ['']) @@ -196,8 +195,7 @@ test('conc036', skip, compile_and_run, ['']) # Interrupting foreign calls only makes sense if we are threaded test('foreignInterruptible', [when(fast(), skip), when(opsys('mingw32'),expect_fail), - # Fragile in unregisterised way; see #15467. - when(unregisterised(), skip), + when(unregisterised(), fragile(15467)), # I don't think we support interrupting Sleep() # on Windows. --SDM only_threaded_ways, diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index e9ea975..96ab506 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -87,8 +87,7 @@ 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), + when(unregisterised(), fragile(16085)), pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup')], compile_and_run, ['ffi018_ghci_c.o']) @@ -100,8 +99,7 @@ test('T1679', normal, compile_and_run, ['']) test('T1288', [omit_ways(['ghci'])], compile_and_run, ['T1288_c.c']) test('T1288_ghci', [only_ways(['ghci']), - # This test is fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')], compile_and_run, ['T1288_ghci_c.o']) diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T index 792e91b..88ada22 100644 --- a/testsuite/tests/ghci/linking/all.T +++ b/testsuite/tests/ghci/linking/all.T @@ -6,8 +6,7 @@ test('ghcilink001', makefile_test, ['ghcilink001']) test('ghcilink002', [extra_files(['TestLink.hs', 'f.c']), - # Fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), unless(doing_ghci, skip)], makefile_test, ['ghcilink002']) @@ -21,8 +20,7 @@ test('ghcilink004', test('ghcilink005', [extra_files(['TestLink.hs', 'f.c']), - # Fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), unless(doing_ghci, skip)], makefile_test, ['ghcilink005']) diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T index 5440019..84693d7 100644 --- a/testsuite/tests/ghci/should_run/all.T +++ b/testsuite/tests/ghci/should_run/all.T @@ -11,7 +11,7 @@ test('T2881', just_ghci, compile_and_run, ['']) test('T3171', [when(opsys('mingw32'),skip), - skip, # This test is quite flaky (#15383) + fragile(15383), req_interp, combined_output], makefile_test, []) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 044d4fe..f6891c3 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -87,9 +87,7 @@ test('prof-doc-fib', [], compile_and_run, ['']) test('prof-doc-last', [], compile_and_run, ['-fno-full-laziness']) # unicode in cost centre names -test('T5559', - [ skip # Skip due to non-deterministic failures on CI, see Trac #16350 - ], compile_and_run, ['']) +test('T5559', fragile(16350), compile_and_run, ['']) # Note [consistent stacks] # Certain optimisations can change the stacks we get out of the @@ -150,6 +148,5 @@ test('T14257', [], makefile_test, ['T14257']) test('T15897', [extra_ways(['profasm']), only_ways(['profasm']), run_timeout_multiplier(2), - # Takes too long and is quite fragile (#15467, #16193) - skip], + fragile(15467)], makefile_test, ['T15897']) From git at git.haskell.org Sat Mar 2 14:52:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:16 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: gitlab-ci: Don't allow i386-deb9 to fail (971f041) Message-ID: <20190302145216.EC1CC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/971f041f815a0ebdc1e6acd3d8ec9a31a4ba7952/ghc >--------------------------------------------------------------- commit 971f041f815a0ebdc1e6acd3d8ec9a31a4ba7952 Author: Ben Gamari Date: Tue Feb 26 10:14:15 2019 -0500 gitlab-ci: Don't allow i386-deb9 to fail Also account for testsuite metric drift. Metric Decrease: haddock.Cabal >--------------------------------------------------------------- 971f041f815a0ebdc1e6acd3d8ec9a31a4ba7952 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bca1fe..db87d4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -207,7 +207,6 @@ validate-i386-linux-deb9: extends: .validate-linux stage: full-build image: ghcci/i386-linux-deb9:0.1 - allow_failure: true variables: TEST_ENV: "i386-linux-deb9" artifacts: From git at git.haskell.org Sat Mar 2 14:52:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 2 Mar 2019 14:52:20 +0000 (UTC) Subject: [commit: ghc] wip/heapprof001-fragile: testsuite: Mark heapprof001 as fragile on all platforms (3981c41) Message-ID: <20190302145220.01F873A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/heapprof001-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/3981c4126954b6bca86afbea2bdb47bdcc31ecf4/ghc >--------------------------------------------------------------- commit 3981c4126954b6bca86afbea2bdb47bdcc31ecf4 Author: Ben Gamari Date: Fri Mar 1 22:57:55 2019 -0500 testsuite: Mark heapprof001 as fragile on all platforms See #15382. >--------------------------------------------------------------- 3981c4126954b6bca86afbea2bdb47bdcc31ecf4 testsuite/tests/profiling/should_run/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index f6891c3..0222a3e 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,7 @@ expect_broken_for_10037 = expect_broken_for( test('heapprof001', [when(have_profiling(), extra_ways(extra_prof_ways)), - when(arch('i386'), fragile(15382)), + fragile(15382), extra_run_opts('7')], compile_and_run, ['']) From git at git.haskell.org Sun Mar 3 19:55:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:40 +0000 (UTC) Subject: [commit: ghc] branch 'wip/revert-atomic-writes' created Message-ID: <20190303195540.E0A313A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/revert-atomic-writes Referencing: 3533d4984794bf32cc3ab25c622bd4c0df9e6c25 From git at git.haskell.org Sun Mar 3 19:55:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/final-mfp' created Message-ID: <20190303195542.E01A73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/final-mfp Referencing: 69e85a9a971425741e96cb41bebad8bd4221b97f From git at git.haskell.org Sun Mar 3 19:55:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:45 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: gitlab-ci: Pull docker images from ghc/ci-images registry (b90695c) Message-ID: <20190303195546.001C93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/b90695cdaaa0995c1b7a26289c63be9f9e9cfe3e/ghc >--------------------------------------------------------------- commit b90695cdaaa0995c1b7a26289c63be9f9e9cfe3e Author: Ben Gamari Date: Fri Feb 22 14:52:50 2019 -0500 gitlab-ci: Pull docker images from ghc/ci-images registry >--------------------------------------------------------------- b90695cdaaa0995c1b7a26289c63be9f9e9cfe3e .gitlab-ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bca1fe..149e32a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ variables: GIT_SSL_NO_VERIFY: "1" + # Commit of ghc/ci-images repository from which to pull Docker images + DOCKER_REV: 2757db588256b0f96dd44d602f0857ae8f86a704 before_script: - python3 .gitlab/fix-submodules.py @@ -32,7 +34,7 @@ stages: ghc-linters: stage: lint - image: ghcci/linters:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - | if [ -n "$CI_MERGE_REQUEST_ID" ]; then @@ -70,7 +72,7 @@ ghc-linters: validate-x86_64-linux-deb8-hadrian: extends: .validate-hadrian stage: build - image: ghcci/x86_64-linux-deb8:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV" before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . @@ -180,7 +182,7 @@ validate-x86_64-darwin: validate-aarch64-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/aarch64-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_ENV: "aarch64-linux-deb9" @@ -206,7 +208,7 @@ nightly-aarch64-linux-deb9: validate-i386-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/i386-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_ENV: "i386-linux-deb9" @@ -219,7 +221,7 @@ validate-i386-linux-deb9: nightly-i386-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/i386-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_TYPE: slowtest @@ -237,7 +239,7 @@ nightly-i386-linux-deb9: validate-x86_64-linux-deb9-debug: extends: .validate-linux stage: build - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: BUILD_FLAVOUR: validate TEST_ENV: "x86_64-linux-deb9-debug" @@ -247,7 +249,7 @@ validate-x86_64-linux-deb9-debug: validate-x86_64-linux-deb9: extends: .validate-linux stage: build - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb9" artifacts: @@ -270,7 +272,7 @@ nightly-x86_64-linux-deb9: validate-x86_64-linux-deb9-llvm: extends: .validate-linux stage: full-build - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: BUILD_FLAVOUR: perf-llvm TEST_ENV: "x86_64-linux-deb9-llvm" @@ -280,7 +282,7 @@ validate-x86_64-linux-deb9-llvm: release-x86_64-linux-deb8: extends: .validate-linux stage: full-build - image: ghcci/x86_64-linux-deb8:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb8" only: @@ -294,7 +296,7 @@ release-x86_64-linux-deb8: release-x86_64-linux-fedora27: extends: .validate-linux stage: full-build - image: ghcci/x86_64-linux-fedora27:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-fedora27" only: @@ -311,7 +313,7 @@ validate-x86_64-linux-deb9-integer-simple: variables: INTEGER_LIBRARY: integer-simple TEST_ENV: "x86_64-linux-deb9-integer-simple" - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" cache: key: linux-x86_64-deb9 @@ -332,7 +334,7 @@ validate-x86_64-linux-deb9-unreg: variables: CONFIGURE_ARGS: --enable-unregisterised TEST_ENV: "x86_64-linux-deb9-unreg" - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" cache: key: linux-x86_64-deb9 From git at git.haskell.org Sun Mar 3 19:55:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:49 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: gitlab-ci: Give deb9-unreg job a distinct cache key (1bceb64) Message-ID: <20190303195549.1C3C03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/1bceb6431736a53d4746f570ba3631905f6c9c29/ghc >--------------------------------------------------------------- commit 1bceb6431736a53d4746f570ba3631905f6c9c29 Author: Ben Gamari Date: Thu Feb 21 10:51:19 2019 -0500 gitlab-ci: Give deb9-unreg job a distinct cache key >--------------------------------------------------------------- 1bceb6431736a53d4746f570ba3631905f6c9c29 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c762c88..7c78411 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -351,7 +351,7 @@ validate-x86_64-linux-deb9-unreg: TEST_ENV: "x86_64-linux-deb9-unreg" image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" cache: - key: linux-x86_64-deb9 + key: linux-x86_64-deb9-unreg ############################################################ # Validation via Pipelines (Windows) From git at git.haskell.org Sun Mar 3 19:55:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:52 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: gitlab-ci: Produce DWARF-enabled binary distribution (d298cb9) Message-ID: <20190303195552.AFF4A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/d298cb9cf722126316c9697c20a8e0048498efb9/ghc >--------------------------------------------------------------- commit d298cb9cf722126316c9697c20a8e0048498efb9 Author: Ben Gamari Date: Tue Feb 19 11:40:40 2019 -0500 gitlab-ci: Produce DWARF-enabled binary distribution >--------------------------------------------------------------- d298cb9cf722126316c9697c20a8e0048498efb9 .gitlab-ci.yml | 17 ++++++++++++++++- mk/flavours/dwarf.mk | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 149e32a..c762c88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 2757db588256b0f96dd44d602f0857ae8f86a704 + DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f before_script: - python3 .gitlab/fix-submodules.py @@ -258,6 +258,21 @@ validate-x86_64-linux-deb9: cache: key: linux-x86_64-deb9 +release-x86_64-linux-deb9-dwarf: + extends: .validate-linux + stage: build + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" + allow_failure: true + variables: + CONFIGURE_ARGS: "--enable-dwarf-unwind" + BUILD_FLAVOUR: dwarf + TEST_ENV: "x86_64-linux-deb9" + artifacts: + when: always + expire_in: 2 week + cache: + key: linux-x86_64-deb9 + nightly-x86_64-linux-deb9: extends: validate-x86_64-linux-deb9 stage: build diff --git a/mk/flavours/dwarf.mk b/mk/flavours/dwarf.mk new file mode 100644 index 0000000..15f16e2 --- /dev/null +++ b/mk/flavours/dwarf.mk @@ -0,0 +1,14 @@ +# Build flavour which produces a compiler, RTS, and core libraries with DWARF +# debug information. For best results run ./configure with +# --enable-dwarf-unwind. + +SRC_HC_OPTS = -O -H64m +GhcStage1HcOpts = -O2 +GhcStage2HcOpts = -O2 -g3 +GhcRtsHcOpts = -O2 -g3 +GhcLibHcOpts = -O2 -g3 +BUILD_PROF_LIBS = YES +#SplitObjs +#HADDOCK_DOCS +#BUILD_SPHINX_HTML +#BUILD_SPHINX_PDF From git at git.haskell.org Sun Mar 3 19:55:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:55 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: Drop Docker images (161f102) Message-ID: <20190303195555.BEB413A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/161f102b023b3668c9cdc28ace2c1985049841c3/ghc >--------------------------------------------------------------- commit 161f102b023b3668c9cdc28ace2c1985049841c3 Author: Ben Gamari Date: Fri Feb 22 17:04:27 2019 -0500 Drop Docker images These have been moved to the ghc/ci-images project. >--------------------------------------------------------------- 161f102b023b3668c9cdc28ace2c1985049841c3 .circleci/images/aarch64-linux-deb9/Dockerfile | 70 -------------- .circleci/images/i386-linux-deb8/Dockerfile | 44 --------- .circleci/images/i386-linux-deb9/Dockerfile | 44 --------- .circleci/images/linters/Dockerfile | 30 ------ .circleci/images/update-image | 34 ------- .circleci/images/x86_64-freebsd/Dockerfile | 25 ----- .circleci/images/x86_64-freebsd/build-toolchain.sh | 102 --------------------- .circleci/images/x86_64-linux-centos7/Dockerfile | 58 ------------ .circleci/images/x86_64-linux-deb8/Dockerfile | 38 -------- .circleci/images/x86_64-linux-deb9/Dockerfile | 46 ---------- .circleci/images/x86_64-linux-fedora27/Dockerfile | 54 ----------- 11 files changed, 545 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 161f102b023b3668c9cdc28ace2c1985049841c3 From git at git.haskell.org Sun Mar 3 19:55:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:55:58 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: testsuite: Suppress ticks when comparing -ddump-simpl output (aeefc90) Message-ID: <20190303195558.D46903A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/aeefc90cf7fb42183aebe23ccc9d06863f5a9fcf/ghc >--------------------------------------------------------------- commit aeefc90cf7fb42183aebe23ccc9d06863f5a9fcf Author: Ben Gamari Date: Sun Feb 24 00:02:11 2019 -0500 testsuite: Suppress ticks when comparing -ddump-simpl output Otherwise these tests break spuriously when core libraries are compiled with source notes. >--------------------------------------------------------------- aeefc90cf7fb42183aebe23ccc9d06863f5a9fcf testsuite/tests/numeric/should_compile/Makefile | 6 ++--- testsuite/tests/simplCore/should_compile/Makefile | 16 ++++++------ testsuite/tests/simplCore/should_compile/all.T | 30 +++++++++++------------ 3 files changed, 26 insertions(+), 26 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 aeefc90cf7fb42183aebe23ccc9d06863f5a9fcf From git at git.haskell.org Sun Mar 3 19:56:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:01 +0000 (UTC) Subject: [commit: ghc] wip/final-mfp: Accept new test-suite outputs for base-4.13 (9d1e6cf) Message-ID: <20190303195601.EA20F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/final-mfp Link : http://ghc.haskell.org/trac/ghc/changeset/9d1e6cfb82c5be1477aa8780238781329bd5b7e5/ghc >--------------------------------------------------------------- commit 9d1e6cfb82c5be1477aa8780238781329bd5b7e5 Author: Herbert Valerio Riedel Date: Sat Feb 16 11:55:25 2019 +0100 Accept new test-suite outputs for base-4.13 NB: This covers only the trivial ones for better reviewability >--------------------------------------------------------------- 9d1e6cfb82c5be1477aa8780238781329bd5b7e5 testsuite/tests/ado/ado004.stderr | 2 +- testsuite/tests/backpack/cabal/T16219/backpack-issue.cabal | 8 ++++---- testsuite/tests/backpack/should_compile/bkp16.stderr | 4 ++-- testsuite/tests/backpack/should_fail/bkpfail16.stderr | 4 ++-- testsuite/tests/backpack/should_fail/bkpfail17.stderr | 4 ++-- testsuite/tests/backpack/should_fail/bkpfail19.stderr | 4 ++-- testsuite/tests/dependent/should_compile/T14729.stderr | 2 +- testsuite/tests/dependent/should_compile/T15743.stderr | 2 +- testsuite/tests/dependent/should_compile/T15743e.stderr | 2 +- testsuite/tests/determinism/determ021/determ021.stdout | 4 ++-- testsuite/tests/driver/json2.stderr | 2 +- testsuite/tests/ghci/scripts/T4175.stdout | 1 + testsuite/tests/ghci/scripts/ghci008.stdout | 4 ++-- testsuite/tests/ghci/scripts/ghci011.stdout | 1 + testsuite/tests/ghci/scripts/ghci025.stdout | 1 - testsuite/tests/indexed-types/should_compile/T15711.stderr | 2 +- testsuite/tests/indexed-types/should_compile/T15852.stderr | 2 +- testsuite/tests/indexed-types/should_compile/T3017.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/ADT.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr1.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr2.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr3.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr4.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr5.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/AddAndOr6.stderr | 2 +- .../tests/partial-sigs/should_compile/BoolToBool.stderr | 2 +- .../partial-sigs/should_compile/DataFamilyInstanceLHS.stderr | 2 +- .../tests/partial-sigs/should_compile/Defaulting1MROn.stderr | 2 +- .../partial-sigs/should_compile/Defaulting2MROff.stderr | 2 +- .../tests/partial-sigs/should_compile/Defaulting2MROn.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Either.stderr | 2 +- .../partial-sigs/should_compile/EqualityConstraint.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Every.stderr | 2 +- .../tests/partial-sigs/should_compile/EveryNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/ExpressionSig.stderr | 2 +- .../partial-sigs/should_compile/ExpressionSigNamed.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints1.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints2.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints3.stderr | 4 ++-- .../tests/partial-sigs/should_compile/ExtraNumAMROff.stderr | 2 +- .../tests/partial-sigs/should_compile/ExtraNumAMROn.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Forall1.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/GenNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank1.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank2.stderr | 2 +- .../partial-sigs/should_compile/LocalDefinitionBug.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Meltdown.stderr | 2 +- .../tests/partial-sigs/should_compile/MonoLocalBinds.stderr | 2 +- .../tests/partial-sigs/should_compile/NamedTyVar.stderr | 2 +- .../NamedWildcardInDataFamilyInstanceLHS.stderr | 2 +- .../NamedWildcardInTypeFamilyInstanceLHS.stderr | 2 +- .../partial-sigs/should_compile/ParensAroundContext.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/PatBind.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/PatBind2.stderr | 2 +- .../tests/partial-sigs/should_compile/PatternSig.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Recursive.stderr | 2 +- .../partial-sigs/should_compile/ScopedNamedWildcards.stderr | 2 +- .../should_compile/ScopedNamedWildcardsGood.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/ShowNamed.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/SkipMany.stderr | 2 +- .../partial-sigs/should_compile/SomethingShowable.stderr | 2 +- .../partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Uncurry.stderr | 2 +- .../tests/partial-sigs/should_compile/UncurryNamed.stderr | 2 +- .../should_compile/WarningWildcardInstantiations.stderr | 2 +- testsuite/tests/polykinds/T15592.stderr | 2 +- testsuite/tests/polykinds/T15592b.stderr | 2 +- testsuite/tests/rename/should_fail/rnfail040.stderr | 2 +- testsuite/tests/roles/should_compile/Roles1.stderr | 2 +- testsuite/tests/roles/should_compile/Roles14.stderr | 2 +- testsuite/tests/roles/should_compile/Roles2.stderr | 2 +- testsuite/tests/roles/should_compile/Roles3.stderr | 2 +- testsuite/tests/roles/should_compile/Roles4.stderr | 2 +- testsuite/tests/roles/should_compile/T8958.stderr | 2 +- testsuite/tests/safeHaskell/check/Check01.stderr | 2 +- testsuite/tests/safeHaskell/check/Check06.stderr | 2 +- testsuite/tests/safeHaskell/check/Check08.stderr | 2 +- testsuite/tests/safeHaskell/check/Check09.stderr | 4 ++-- testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr | 2 +- testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr | 2 +- testsuite/tests/safeHaskell/flags/SafeFlags17.stderr | 2 +- testsuite/tests/th/T15321.stderr | 4 ++-- testsuite/tests/typecheck/should_compile/T12763.stderr | 2 +- .../should_compile/abstract_refinement_hole_fits.stderr | 8 -------- .../typecheck/should_compile/constraint_hole_fits.stderr | 2 -- .../typecheck/should_compile/refinement_hole_fits.stderr | 10 ---------- .../should_compile/subsumption_sort_hole_fits.stderr | 12 ++++++------ testsuite/tests/typecheck/should_compile/tc231.stderr | 2 +- .../tests/typecheck/should_compile/valid_hole_fits.stderr | 4 ++-- .../typecheck/should_fail/TcStaticPointersFail02.stderr | 4 ++-- testsuite/tests/typecheck/should_fail/tcfail182.stderr | 2 +- 92 files changed, 107 insertions(+), 126 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 9d1e6cfb82c5be1477aa8780238781329bd5b7e5 From git at git.haskell.org Sun Mar 3 19:56:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:04 +0000 (UTC) Subject: [commit: ghc] wip/final-mfp: testsuite: Remove Monad(fail) references (102c24d) Message-ID: <20190303195604.EEE103A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/final-mfp Link : http://ghc.haskell.org/trac/ghc/changeset/102c24d5d4423a3538f122f1b16999a07c70e309/ghc >--------------------------------------------------------------- commit 102c24d5d4423a3538f122f1b16999a07c70e309 Author: Ben Gamari Date: Wed Feb 27 21:45:29 2019 -0500 testsuite: Remove Monad(fail) references >--------------------------------------------------------------- 102c24d5d4423a3538f122f1b16999a07c70e309 testsuite/tests/rebindable/DoRestrictedM.hs | 1 - testsuite/tests/rebindable/T5908.hs | 5 ----- 2 files changed, 6 deletions(-) diff --git a/testsuite/tests/rebindable/DoRestrictedM.hs b/testsuite/tests/rebindable/DoRestrictedM.hs index 2e982c1..4f78857 100644 --- a/testsuite/tests/rebindable/DoRestrictedM.hs +++ b/testsuite/tests/rebindable/DoRestrictedM.hs @@ -32,7 +32,6 @@ newtype RegularM m a = RegularM{unRM :: m a} instance Prelude.Monad m => MN2 (RegularM m) a where return = RegularM . Prelude.return - fail = RegularM . Prelude.fail instance Prelude.Monad m => MN3 (RegularM m) a b where m >>= f = RegularM ((Prelude.>>=) (unRM m) (unRM . f)) diff --git a/testsuite/tests/rebindable/T5908.hs b/testsuite/tests/rebindable/T5908.hs index 2666c33..ff5da89 100644 --- a/testsuite/tests/rebindable/T5908.hs +++ b/testsuite/tests/rebindable/T5908.hs @@ -25,11 +25,9 @@ class Monad m where (>>=) :: forall e ex x a b . m e ex a -> (a -> m ex x b) -> m e x b (>>) :: forall e ex x a b . m e ex a -> m ex x b -> m e x b return :: a -> m ex ex a - fail :: String -> m e x a {-# INLINE (>>) #-} m >> k = m >>= \ _ -> k - fail = error type Writer w = WriterT w Identity @@ -60,9 +58,6 @@ instance (Category w, Prelude.Monad m) => Monad (WriterT w m) where where (>>=) = (Prelude.>>=) return = Prelude.return - fail msg = WriterT $ fail msg - where - fail = Prelude.fail tell :: (Category w, Prelude.Monad m) => w e x -> WriterT w m e x () tell w = WriterT $ return ((), w) From git at git.haskell.org Sun Mar 3 19:56:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:08 +0000 (UTC) Subject: [commit: ghc] wip/final-mfp: base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead (957edc8) Message-ID: <20190303195608.045373A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/final-mfp Link : http://ghc.haskell.org/trac/ghc/changeset/957edc8337ccb9d761af393cf61adc80190bc374/ghc >--------------------------------------------------------------- commit 957edc8337ccb9d761af393cf61adc80190bc374 Author: Herbert Valerio Riedel Date: Sat Nov 10 01:12:52 2018 +0100 base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail >--------------------------------------------------------------- 957edc8337ccb9d761af393cf61adc80190bc374 libraries/base/Control/Monad.hs | 4 +++- libraries/base/Control/Monad/ST/Lazy/Imp.hs | 3 --- libraries/base/GHC/Base.hs | 16 ---------------- libraries/base/GHC/Conc/Sync.hs | 2 +- libraries/base/GHC/TopHandler.hs | 2 +- libraries/base/Prelude.hs | 3 ++- libraries/base/System/IO.hs | 2 +- libraries/base/Text/ParserCombinators/ReadP.hs | 3 --- libraries/base/Text/ParserCombinators/ReadPrec.hs | 1 - libraries/base/base.cabal | 4 ++-- 10 files changed, 10 insertions(+), 30 deletions(-) diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs index fbdb99e..a0d4284 100644 --- a/libraries/base/Control/Monad.hs +++ b/libraries/base/Control/Monad.hs @@ -19,7 +19,8 @@ module Control.Monad -- * Functor and monad classes Functor(fmap) - , Monad((>>=), (>>), return, fail) + , Monad((>>=), (>>), return) + , MonadFail(fail) , MonadPlus(mzero, mplus) -- * Functions @@ -75,6 +76,7 @@ module Control.Monad , (<$!>) ) where +import Control.Monad.Fail ( MonadFail(fail) ) import Data.Foldable ( Foldable, sequence_, sequenceA_, msum, mapM_, foldlM, forM_ ) import Data.Functor ( void, (<$>) ) import Data.Traversable ( forM, mapM, traverse, sequence, sequenceA ) diff --git a/libraries/base/Control/Monad/ST/Lazy/Imp.hs b/libraries/base/Control/Monad/ST/Lazy/Imp.hs index f8d35b9..5bb1a06 100644 --- a/libraries/base/Control/Monad/ST/Lazy/Imp.hs +++ b/libraries/base/Control/Monad/ST/Lazy/Imp.hs @@ -180,9 +180,6 @@ instance Applicative (ST s) where -- | @since 2.01 instance Monad (ST s) where - - fail s = errorWithoutStackTrace s - (>>) = (*>) m >>= k = ST $ \ s -> diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 6b606d3..60a485c 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -664,17 +664,6 @@ class Applicative m => Monad m where return :: a -> m a return = pure - -- | Fail with a message. This operation is not part of the - -- mathematical definition of a monad, but is invoked on pattern-match - -- failure in a @do@ expression. - -- - -- As part of the MonadFail proposal (MFP), this function is moved - -- to its own class 'Control.Monad.MonadFail' (see "Control.Monad.Fail" for - -- more details). The definition here will be removed in a future - -- release. - fail :: String -> m a - fail s = errorWithoutStackTrace s - {- Note [Recursive bindings for Applicative/Monad] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -855,8 +844,6 @@ instance Monad Maybe where (>>) = (*>) - fail _ = Nothing - -- ----------------------------------------------------------------------------- -- The Alternative class definition @@ -984,8 +971,6 @@ instance Monad [] where xs >>= f = [y | x <- xs, y <- f x] {-# INLINE (>>) #-} (>>) = (*>) - {-# INLINE fail #-} - fail _ = [] -- | @since 2.01 instance Alternative [] where @@ -1365,7 +1350,6 @@ instance Monad IO where {-# INLINE (>>=) #-} (>>) = (*>) (>>=) = bindIO - fail s = failIO s -- | @since 4.9.0.0 instance Alternative IO where diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs index 7038b0d..5c3e63a 100644 --- a/libraries/base/GHC/Conc/Sync.hs +++ b/libraries/base/GHC/Conc/Sync.hs @@ -367,7 +367,7 @@ to avoid contention with other processes in the machine. -} setNumCapabilities :: Int -> IO () setNumCapabilities i - | i <= 0 = fail $ "setNumCapabilities: Capability count ("++show i++") must be positive" + | i <= 0 = failIO $ "setNumCapabilities: Capability count ("++show i++") must be positive" | otherwise = c_setNumCapabilities (fromIntegral i) foreign import ccall safe "setNumCapabilities" diff --git a/libraries/base/GHC/TopHandler.hs b/libraries/base/GHC/TopHandler.hs index d988369..bb358a3 100644 --- a/libraries/base/GHC/TopHandler.hs +++ b/libraries/base/GHC/TopHandler.hs @@ -241,7 +241,7 @@ safeExit = exitHelper useSafeExit fastExit = exitHelper useFastExit unreachable :: IO a -unreachable = fail "If you can read this, shutdownHaskellAndExit did not exit." +unreachable = failIO "If you can read this, shutdownHaskellAndExit did not exit." exitHelper :: CInt -> Int -> IO a #if defined(mingw32_HOST_OS) diff --git a/libraries/base/Prelude.hs b/libraries/base/Prelude.hs index 15e392f..f7b2fd9 100644 --- a/libraries/base/Prelude.hs +++ b/libraries/base/Prelude.hs @@ -73,7 +73,8 @@ module Prelude ( -- ** Monads and functors Functor(fmap, (<$)), (<$>), Applicative(pure, (<*>), (*>), (<*)), - Monad((>>=), (>>), return, fail), + Monad((>>=), (>>), return), + MonadFail(fail), mapM_, sequence_, (=<<), -- ** Folds and traversals diff --git a/libraries/base/System/IO.hs b/libraries/base/System/IO.hs index 1fc39be..08416ff 100644 --- a/libraries/base/System/IO.hs +++ b/libraries/base/System/IO.hs @@ -485,7 +485,7 @@ openTempFile' :: String -> FilePath -> String -> Bool -> CMode -> IO (FilePath, Handle) openTempFile' loc tmp_dir template binary mode | pathSeparator template - = fail $ "openTempFile': Template string must not contain path separator characters: "++template + = failIO $ "openTempFile': Template string must not contain path separator characters: "++template | otherwise = findTempName where -- We split off the last extension, so we can use .foo.ext files diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs index e28f32d..e6dcab5 100644 --- a/libraries/base/Text/ParserCombinators/ReadP.hs +++ b/libraries/base/Text/ParserCombinators/ReadP.hs @@ -120,8 +120,6 @@ instance Monad P where (Result x p) >>= k = k x <|> (p >>= k) (Final (r:|rs)) >>= k = final [ys' | (x,s) <- (r:rs), ys' <- run (k x) s] - fail _ = Fail - -- | @since 4.9.0.0 instance MonadFail P where fail _ = Fail @@ -177,7 +175,6 @@ instance Applicative ReadP where -- | @since 2.01 instance Monad ReadP where - fail _ = R (\_ -> Fail) R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k)) -- | @since 4.9.0.0 diff --git a/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs index 2b30fe0..df77045 100644 --- a/libraries/base/Text/ParserCombinators/ReadPrec.hs +++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs @@ -85,7 +85,6 @@ instance Applicative ReadPrec where -- | @since 2.01 instance Monad ReadPrec where - fail s = P (\_ -> fail s) P f >>= k = P (\n -> do a <- f n; let P f' = k a in f' n) -- | @since 4.9.0.0 diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 4e809e7..a2c9164 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -1,6 +1,6 @@ -cabal-version: 2.1 +cabal-version: 2.2 name: base -version: 4.12.0.0 +version: 4.13.0.0 -- NOTE: Don't forget to update ./changelog.md license: BSD-3-Clause From git at git.haskell.org Sun Mar 3 19:56:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:11 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: Revert "compiler: Refactor: extract `withAtomicRename`" (2974af3) Message-ID: <20190303195611.0D7403A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/2974af32361da7028352387f7172c4e16ecf43da/ghc >--------------------------------------------------------------- commit 2974af32361da7028352387f7172c4e16ecf43da Author: Ben Gamari Date: Sun Mar 3 00:16:00 2019 -0500 Revert "compiler: Refactor: extract `withAtomicRename`" This reverts commit e8a08f400744a860d1366c6680c8419d30f7cc2a. >--------------------------------------------------------------- 2974af32361da7028352387f7172c4e16ecf43da compiler/main/DriverPipeline.hs | 13 +++++++------ compiler/utils/Util.hs | 24 +----------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f1ef637..3f59ed3 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1341,10 +1341,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags let local_includes = [ SysTools.Option ("-iquote" ++ p) | p <- includePathsQuote cmdline_include_paths ] let runAssembler inputFilename outputFilename - = liftIO $ do - withAtomicRename outputFilename $ \temp_outputFilename -> do - as_prog - dflags + = liftIO $ as_prog dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags @@ -1374,11 +1371,15 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags , SysTools.Option "-c" , SysTools.FileOption "" inputFilename , SysTools.Option "-o" - , SysTools.FileOption "" temp_outputFilename + , SysTools.FileOption "" outputFilename ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - runAssembler input_fn output_fn + + -- Atomic write by writing to temp file and then renaming + let temp_output_fn = output_fn <.> "tmp" + runAssembler input_fn temp_output_fn + liftIO $ renameFile temp_output_fn output_fn return (RealPhase next_phase, output_fn) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 41f63f2..16864fe 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -99,7 +99,6 @@ module Util ( doesDirNameExist, getModificationUTCTime, modificationTimeIfExists, - withAtomicRename, global, consIORef, globalM, sharedGlobal, sharedGlobalM, @@ -146,10 +145,9 @@ import GHC.Stack (HasCallStack) import Control.Applicative ( liftA2 ) import Control.Monad ( liftM, guard ) -import Control.Monad.IO.Class ( MonadIO, liftIO ) import GHC.Conc.Sync ( sharedCAF ) import System.IO.Error as IO ( isDoesNotExistError ) -import System.Directory ( doesDirectoryExist, getModificationTime, renameFile ) +import System.Directory ( doesDirectoryExist, getModificationTime ) import System.FilePath import Data.Char ( isUpper, isAlphaNum, isSpace, chr, ord, isDigit, toUpper @@ -1306,26 +1304,6 @@ modificationTimeIfExists f = do else ioError e -- -------------------------------------------------------------- --- atomic file writing by writing to a temporary file first (see #14533) --- --- This should be used in all cases where GHC writes files to disk --- and uses their modification time to skip work later, --- as otherwise a partially written file (e.g. due to crash or Ctrl+C) --- also results in a skip. - -withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a -withAtomicRename targetFile f = do - -- The temp file must be on the same file system (mount) as the target file - -- to result in an atomic move on most platforms. - -- The standard way to ensure that is to place it into the same directory. - -- This can still be fooled when somebody mounts a different file system - -- at just the right time, but that is not a case we aim to cover here. - let temp = targetFile <.> "tmp" - res <- f temp - liftIO $ renameFile temp targetFile - return res - --- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string -- up (but not including) the last character for which 'pred' returned From git at git.haskell.org Sun Mar 3 19:56:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:14 +0000 (UTC) Subject: [commit: ghc] wip/revert-atomic-writes: Revert "compiler: Write .o files atomically. See #14533" (3533d49) Message-ID: <20190303195614.151F03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/3533d4984794bf32cc3ab25c622bd4c0df9e6c25/ghc >--------------------------------------------------------------- commit 3533d4984794bf32cc3ab25c622bd4c0df9e6c25 Author: Ben Gamari Date: Sun Mar 3 00:16:08 2019 -0500 Revert "compiler: Write .o files atomically. See #14533" This reverts commit 0e2d300a59b1b5c167d2e7d99a448c8663ba6d7d. >--------------------------------------------------------------- 3533d4984794bf32cc3ab25c622bd4c0df9e6c25 compiler/main/DriverPipeline.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 3f59ed3..5fe2362 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1375,12 +1375,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - - -- Atomic write by writing to temp file and then renaming - let temp_output_fn = output_fn <.> "tmp" - runAssembler input_fn temp_output_fn - liftIO $ renameFile temp_output_fn output_fn - + runAssembler input_fn output_fn return (RealPhase next_phase, output_fn) From git at git.haskell.org Sun Mar 3 19:56:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 3 Mar 2019 19:56:17 +0000 (UTC) Subject: [commit: ghc] wip/final-mfp: Rip out remainder of MonadFailDesugaring (69e85a9) Message-ID: <20190303195617.2C5113A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/final-mfp Link : http://ghc.haskell.org/trac/ghc/changeset/69e85a9a971425741e96cb41bebad8bd4221b97f/ghc >--------------------------------------------------------------- commit 69e85a9a971425741e96cb41bebad8bd4221b97f Author: Ben Gamari Date: Sun Mar 3 00:31:47 2019 -0500 Rip out remainder of MonadFailDesugaring >--------------------------------------------------------------- 69e85a9a971425741e96cb41bebad8bd4221b97f compiler/main/DynFlags.hs | 8 ++------ compiler/prelude/PrelNames.hs | 14 +++++--------- compiler/rename/RnExpr.hs | 17 ++++++----------- compiler/rename/RnSource.hs | 43 ------------------------------------------- 4 files changed, 13 insertions(+), 69 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 69e85a9a971425741e96cb41bebad8bd4221b97f From git at git.haskell.org Mon Mar 4 18:51:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 18:51:12 +0000 (UTC) Subject: [commit: ghc] master's head updated: Use validate flavour rather than devel2 for DEBUG CI job (44ad721) Message-ID: <20190304185112.D64313A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: c9fe14c Update transformers module 54a50a6 gitlab-ci: Reenable Hadrian build on Windows 5fcee8a users guide: consistent spelling of inlinable 395c8ea users guide: fix typesetting of pragmas cfe6401 Fix hadrian prof flavour so that it builds a profiled version of GHC 33aba19 Minor typo in docs for KProxy b19ee0e Add myself to CODEOWNERS for a few files 512a5f3 testsuite: Ensure that config.{msys,cygwin} are initialized d26869a Hadrian: install patches 'haddock-{html,interface}' 0b705fa testsuite: Mark ghci063 as broken on Darwin 57142eb testsuite: Mark T16180 as broken on Darwin daff24b gitlab-ci: Disallow failure efc9584 Hadrian: support in-tree GMP cd45f8c Update Darwin CI to use new toplevel --with-intree-gmp configure flag a90a2ae gitlab: Collect artifacts on Windows 5341edf Error out of invalid Int/Word bit shifts c9a02df gitlab-ci: Drop CircleCI jobs bb2acfe A few typofixes b397e97 Minor refactor [ci skip] 35c58c3 testsuite: Skip ghcilink002 when unregisterised 886ddb2 gitlab-ci: Explicitly clear dependencies of all jobs 571e45d Add Simon and Richard as more CODEOWNERS 3cbee25 Add @sgraf to CODEOWNERS 1dd251b testsuite: Add predicate for CPU feature availability 372b5d1 testsuite: Add test for #16104 0d9f105 GhcPlugins: Fix lookup of TH names fc44e0b testsuite: Normalise style 236beac testsuite: Remove directories that already exist when seeding extra_files 55bbe9c testsuite: Mark hWaitForInput-accurate-socket as requiring unix f75c86a Update binary submodule to latest master branch tip d0b8a16 Update Cabal submodule to latest master branch tip 5cb071a hadrian: use new-exec to make sure alex & happy are in PATH (#16120) 3cf12e6 check-api-annotations checks for annotation preceding its span 022a717 testsuite: Skip T1288_ghci in unregisterised dc6fd39 testsuite: Skip foreignInterruptible in unregisterised way def84a1 testsuite: Add tests from #11982 18bd272 Add myself to a few more places 019127b Update CODEOWNERS e716438 Add @simonmar to various things in CODEOWNERS 10faf44 Don't overwrite the set log_action when using --interactive b89b6e7 Fix incorrectly named configure options 7223b44 Fix regDotColor for amd64. f8605fa Update CODEOWNERS files with utils 6da9f4c gitlab-ci: Fix Windows cleanup command line 79a5afb Test that hsc2hs works with promoted data constructors 7797492 Some refactoring in tcInferApps b1e569a Use sigPrec in more places in Convert and HsUtils 7cdcd3e Fix #12509: ghci -XSafe fails in an inscrutable way 76c8fd6 Batch merge 172a593 Revert "Batch merge" bdb559a testsuite: Introduce makefile_test 513a449 testsuite: Use makefile_test cc2261d Performance tests: recover a baseline from ancestor commits and CI results. c1d9416 Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions under -mbmi2 cfbd39b gitlab-ci: Use build cleanup logic on Darwin as well 924a460 Avoid compiling Hadrian dependencies with profiling on Cabal/Windows c85d708 Avoid compiling Hadrian dependencies with profiling on Cabal/Linux f00b35f make ghc-pkg shut up 6fa3866 Use `NameEnv Id` instead of `Map Name Id` 5ed48d2 Include type info for only some exprs in HIE files e7e5f4a Only build vanilla way in devel2 flavour 4bf35da API Annotations: Parens not attached correctly for ClassDecl e29b1ee Add a RTS option -xp to load PIC object anywhere in address space 740534d Allocate bss section within proper range of other sections 6e96aa2 Don't use X86_64_ELF_NONPIC_HACK for +RTS -xp deab6d6 Fix syntax in CODEOWNERS file 4fa3229 Use ByteString to represent Cmm string literals (#16198) d887f37 Optimize pprASCII 98ff301 hWaitForInput-accurate-stdin test 0593e93 Add -fdefer-diagnostics to defer and group diagnostic messages in make-mode 92c7e70 Use O2 on stage1 for faster overall build times with make. 1be81c5 Add O2 to hsCompiler on stage0 for most hadrian flavours. e08974e Introduce GhciMonad and generalize types of functions in GHCi.UI 5b970d8 testsuite: Add test for #14828 ff2d601 Replace BlockSequence with OrdList in BlockLayout.hs 438c11c Small optimizations to BlockLayout. 4376d88 PPC NCG: Promote integers to word size in C calls 9bcef36 Update hsc2hs submodule 038de6a Update text submodule 03030bc Update unix submodule edca783 Update deepseq submodule 229f097 Update haskeline submodule ffd2035 Update parsec submodule 4a9e14b Update process submodule 713271d Update stm submodule 8673432 Update terminfo submodule 780bcda Hadrian: Update instructions for building on Windows 21462a3 Hadrian: Fix outdated link. ebe2d34 Revert "Performance tests: recover a baseline from ancestor commits and CI results." d6d735c Fix #16219: TemplateHaskell causes indefinite package build error ef6b283 Remove ExnStr and ThrowsExn business f0cd728 Reject oversaturated VKAs in type family equations 6dae133 Update user-settings.md with a pointer to `Packages` 97231c3 Polished Note [Exceptions and strictness] 2d79cd1 Turn on -Werror when validating 558550a Remove unused imports 45bd04d Bump hsc2hs for removed unused match 71dae4e Turn on -Wno-unused-imports in make build system 59d622d docs: change meta-variable of -interactive-print from expr to name 59516e4 Fix missing space in ppr_cmd for HsCmdArrForm 8dcd00c Add werror function to Flavour.hs eeabeb9 Report multiple errors 461c447 testsuite: Skip T15897 in unregisterised way e0c0bde testsuite: Use makefile_test for T16212 626b63b testsuite: Mark print037 as broken when GHC is built with LLVM ef25b59 gitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail 406e43a Add `-fplugin-trustworthy` to avoid marking modules as unsafe ab49342 Refactor splice_exp in Parser.y e88e083 Fix #14579 by defining tyConAppNeedsKindSig, and using it 9292a18 Add int-index as parser/* codeowner c07e7ec Fix #16287 by checking for more unsaturated synonym arguments c32de5f gitlab-ci: Add a devel2 build 0620e59 gitlab-ci: More aggressive artifact expiration 701cfb3 Revert "gitlab-ci: More aggressive artifact expiration" 606db8c testsuite: Mark T11334b as broken in debugged compiler 7e495b4 testsuite: Mark recomp007 as broken in debugged compiler 71d5ab0 testsuite: Mark T14740 and tcfail159 as broken in debugged compiler aad05fb testsuite: Mark T5515 as broken with debugged compiler 2b90356 Fix #14729 by making the normaliser homogeneous 03b7abc Allow resizing the stack for the graph allocator. 14eb23c Update hpc submodule bac64c3 Hadrian: compile libgmp static on Windows d97f0db Fix test for T16180 on Darwin (fix #16128) ee52298 TestEquality instance for Compose a9bef62 Add a changelog for base 4.14.0.0 41df8e3 Update filepath submodule be8a803 Update directory submodule f17a576 ImplicitParams does not imply FlexibleContexts or FlexibleInstances, fixes #16248 be15f74 API Annotations: more explicit foralls fixup cbfc9fc API Annotations: AnnAt disconnected for TYPEAPP 5e9888b API Annotations: parens anns discarded for `(*)` operator c1cf269 Lexer: Alternate Layout Rule injects actual not virtual braces 7ff127f rts/ProfilerReportJson: Fix format string ced729f Cleanup in parser/Ctype.hs 071bef1 Fix optSemi type in Parser.y 0a4bbb5 Remove a few undefined prel names 616b2ef Comments only cefb780 Comments only about the binder-swap in OccurAnal 9bb23d5 Minor refactor of CUSK handling fb031b9 Stack: fix name mangling. 9170daa Replace a few uses of snocView with last/lastMaybe. f4d8e90 Improve snocView implementation. 9adb7f6 Simplify the build.stack.bat script to use 'stack run' 249b0ba Upgrade to the latest stack resolver 3fcf79a Fix inverted position pragma flag in parser API e67384f Fix invalid doc comment 53a870f Make CI via Hadrian build docs 027017f Remove ghctags (#16274) a48753b Capture and simplify constraints arising from running typed splices 224fec6 testsuite: Report stdout and stderr in JUnit output f53ef1a testsuite: Always skip T15897 07f5cbc Fix Int overflow on 32 bit platform b1662e8 Hadrian: add LLVM flavours 180c976 testsuite: Report unexpected passes in junit output 093fa2f Update array submodule 6399965 Add explicit dependencies to cleanup-darwin 012257c Fix #16293 by cleaning up Proxy# infelicities 4a4ae70 Fix #16188 8b476d8 Fix #16299 by deleting incorrect code from IfaceSyn a08f463 Fix #15849 by checking whether there's a do block 2868313 configure: Document CLANG, LLC, and OPT variables 6b890d7 Fix checkStackChunk() call in Interepter.c, enable an assertion 4af0a2d Update parallel submodule e40f00d Fix typos [skip ci] 7f26b74 Add `liftedTyped` to `Lift` class 0f1eb88 Add perf test for #16190 1d9a1d9 NCG: fast compilation of very large strings (#16190) 1962621 Implement -Wredundant-record-wildcards and -Wunused-record-wildcards 6827838 Make a smart mkAppTyM 5c1f268 Fail fast in solveLocalEqualities b31df5c Hadrian: enable -Wcompat=error in the testsuite 887454d 'forall' always a keyword, plus the dot type operator 173d0ce Properly escape character literals in Haddocks bcaba30 Don't wrap the entry map for LiveInfo in Maybe. 0b92bdc Fix and Reapply "Performance tests: recover a baseline from ancestor commits and CI results." 9b39597 Fix tests which were made to pass by "Make a smart mkAppTyM" 5544f60 Remove Simon's special number from typecheck/should_fail/all.t 7752fa5 Minor documentation fix in GHC.ForeignPtr 3cb063c Remove `parallel` as a submodule 69ebf5c HIE: Save module name and module exports af7b0fd Cmm: Promote stack arguments to word size 4a09d30 Run some of Haddock's tests in the testsuite 0fff3ae Testsuite: implement use_specs. 1f1b9e3 Get rid of tcm_smart from TyCoMapper 1ffee94 Fix warnings and fatal parsing errors 2a43164 Uphold AvailTC Invariant for associated data fams 129a800 Fix Haddock comment for Integer datatype 9049bfb Disable binder swap in OccurAnal (Trac #16288) b78cc64 Make constructor wrappers inline only during the final phase 7833cf4 Look through newtype wrappers (Trac #16254) 76ac103 base: Document errno behaviour in haddocks. 9f5b11f Remove arc scripts 908b4b8 Fix two bugs in stg_ap_0_fast in profiling runtime 1dad4fc Hadrian: Fix untracked dependencies eda456f CI: Run `cabal update` before trying to build Hadrian aa79f65 Bump ghc version to 8.9 2e96ce1 Test bit-manipulating primops under respective arch flags like -msse4.2 2209ea8 Add comments about how zip fusion e86606f Tiny refactor in isUnliftedRuntimeRep 5eeefe4 Improve the very simple optimiser slightly 3f73f08 Comments only, in GhcPrelude 2a0be14 Text.ParserCombinators.ReadP: use NonEmpty in Final 32f44ed Fix test runner crash when not in a git repo 2f4af71 Dot/bang operators in export lists (Trac #16339) e204431 Handle the (~) type operator in 'tyconsym' 48aafc2 Testsuite: opt-in to symlinks on Windows 9db92cf Set builder env 0e2d300 compiler: Write .o files atomically. See #14533 e8a08f4 compiler: Refactor: extract `withAtomicRename` 473632d Bump nofib submodule. a07f46e Remove tcTyConUserTyVars 0eb7cf0 Don't do binder-swap for GlobalIds c25b135 Fix exprIsConApp_maybe 44ad721 Use validate flavour rather than devel2 for DEBUG CI job From git at git.haskell.org Mon Mar 4 21:04:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:04:47 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: A bit of reorganization (1285d6b) Message-ID: <20190304210447.03E213A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1285d6b95fbae7858abbc4722bc2301d7fe40425/ghc >--------------------------------------------------------------- commit 1285d6b95fbae7858abbc4722bc2301d7fe40425 Author: Ben Gamari Date: Fri Mar 1 10:54:02 2019 -0500 gitlab-ci: A bit of reorganization >--------------------------------------------------------------- 1285d6b95fbae7858abbc4722bc2301d7fe40425 .gitlab-ci.yml | 162 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 84 insertions(+), 78 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c78411..1140c7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ variables: GIT_SSL_NO_VERIFY: "1" + # Commit of ghc/ci-images repository from which to pull Docker images DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f @@ -122,6 +123,10 @@ validate-x86_64-linux-deb8-hadrian: - ghc.tar.xz - junit.xml +################################# +# x86_64-darwin +################################# + validate-x86_64-darwin: extends: .validate stage: full-build @@ -179,24 +184,30 @@ validate-x86_64-darwin: - cabal-cache - toolchain -validate-aarch64-linux-deb9: +################################# +# aarch64-linux-deb9 +################################# + +.build-aarch64-linux-deb9: extends: .validate-linux stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_ENV: "aarch64-linux-deb9" - artifacts: - when: always - expire_in: 2 week cache: key: linux-aarch64-deb9 tags: - aarch64-linux +validate-aarch64-linux-deb9: + extends: .build-aarch64-linux-deb9 + artifacts: + when: always + expire_in: 2 week + nightly-aarch64-linux-deb9: - extends: validate-aarch64-linux-deb9 - stage: full-build + extends: .build-aarch64-linux-deb9 artifacts: expire_in: 2 year variables: @@ -205,77 +216,58 @@ nightly-aarch64-linux-deb9: variables: - $NIGHTLY -validate-i386-linux-deb9: +################################# +# i386-linux-deb9 +################################# + +.build-i386-linux-deb9: extends: .validate-linux stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_ENV: "i386-linux-deb9" + cache: + key: linux-i386-deb9 + +validate-i386-linux-deb9: + extends: .build-i386-linux-deb9 artifacts: when: always expire_in: 2 week - cache: - key: linux-i386-deb9 nightly-i386-linux-deb9: - extends: .validate-linux - stage: full-build - image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" - allow_failure: true + extends: .build-i386-linux-deb9 variables: TEST_TYPE: slowtest - TEST_ENV: "i386-linux-deb9" artifacts: when: always expire_in: 2 week only: variables: - $NIGHTLY - 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: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" - variables: - BUILD_FLAVOUR: validate - TEST_ENV: "x86_64-linux-deb9-debug" - cache: - key: linux-x86_64-deb9 +################################# +# x86_64-linux-deb9 +################################# -validate-x86_64-linux-deb9: +.build-x86_64-linux-deb9: extends: .validate-linux stage: build image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb9" - artifacts: - when: always - expire_in: 2 week cache: key: linux-x86_64-deb9 -release-x86_64-linux-deb9-dwarf: - extends: .validate-linux - stage: build - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" - allow_failure: true - variables: - CONFIGURE_ARGS: "--enable-dwarf-unwind" - BUILD_FLAVOUR: dwarf - TEST_ENV: "x86_64-linux-deb9" +validate-x86_64-linux-deb9: + extends: .build-x86_64-linux-deb9 artifacts: when: always expire_in: 2 week - cache: - key: linux-x86_64-deb9 nightly-x86_64-linux-deb9: - extends: validate-x86_64-linux-deb9 - stage: build + extends: .build-x86_64-linux-deb9 artifacts: expire_in: 2 year variables: @@ -284,15 +276,51 @@ nightly-x86_64-linux-deb9: variables: - $NIGHTLY +# N.B. Has DEBUG assertions enabled in stage2 +validate-x86_64-linux-deb9-debug: + extends: .build-x86_64-linux-deb9 + variables: + BUILD_FLAVOUR: validate + TEST_ENV: "x86_64-linux-deb9-debug" + validate-x86_64-linux-deb9-llvm: - extends: .validate-linux + extends: .build-x86_64-linux-deb9 stage: full-build - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: BUILD_FLAVOUR: perf-llvm TEST_ENV: "x86_64-linux-deb9-llvm" - cache: - key: linux-x86_64-deb9 + +validate-x86_64-linux-deb9-integer-simple: + extends: .build-x86_64-linux-deb9 + stage: full-build + variables: + INTEGER_LIBRARY: integer-simple + TEST_ENV: "x86_64-linux-deb9-integer-simple" + +nightly-x86_64-linux-deb9-integer-simple: + extends: .build-x86_64-linux-deb9 + stage: full-build + variables: + INTEGER_LIBRARY: integer-simple + TEST_ENV: "x86_64-linux-deb9-integer-simple" + TEST_TYPE: slowtest + artifacts: + expire_in: 2 year + only: + variables: + - $NIGHTLY + +validate-x86_64-linux-deb9-unreg: + extends: .build-x86_64-linux-deb9 + stage: full-build + variables: + CONFIGURE_ARGS: --enable-unregisterised + TEST_ENV: "x86_64-linux-deb9-unreg" + + +################################# +# x86_64-linux-deb8 +################################# release-x86_64-linux-deb8: extends: .validate-linux @@ -308,6 +336,11 @@ release-x86_64-linux-deb8: when: always expire_in: 2 week + +################################# +# x86_64-linux-fedora27 +################################# + release-x86_64-linux-fedora27: extends: .validate-linux stage: full-build @@ -322,37 +355,6 @@ release-x86_64-linux-fedora27: when: always expire_in: 2 week -validate-x86_64-linux-deb9-integer-simple: - extends: .validate-linux - stage: full-build - variables: - INTEGER_LIBRARY: integer-simple - TEST_ENV: "x86_64-linux-deb9-integer-simple" - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" - cache: - key: linux-x86_64-deb9 - -nightly-x86_64-linux-deb9-integer-simple: - extends: validate-x86_64-linux-deb9-integer-simple - stage: full-build - artifacts: - expire_in: 2 year - variables: - TEST_TYPE: slowtest - only: - variables: - - $NIGHTLY - -validate-x86_64-linux-deb9-unreg: - extends: .validate-linux - stage: full-build - variables: - CONFIGURE_ARGS: --enable-unregisterised - TEST_ENV: "x86_64-linux-deb9-unreg" - image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" - cache: - key: linux-x86_64-deb9-unreg - ############################################################ # Validation via Pipelines (Windows) ############################################################ @@ -444,6 +446,10 @@ validate-x86_64-windows: - ghc.tar.xz - junit.xml +############################################################ +# Cleanup +############################################################ + # Note [Cleaning up after shell executor] # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # From git at git.haskell.org Mon Mar 4 21:04:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:04:50 +0000 (UTC) Subject: [commit: ghc] master: detect 'autoreconf' path during configure, and use it in hadrian (f77229e) Message-ID: <20190304210450.0739B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f77229e3c30fa9e353c061dc038a5d0b2ee01c48/ghc >--------------------------------------------------------------- commit f77229e3c30fa9e353c061dc038a5d0b2ee01c48 Author: Alp Mestanogullari Date: Tue Feb 26 11:21:55 2019 +0100 detect 'autoreconf' path during configure, and use it in hadrian >--------------------------------------------------------------- f77229e3c30fa9e353c061dc038a5d0b2ee01c48 configure.ac | 3 +++ hadrian/cfg/system.config.in | 2 +- hadrian/src/Builder.hs | 14 +++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e5ea091..1aae465 100644 --- a/configure.ac +++ b/configure.ac @@ -817,6 +817,9 @@ dnl ** check for patch dnl if GNU patch is named gpatch, look for it first AC_PATH_PROGS(PatchCmd,gpatch patch, patch) +dnl ** check for autoreconf +AC_PATH_PROG(AutoreconfCmd, autoreconf, autoreconf) + dnl ** check for dtrace (currently only implemented for Mac OS X) AC_ARG_ENABLE(dtrace, [AC_HELP_STRING([--enable-dtrace], diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in index 7b92b29..4cae2b6 100644 --- a/hadrian/cfg/system.config.in +++ b/hadrian/cfg/system.config.in @@ -7,7 +7,7 @@ alex = @AlexCmd@ ar = @ArCmd@ -autoreconf = autoreconf +autoreconf = @AutoreconfCmd@ cc = @CC@ happy = @HappyCmd@ hs-cpp = @HaskellCPPCmd@ diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 02edb19..38d21b3 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -288,7 +288,7 @@ systemBuilderPath builder = case builder of Alex -> fromKey "alex" Ar _ Stage0 -> fromKey "system-ar" Ar _ _ -> fromKey "ar" - Autoreconf _ -> fromKey "autoreconf" + Autoreconf _ -> stripExe =<< fromKey "autoreconf" Cc _ Stage0 -> fromKey "system-cc" Cc _ _ -> fromKey "cc" -- We can't ask configure for the path to configure! @@ -329,6 +329,18 @@ systemBuilderPath builder = case builder of (True , True ) -> fixAbsolutePathOnWindows fullPath (True , False) -> fixAbsolutePathOnWindows fullPath <&> (<.> exe) + -- Without this function, on Windows we can observe a bad builder path + -- for 'autoreconf'. If the relevant system.config field is set to + -- /usr/bin/autoreconf in the file, the path that we read + -- is C:/msys64/usr/bin/autoreconf.exe. A standard msys2 set up happens + -- to have an executable named 'autoreconf' there, without the 'exe' + -- extension. Hence this function. + stripExe s = do + let sNoExt = dropExtension s + exists <- doesFileExist s + if exists then return s else return sNoExt + + -- | Was the path to a given system 'Builder' specified in configuration files? isSpecified :: Builder -> Action Bool isSpecified = fmap (not . null) . systemBuilderPath From git at git.haskell.org Mon Mar 4 21:04:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:04:53 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: track mingw, ship it in bindists, more robust install script (22c2713) Message-ID: <20190304210453.177703A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/22c2713bcc30cea9da7d8b95f3ea99357d1551f7/ghc >--------------------------------------------------------------- commit 22c2713bcc30cea9da7d8b95f3ea99357d1551f7 Author: Alp Mestanogullari Date: Thu Feb 28 15:20:14 2019 +0100 Hadrian: track mingw, ship it in bindists, more robust install script >--------------------------------------------------------------- 22c2713bcc30cea9da7d8b95f3ea99357d1551f7 .gitlab-ci.yml | 2 - hadrian/src/Base.hs | 8 +++- hadrian/src/Builder.hs | 4 ++ hadrian/src/Rules/BinaryDist.hs | 82 +++++++++++++++++++++++----------- hadrian/src/Rules/Program.hs | 13 ++++++ hadrian/src/Settings/Builders/Cabal.hs | 4 +- 6 files changed, 84 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 22c2713bcc30cea9da7d8b95f3ea99357d1551f7 From git at git.haskell.org Mon Mar 4 21:04:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:04:56 +0000 (UTC) Subject: [commit: ghc] master: Don't leave .hi files after running Haddock tests (e2ae52c) Message-ID: <20190304210456.1F9BA3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e2ae52c34e81123dce9991fad393d96fd7b7af6a/ghc >--------------------------------------------------------------- commit e2ae52c34e81123dce9991fad393d96fd7b7af6a Author: Alec Theriault Date: Thu Feb 28 05:45:24 2019 -0800 Don't leave .hi files after running Haddock tests RyanGlScott observed in https://github.com/haskell/haddock/issues/1030 that running Haddock tests in GHC's testsuite left some `.hi` files around in `utils/haddock`. This should fix that problem. >--------------------------------------------------------------- e2ae52c34e81123dce9991fad393d96fd7b7af6a testsuite/tests/haddock/haddock_testsuite/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testsuite/tests/haddock/haddock_testsuite/Makefile b/testsuite/tests/haddock/haddock_testsuite/Makefile index 59a4a17..37b0a98 100644 --- a/testsuite/tests/haddock/haddock_testsuite/Makefile +++ b/testsuite/tests/haddock/haddock_testsuite/Makefile @@ -18,6 +18,7 @@ haddockTest=$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock.hs \ htmlTest: '$(TEST_HC)' \ -odir . \ + -hidir . \ -package Cabal \ -o html-test \ $(haddockTest) \ @@ -32,6 +33,7 @@ htmlTest: latexTest: '$(TEST_HC)' \ -odir . \ + -hidir . \ -package Cabal \ -o latex-test \ $(haddockTest) \ @@ -46,6 +48,7 @@ latexTest: hoogleTest: '$(TEST_HC)' \ -odir . \ + -hidir . \ -package Cabal \ -o hoogle-test \ $(haddockTest) \ @@ -60,6 +63,7 @@ hoogleTest: hypsrcTest: '$(TEST_HC)' \ -odir . \ + -hidir . \ -package Cabal \ -o hypsrc-test \ $(haddockTest) \ From git at git.haskell.org Mon Mar 4 21:04:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:04:59 +0000 (UTC) Subject: [commit: ghc] master: Revert "compiler: Refactor: extract `withAtomicRename`" (e7080be) Message-ID: <20190304210459.25AF93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e7080bef906b66d0e7053db99c9733aa95059d42/ghc >--------------------------------------------------------------- commit e7080bef906b66d0e7053db99c9733aa95059d42 Author: Ben Gamari Date: Sun Mar 3 00:16:00 2019 -0500 Revert "compiler: Refactor: extract `withAtomicRename`" This reverts commit e8a08f400744a860d1366c6680c8419d30f7cc2a. >--------------------------------------------------------------- e7080bef906b66d0e7053db99c9733aa95059d42 compiler/main/DriverPipeline.hs | 13 +++++++------ compiler/utils/Util.hs | 24 +----------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f1ef637..3f59ed3 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1341,10 +1341,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags let local_includes = [ SysTools.Option ("-iquote" ++ p) | p <- includePathsQuote cmdline_include_paths ] let runAssembler inputFilename outputFilename - = liftIO $ do - withAtomicRename outputFilename $ \temp_outputFilename -> do - as_prog - dflags + = liftIO $ as_prog dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags @@ -1374,11 +1371,15 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags , SysTools.Option "-c" , SysTools.FileOption "" inputFilename , SysTools.Option "-o" - , SysTools.FileOption "" temp_outputFilename + , SysTools.FileOption "" outputFilename ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - runAssembler input_fn output_fn + + -- Atomic write by writing to temp file and then renaming + let temp_output_fn = output_fn <.> "tmp" + runAssembler input_fn temp_output_fn + liftIO $ renameFile temp_output_fn output_fn return (RealPhase next_phase, output_fn) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 41f63f2..16864fe 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -99,7 +99,6 @@ module Util ( doesDirNameExist, getModificationUTCTime, modificationTimeIfExists, - withAtomicRename, global, consIORef, globalM, sharedGlobal, sharedGlobalM, @@ -146,10 +145,9 @@ import GHC.Stack (HasCallStack) import Control.Applicative ( liftA2 ) import Control.Monad ( liftM, guard ) -import Control.Monad.IO.Class ( MonadIO, liftIO ) import GHC.Conc.Sync ( sharedCAF ) import System.IO.Error as IO ( isDoesNotExistError ) -import System.Directory ( doesDirectoryExist, getModificationTime, renameFile ) +import System.Directory ( doesDirectoryExist, getModificationTime ) import System.FilePath import Data.Char ( isUpper, isAlphaNum, isSpace, chr, ord, isDigit, toUpper @@ -1306,26 +1304,6 @@ modificationTimeIfExists f = do else ioError e -- -------------------------------------------------------------- --- atomic file writing by writing to a temporary file first (see #14533) --- --- This should be used in all cases where GHC writes files to disk --- and uses their modification time to skip work later, --- as otherwise a partially written file (e.g. due to crash or Ctrl+C) --- also results in a skip. - -withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a -withAtomicRename targetFile f = do - -- The temp file must be on the same file system (mount) as the target file - -- to result in an atomic move on most platforms. - -- The standard way to ensure that is to place it into the same directory. - -- This can still be fooled when somebody mounts a different file system - -- at just the right time, but that is not a case we aim to cover here. - let temp = targetFile <.> "tmp" - res <- f temp - liftIO $ renameFile temp targetFile - return res - --- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string -- up (but not including) the last character for which 'pred' returned From git at git.haskell.org Mon Mar 4 21:05:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:05:02 +0000 (UTC) Subject: [commit: ghc] master: Revert "compiler: Write .o files atomically. See #14533" (e6ce174) Message-ID: <20190304210502.2ECA63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e6ce17433b75c6c985bffaf1f6fc18d299666ccb/ghc >--------------------------------------------------------------- commit e6ce17433b75c6c985bffaf1f6fc18d299666ccb Author: Ben Gamari Date: Sun Mar 3 00:16:08 2019 -0500 Revert "compiler: Write .o files atomically. See #14533" This reverts commit 0e2d300a59b1b5c167d2e7d99a448c8663ba6d7d. >--------------------------------------------------------------- e6ce17433b75c6c985bffaf1f6fc18d299666ccb compiler/main/DriverPipeline.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 3f59ed3..5fe2362 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1375,12 +1375,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - - -- Atomic write by writing to temp file and then renaming - let temp_output_fn = output_fn <.> "tmp" - runAssembler input_fn temp_output_fn - liftIO $ renameFile temp_output_fn output_fn - + runAssembler input_fn output_fn return (RealPhase next_phase, output_fn) From git at git.haskell.org Mon Mar 4 21:05:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:05:05 +0000 (UTC) Subject: [commit: ghc] wip/final-mfp: More testsuite things (79e4524) Message-ID: <20190304210505.442563A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/final-mfp Link : http://ghc.haskell.org/trac/ghc/changeset/79e4524cd27eb0da0e3e3f69c5373468da58afad/ghc >--------------------------------------------------------------- commit 79e4524cd27eb0da0e3e3f69c5373468da58afad Author: Ben Gamari Date: Mon Mar 4 14:38:03 2019 -0500 More testsuite things >--------------------------------------------------------------- 79e4524cd27eb0da0e3e3f69c5373468da58afad testsuite/tests/deSugar/should_run/dsrun010.hs | 6 +- testsuite/tests/determinism/determ017/A.hs | 8 +- .../tests/monadfail/MonadFailWarningsDisabled.hs | 100 --------------------- testsuite/tests/monadfail/all.T | 1 - testsuite/tests/perf/compiler/T3064.hs | 2 + testsuite/tests/programs/galois_raytrace/Eval.hs | 3 +- testsuite/tests/quasiquotation/qq005/Expr.hs | 2 +- testsuite/tests/quasiquotation/qq006/Expr.hs | 2 +- testsuite/tests/rebindable/DoRestrictedM.hs | 5 +- testsuite/tests/rebindable/rebindable2.hs | 6 +- testsuite/tests/simplCore/prog002/Simpl009Help.hs | 3 - testsuite/tests/simplCore/should_compile/T8331.hs | 2 + testsuite/tests/typecheck/should_compile/T4524.hs | 2 + testsuite/tests/typecheck/should_compile/T4969.hs | 1 - .../tests/typecheck/should_compile/Tc239_Help.hs | 1 - .../tests/typecheck/should_run/T1735_Help/State.hs | 4 +- testsuite/tests/warnings/should_compile/T11128.hs | 50 ----------- .../tests/warnings/should_compile/T11128.stderr | 20 ----- testsuite/tests/warnings/should_compile/T11128b.hs | 64 ------------- .../tests/warnings/should_compile/T11128b.stderr | 10 --- testsuite/tests/warnings/should_compile/all.T | 2 - testsuite/tests/wcompat-warnings/Template.hs | 7 +- .../wcompat-warnings/WCompatWarningsOn.stderr | 29 +----- 23 files changed, 34 insertions(+), 296 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 79e4524cd27eb0da0e3e3f69c5373468da58afad From git at git.haskell.org Mon Mar 4 21:05:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 4 Mar 2019 21:05:08 +0000 (UTC) Subject: [commit: ghc] master's head updated: Revert "compiler: Write .o files atomically. See #14533" (e6ce174) Message-ID: <20190304210508.487C53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 806cc23 Build and copy libffi shared libraries correctly and enable dynamically linking ghc. 4b752d5 Update CI images to GHC-8.4.4 & cabal-install-2.4.1.0 e87ae47 Drop support for i386 and PowerPC in MachO linker 04b7f4c ghc-in-ghci: Fix capitalization of hieFile 2e9426d hWaitForInput-accurate-socket test ac34e78 Remove bogus assertion 6cce36f Add AnonArgFlag to FunTy e61f6e3 Expression/command ambiguity resolution ee284b8 Fix regression incorrectly advertising TH support a990312 Exit with exit code 1 when tests unexpectedly pass 1059e23 gitlab-ci: Only build x86_64-deb8 and fedora27 for releases b85068f Include closure header size in StgLamLift's estimations 8897018 User's Guide: update info on kind inference ae7d1ff User's Guide: forall is a keyword nowadays 6ba3421 testsuite: Fix whitespace in hp2ps error message 9059343 base: Allow fusion for zip7 and related 14586f5 Disable fragile test cases: T14697 T5559 T3424 f320f3b Fix the ghci063 test on Darwin (Trac #16201) 4dbacba Skip T3424 when fast() 5bc195b Treat kind/type variables identically, demolish FKTV 5c084e0 RTS: Add missing memory barrier 2e8f664 Fix intermittent hie002 failure f838809 Cleanup iserv/iserv-proxy c26d299 Visible dependent quantification f37efb1 Lexer: turn some fatal errors into non-fatal ones 8442103 Hadrian: introduce ways to skip some documentation targets 9aa2727 use --docs=no-sphinx in both Hadrian CI jobs b1c7ffa Fix parsing of expected performance changes for tests with non-alpha characters. b90695c gitlab-ci: Pull docker images from ghc/ci-images registry 161f102 Drop Docker images d298cb9 gitlab-ci: Produce DWARF-enabled binary distribution aeefc90 testsuite: Suppress ticks when comparing -ddump-simpl output 1bceb64 gitlab-ci: Give deb9-unreg job a distinct cache key 1285d6b gitlab-ci: A bit of reorganization f77229e detect 'autoreconf' path during configure, and use it in hadrian e2ae52c Don't leave .hi files after running Haddock tests 22c2713 Hadrian: track mingw, ship it in bindists, more robust install script e7080be Revert "compiler: Refactor: extract `withAtomicRename`" e6ce174 Revert "compiler: Write .o files atomically. See #14533" From git at git.haskell.org Tue Mar 5 21:43:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:29 +0000 (UTC) Subject: [commit: ghc] branch 'wip/mark-fragile-windows-tests' created Message-ID: <20190305214329.385B73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/mark-fragile-windows-tests Referencing: 1542c8322c0fb6196a963dbb05645d184ef3e7db From git at git.haskell.org Tue Mar 5 21:43:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:31 +0000 (UTC) Subject: [commit: ghc] branch 'wip/i386-win32-builds' created Message-ID: <20190305214331.38EF03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/i386-win32-builds Referencing: 9ecc9bb08822db7930e9c9d3143b0f6b07901929 From git at git.haskell.org Tue Mar 5 21:43:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:33 +0000 (UTC) Subject: [commit: ghc] branch 'wip/angerman/reinstallable-lib-ghc' created Message-ID: <20190305214333.476DA3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/angerman/reinstallable-lib-ghc Referencing: aec4bf4090a9d871e37c25e24cbd276feb8e4834 From git at git.haskell.org Tue Mar 5 21:43:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:35 +0000 (UTC) Subject: [commit: ghc] branch 'wip/lazy-interface-unfoldings' created Message-ID: <20190305214335.485EA3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/lazy-interface-unfoldings Referencing: 3a1210f20915702983e4750a280daf8892e51c31 From git at git.haskell.org Tue Mar 5 21:43:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:37 +0000 (UTC) Subject: [commit: ghc] branch 'wip/reapply-atomic-writes' created Message-ID: <20190305214337.4D27F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/reapply-atomic-writes Referencing: ced9f3cf781e62d5becdbaf4fc57d65a9eaf1876 From git at git.haskell.org Tue Mar 5 21:43:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:40 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Mark T16219 and cabal09 as broken on Windows (cc22de3) Message-ID: <20190305214340.54A7F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/cc22de39817b332287871e6da4e3f4cce441e125/ghc >--------------------------------------------------------------- commit cc22de39817b332287871e6da4e3f4cce441e125 Author: Ben Gamari Date: Mon Mar 4 18:40:48 2019 -0500 testsuite: Mark T16219 and cabal09 as broken on Windows See #16386. >--------------------------------------------------------------- cc22de39817b332287871e6da4e3f4cce441e125 testsuite/tests/backpack/cabal/T16219/all.T | 3 ++- testsuite/tests/cabal/cabal09/all.T | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/backpack/cabal/T16219/all.T b/testsuite/tests/backpack/cabal/T16219/all.T index 29dd8a4..04f41bf 100644 --- a/testsuite/tests/backpack/cabal/T16219/all.T +++ b/testsuite/tests/backpack/cabal/T16219/all.T @@ -4,6 +4,7 @@ else: cleanup = 'CLEANUP=0' test('T16219', - extra_files(['Setup.hs', 'backpack-issue.cabal', 'library-a', 'library-a-impl', 'library-b']), + [extra_files(['Setup.hs', 'backpack-issue.cabal', 'library-a', 'library-a-impl', 'library-b']), + when(opsys('mingw32'), expect_broken(16386))], run_command, ['$MAKE -s --no-print-directory T16219 ' + cleanup]) diff --git a/testsuite/tests/cabal/cabal09/all.T b/testsuite/tests/cabal/cabal09/all.T index 438161b..e9c936b 100644 --- a/testsuite/tests/cabal/cabal09/all.T +++ b/testsuite/tests/cabal/cabal09/all.T @@ -4,6 +4,7 @@ else: cleanup = 'CLEANUP=0' test('cabal09', - extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), + [extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), + when(opsys('mingw32'), expect_broken(16386))], run_command, ['$MAKE -s --no-print-directory cabal09 ' + cleanup]) From git at git.haskell.org Tue Mar 5 21:43:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:43 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Fix expected output on Windows for various ghci tests (d22b778) Message-ID: <20190305214343.642F53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/d22b778469d0e11cde25086eeb17b6c0ae25e9c2/ghc >--------------------------------------------------------------- commit d22b778469d0e11cde25086eeb17b6c0ae25e9c2 Author: Ben Gamari Date: Mon Mar 4 18:43:35 2019 -0500 testsuite: Fix expected output on Windows for various ghci tests Broke as -Wimplicit-kind-vars no longer exists. Specifically ghci024, ghci057 and T9293. >--------------------------------------------------------------- d22b778469d0e11cde25086eeb17b6c0ae25e9c2 testsuite/tests/ghci/scripts/T9293.stdout-mingw32 | 4 ---- testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 | 1 - testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 | 4 ---- 3 files changed, 9 deletions(-) diff --git a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 index be028c5..eb3e225 100644 --- a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 @@ -12,7 +12,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -35,7 +34,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -57,7 +55,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -81,7 +78,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 index b0f4c73..8083bc9 100644 --- a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 @@ -13,7 +13,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 index be028c5..eb3e225 100644 --- a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 @@ -12,7 +12,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -35,7 +34,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -57,7 +55,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -81,7 +78,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances From git at git.haskell.org Tue Mar 5 21:43:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:46 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Mark T5836 as broken on Windows (af155c0) Message-ID: <20190305214346.746803A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/af155c03dd5dc82f19691fc55b8a0266d82f0c97/ghc >--------------------------------------------------------------- commit af155c03dd5dc82f19691fc55b8a0266d82f0c97 Author: Ben Gamari Date: Mon Mar 4 18:49:01 2019 -0500 testsuite: Mark T5836 as broken on Windows See #16387. >--------------------------------------------------------------- af155c03dd5dc82f19691fc55b8a0266d82f0c97 testsuite/tests/ghci/scripts/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 946c6ef..6f9b18e 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -135,7 +135,9 @@ test('GhciKinds', normal, ghci_script, ['GhciKinds.script']) test('T5564', normal, ghci_script, ['T5564.script']) test('Defer02', extra_files(['../../typecheck/should_run/Defer01.hs']), ghci_script, ['Defer02.script']) test('T5820', normal, ghci_script, ['T5820.script']) -test('T5836', normal, ghci_script, ['T5836.script']) +test('T5836', + when(opsys('mingw32'), expect_broken(16387)), + ghci_script, ['T5836.script']) test('T5979', [reqlib('transformers'), normalise_slashes, From git at git.haskell.org Tue Mar 5 21:43:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:49 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Mark T15904 as broken on Windows (35ea2f7) Message-ID: <20190305214349.793FB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/35ea2f78348651a91f8738878f156ff93d3f8b60/ghc >--------------------------------------------------------------- commit 35ea2f78348651a91f8738878f156ff93d3f8b60 Author: Ben Gamari Date: Mon Mar 4 18:52:59 2019 -0500 testsuite: Mark T15904 as broken on Windows It seems to look for some sort of manifest file. See #16388. >--------------------------------------------------------------- 35ea2f78348651a91f8738878f156ff93d3f8b60 testsuite/tests/hp2ps/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/hp2ps/all.T b/testsuite/tests/hp2ps/all.T index b884ecf..4c65241 100644 --- a/testsuite/tests/hp2ps/all.T +++ b/testsuite/tests/hp2ps/all.T @@ -1 +1 @@ -test('T15904', [], makefile_test, []) +test('T15904', when(opsys('mingw32'), expect_broken(16388)), makefile_test, []) From git at git.haskell.org Tue Mar 5 21:43:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:52 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Mark T16190 as broken on Windows (6a0bf64) Message-ID: <20190305214352.7E8073A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/6a0bf64fdf324aa2866e024c9e22cf23cf251cfc/ghc >--------------------------------------------------------------- commit 6a0bf64fdf324aa2866e024c9e22cf23cf251cfc Author: Ben Gamari Date: Mon Mar 4 18:58:55 2019 -0500 testsuite: Mark T16190 as broken on Windows There seems to be some filepath funniness due to TH embedding going on here. See #16389. >--------------------------------------------------------------- 6a0bf64fdf324aa2866e024c9e22cf23cf251cfc testsuite/tests/perf/compiler/all.T | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index c6548c1..54ef8ce 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -395,7 +395,8 @@ test ('T15164', ['-v0 -O']) test('T16190', - [ collect_stats() + [ collect_stats(), + when(opsys('mingw32'), expect_broken(16389)) ], multimod_compile, ['T16190.hs', '-v0']) From git at git.haskell.org Tue Mar 5 21:43:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:55 +0000 (UTC) Subject: [commit: ghc] wip/lazy-interface-unfoldings: typecheck: Load unfolding lazily (8e6290a) Message-ID: <20190305214355.A79CB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/lazy-interface-unfoldings Link : http://ghc.haskell.org/trac/ghc/changeset/8e6290ab4eaf0e3f5efb47aad601dc07036f8163/ghc >--------------------------------------------------------------- commit 8e6290ab4eaf0e3f5efb47aad601dc07036f8163 Author: Ben Gamari Date: Mon Oct 17 21:44:55 2016 -0400 typecheck: Load unfolding lazily See #9370. (cherry picked from commit d4c5bb031af5b339b799a519f4a91ea5fc42d5d8) >--------------------------------------------------------------- 8e6290ab4eaf0e3f5efb47aad601dc07036f8163 compiler/basicTypes/IdInfo.hs | 2 +- compiler/iface/LoadIface.hs | 19 +++--- compiler/iface/TcIface.hs | 128 ++++++++++++++++++---------------------- compiler/iface/TcIface.hs-boot | 4 +- compiler/simplCore/SimplCore.hs | 3 +- 5 files changed, 69 insertions(+), 87 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 8e6290ab4eaf0e3f5efb47aad601dc07036f8163 From git at git.haskell.org Tue Mar 5 21:43:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:43:58 +0000 (UTC) Subject: [commit: ghc] wip/lazy-interface-unfoldings: Progress (c32dcb8) Message-ID: <20190305214358.B907B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/lazy-interface-unfoldings Link : http://ghc.haskell.org/trac/ghc/changeset/c32dcb8fdaa45dc0f56dc1dda935a7ef15970327/ghc >--------------------------------------------------------------- commit c32dcb8fdaa45dc0f56dc1dda935a7ef15970327 Author: Ben Gamari Date: Sun Nov 13 16:07:03 2016 -0500 Progress >--------------------------------------------------------------- c32dcb8fdaa45dc0f56dc1dda935a7ef15970327 compiler/basicTypes/Id.hs | 10 +++++++++- compiler/coreSyn/CoreFVs.hs | 5 ++++- compiler/deSugar/Desugar.hs | 7 ++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/compiler/basicTypes/Id.hs b/compiler/basicTypes/Id.hs index 199842c..195330c 100644 --- a/compiler/basicTypes/Id.hs +++ b/compiler/basicTypes/Id.hs @@ -93,7 +93,7 @@ module Id ( -- ** Reading 'IdInfo' fields idArity, idCallArity, idFunRepArity, - idUnfolding, realIdUnfolding, + idUnfolding, realIdUnfolding, idOptUnfolding, idSpecialisation, idCoreRules, idHasRules, idCafInfo, idOneShotInfo, idStateHackOneShotInfo, @@ -702,6 +702,14 @@ idUnfolding id where info = idInfo id +-- | Return the unfolding associated with an 'Id' only if optimization is +-- enabled or the 'Id' is a local variable (and consequently retrieving the +-- unfolding costs us nothing). +idOptUnfolding :: DynFlags -> Id -> Unfolding +idOptUnfolding dflags id + | optLevel dflags > 0 || isLocalId id = idUnfolding id + | otherwise = NoUnfolding + realIdUnfolding :: Id -> Unfolding -- Expose the unfolding if there is one, including for loop breakers realIdUnfolding id = unfoldingInfo (idInfo id) diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs index 18e109a..a70acb7 100644 --- a/compiler/coreSyn/CoreFVs.hs +++ b/compiler/coreSyn/CoreFVs.hs @@ -655,7 +655,10 @@ idUnfoldingVars :: Id -> VarSet idUnfoldingVars id = fvVarSet $ idUnfoldingFVs id idUnfoldingFVs :: Id -> FV -idUnfoldingFVs id = stableUnfoldingFVs (realIdUnfolding id) `orElse` emptyFV +idUnfoldingFVs id + | isLocalVar id = stableUnfoldingFVs (realIdUnfolding id) `orElse` emptyFV + -- Global vars have no free variables + | otherwise = emptyFV stableUnfoldingVars :: Unfolding -> Maybe VarSet stableUnfoldingVars unf = fvVarSet `fmap` stableUnfoldingFVs unf diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index aa9748e..5bec60e 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -421,10 +421,11 @@ warnRuleShadowing rule_name rule_act fn_id arg_ids = do { check False fn_id -- We often have multiple rules for the same Id in a -- module. Maybe we should check that they don't overlap -- but currently we don't - ; mapM_ (check True) arg_ids } + ; dflags <- getDynFlags + ; mapM_ (check dflags True) arg_ids } where - check check_rules_too lhs_id - | isLocalId lhs_id || canUnfold (idUnfolding lhs_id) + check dflags check_rules_too lhs_id + | isLocalId lhs_id || (canUnfold (idOptUnfolding dflags lhs_id) -- If imported with no unfolding, no worries , idInlineActivation lhs_id `competesWith` rule_act = warnDs (Reason Opt_WarnInlineRuleShadowing) From git at git.haskell.org Tue Mar 5 21:44:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:01 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite/plugins: Add multi_cpu_race modifier on Windows (8a52b3a) Message-ID: <20190305214401.DBC1D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/8a52b3a2aea46b1f68820b69db41651b043fd091/ghc >--------------------------------------------------------------- commit 8a52b3a2aea46b1f68820b69db41651b043fd091 Author: Ben Gamari Date: Mon Mar 4 19:01:43 2019 -0500 testsuite/plugins: Add multi_cpu_race modifier on Windows A few tests previously failed with various failure modes. For instance, `plugin-recomp-change` fails with: ``` Wrong exit code for plugin-recomp-change()(expected 0 , actual 2 ) Stderr ( plugin-recomp-change ): Simple Plugin Passes Queried Got options: Simple Plugin Pass Run C://GitLabRunner//builds//8fc0e283//0//ghc//ghc//inplace//mingw//bin/ld.exe: cannot find -lHSplugin-recompilation-0.1-CPeObcGoBuvHdwBnpK9jQq collect2.exe: error: ld returned 1 exit status `gcc.exe' failed in phase `Linker'. (Exit code: 1) make[2]: *** [Makefile:112: plugin-recomp-change] Error 1 *** unexpected failure for plugin-recomp-change(normal) ``` It's unclear whether the ghc-pkg concurrency issue mentioned in all.T is the culprit but the set of tests that fail overlaps strongly with the set of tests that lack the `multi_cpu_race` modifier. Let's see if adding it fixes them. >--------------------------------------------------------------- 8a52b3a2aea46b1f68820b69db41651b043fd091 testsuite/tests/plugins/all.T | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index f53d9aa..1834e3b 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -1,4 +1,4 @@ -setTestOpts(req_interp) +setTestOpts([req_interp, when(opsys('mingw32'), multi_cpu_race)]) # The implementation of ghc-pkg doesn't seem to be multi-concurrent process safe # on windows. These tests which mutate the package db need to be run @@ -7,130 +7,111 @@ setTestOpts(req_interp) test('plugins01', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], makefile_test, []) test('plugins02', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.plugin_way_flags]) test('plugins03', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistentPlugin -package simple-plugin']) test('plugins04', [extra_files(['HomePackagePlugin.hs']), - only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race)], + only_ways([config.ghc_plugin_way])], multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin']) test('plugins05', [extra_files(['HomePackagePlugin.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way])], multimod_compile_and_run, ['plugins05', '-package ghc']) test('plugins06', [extra_files(['LinkerTicklingPlugin.hs']), - when(opsys('mingw32'), multi_cpu_race), unless(have_dynamic(), skip), only_ways([config.ghc_plugin_way])], multimod_compile_and_run, ['plugins06', '-package ghc']) test('plugins07', [extra_files(['rule-defining-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.plugins07 TOP={top}')], makefile_test, []) test('plugins08', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins08 TOP={top}')], makefile_test, []) test('plugins09', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins09 TOP={top}')], makefile_test, []) test('plugins10', [extra_files(['simple-plugin/', 'QuasiQuotation.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins10 TOP={top}')], makefile_test, []) test('plugins11', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins11 TOP={top}')], makefile_test, []) test('plugins12', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins12 TOP={top}')], makefile_test, []) test('plugins13', [extra_files(['simple-plugin/', 'PluginFilteredExport.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins13 TOP={top}')], makefile_test, []) test('plugins14', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins14 TOP={top}')], makefile_test, []) test('plugins15', [extra_files(['simple-plugin/', 'MetaRemoveHelper.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins15 TOP={top}')], makefile_test, []) test('T10420', [extra_files(['rule-defining-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.T10420 TOP={top}')], makefile_test, []) test('T10294', [extra_files(['annotation-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294 TOP={top}')], makefile_test, []) test('T10294a', [extra_files(['annotation-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294a TOP={top}')], makefile_test, []) test('frontend01', [extra_files(['FrontendPlugin.hs']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), unless(have_dynamic(), expect_broken(10301))], makefile_test, []) @@ -142,14 +123,12 @@ test('T11244', test('T12567a', [extra_files(['T12567b.hs', 'simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.T12567a TOP={top}')], makefile_test, []) test('T14335', [extra_files(['simple-plugin/', 'plugins01.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], compile_fail, @@ -158,7 +137,6 @@ test('T14335', test('plugin-recomp-pure', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -166,7 +144,6 @@ test('plugin-recomp-pure', test('plugin-recomp-impure', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -174,7 +151,6 @@ test('plugin-recomp-impure', test('plugin-recomp-flags', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -213,7 +189,7 @@ test('T15858', test('T16104', [extra_files(['T16104-plugin/']), pre_cmd('$MAKE -s --no-print-directory -C T16104-plugin package.T16104-plugin TOP={top}') - ], + ], makefile_test, []) test('T16260', From git at git.haskell.org Tue Mar 5 21:44:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:05 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Mark T10672 as broken (fccd0fc) Message-ID: <20190305214405.6354A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/fccd0fc267bad7ada405d357d544a78359b2b0d0/ghc >--------------------------------------------------------------- commit fccd0fc267bad7ada405d357d544a78359b2b0d0 Author: Ben Gamari Date: Mon Mar 4 19:16:09 2019 -0500 testsuite: Mark T10672 as broken This test, which is only run on Windows, seems to be reliably timing out. See #16390. >--------------------------------------------------------------- fccd0fc267bad7ada405d357d544a78359b2b0d0 testsuite/tests/rts/T10672/all.T | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/rts/T10672/all.T b/testsuite/tests/rts/T10672/all.T index 1e04f1b..5e0c43c 100644 --- a/testsuite/tests/rts/T10672/all.T +++ b/testsuite/tests/rts/T10672/all.T @@ -1,9 +1,11 @@ test('T10672_x64', [extra_files(['Main.hs', 'Printf.hs', 'cxxy.cpp']), - [unless(opsys('mingw32'), skip), unless(arch('x86_64'), skip)]], + unless(opsys('mingw32'), skip), unless(arch('x86_64'), skip), + when(opsys('mingw32'), expect_broken(16390))], makefile_test, ['T10672_x64']) test('T10672_x86', [extra_files(['Main.hs', 'Printf.hs', 'cxxy.cpp']), - [unless(opsys('mingw32'), skip), unless(arch('i386'), skip)]], + unless(opsys('mingw32'), skip), unless(arch('i386'), skip), + when(opsys('mingw32'), expect_broken(16390))], makefile_test, ['T10672_x86']) From git at git.haskell.org Tue Mar 5 21:44:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:08 +0000 (UTC) Subject: [commit: ghc] wip/lazy-interface-unfoldings: Hi (3a1210f) Message-ID: <20190305214408.6C7413A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/lazy-interface-unfoldings Link : http://ghc.haskell.org/trac/ghc/changeset/3a1210f20915702983e4750a280daf8892e51c31/ghc >--------------------------------------------------------------- commit 3a1210f20915702983e4750a280daf8892e51c31 Author: Ben Gamari Date: Mon Mar 4 23:19:42 2019 -0500 Hi >--------------------------------------------------------------- 3a1210f20915702983e4750a280daf8892e51c31 compiler/deSugar/Desugar.hs | 10 +++++----- compiler/iface/TcIface.hs | 8 ++++---- compiler/iface/TcIface.hs-boot | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index 5bec60e..1e1aa92 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -418,14 +418,14 @@ dsRule _ = panic "dsRule: Impossible Match" -- due to #15884 warnRuleShadowing :: RuleName -> Activation -> Id -> [Id] -> DsM () -- See Note [Rules and inlining/other rules] warnRuleShadowing rule_name rule_act fn_id arg_ids - = do { check False fn_id -- We often have multiple rules for the same Id in a - -- module. Maybe we should check that they don't overlap - -- but currently we don't - ; dflags <- getDynFlags + = do { dflags <- getDynFlags + ; check dflags False fn_id -- We often have multiple rules for the same Id in a + -- module. Maybe we should check that they don't overlap + -- but currently we don't ; mapM_ (check dflags True) arg_ids } where check dflags check_rules_too lhs_id - | isLocalId lhs_id || (canUnfold (idOptUnfolding dflags lhs_id) + | isLocalId lhs_id || (canUnfold (idOptUnfolding dflags lhs_id)) -- If imported with no unfolding, no worries , idInlineActivation lhs_id `competesWith` rule_act = warnDs (Reason Opt_WarnInlineRuleShadowing) diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 9fce8aa..afb306d 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -370,7 +370,7 @@ typecheckIfacesForMerging mod ifaces tc_env_var = -- See Note [Resolving never-exported Names in TcIface] type_env <- fixM $ \type_env -> do setImplicitEnvM type_env $ do - decls <- loadDecls ignore_prags (mi_decls iface) + decls <- loadDecls (mi_decls iface) return (mkNameEnv decls) -- But note that we use this type_env to typecheck references to DFun -- in 'IfaceInst' @@ -415,6 +415,7 @@ typecheckIfaceForInstantiate nsubst iface = setImplicitEnvM type_env $ do insts <- mapM tcIfaceInst (mi_insts iface) fam_insts <- mapM tcIfaceFamInst (mi_fam_insts iface) + rules <- tcIfaceRules (mi_rules iface) anns <- tcIfaceAnnotations (mi_anns iface) exports <- ifaceExportNames (mi_exports iface) complete_sigs <- tcIfaceCompleteSigs (mi_complete_sigs iface) @@ -619,7 +620,6 @@ tcIfaceDecl :: IfaceDecl tcIfaceDecl = tc_iface_decl Nothing tc_iface_decl :: Maybe Class -- ^ For associated type/data family declarations - -> Bool -- ^ True <=> discard IdInfo on IfaceId bindings -> IfaceDecl -> IfL TyThing tc_iface_decl _ (IfaceId {ifName = name, ifType = iface_type, @@ -715,7 +715,7 @@ tc_iface_decl _parent ; cls <- buildClass tc_name binders' roles fds Nothing ; return (ATyCon (classTyCon cls)) } -tc_iface_decl _parent ignore_prags +tc_iface_decl _parent (IfaceClass {ifName = tc_name, ifRoles = roles, ifBinders = binders, @@ -1431,7 +1431,7 @@ tcIdDetails ty IfDFunId tcIdDetails _ (IfRecSelId tc naughty) = do { tc' <- either (fmap RecSelData . tcIfaceTyCon) - (fmap (RecSelPatSyn . tyThingPatSyn) . tcIfaceDecl False) + (fmap (RecSelPatSyn . tyThingPatSyn) . tcIfaceDecl) tc ; return (RecSelId { sel_tycon = tc', sel_naughty = naughty }) } where diff --git a/compiler/iface/TcIface.hs-boot b/compiler/iface/TcIface.hs-boot index f1e7dd7..ddf0455 100644 --- a/compiler/iface/TcIface.hs-boot +++ b/compiler/iface/TcIface.hs-boot @@ -1,6 +1,5 @@ module TcIface where -import GhcPrelude import IfaceSyn ( IfaceDecl, IfaceClsInst, IfaceFamInst, IfaceRule, IfaceAnnotation, IfaceCompleteMatch ) import TyCoRep ( TyThing ) From git at git.haskell.org Tue Mar 5 21:44:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:11 +0000 (UTC) Subject: [commit: ghc] master, wip/angerman/reinstallable-lib-ghc, wip/i386-win32-builds, wip/reapply-atomic-writes: Be more careful when naming TyCon binders (80dfcee) Message-ID: <20190305214411.9BA593A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/angerman/reinstallable-lib-ghc,wip/i386-win32-builds,wip/reapply-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/80dfcee61e3bfb67f131cd674f96467e16c0f9d8/ghc >--------------------------------------------------------------- commit 80dfcee61e3bfb67f131cd674f96467e16c0f9d8 Author: Simon Peyton Jones Date: Mon Feb 25 08:31:33 2019 +0000 Be more careful when naming TyCon binders This patch fixes two rather gnarly test cases: * Trac #16342 (mutual recursion) See Note [Tricky scoping in generaliseTcTyCon] * Trac #16221 (shadowing) See Note [Unification variables need fresh Names] The main changes are: * Substantial reworking of TcTyClsDecls.generaliseTcTyCon This is the big change, and involves the rather tricky function TcHsSyn.zonkRecTyVarBndrs. See Note [Inferring kinds for type declarations] and Note [Tricky scoping in generaliseTcTyCon] for the details. * bindExplicitTKBndrs_Tv and bindImplicitTKBndrs_Tv both now allocate /freshly-named/ unification variables. Indeed, more generally, unification variables are always fresh; see Note [Unification variables need fresh Names] in TcMType * Clarify the role of tcTyConScopedTyVars. See Note [Scoped tyvars in a TcTyCon] in TyCon As usual, this dragged in some more refactoring: * Renamed TcMType.zonkTyCoVarBndr to zonkAndSkolemise * I renamed checkValidTelescope to checkTyConTelescope; it's only used on TyCons, and indeed takes a TyCon as argument. * I folded the slightly-mysterious reportFloatingKvs into checkTyConTelescope. (Previously all its calls immediately followed a call to checkTyConTelescope.) It makes much more sense there. * I inlined some called-once functions to simplify checkValidTyFamEqn. It's less spaghetti-like now. * This patch also fixes Trac #16251. I'm not quite sure why #16251 went wrong in the first place, nor how this patch fixes it, but hey, it's good, and life is short. >--------------------------------------------------------------- 80dfcee61e3bfb67f131cd674f96467e16c0f9d8 compiler/deSugar/DsMeta.hs | 4 +- compiler/hsSyn/HsTypes.hs | 13 +- compiler/rename/RnSource.hs | 5 +- compiler/typecheck/TcHsSyn.hs | 56 +++-- compiler/typecheck/TcHsType.hs | 103 +++++---- compiler/typecheck/TcMType.hs | 240 +++++++++++--------- compiler/typecheck/TcSigs.hs | 4 +- compiler/typecheck/TcTyClsDecls.hs | 237 ++++++++++++++------ compiler/typecheck/TcValidity.hs | 249 ++++++++++++++------- compiler/types/TyCon.hs | 40 +++- testsuite/tests/indexed-types/should_fail/all.T | 2 +- .../tests/typecheck/should_compile/tc141.stderr | 18 +- testsuite/tests/typecheck/should_fail/T2688.stderr | 4 +- 13 files changed, 607 insertions(+), 368 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 80dfcee61e3bfb67f131cd674f96467e16c0f9d8 From git at git.haskell.org Tue Mar 5 21:44:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:14 +0000 (UTC) Subject: [commit: ghc] master, wip/angerman/reinstallable-lib-ghc, wip/i386-win32-builds, wip/reapply-atomic-writes: Test Runner: don't show missing baseline warning for performance tests with expected changes on the current commit. (6c4e45b) Message-ID: <20190305214414.B6C5D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/angerman/reinstallable-lib-ghc,wip/i386-win32-builds,wip/reapply-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/6c4e45b043b0577d64e5addf5eaf6503e4a10b23/ghc >--------------------------------------------------------------- commit 6c4e45b043b0577d64e5addf5eaf6503e4a10b23 Author: David Eichmann Date: Mon Feb 25 16:21:33 2019 +0000 Test Runner: don't show missing baseline warning for performance tests with expected changes on the current commit. Trac #16359 >--------------------------------------------------------------- 6c4e45b043b0577d64e5addf5eaf6503e4a10b23 testsuite/driver/perf_notes.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index 9362e46..0aa2fa9 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -308,9 +308,11 @@ def baseline_commit_log(commit): # (bool , str ) -> (str , str , str , str) -> float _commit_metric_cache = {} -# Get the baseline (expected value) of a test at a given commit. This searches -# git notes from older commits for recorded metrics (locally and from ci). More -# recent commits are favoured, then local results over ci results are favoured. +# Get the baseline of a test at a given commit. This is the expected value +# *before* the commit is applied (i.e. on the parent commit). +# This searches git notes from older commits for recorded metrics (locally and +# from ci). More recent commits are favoured, then local results over ci results +# are favoured. # # commit: str - must be a commit hash (see commit_has()) # name: str - test name @@ -319,7 +321,8 @@ _commit_metric_cache = {} # metric: str - test metric # way: str - test way # returns: the Baseline named tuple or None if no metric was found within -# BaselineSearchDepth commits and since the last expected change. +# BaselineSearchDepth commits and since the last expected change +# (ignoring any expected change in the given commit). def baseline_metric(commit, name, test_env, metric, way): # For performance reasons (in order to avoid calling commit_hash), we assert # commit is already a commit hash. @@ -393,14 +396,8 @@ def baseline_metric(commit, name, test_env, metric, way): # Searches through previous commits trying local then ci for each commit in. def search(useCiNamespace, depth): - # Stop if reached the max search depth, or if - # there is an expected change at the child commit (depth-1). This is a - # subtlety: Metrics recorded on commit x incorporate the expected - # changes for commit x. Hence metrics from x are still a valid baseline, - # while older commits are not. This is why we check for expected changes - # on depth-1 rather than depth. - if depth >= BaselineSearchDepth or has_expected_change( \ - depth_to_commit(depth - 1)): + # Stop if reached the max search depth. + if depth >= BaselineSearchDepth: return None # Check for a metric on this commit. @@ -409,11 +406,17 @@ def baseline_metric(commit, name, test_env, metric, way): return current_metric # Metric is not available. - # If tried local, now try CI. Else move to the parent commit. + # If tried local, now try CI. if not useCiNamespace: return search(True, depth) - else: - return search(False, depth + 1) + + # Stop if there is an expected change at this commit. In that case + # metrics on ancestor commits will not be a valid baseline. + if has_expected_change(depth_to_commit(depth)): + return None + + # Move to the parent commit. + return search(False, depth + 1) # Start search from parent commit using local name space. return search(False, 1) From git at git.haskell.org Tue Mar 5 21:44:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:18 +0000 (UTC) Subject: [commit: ghc] master, wip/angerman/reinstallable-lib-ghc, wip/i386-win32-builds, wip/reapply-atomic-writes: Fix map/coerce rule for newtypes with wrappers (646b6df) Message-ID: <20190305214418.B32D93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/angerman/reinstallable-lib-ghc,wip/i386-win32-builds,wip/reapply-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/646b6dfbe125aa756a935e840979ba11b4a882c0/ghc >--------------------------------------------------------------- commit 646b6dfbe125aa756a935e840979ba11b4a882c0 Author: Krzysztof Gogolewski Date: Tue Feb 26 17:22:28 2019 +0100 Fix map/coerce rule for newtypes with wrappers This addresses Trac #16208 by marking newtype wrapper unfoldings as compulsory. Furthermore, we can remove the special case for newtypes in exprIsConApp_maybe (introduced in 7833cf407d1f). >--------------------------------------------------------------- 646b6dfbe125aa756a935e840979ba11b4a882c0 compiler/basicTypes/MkId.hs | 25 +++++++++++++++- compiler/coreSyn/CoreOpt.hs | 35 +++++----------------- compiler/coreSyn/CoreUtils.hs | 1 - testsuite/tests/simplCore/should_run/T16208.hs | 17 +++++++++++ testsuite/tests/simplCore/should_run/T16208.stdout | 1 + testsuite/tests/simplCore/should_run/all.T | 1 + 6 files changed, 51 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 646b6dfbe125aa756a935e840979ba11b4a882c0 From git at git.haskell.org Tue Mar 5 21:44:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:21 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Move Constants into rts (7e20764) Message-ID: <20190305214421.BCEBB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/7e20764c41b374587dcd00aebde36bb50f0bc901/ghc >--------------------------------------------------------------- commit 7e20764c41b374587dcd00aebde36bb50f0bc901 Author: Moritz Angermann Date: Tue Mar 5 18:25:45 2019 +0800 Move Constants into rts >--------------------------------------------------------------- 7e20764c41b374587dcd00aebde36bb50f0bc901 rts/rts.cabal.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index a3f74be..dce1650 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -120,6 +120,8 @@ library ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h -- ^ from ../includes DerivedConstants.h ffi.h ffitarget.h + GHCConstantsHaskellType.hs GHCConstantsHaskellWrappers.hs + platformConstants -- ^ generated rts/Adjustor.h rts/BlockSignals.h From git at git.haskell.org Tue Mar 5 21:44:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:24 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Move primops into ghc-prim (e6c0ef5) Message-ID: <20190305214424.D02363A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/e6c0ef53bdaa79a6faf7dfe4ca645804befc51b8/ghc >--------------------------------------------------------------- commit e6c0ef53bdaa79a6faf7dfe4ca645804befc51b8 Author: Moritz Angermann Date: Tue Mar 5 18:26:02 2019 +0800 Move primops into ghc-prim >--------------------------------------------------------------- e6c0ef53bdaa79a6faf7dfe4ca645804befc51b8 compiler/ghc.mk | 79 --------------------------------------- libraries/ghc-prim/ghc-prim.cabal | 17 +++++++++ 2 files changed, 17 insertions(+), 79 deletions(-) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 6cfa43a..2c3c3ea 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -234,85 +234,6 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. compiler/stage3/$(PLATFORM_H) : compiler/stage2/$(PLATFORM_H) "$(CP)" $< $@ -# ---------------------------------------------------------------------------- -# Generate supporting stuff for prelude/PrimOp.hs -# from prelude/primops.txt - -PRIMOP_BITS_NAMES = primop-data-decl.hs-incl \ - primop-tag.hs-incl \ - primop-list.hs-incl \ - primop-has-side-effects.hs-incl \ - primop-out-of-line.hs-incl \ - primop-commutable.hs-incl \ - primop-code-size.hs-incl \ - primop-can-fail.hs-incl \ - primop-strictness.hs-incl \ - primop-fixity.hs-incl \ - primop-primop-info.hs-incl \ - primop-vector-uniques.hs-incl \ - primop-vector-tys.hs-incl \ - primop-vector-tys-exports.hs-incl \ - primop-vector-tycons.hs-incl - -PRIMOP_BITS_STAGE1 = $(addprefix compiler/stage1/build/,$(PRIMOP_BITS_NAMES)) -PRIMOP_BITS_STAGE2 = $(addprefix compiler/stage2/build/,$(PRIMOP_BITS_NAMES)) -PRIMOP_BITS_STAGE3 = $(addprefix compiler/stage3/build/,$(PRIMOP_BITS_NAMES)) - -compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) -compiler_CPP_OPTS += ${GhcCppOpts} - -# We add these paths to the Haskell compiler's #include search path list since -# we must avoid #including files by paths relative to the source file as Hadrian -# moves the build artifacts out of the source tree. See #8040. -compiler_HC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) - -define preprocessCompilerFiles -# $0 = stage -compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp compiler/stage$1/$$(PLATFORM_H) - $$(HS_CPP) -P $$(compiler_CPP_OPTS) -Icompiler/stage$1 -x c $$< | grep -v '^#pragma GCC' > $$@ - -compiler/stage$1/build/primop-data-decl.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --data-decl < $$< > $$@ -compiler/stage$1/build/primop-tag.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-tag < $$< > $$@ -compiler/stage$1/build/primop-list.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-list < $$< > $$@ -compiler/stage$1/build/primop-has-side-effects.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --has-side-effects < $$< > $$@ -compiler/stage$1/build/primop-out-of-line.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --out-of-line < $$< > $$@ -compiler/stage$1/build/primop-commutable.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --commutable < $$< > $$@ -compiler/stage$1/build/primop-code-size.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --code-size < $$< > $$@ -compiler/stage$1/build/primop-can-fail.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --can-fail < $$< > $$@ -compiler/stage$1/build/primop-strictness.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --strictness < $$< > $$@ -compiler/stage$1/build/primop-fixity.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --fixity < $$< > $$@ -compiler/stage$1/build/primop-primop-info.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-primop-info < $$< > $$@ -compiler/stage$1/build/primop-vector-uniques.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-uniques < $$< > $$@ -compiler/stage$1/build/primop-vector-tys.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tys < $$< > $$@ -compiler/stage$1/build/primop-vector-tys-exports.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tys-exports < $$< > $$@ -compiler/stage$1/build/primop-vector-tycons.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tycons < $$< > $$@ - -# Usages aren't used any more; but the generator -# can still generate them if we want them back -compiler/stage$1/build/primop-usage.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --usage < $$< > $$@ - -endef - -$(eval $(call preprocessCompilerFiles,1)) -$(eval $(call preprocessCompilerFiles,2)) -$(eval $(call preprocessCompilerFiles,3)) - # ----------------------------------------------------------------------------- # Configuration diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index a95f1ec..3bc849b 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -81,3 +81,20 @@ Library -- We need to set the unit ID to ghc-prim (without a version number) -- as it's magic. ghc-options: -this-unit-id ghc-prim + + install-includes: + primop-data-decl.hs-incl + primop-tag.hs-incl + primop-list.hs-incl + primop-has-side-effects.hs-incl + primop-out-of-line.hs-incl + primop-commutable.hs-incl + primop-code-size.hs-incl + primop-can-fail.hs-incl + primop-strictness.hs-incl + primop-fixity.hs-incl + primop-primop-info.hs-incl + primop-vector-uniques.hs-incl + primop-vector-tys.hs-incl + primop-vector-tys-exports.hs-incl + primop-vector-tycons.hs-incl \ No newline at end of file From git at git.haskell.org Tue Mar 5 21:44:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:28 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Move boot_platform and primops.txt.pp into ghc-prim (aec4bf4) Message-ID: <20190305214428.A10F93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/aec4bf4090a9d871e37c25e24cbd276feb8e4834/ghc >--------------------------------------------------------------- commit aec4bf4090a9d871e37c25e24cbd276feb8e4834 Author: Moritz Angermann Date: Tue Mar 5 18:34:26 2019 +0800 Move boot_platform and primops.txt.pp into ghc-prim >--------------------------------------------------------------- aec4bf4090a9d871e37c25e24cbd276feb8e4834 compiler/ghc.mk | 94 ---------- ghc.mk | 20 --- libraries/ghc-prim/ghc.mk | 198 +++++++++++++++++++++ .../prelude => libraries/ghc-prim}/primops.txt.pp | 0 4 files changed, 198 insertions(+), 114 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 aec4bf4090a9d871e37c25e24cbd276feb8e4834 From git at git.haskell.org Tue Mar 5 21:44:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:31 +0000 (UTC) Subject: [commit: ghc] wip/reapply-atomic-writes: compiler: Write .o files atomically. See #14533 (c8f857f) Message-ID: <20190305214431.EAC543A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/reapply-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/c8f857ff01bd573f575a75620f084f64a6c1fa1d/ghc >--------------------------------------------------------------- commit c8f857ff01bd573f575a75620f084f64a6c1fa1d Author: Niklas Hambüchen Date: Sun Feb 17 20:48:45 2019 +0100 compiler: Write .o files atomically. See #14533 This issue was reproduced with, and the fix confirmed with, the `hatrace` tool for syscall-based fault injection: https://github.com/nh2/hatrace The concrete test case for GHC is at https://github.com/nh2/hatrace/blob/e23d35a2d2c79e8bf49e9e2266b3ff7094267f29/test/HatraceSpec.hs#L185 A previous, nondeterministic reproducer for the issue was provided by Alexey Kuleshevich in https://github.com/lehins/exec-kill-loop Signed-off-by: Niklas Hambüchen Reviewed-by: Alexey Kuleshevich >--------------------------------------------------------------- c8f857ff01bd573f575a75620f084f64a6c1fa1d compiler/main/DriverPipeline.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 5fe2362..3f59ed3 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1375,7 +1375,12 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - runAssembler input_fn output_fn + + -- Atomic write by writing to temp file and then renaming + let temp_output_fn = output_fn <.> "tmp" + runAssembler input_fn temp_output_fn + liftIO $ renameFile temp_output_fn output_fn + return (RealPhase next_phase, output_fn) From git at git.haskell.org Tue Mar 5 21:44:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:35 +0000 (UTC) Subject: [commit: ghc] wip/reapply-atomic-writes: compiler: Refactor: extract `withAtomicRename` (ced9f3c) Message-ID: <20190305214435.0ADC13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/reapply-atomic-writes Link : http://ghc.haskell.org/trac/ghc/changeset/ced9f3cf781e62d5becdbaf4fc57d65a9eaf1876/ghc >--------------------------------------------------------------- commit ced9f3cf781e62d5becdbaf4fc57d65a9eaf1876 Author: Niklas Hambüchen Date: Sun Feb 17 21:09:29 2019 +0100 compiler: Refactor: extract `withAtomicRename` >--------------------------------------------------------------- ced9f3cf781e62d5becdbaf4fc57d65a9eaf1876 compiler/main/DriverPipeline.hs | 13 ++++++------- compiler/utils/Util.hs | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 3f59ed3..f1ef637 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1341,7 +1341,10 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags let local_includes = [ SysTools.Option ("-iquote" ++ p) | p <- includePathsQuote cmdline_include_paths ] let runAssembler inputFilename outputFilename - = liftIO $ as_prog dflags + = liftIO $ do + withAtomicRename outputFilename $ \temp_outputFilename -> do + as_prog + dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags @@ -1371,15 +1374,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags , SysTools.Option "-c" , SysTools.FileOption "" inputFilename , SysTools.Option "-o" - , SysTools.FileOption "" outputFilename + , SysTools.FileOption "" temp_outputFilename ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - - -- Atomic write by writing to temp file and then renaming - let temp_output_fn = output_fn <.> "tmp" - runAssembler input_fn temp_output_fn - liftIO $ renameFile temp_output_fn output_fn + runAssembler input_fn output_fn return (RealPhase next_phase, output_fn) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 16864fe..41f63f2 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -99,6 +99,7 @@ module Util ( doesDirNameExist, getModificationUTCTime, modificationTimeIfExists, + withAtomicRename, global, consIORef, globalM, sharedGlobal, sharedGlobalM, @@ -145,9 +146,10 @@ import GHC.Stack (HasCallStack) import Control.Applicative ( liftA2 ) import Control.Monad ( liftM, guard ) +import Control.Monad.IO.Class ( MonadIO, liftIO ) import GHC.Conc.Sync ( sharedCAF ) import System.IO.Error as IO ( isDoesNotExistError ) -import System.Directory ( doesDirectoryExist, getModificationTime ) +import System.Directory ( doesDirectoryExist, getModificationTime, renameFile ) import System.FilePath import Data.Char ( isUpper, isAlphaNum, isSpace, chr, ord, isDigit, toUpper @@ -1304,6 +1306,26 @@ modificationTimeIfExists f = do else ioError e -- -------------------------------------------------------------- +-- atomic file writing by writing to a temporary file first (see #14533) +-- +-- This should be used in all cases where GHC writes files to disk +-- and uses their modification time to skip work later, +-- as otherwise a partially written file (e.g. due to crash or Ctrl+C) +-- also results in a skip. + +withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a +withAtomicRename targetFile f = do + -- The temp file must be on the same file system (mount) as the target file + -- to result in an atomic move on most platforms. + -- The standard way to ensure that is to place it into the same directory. + -- This can still be fooled when somebody mounts a different file system + -- at just the right time, but that is not a case we aim to cover here. + let temp = targetFile <.> "tmp" + res <- f temp + liftIO $ renameFile temp targetFile + return res + +-- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string -- up (but not including) the last character for which 'pred' returned From git at git.haskell.org Tue Mar 5 21:44:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:38 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite/plugins: Increase compile timeout on Windows (44229c8) Message-ID: <20190305214438.132983A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/44229c8b1221069bbbe6a98adede5db1bd6faa07/ghc >--------------------------------------------------------------- commit 44229c8b1221069bbbe6a98adede5db1bd6faa07 Author: Ben Gamari Date: Tue Mar 5 11:30:57 2019 -0500 testsuite/plugins: Increase compile timeout on Windows I think the linker is routinely eating through the timeout, leading to many spurious failures. >--------------------------------------------------------------- 44229c8b1221069bbbe6a98adede5db1bd6faa07 testsuite/tests/plugins/all.T | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 1834e3b..f345e21 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -1,9 +1,15 @@ -setTestOpts([req_interp, when(opsys('mingw32'), multi_cpu_race)]) +setTestOpts([ + req_interp, + # The implementation of ghc-pkg doesn't seem to be multi-concurrent process + # safe on windows. These tests which mutate the package db need to be run + # sequentially until this is fixed. This likely means that #13194 isn't fully + # solved. See also #15313. + when(opsys('mingw32'), multi_cpu_race), + # The Windows toolchain, particularly linking, is remarkably slow, give it + # time to do its thing + when(opsys('mingw32'), compile_timeout_multiplier(2)) +]) -# The implementation of ghc-pkg doesn't seem to be multi-concurrent process safe -# on windows. These tests which mutate the package db need to be run -# sequentially until this is fixed. This likely means that #13194 isn't fully -# solved. See also #15313. test('plugins01', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), From git at git.haskell.org Tue Mar 5 21:44:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:41 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: rts/RtsSymbols: Drop __mingw_vsnwprintf (1542c83) Message-ID: <20190305214441.1C7E13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/1542c8322c0fb6196a963dbb05645d184ef3e7db/ghc >--------------------------------------------------------------- commit 1542c8322c0fb6196a963dbb05645d184ef3e7db Author: Ben Gamari Date: Tue Mar 5 11:58:18 2019 -0500 rts/RtsSymbols: Drop __mingw_vsnwprintf As described in #16387, this is already defined by mingw and consequently defining it in the RTS as well leads to multiple definition errors from the RTS linker at runtime. >--------------------------------------------------------------- 1542c8322c0fb6196a963dbb05645d184ef3e7db rts/RtsSymbols.c | 1 - 1 file changed, 1 deletion(-) diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index 6966d6d..575b6f0 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -110,7 +110,6 @@ RTS_WIN64_ONLY(SymI_HasProto(__imp__environ)) \ RTS_WIN32_ONLY(SymI_HasProto(_imp___iob)) \ RTS_WIN64_ONLY(SymI_HasProto(__iob_func)) \ - RTS_WIN64_ONLY(SymI_HasProto(__mingw_vsnwprintf)) \ /* see Note [Symbols for MinGW's printf] */ \ SymI_HasProto(_lock_file) \ SymI_HasProto(_unlock_file) From git at git.haskell.org Tue Mar 5 21:44:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 5 Mar 2019 21:44:44 +0000 (UTC) Subject: [commit: ghc] wip/i386-win32-builds: gitlab-ci: Implement support for i386/Windows bindists (9ecc9bb) Message-ID: <20190305214444.26F923A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/i386-win32-builds Link : http://ghc.haskell.org/trac/ghc/changeset/9ecc9bb08822db7930e9c9d3143b0f6b07901929/ghc >--------------------------------------------------------------- commit 9ecc9bb08822db7930e9c9d3143b0f6b07901929 Author: Ben Gamari Date: Tue Mar 5 16:41:55 2019 -0500 gitlab-ci: Implement support for i386/Windows bindists >--------------------------------------------------------------- 9ecc9bb08822db7930e9c9d3143b0f6b07901929 .gitlab-ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++++--------- .gitlab/win32-init.sh | 14 ++++++++++++- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6fb0c7..6121fa6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -385,21 +385,20 @@ release-x86_64-linux-fedora27: dependencies: [] variables: FORCE_SYMLINKS: 1 + LANG: "en_US.UTF-8" cache: paths: - cabal-cache - ghc-8.6.2 - ghc-tarballs -validate-x86_64-windows-hadrian: +.build-windows-hadrian: extends: .validate-windows stage: full-build variables: GHC_VERSION: "8.6.2" - LANG: "en_US.UTF-8" script: - | - set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick" @@ -408,22 +407,35 @@ validate-x86_64-windows-hadrian: #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" # FIXME: Testsuite disabled due to #16156. #- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cache: - key: x86_64-windows tags: - x86_64-windows -validate-x86_64-windows: +validate-x86_64-windows-hadrian: + extends: .build-windows-hadrian + variables: + MSYSTEM: MINGW64 + cache: + key: x86_64-windows-hadrian + +nightly-i386-windows-hadrian: + extends: .build-windows-hadrian + variables: + MSYSTEM: MINGW32 + only: + variables: + - $NIGHTLY + cache: + key: i386-windows-hadrian + +.build-windows: extends: .validate-windows stage: full-build # due to #16084 allow_failure: true variables: GHC_VERSION: "8.6.2" - LANG: "en_US.UTF-8" script: - | - set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" @@ -432,18 +444,43 @@ validate-x86_64-windows: bash -c "make binary-dist TAR_COMP_OPTS=-1" mv ghc-*.tar.xz ghc.tar.xz - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cache: - key: x86_64-windows tags: - x86_64-windows artifacts: when: always + expire_in: 2 week reports: junit: junit.xml paths: - ghc.tar.xz - junit.xml +validate-x86_64-windows: + extends: .build-windows + variables: + MSYSTEM: MINGW64 + cache: + key: x86_64-windows + +release-i386-windows: + extends: .build-windows + only: + - tags + variables: + MSYSTEM: MINGW32 + cache: + key: i386-windows + +nightly-i386-windows: + extends: .build-windows + only: + variables: + - $NIGHTLY + variables: + MSYSTEM: MINGW32 + cache: + key: i386-windows + ############################################################ # Cleanup ############################################################ diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh index dce9be8..aacb6d7 100644 --- a/.gitlab/win32-init.sh +++ b/.gitlab/win32-init.sh @@ -10,7 +10,19 @@ if [ -d "`pwd`/cabal-cache" ]; then fi if [ ! -e $toolchain/bin/ghc ]; then - curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-mingw32.tar.xz | tar -xJ + case $MSYSTEM in + MINGW32) + triple="i386-unknown-mingw32" + ;; + MINGW64) + triple="x86_64-unknown-mingw32" + ;; + *) + echo "win32-init: Unknown MSYSTEM $MSYSTEM" + exit 1 + ;; + esac + curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-$triple.tar.xz | tar -xJ mv ghc-$GHC_VERSION toolchain fi From git at git.haskell.org Wed Mar 6 16:37:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:37:55 +0000 (UTC) Subject: [commit: ghc] tag 'ghc-8.6.4-release' created Message-ID: <20190306163755.1E2753A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New tag : ghc-8.6.4-release Referencing: e843855f3ddf01aa07ac6f6edf5633867181ba78 From git at git.haskell.org Wed Mar 6 16:37:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:37:59 +0000 (UTC) Subject: [commit: ghc] : testsuite: Add test for #16104 (8c2dbc1) Message-ID: <20190306163759.3E3C23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/8c2dbc161572b59498a9d7abe444e65973069ef7/ghc >--------------------------------------------------------------- commit 8c2dbc161572b59498a9d7abe444e65973069ef7 Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- 8c2dbc161572b59498a9d7abe444e65973069ef7 testsuite/tests/plugins/Makefile | 4 ++++ .../tc-plugin-ghci => plugins/T16104-plugin}/LICENSE | 0 .../{rule-defining-plugin => T16104-plugin}/Makefile | 0 .../T16104-plugin}/Setup.hs | 0 .../T16104-plugin.cabal} | 8 ++------ .../tests/plugins/T16104-plugin/T16104_Plugin.hs | 20 ++++++++++++++++++++ testsuite/tests/plugins/T16104.hs | 4 ++++ testsuite/tests/plugins/T16104.stdout | 1 + testsuite/tests/plugins/all.T | 4 ++++ 9 files changed, 35 insertions(+), 6 deletions(-) diff --git a/testsuite/tests/plugins/Makefile b/testsuite/tests/plugins/Makefile index 8a6af5b..d913ca5 100644 --- a/testsuite/tests/plugins/Makefile +++ b/testsuite/tests/plugins/Makefile @@ -121,3 +121,7 @@ plugin-recomp-change-prof: "$(MAKE)" -s --no-print-directory -C plugin-recomp package.plugins01 TOP=$(TOP) RUN=-DRUN2 "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 plugin-recomp-test.hs -package-db plugin-recomp/pkg.plugins01/local.package.conf -fplugin PurePlugin "$(TEST_HC)" $(TEST_HC_OPTS) -prof -osuf p_o -hisuf p_hi -v0 plugin-recomp-test.hs -package-db plugin-recomp/pkg.plugins01/local.package.conf -fplugin PurePlugin + +.PHONY: T16104 +T16104: + "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 T16104.hs -package-db T16104-plugin/pkg.T16104-plugin/local.package.conf diff --git a/testsuite/tests/ghci/should_run/tc-plugin-ghci/LICENSE b/testsuite/tests/plugins/T16104-plugin/LICENSE similarity index 100% copy from testsuite/tests/ghci/should_run/tc-plugin-ghci/LICENSE copy to testsuite/tests/plugins/T16104-plugin/LICENSE diff --git a/testsuite/tests/plugins/rule-defining-plugin/Makefile b/testsuite/tests/plugins/T16104-plugin/Makefile similarity index 100% copy from testsuite/tests/plugins/rule-defining-plugin/Makefile copy to testsuite/tests/plugins/T16104-plugin/Makefile diff --git a/testsuite/tests/ghci/should_run/tc-plugin-ghci/Setup.hs b/testsuite/tests/plugins/T16104-plugin/Setup.hs similarity index 100% copy from testsuite/tests/ghci/should_run/tc-plugin-ghci/Setup.hs copy to testsuite/tests/plugins/T16104-plugin/Setup.hs diff --git a/testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal b/testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal similarity index 51% copy from testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal copy to testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal index b354f6b..5288e8f 100644 --- a/testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal +++ b/testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal @@ -1,15 +1,11 @@ -Name: rule-defining-plugin +Name: T16104-plugin Version: 0.1 Synopsis: For testing Cabal-Version: >= 1.2 Build-Type: Simple License: BSD3 License-File: LICENSE -Author: Edward Z. Yang -Homepage: http://ezyang.com Library Build-Depends: base, ghc - ghc-options: -O - Exposed-Modules: - RuleDefiningPlugin + Exposed-Modules: T16104_Plugin diff --git a/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs b/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs new file mode 100644 index 0000000..79cd0fe --- /dev/null +++ b/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T16104_Plugin (plugin) where + +import GhcPlugins +import Data.Bits + +plugin :: Plugin +plugin = defaultPlugin {installCoreToDos = install} + where install _ todos = return (test : todos) + + test = CoreDoPluginPass "Test" check + + check :: ModGuts -> CoreM ModGuts + check m = do mbN <- thNameToGhcName 'complement + case mbN of + Just _ -> liftIO $ putStrLn "Found complement!" + Nothing -> error "Failed to locate complement" + + return m diff --git a/testsuite/tests/plugins/T16104.hs b/testsuite/tests/plugins/T16104.hs new file mode 100644 index 0000000..bfef697 --- /dev/null +++ b/testsuite/tests/plugins/T16104.hs @@ -0,0 +1,4 @@ +{-# OPTIONS_GHC -fplugin T16104_Plugin #-} + +main :: IO () +main = return () diff --git a/testsuite/tests/plugins/T16104.stdout b/testsuite/tests/plugins/T16104.stdout new file mode 100644 index 0000000..a1eb7b6 --- /dev/null +++ b/testsuite/tests/plugins/T16104.stdout @@ -0,0 +1 @@ +Found complement! diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index f366d49..05283e6 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -141,3 +141,7 @@ test('plugin-recomp-change-prof', when(not config.have_profiling,skip) ], run_command, ['$MAKE -s --no-print-directory plugin-recomp-change-prof']) + +test('T16104', + pre_cmd('$MAKE -s --no-print-directory -C T16104-plugin package.T16104-plugin TOP={top}'), + run_command, ['$MAKE -s --no-print-directory T16104']) From git at git.haskell.org Wed Mar 6 16:38:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:02 +0000 (UTC) Subject: [commit: ghc] : GhcPlugins: Fix lookup of TH names (5abfd98) Message-ID: <20190306163802.673433A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/5abfd982f55287b24fd71a5d60a2e3d0e361e47e/ghc >--------------------------------------------------------------- commit 5abfd982f55287b24fd71a5d60a2e3d0e361e47e Author: Ben Gamari Date: Sat Jan 19 13:59:18 2019 -0500 GhcPlugins: Fix lookup of TH names Previously `thNameToGhcName` was calling `lookupOrigNameCache` directly, which failed to handle the case that the name wasn't already in the name cache. This happens, for instance, when the name was in scope in a plugin being used during compilation but not in scope in the module being compiled. In this case we the interface file containing the name won't be loaded and `lookupOrigNameCache` fails. This was the cause of #16104. The solution is simple: use the nicely packaged `lookupOrigIO` instead. (cherry picked from commit 0d9f105ba423af4f2ca215a18d04d4c8e2c372a8) >--------------------------------------------------------------- 5abfd982f55287b24fd71a5d60a2e3d0e361e47e compiler/simplCore/CoreMonad.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs index 912ff99..683fb04 100644 --- a/compiler/simplCore/CoreMonad.hs +++ b/compiler/simplCore/CoreMonad.hs @@ -67,6 +67,7 @@ import Annotations import IOEnv hiding ( liftIO, failM, failWithM ) import qualified IOEnv ( liftIO ) +import IfaceEnv ( lookupOrigIO ) import TcEnv ( lookupGlobal ) import Var import Outputable @@ -821,6 +822,6 @@ thNameToGhcName th_name | Just n <- isExact_maybe rdr_name -- This happens in derived code = return $ if isExternalName n then Just n else Nothing | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name - = do { cache <- getOrigNameCache - ; return $ lookupOrigNameCache cache rdr_mod rdr_occ } + = do { hsc_env <- getHscEnv + ; Just <$> liftIO (lookupOrigIO hsc_env rdr_mod rdr_occ) } | otherwise = return Nothing From git at git.haskell.org Wed Mar 6 16:38:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:06 +0000 (UTC) Subject: [commit: ghc] : Stack: fix name mangling. (0f253b8) Message-ID: <20190306163806.7B6873A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/0f253b890ca3aff79622cad6433a623795cd8ff7/ghc >--------------------------------------------------------------- commit 0f253b890ca3aff79622cad6433a623795cd8ff7 Author: Tamar Christina Date: Sun Jan 27 15:54:36 2019 +0000 Stack: fix name mangling. (cherry picked from commit fb031b9b046e48ffe0d2864ec76bee3bc8ff5625) >--------------------------------------------------------------- 0f253b890ca3aff79622cad6433a623795cd8ff7 compiler/nativeGen/X86/Instr.hs | 2 +- .../tests/profiling/should_compile/T16166/Main.hs | 11 ++++ .../should_compile/T16166/NetworkRequestHeader.hs | 76 ++++++++++++++++++++++ .../tests/profiling/should_compile/T16166/all.T | 7 ++ 4 files changed, 95 insertions(+), 1 deletion(-) diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs index c7000c9..1a612b8 100644 --- a/compiler/nativeGen/X86/Instr.hs +++ b/compiler/nativeGen/X86/Instr.hs @@ -934,7 +934,7 @@ x86_mkStackAllocInstr platform amount ] ArchX86_64 | needs_probe_call platform amount -> [ MOV II64 (OpImm (ImmInt amount)) (OpReg rax) - , CALL (Left $ strImmLit "__chkstk_ms") [rax] + , CALL (Left $ strImmLit "___chkstk_ms") [rax] , SUB II64 (OpReg rax) (OpReg rsp) ] | otherwise -> diff --git a/testsuite/tests/profiling/should_compile/T16166/Main.hs b/testsuite/tests/profiling/should_compile/T16166/Main.hs new file mode 100644 index 0000000..09dbb87 --- /dev/null +++ b/testsuite/tests/profiling/should_compile/T16166/Main.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE BangPatterns #-} +-- Main.hs +module Main (main) where + +import NetworkRequestHeader + +import Control.Monad + +main :: IO () +main = void $ parseHeaderLines [] + diff --git a/testsuite/tests/profiling/should_compile/T16166/NetworkRequestHeader.hs b/testsuite/tests/profiling/should_compile/T16166/NetworkRequestHeader.hs new file mode 100644 index 0000000..48a6288 --- /dev/null +++ b/testsuite/tests/profiling/should_compile/T16166/NetworkRequestHeader.hs @@ -0,0 +1,76 @@ +{-# LANGUAGE BangPatterns #-} +-- NetworkRequestHeader.hs +module NetworkRequestHeader (parseHeaderLines, parseRequestLine) where + +import Control.Exception +import Control.Monad +import Data.ByteString.Internal (ByteString(..), memchr) +import Data.Word +import Foreign.ForeignPtr (withForeignPtr) +import Foreign.Ptr (Ptr, plusPtr, minusPtr, nullPtr) +import Foreign.Storable (peek) + +-- | Error types for bad 'Request'. +data InvalidRequest = NonHttp + +instance Show InvalidRequest where show _ = "" +instance Exception InvalidRequest + +parseHeaderLines :: [ByteString] + -> IO (ByteString + ,ByteString -- Path + ,ByteString -- Path, parsed + ) +parseHeaderLines [] = throwIO $ NonHttp +parseHeaderLines (firstLine:_) = do + (method, path') <- parseRequestLine firstLine + let path = path' + return (method, path', path) + +parseRequestLine :: ByteString + -> IO (ByteString + ,ByteString) +parseRequestLine (PS fptr off len) = withForeignPtr fptr $ \ptr -> do + when (len < 14) $ throwIO NonHttp + let methodptr = ptr `plusPtr` off + limptr = methodptr `plusPtr` len + lim0 = fromIntegral len + + pathptr0 <- memchr methodptr 32 lim0 -- ' ' + when (pathptr0 == nullPtr || (limptr `minusPtr` pathptr0) < 11) $ + throwIO NonHttp + let pathptr = pathptr0 `plusPtr` 1 + lim1 = fromIntegral (limptr `minusPtr` pathptr0) + + httpptr0 <- memchr pathptr 32 lim1 -- ' ' + when (httpptr0 == nullPtr || (limptr `minusPtr` httpptr0) < 9) $ + throwIO NonHttp + let httpptr = httpptr0 `plusPtr` 1 + lim2 = fromIntegral (httpptr0 `minusPtr` pathptr) + + checkHTTP httpptr + queryptr <- memchr pathptr 63 lim2 -- '?' + + let !method = bs ptr methodptr pathptr0 + !path + | queryptr == nullPtr = bs ptr pathptr httpptr0 + | otherwise = bs ptr pathptr queryptr + + return (method,path) + where + check :: Ptr Word8 -> Int -> Word8 -> IO () + check p n w = do + w0 <- peek $ p `plusPtr` n + when (w0 /= w) $ throwIO NonHttp + checkHTTP httpptr = do + check httpptr 0 72 -- 'H' + check httpptr 1 84 -- 'T' + check httpptr 2 84 -- 'T' + check httpptr 3 80 -- 'P' + check httpptr 4 47 -- '/' + check httpptr 6 46 -- '.' + bs ptr p0 p1 = PS fptr o l + where + o = p0 `minusPtr` ptr + l = p1 `minusPtr` p0 + diff --git a/testsuite/tests/profiling/should_compile/T16166/all.T b/testsuite/tests/profiling/should_compile/T16166/all.T new file mode 100644 index 0000000..31f129b --- /dev/null +++ b/testsuite/tests/profiling/should_compile/T16166/all.T @@ -0,0 +1,7 @@ +# We need the register allocator to use more than a page worth of stack space +# when spilling in a single function, easiest way to do that is +# using a profiling build +test('T16166', [only_ways(['normal']), req_profiling, + extra_files(['Main.hs', 'NetworkRequestHeader.hs'])], + multimod_compile, + ['Main NetworkRequestHeader', '-O -prof -fprof-auto -v0']) From git at git.haskell.org Wed Mar 6 16:38:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:09 +0000 (UTC) Subject: [commit: ghc] : users-guide: Some more release notes for 8.6.4 (ba11d0a) Message-ID: <20190306163809.807C93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/ba11d0aad0a9f2275bf6fe733db4719416d80c36/ghc >--------------------------------------------------------------- commit ba11d0aad0a9f2275bf6fe733db4719416d80c36 Author: Ben Gamari Date: Tue Feb 12 13:17:02 2019 -0500 users-guide: Some more release notes for 8.6.4 >--------------------------------------------------------------- ba11d0aad0a9f2275bf6fe733db4719416d80c36 docs/users_guide/8.6.4-notes.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/users_guide/8.6.4-notes.rst b/docs/users_guide/8.6.4-notes.rst index 738b89b..e0d9a15 100644 --- a/docs/users_guide/8.6.4-notes.rst +++ b/docs/users_guide/8.6.4-notes.rst @@ -11,10 +11,22 @@ Highlights The highlights, since the 8.6.3 release, are: +- Inconsistencies between the versions of ``transformers`` and ``process`` + shipped with the compiler and those present on Hackage have been resolved + (:ghc-ticket:`16199`). - A patch fixing a set of linker failures on Windows has been reverted as it unfortunately caused (:ghc-ticket:`15105`, :ghc-ticket:`15894`, :ghc-ticket:`15934`) - A bug wherein changes in default method definitions would fail to trigger recompilation has been fixed (:ghc-ticket:`15970`). +- A bug wherein plugins would fail to lookup names not in scope in the module + being compiled has been fixed (:ghc-ticket:`16104`) +- A bug resulting in hangs during RTS shutdown on Darwin has been resolved + (:ghc-ticket:`16150`) +- A bug where some programs involving :extension:`StaticData` would be rejected + with either a typechecking error or internal compiler error has been fixed + (:ghc-ticket:`16141`) +- A bug where compilation on Windows can fail with linker errors referring to + ``__chkstk_ms`` has been fixed (:ghc-ticket:`16166`) Known issues ------------ From git at git.haskell.org Wed Mar 6 16:38:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:12 +0000 (UTC) Subject: [commit: ghc] : Fix two bugs in stg_ap_0_fast in profiling runtime (a481b19) Message-ID: <20190306163812.816DD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/a481b1991c5ec0c5ff80e05d0af8e1bac8876301/ghc >--------------------------------------------------------------- commit a481b1991c5ec0c5ff80e05d0af8e1bac8876301 Author: Ömer Sinan Ağacan Date: Fri Jan 18 22:35:37 2019 +0300 Fix two bugs in stg_ap_0_fast in profiling runtime This includes two bug fixes in profiling version of stg_ap_0_fast: - PAPs allocated by stg_ap_0_fast are now correctly tagged. This invariant is checked in Sanity.c:checkPAP. (This was originally implemented in 2693eb11f5, later reverted with ab55b4ddb7 because it revealed the bug below, but it wasn't clear at the time whether the bug was the one below or something in the commit) - The local variable `untaggedfun` is now marked as a pointer so it survives GC. With this we finally fix all known bugs caught in #15508. `concprog001` now works reliably with prof+threaded and prof runtimes (with and without -debug). (cherry picked from commit 908b4b8659713f0b7a1704ce33c7fa30e3e0ffc3) >--------------------------------------------------------------- a481b1991c5ec0c5ff80e05d0af8e1bac8876301 rts/Apply.cmm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/rts/Apply.cmm b/rts/Apply.cmm index 40f890d..0454fd6 100644 --- a/rts/Apply.cmm +++ b/rts/Apply.cmm @@ -60,7 +60,7 @@ stg_ap_0_fast ( P_ fun ) again: W_ info; - W_ untaggedfun; + P_ untaggedfun; W_ arity; untaggedfun = UNTAG(fun); info = %INFO_PTR(untaggedfun); @@ -106,6 +106,11 @@ again: pap = Hp - SIZEOF_StgPAP + WDS(1); SET_HDR(pap, stg_PAP_info, CCCS); StgPAP_arity(pap) = arity; + if (arity <= TAG_MASK) { + // TODO: Shouldn't this already be tagged? If not why did we + // untag it at the beginning of this function? + fun = untaggedfun + arity; + } StgPAP_fun(pap) = fun; StgPAP_n_args(pap) = 0; return (pap); @@ -117,9 +122,8 @@ again: return (fun); } else { // We're going to copy this PAP, and put the new CCS in it - fun = untaggedfun; W_ size; - size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(fun))); + size = SIZEOF_StgPAP + WDS(TO_W_(StgPAP_n_args(untaggedfun))); HP_CHK_GEN(size); TICK_ALLOC_PAP(size, 0); // attribute this allocation to the "overhead of profiling" @@ -127,13 +131,13 @@ again: P_ pap; pap = Hp - size + WDS(1); // We'll lose the original PAP, so we should enter its CCS - ccall enterFunCCS(BaseReg "ptr", StgHeader_ccs(fun) "ptr"); + ccall enterFunCCS(BaseReg "ptr", StgHeader_ccs(untaggedfun) "ptr"); SET_HDR(pap, stg_PAP_info, CCCS); - StgPAP_arity(pap) = StgPAP_arity(fun); - StgPAP_n_args(pap) = StgPAP_n_args(fun); + StgPAP_arity(pap) = StgPAP_arity(untaggedfun); + StgPAP_n_args(pap) = StgPAP_n_args(untaggedfun); StgPAP_fun(pap) = StgPAP_fun(fun); W_ i; - i = TO_W_(StgPAP_n_args(fun)); + i = TO_W_(StgPAP_n_args(untaggedfun)); loop: if (i == 0) { return (pap); From git at git.haskell.org Wed Mar 6 16:38:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:15 +0000 (UTC) Subject: [commit: ghc] : Fix regression incorrectly advertising TH support (bdc9680) Message-ID: <20190306163815.83D603A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/bdc9680cc5fe36f09b263d886e8b4e99d5c84635/ghc >--------------------------------------------------------------- commit bdc9680cc5fe36f09b263d886e8b4e99d5c84635 Author: Herbert Valerio Riedel Date: Sat Feb 16 22:08:46 2019 +0100 Fix regression incorrectly advertising TH support `--supported-languages` must only advertise language extensions which are supported by the compiler in order for tooling such as Cabal relying on this signalling not to behave incorrectly. Fixes #16331 (cherry picked from commit db4372cda7f6c87e7ad26efe3fca4b3f7f527a48) >--------------------------------------------------------------- bdc9680cc5fe36f09b263d886e8b4e99d5c84635 compiler/main/DynFlags.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 95a7122..5391326 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -4084,6 +4084,14 @@ supportedExtensions :: [String] supportedExtensions = concatMap toFlagSpecNamePair xFlags where toFlagSpecNamePair flg +#if !defined(GHCI) + -- IMPORTANT! Make sure that `ghc --supported-extensions` omits + -- "TemplateHaskell"/"QuasiQuotes" when it's known not to work out of the + -- box. See also GHC #11102 and #16331 for more details about + -- the rationale + | flagSpecFlag flg == LangExt.TemplateHaskell = [noName] + | flagSpecFlag flg == LangExt.QuasiQuotes = [noName] +#endif | otherwise = [name, noName] where noName = "No" ++ name From git at git.haskell.org Wed Mar 6 16:38:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:18 +0000 (UTC) Subject: [commit: ghc] : gitlab-ci: Pull docker images from ghc/ci-images registry (e1f52f3) Message-ID: <20190306163818.C505F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/e1f52f38b802521f5b7426637f2a0dea9223f115/ghc >--------------------------------------------------------------- commit e1f52f38b802521f5b7426637f2a0dea9223f115 Author: Ben Gamari Date: Fri Feb 22 14:52:50 2019 -0500 gitlab-ci: Pull docker images from ghc/ci-images registry (cherry picked from commit b90695cdaaa0995c1b7a26289c63be9f9e9cfe3e) >--------------------------------------------------------------- e1f52f38b802521f5b7426637f2a0dea9223f115 .gitlab-ci.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35aee09..1589bc1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ variables: GIT_SSL_NO_VERIFY: "1" + # Commit of ghc/ci-images repository from which to pull Docker images + DOCKER_REV: 2757db588256b0f96dd44d602f0857ae8f86a704 before_script: - python3 .gitlab/fix-submodules.py @@ -30,7 +32,7 @@ stages: ghc-linters: stage: lint - image: ghcci/linters:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - | if [ -n "$CI_MERGE_REQUEST_ID" ]; then @@ -65,7 +67,7 @@ ghc-linters: validate-x86_64-linux-deb8-hadrian: extends: .validate-hadrian stage: build - image: ghcci/x86_64-linux-deb8:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV" before_script: # workaround for docker permissions - sudo chown ghc:ghc -R . @@ -165,7 +167,7 @@ validate-x86_64-darwin: validate-aarch64-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/aarch64-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:$DOCKER_REV" allow_failure: true artifacts: when: always @@ -189,7 +191,7 @@ nightly-aarch64-linux-deb9: validate-i386-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/i386-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" allow_failure: true artifacts: when: always @@ -200,7 +202,7 @@ validate-i386-linux-deb9: nightly-i386-linux-deb9: extends: .validate-linux stage: full-build - image: ghcci/i386-linux-deb9:0.1 + image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" allow_failure: true variables: TEST_TYPE: slowtest @@ -216,7 +218,7 @@ nightly-i386-linux-deb9: validate-x86_64-linux-deb9: extends: .validate-linux stage: build - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" artifacts: when: always expire_in: 2 week @@ -238,7 +240,7 @@ validate-x86_64-linux-deb9-llvm: extends: .validate-linux stage: full-build allow_failure: true - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: BUILD_FLAVOUR: perf-llvm cache: @@ -247,7 +249,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 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV" cache: key: linux-x86_64-deb8 artifacts: @@ -257,7 +259,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 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV" cache: key: linux-x86_64-fedora27 artifacts: @@ -270,7 +272,7 @@ validate-x86_64-linux-deb9-integer-simple: allow_failure: true variables: INTEGER_LIBRARY: integer-simple - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" cache: key: linux-x86_64-deb9 @@ -292,7 +294,7 @@ validate-x86_64-linux-deb9-unreg: allow_failure: true variables: CONFIGURE_ARGS: --enable-unregisterised - image: ghcci/x86_64-linux-deb9:0.2 + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" cache: key: linux-x86_64-deb9 From git at git.haskell.org Wed Mar 6 16:38:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:22 +0000 (UTC) Subject: [commit: ghc] : gitlab-ci: Produce DWARF-enabled binary distribution (b09f057) Message-ID: <20190306163822.629773A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/b09f057a26c0b8b7afb82c9b87c5aba8a438286f/ghc >--------------------------------------------------------------- commit b09f057a26c0b8b7afb82c9b87c5aba8a438286f Author: Ben Gamari Date: Tue Feb 19 11:40:40 2019 -0500 gitlab-ci: Produce DWARF-enabled binary distribution (cherry picked from commit d298cb9cf722126316c9697c20a8e0048498efb9) >--------------------------------------------------------------- b09f057a26c0b8b7afb82c9b87c5aba8a438286f .gitlab-ci.yml | 17 ++++++++++++++++- mk/flavours/dwarf.mk | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1589bc1..339ea8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 2757db588256b0f96dd44d602f0857ae8f86a704 + DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f before_script: - python3 .gitlab/fix-submodules.py @@ -225,6 +225,21 @@ validate-x86_64-linux-deb9: cache: key: linux-x86_64-deb9 +release-x86_64-linux-deb9-dwarf: + extends: .validate-linux + stage: build + image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" + allow_failure: true + variables: + CONFIGURE_ARGS: "--enable-dwarf-unwind" + BUILD_FLAVOUR: dwarf + TEST_ENV: "x86_64-linux-deb9" + artifacts: + when: always + expire_in: 2 week + cache: + key: linux-x86_64-deb9 + nightly-x86_64-linux-deb9: extends: validate-x86_64-linux-deb9 stage: build diff --git a/mk/flavours/dwarf.mk b/mk/flavours/dwarf.mk new file mode 100644 index 0000000..15f16e2 --- /dev/null +++ b/mk/flavours/dwarf.mk @@ -0,0 +1,14 @@ +# Build flavour which produces a compiler, RTS, and core libraries with DWARF +# debug information. For best results run ./configure with +# --enable-dwarf-unwind. + +SRC_HC_OPTS = -O -H64m +GhcStage1HcOpts = -O2 +GhcStage2HcOpts = -O2 -g3 +GhcRtsHcOpts = -O2 -g3 +GhcLibHcOpts = -O2 -g3 +BUILD_PROF_LIBS = YES +#SplitObjs +#HADDOCK_DOCS +#BUILD_SPHINX_HTML +#BUILD_SPHINX_PDF From git at git.haskell.org Wed Mar 6 16:38:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:25 +0000 (UTC) Subject: [commit: ghc] : gitlab-ci: Drop CircleCI jobs (b6f949f) Message-ID: <20190306163825.776BF3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/b6f949ff4953cf51005159de3d27267835673504/ghc >--------------------------------------------------------------- commit b6f949ff4953cf51005159de3d27267835673504 Author: Ben Gamari Date: Sat Mar 2 15:32:30 2019 -0500 gitlab-ci: Drop CircleCI jobs >--------------------------------------------------------------- b6f949ff4953cf51005159de3d27267835673504 .gitlab-ci.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 339ea8f..f9f3a34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -400,32 +400,3 @@ validate-x86_64-windows: - ghc.tar.xz - junit.xml -############################################################ -# Validation via CircleCI -############################################################ - -.circleci: - stage: build - image: ghcci/x86_64-linux-deb8:0.1 - artifacts: - when: always - expire_in: 2 week - reports: - junit: junit.xml - 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. -# -# This requires updating the maximum artifacts size limit in Gitlab to -# something like 200MB. - -.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 Wed Mar 6 16:38:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 16:38:28 +0000 (UTC) Subject: [commit: ghc] : Bump to 8.6.4 (aac18e9) Message-ID: <20190306163828.868063A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : Link : http://ghc.haskell.org/trac/ghc/changeset/aac18e9a08e6de9648e1a62d849dcd409f407df8/ghc >--------------------------------------------------------------- commit aac18e9a08e6de9648e1a62d849dcd409f407df8 Author: Ben Gamari Date: Mon Mar 4 15:48:49 2019 -0500 Bump to 8.6.4 >--------------------------------------------------------------- aac18e9a08e6de9648e1a62d849dcd409f407df8 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8469247..11c2a34 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.6.3], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.6.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) # Set this to YES for a released version, otherwise NO : ${RELEASE=YES} From git at git.haskell.org Wed Mar 6 21:48:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:41 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16394' created Message-ID: <20190306214841.D7FB23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16394 Referencing: 633c43e3ad8eb5725b92b4c359e45ab8133060a3 From git at git.haskell.org Wed Mar 6 21:48:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:43 +0000 (UTC) Subject: [commit: ghc] branch 'wip/andrey/drop-symlink-traversal' created Message-ID: <20190306214843.D8E1C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/andrey/drop-symlink-traversal Referencing: 3ed77774bd07a85ffedb085d7cfe11809e1d2f0f From git at git.haskell.org Wed Mar 6 21:48:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:45 +0000 (UTC) Subject: [commit: ghc] branch 'wip/magic-carpet-ride' created Message-ID: <20190306214845.D99073A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/magic-carpet-ride Referencing: 646b6dfbe125aa756a935e840979ba11b4a882c0 From git at git.haskell.org Wed Mar 6 21:48:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:49 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Split Config.hs into Config.hs + config.hs-incl, and place config.hs-incl into the rts. (7bba164) Message-ID: <20190306214849.A0E1F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/7bba164c93f6ee939da8547ec8683b97deefbea8/ghc >--------------------------------------------------------------- commit 7bba164c93f6ee939da8547ec8683b97deefbea8 Author: Moritz Angermann Date: Tue Mar 5 22:43:47 2019 +0800 Split Config.hs into Config.hs + config.hs-incl, and place config.hs-incl into the rts. >--------------------------------------------------------------- 7bba164c93f6ee939da8547ec8683b97deefbea8 compiler/ghc.mk | 99 +------------------------------------------------ compiler/main/Config.hs | 7 ++++ rts/ghc.mk | 89 ++++++++++++++++++++++++++++++++++++++++++++ rts/rts.cabal.in | 1 + 4 files changed, 98 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 7bba164c93f6ee939da8547ec8683b97deefbea8 From git at git.haskell.org Wed Mar 6 21:48:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:52 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: WIP (24f1851) Message-ID: <20190306214852.AF7083A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/24f185130f2f919a589d24786bc1b5c71ed60bbc/ghc >--------------------------------------------------------------- commit 24f185130f2f919a589d24786bc1b5c71ed60bbc Author: Moritz Angermann Date: Wed Mar 6 09:51:16 2019 +0800 WIP >--------------------------------------------------------------- 24f185130f2f919a589d24786bc1b5c71ed60bbc compiler/ghc.mk | 16 ++++++++++------ ghc/ghc.mk | 6 +++--- libraries/ghc-prim/ghc.mk | 41 ++++++++++++++++++++--------------------- rts/rts.cabal.in | 1 + 4 files changed, 34 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 24f185130f2f919a589d24786bc1b5c71ed60bbc From git at git.haskell.org Wed Mar 6 21:48:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:55 +0000 (UTC) Subject: [commit: ghc] master, wip/andrey/drop-symlink-traversal: Rip out object splitting (37f257a) Message-ID: <20190306214855.D5B0E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/andrey/drop-symlink-traversal Link : http://ghc.haskell.org/trac/ghc/changeset/37f257afcd6a52cf4d76c60d766b1aeb520b9f05/ghc >--------------------------------------------------------------- commit 37f257afcd6a52cf4d76c60d766b1aeb520b9f05 Author: Ben Gamari Date: Mon Nov 26 17:21:12 2018 -0500 Rip out object splitting The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629 >--------------------------------------------------------------- 37f257afcd6a52cf4d76c60d766b1aeb520b9f05 .gitignore | 1 - aclocal.m4 | 20 --- compiler/cmm/CLabel.hs | 4 +- compiler/codeGen/StgCmm.hs | 38 +---- compiler/codeGen/StgCmmExpr.hs | 11 +- compiler/codeGen/StgCmmMonad.hs | 10 -- compiler/ghc.mk | 7 - compiler/main/DriverPhases.hs | 9 -- compiler/main/DriverPipeline.hs | 166 +++---------------- compiler/main/DynFlags.hs | 25 +-- compiler/main/HscMain.hs | 2 +- compiler/main/SysTools.hs | 16 +- compiler/main/SysTools/BaseDir.hs | 2 +- compiler/main/SysTools/Tasks.hs | 5 - compiler/nativeGen/AsmCodeGen.hs | 32 +--- compiler/nativeGen/CFG.hs | 7 +- compiler/nativeGen/PIC.hs | 2 - compiler/nativeGen/PPC/Ppr.hs | 17 +- compiler/nativeGen/RegAlloc/Liveness.hs | 4 - compiler/nativeGen/SPARC/Ppr.hs | 11 +- compiler/nativeGen/X86/Ppr.hs | 19 +-- configure.ac | 45 ------ distrib/cross-port | 1 - distrib/hc-build | 1 - docs/storage-mgt/rp.tex | 1 - docs/users_guide/8.8.1-notes.rst | 5 + docs/users_guide/packages.rst | 4 +- docs/users_guide/phases.rst | 19 +-- driver/split/Makefile | 15 -- driver/split/ghc-split.pl | 275 -------------------------------- driver/split/ghc.mk | 20 --- ghc.mk | 10 -- ghc/ghc.mk | 6 - hadrian/README.md | 5 - hadrian/cfg/system.config.in | 1 - hadrian/doc/user-settings.md | 9 -- hadrian/src/Base.hs | 7 - hadrian/src/Builder.hs | 3 +- hadrian/src/CommandLine.hs | 12 +- hadrian/src/Flavour.hs | 2 - hadrian/src/Oracles/Flag.hs | 13 +- hadrian/src/Packages.hs | 3 +- hadrian/src/Rules/BinaryDist.hs | 2 +- hadrian/src/Rules/Generate.hs | 30 ---- hadrian/src/Rules/Library.hs | 12 +- hadrian/src/Settings/Builders/Ghc.hs | 1 - hadrian/src/Settings/Default.hs | 13 +- hadrian/src/Settings/Default.hs-boot | 3 +- mk/config.mk.in | 32 +--- mk/flavours/bench-cross-ncg.mk | 1 - mk/flavours/bench-cross.mk | 1 - mk/flavours/bench-llvm.mk | 1 - mk/flavours/bench.mk | 1 - mk/flavours/devel1.mk | 1 - mk/flavours/devel2.mk | 1 - mk/flavours/perf-cross-ncg.mk | 1 - mk/flavours/perf-cross.mk | 1 - mk/flavours/perf-llvm.mk | 1 - mk/flavours/perf.mk | 1 - mk/flavours/prof-llvm.mk | 1 - mk/flavours/prof.mk | 1 - mk/flavours/quick-cross-ncg.mk | 1 - mk/flavours/quick-cross.mk | 1 - mk/flavours/quick-llvm.mk | 1 - mk/flavours/quick.mk | 1 - mk/flavours/quickest.mk | 1 - mk/flavours/validate.mk | 1 - rules/build-package-way.mk | 5 - rules/build-perl.mk | 78 --------- rules/distdir-opts.mk | 8 - rules/distdir-way-opts.mk | 1 - utils/haddock | 2 +- 72 files changed, 80 insertions(+), 990 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 37f257afcd6a52cf4d76c60d766b1aeb520b9f05 From git at git.haskell.org Wed Mar 6 21:48:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:48:58 +0000 (UTC) Subject: [commit: ghc] master, wip/andrey/drop-symlink-traversal: rts/Printer: Print forwarding pointers (c19a401) Message-ID: <20190306214858.DC6783A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/andrey/drop-symlink-traversal Link : http://ghc.haskell.org/trac/ghc/changeset/c19a401db45148873a7b6ba575384d2e77807647/ghc >--------------------------------------------------------------- commit c19a401db45148873a7b6ba575384d2e77807647 Author: Ömer Sinan Ağacan Date: Tue Feb 5 00:39:03 2019 -0500 rts/Printer: Print forwarding pointers >--------------------------------------------------------------- c19a401db45148873a7b6ba575384d2e77807647 rts/Printer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rts/Printer.c b/rts/Printer.c index 38335aa..f4d1111 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -111,10 +111,15 @@ printThunkObject( StgThunk *obj, char* tag ) void printClosure( const StgClosure *obj ) { - const StgInfoTable *info; - + debugBelch("%p: ", obj); obj = UNTAG_CONST_CLOSURE(obj); - info = get_itbl(obj); + const StgInfoTable* info = get_itbl(obj); + + while (IS_FORWARDING_PTR(info)) { + obj = (StgClosure*)UN_FORWARDING_PTR(obj); + debugBelch("(forwarding to %p) ", (void*)obj); + info = get_itbl(obj); + } switch ( info->type ) { case INVALID_OBJECT: From git at git.haskell.org Wed Mar 6 21:49:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:01 +0000 (UTC) Subject: [commit: ghc] master, wip/andrey/drop-symlink-traversal: rts/Printer: Introduce a few more printing utilities (23342e1) Message-ID: <20190306214901.EA7053A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/andrey/drop-symlink-traversal Link : http://ghc.haskell.org/trac/ghc/changeset/23342e1f06204a4853a6b191bf0960d2c2baf457/ghc >--------------------------------------------------------------- commit 23342e1f06204a4853a6b191bf0960d2c2baf457 Author: Ömer Sinan Ağacan Date: Tue Feb 5 00:37:57 2019 -0500 rts/Printer: Introduce a few more printing utilities These include printLargeAndPinnedObjects, printWeakLists, and printStaticObjects. These are generally useful things to have. >--------------------------------------------------------------- 23342e1f06204a4853a6b191bf0960d2c2baf457 rts/Printer.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ rts/Printer.h | 3 +++ 2 files changed, 74 insertions(+) diff --git a/rts/Printer.c b/rts/Printer.c index 291f529..38335aa 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -646,6 +646,77 @@ void printTSO( StgTSO *tso ) printStack( tso->stackobj ); } +void printStaticObjects( StgClosure *p ) +{ + while (p != END_OF_STATIC_OBJECT_LIST) { + p = UNTAG_STATIC_LIST_PTR(p); + printClosure(p); + + const StgInfoTable *info = get_itbl(p); + p = *STATIC_LINK(info, p); + } +} + +void printWeakLists() +{ + debugBelch("======= WEAK LISTS =======\n"); + + for (uint32_t cap_idx = 0; cap_idx < n_capabilities; ++cap_idx) { + debugBelch("Capability %d:\n", cap_idx); + Capability *cap = capabilities[cap_idx]; + for (StgWeak *weak = cap->weak_ptr_list_hd; weak; weak = weak->link) { + printClosure((StgClosure*)weak); + } + } + + for (uint32_t gen_idx = 0; gen_idx <= oldest_gen->no; ++gen_idx) { + generation *gen = &generations[gen_idx]; + debugBelch("Generation %d current weaks:\n", gen_idx); + for (StgWeak *weak = gen->weak_ptr_list; weak; weak = weak->link) { + printClosure((StgClosure*)weak); + } + debugBelch("Generation %d old weaks:\n", gen_idx); + for (StgWeak *weak = gen->old_weak_ptr_list; weak; weak = weak->link) { + printClosure((StgClosure*)weak); + } + } + + debugBelch("=========================\n"); +} + +void printLargeAndPinnedObjects() +{ + debugBelch("====== PINNED OBJECTS ======\n"); + + for (uint32_t cap_idx = 0; cap_idx < n_capabilities; ++cap_idx) { + Capability *cap = capabilities[cap_idx]; + + debugBelch("Capability %d: Current pinned object block: %p\n", + cap_idx, (void*)cap->pinned_object_block); + for (bdescr *bd = cap->pinned_object_blocks; bd; bd = bd->link) { + debugBelch("%p\n", (void*)bd); + } + } + + debugBelch("====== LARGE OBJECTS =======\n"); + for (uint32_t gen_idx = 0; gen_idx <= oldest_gen->no; ++gen_idx) { + generation *gen = &generations[gen_idx]; + debugBelch("Generation %d current large objects:\n", gen_idx); + for (bdescr *bd = gen->large_objects; bd; bd = bd->link) { + debugBelch("%p: ", (void*)bd); + printClosure((StgClosure*)bd->start); + } + + debugBelch("Generation %d scavenged large objects:\n", gen_idx); + for (bdescr *bd = gen->scavenged_large_objects; bd; bd = bd->link) { + debugBelch("%p: ", (void*)bd); + printClosure((StgClosure*)bd->start); + } + } + + debugBelch("============================\n"); +} + /* -------------------------------------------------------------------------- * Address printing code * diff --git a/rts/Printer.h b/rts/Printer.h index d2eaf01..44c55de 100644 --- a/rts/Printer.h +++ b/rts/Printer.h @@ -25,6 +25,9 @@ extern void printClosure ( const StgClosure *obj ); extern void printStackChunk ( StgPtr sp, StgPtr spLim ); extern void printTSO ( StgTSO *tso ); extern void printMutableList( bdescr *bd ); +extern void printStaticObjects ( StgClosure *obj ); +extern void printWeakLists ( void ); +extern void printLargeAndPinnedObjects ( void ); extern void DEBUG_LoadSymbols( const char *name ); From git at git.haskell.org Wed Mar 6 21:49:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:05 +0000 (UTC) Subject: [commit: ghc] master, wip/andrey/drop-symlink-traversal: Add regression test for #15918 (db039a4) Message-ID: <20190306214905.C1EAA3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/andrey/drop-symlink-traversal Link : http://ghc.haskell.org/trac/ghc/changeset/db039a4a10fc8fa9e03e6781d1c0dc33151beda6/ghc >--------------------------------------------------------------- commit db039a4a10fc8fa9e03e6781d1c0dc33151beda6 Author: Ryan Scott Date: Tue Mar 5 05:58:29 2019 -0500 Add regression test for #15918 The test case in #15918 no longer triggers an `ASSERT` failure on GHC HEAD, likely due to commit 682783828275cca5fd8bf5be5b52054c75e0e22c (`Make a smart mkAppTyM`). This patch adds a regression test for #15918 to finally put it to rest. >--------------------------------------------------------------- db039a4a10fc8fa9e03e6781d1c0dc33151beda6 testsuite/tests/quantified-constraints/T15918.hs | 19 +++++++++++++++++++ testsuite/tests/quantified-constraints/T15918.stderr | 7 +++++++ testsuite/tests/quantified-constraints/all.T | 1 + 3 files changed, 27 insertions(+) diff --git a/testsuite/tests/quantified-constraints/T15918.hs b/testsuite/tests/quantified-constraints/T15918.hs new file mode 100644 index 0000000..16e1e35 --- /dev/null +++ b/testsuite/tests/quantified-constraints/T15918.hs @@ -0,0 +1,19 @@ +{-# Language PolyKinds #-} +{-# Language TypeFamilies #-} +{-# Language ConstraintKinds #-} +{-# Language FlexibleContexts #-} +{-# Language QuantifiedConstraints #-} +{-# Language UndecidableInstances #-} +module T15918 where + +import Data.Kind + +class Rev f where + rev :: f a + +instance (forall xx. cls xx => Rev xx) => Rev (Build cls) where + rev = undefined + +data Build :: ((k -> Type) -> Constraint) -> (k -> Type) + +uu = rev :: Build [] a diff --git a/testsuite/tests/quantified-constraints/T15918.stderr b/testsuite/tests/quantified-constraints/T15918.stderr new file mode 100644 index 0000000..fa06b0e --- /dev/null +++ b/testsuite/tests/quantified-constraints/T15918.stderr @@ -0,0 +1,7 @@ + +T15918.hs:19:19: error: + • Expected kind ‘(k0 -> *) -> Constraint’, + but ‘[]’ has kind ‘* -> *’ + • In the first argument of ‘Build’, namely ‘[]’ + In an expression type signature: Build [] a + In the expression: rev :: Build [] a diff --git a/testsuite/tests/quantified-constraints/all.T b/testsuite/tests/quantified-constraints/all.T index 1e2eca8..da58582 100644 --- a/testsuite/tests/quantified-constraints/all.T +++ b/testsuite/tests/quantified-constraints/all.T @@ -20,3 +20,4 @@ test('T15359', normal, compile, ['']) test('T15359a', normal, compile, ['']) test('T15625', normal, compile, ['']) test('T15625a', normal, compile, ['']) +test('T15918', normal, compile_fail, ['']) From git at git.haskell.org Wed Mar 6 21:49:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:08 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: Don't mark cabal09 as broken (090e2a6) Message-ID: <20190306214908.E51CB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/090e2a6b21cb0693964508a7aeaf084e2aee1611/ghc >--------------------------------------------------------------- commit 090e2a6b21cb0693964508a7aeaf084e2aee1611 Author: Ben Gamari Date: Tue Mar 5 22:47:28 2019 -0500 Don't mark cabal09 as broken It doesn't fail reliably. >--------------------------------------------------------------- 090e2a6b21cb0693964508a7aeaf084e2aee1611 testsuite/tests/cabal/cabal09/all.T | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testsuite/tests/cabal/cabal09/all.T b/testsuite/tests/cabal/cabal09/all.T index e9c936b..438161b 100644 --- a/testsuite/tests/cabal/cabal09/all.T +++ b/testsuite/tests/cabal/cabal09/all.T @@ -4,7 +4,6 @@ else: cleanup = 'CLEANUP=0' test('cabal09', - [extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), - when(opsys('mingw32'), expect_broken(16386))], + extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), run_command, ['$MAKE -s --no-print-directory cabal09 ' + cleanup]) From git at git.haskell.org Wed Mar 6 21:49:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:11 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Don't mark T5836 as broken (8cbd07f) Message-ID: <20190306214911.EEFBD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/8cbd07f2ae8cd8da113e82a7ad2cc6b1d4706ab6/ghc >--------------------------------------------------------------- commit 8cbd07f2ae8cd8da113e82a7ad2cc6b1d4706ab6 Author: Ben Gamari Date: Tue Mar 5 22:47:59 2019 -0500 testsuite: Don't mark T5836 as broken I believe removing __mingw_vsnwprintf from RtsSymbols fixed #16387. >--------------------------------------------------------------- 8cbd07f2ae8cd8da113e82a7ad2cc6b1d4706ab6 testsuite/tests/ghci/scripts/all.T | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 6f9b18e..946c6ef 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -135,9 +135,7 @@ test('GhciKinds', normal, ghci_script, ['GhciKinds.script']) test('T5564', normal, ghci_script, ['T5564.script']) test('Defer02', extra_files(['../../typecheck/should_run/Defer01.hs']), ghci_script, ['Defer02.script']) test('T5820', normal, ghci_script, ['T5820.script']) -test('T5836', - when(opsys('mingw32'), expect_broken(16387)), - ghci_script, ['T5836.script']) +test('T5836', normal, ghci_script, ['T5836.script']) test('T5979', [reqlib('transformers'), normalise_slashes, From git at git.haskell.org Wed Mar 6 21:49:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:14 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges: Fix checkStackChunk() call in Interepter.c, enable an assertion (b0deeb5) Message-ID: <20190306214915.01A3F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.8-merges Link : http://ghc.haskell.org/trac/ghc/changeset/b0deeb5f96b5a5eeef812e2b228fe864ef4289d3/ghc >--------------------------------------------------------------- commit b0deeb5f96b5a5eeef812e2b228fe864ef4289d3 Author: Ömer Sinan Ağacan Date: Mon Feb 11 18:17:43 2019 +0300 Fix checkStackChunk() call in Interepter.c, enable an assertion Fixes #16303 (cherry picked from commit 6b890d76a252259843a6e87043f8f12e6a8a0aae) >--------------------------------------------------------------- b0deeb5f96b5a5eeef812e2b228fe864ef4289d3 rts/Interpreter.c | 2 +- rts/sm/Sanity.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/Interpreter.c b/rts/Interpreter.c index a3b179a..3450780 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -938,7 +938,7 @@ run_BCO_fun: Sp_subW(2); SpW(1) = (W_)obj; SpW(0) = (W_)&stg_apply_interp_info; - checkStackChunk(Sp,SpLim); + checkStackChunk(Sp, cap->r.rCurrentTSO->stackobj->stack+cap->r.rCurrentTSO->stackobj->stack_size); Sp_addW(2); ); diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 28c9b43..8082b7e 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -172,7 +172,7 @@ checkStackChunk( StgPtr sp, StgPtr stack_end ) while (p < stack_end) { p += checkStackFrame( p ); } - // ASSERT( p == stack_end ); -- HWL + ASSERT( p == stack_end ); } static void From git at git.haskell.org Wed Mar 6 21:49:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:18 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges: Cmm: Promote stack arguments to word size (dfef89d) Message-ID: <20190306214918.031A33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.8-merges Link : http://ghc.haskell.org/trac/ghc/changeset/dfef89d997c4289a851d611875327020b0f0b0a4/ghc >--------------------------------------------------------------- commit dfef89d997c4289a851d611875327020b0f0b0a4 Author: Peter Trommler Date: Thu Jan 31 09:43:08 2019 +0100 Cmm: Promote stack arguments to word size Smaller than word size integers must be promoted to word size when passed on the stack. While on little endian systems we can get away with writing a small integer to a word size stack slot and read it as a word ignoring the upper bits, on big endian systems a small integer write ends up in the most significant bits and a word size read that ignores the upper bits delivers a random value. On little endian systems a smaller than word size write to the stack might be more efficient but that decision is system specific and should be done as an optimization in the respective backends. Fixes #16258 (cherry picked from commit af7b0fdb64ad1c57f5829e8bd89e8e0fa96b11d2) >--------------------------------------------------------------- dfef89d997c4289a851d611875327020b0f0b0a4 compiler/cmm/MkGraph.hs | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs index bcd03bf..41526c7 100644 --- a/compiler/cmm/MkGraph.hs +++ b/compiler/cmm/MkGraph.hs @@ -327,7 +327,17 @@ copyIn dflags conv area formals extra_stk ci (reg, RegisterParam r) = CmmAssign (CmmLocal reg) (CmmReg (CmmGlobal r)) - ci (reg, StackParam off) = + ci (reg, StackParam off) + | isBitsType $ localRegType reg + , typeWidth (localRegType reg) < wordWidth dflags = + let + stack_slot = (CmmLoad (CmmStackSlot area off) (cmmBits $ wordWidth dflags)) + local = CmmLocal reg + width = cmmRegWidth dflags local + expr = CmmMachOp (MO_XX_Conv (wordWidth dflags) width) [stack_slot] + in CmmAssign local expr + + | otherwise = CmmAssign (CmmLocal reg) (CmmLoad (CmmStackSlot area off) ty) where ty = localRegType reg @@ -377,8 +387,16 @@ copyOutOflow dflags conv transfer area actuals updfr_off extra_stack_stuff co (v, RegisterParam r) (rs, ms) = (r:rs, mkAssign (CmmGlobal r) v <*> ms) + -- See Note [Width of parameters] co (v, StackParam off) (rs, ms) - = (rs, mkStore (CmmStackSlot area off) v <*> ms) + = (rs, mkStore (CmmStackSlot area off) (value v) <*> ms) + + width v = cmmExprWidth dflags v + value v + | isBitsType $ cmmExprType dflags v + , width v < wordWidth dflags = + CmmMachOp (MO_XX_Conv (width v) (wordWidth dflags)) [v] + | otherwise = v (setRA, init_offset) = case area of @@ -405,22 +423,26 @@ copyOutOflow dflags conv transfer area actuals updfr_off extra_stack_stuff -- Note [Width of parameters] -- --- Consider passing a small (< word width) primitive like Int8# to a function --- through a register. It's actually non-trivial to do this without --- extending/narrowing: +-- Consider passing a small (< word width) primitive like Int8# to a function. +-- It's actually non-trivial to do this without extending/narrowing: -- * Global registers are considered to have native word width (i.e., 64-bits on --- x86-64), so CmmLint would complain if we assigne an 8-bit parameter to a +-- x86-64), so CmmLint would complain if we assigned an 8-bit parameter to a -- global register. -- * Same problem exists with LLVM IR. -- * Lowering gets harder since on x86-32 not every register exposes its lower -- 8 bits (e.g., for %eax we can use %al, but there isn't a corresponding -- 8-bit register for %edi). So we would either need to extend/narrow anyway, -- or complicate the calling convention. +-- * Passing a small integer in a stack slot, which has native word width, +-- requires extending to word width when writing to the stack and narrowing +-- when reading off the stack (see #16258). -- So instead, we always extend every parameter smaller than native word width -- in copyOutOflow and then truncate it back to the expected width in copyIn. -- Note that we do this in cmm using MO_XX_Conv to avoid requiring -- zero-/sign-extending - it's up to a backend to handle this in a most --- efficient way (e.g., a simple register move) +-- efficient way (e.g., a simple register move or a smaller size store). +-- This convention (of ignoring the upper bits) is different from some C ABIs, +-- e.g. all PowerPC ELF ABIs, that require sign or zero extending parameters. -- -- There was some discussion about this on this PR: -- https://github.com/ghc-proposals/ghc-proposals/pull/74 From git at git.haskell.org Wed Mar 6 21:49:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:21 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges: Bump hsc2hs submodule (74430a5) Message-ID: <20190306214921.0D1373A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.8-merges Link : http://ghc.haskell.org/trac/ghc/changeset/74430a5315ad68a1aa9a09671b1c988a8665c45c/ghc >--------------------------------------------------------------- commit 74430a5315ad68a1aa9a09671b1c988a8665c45c Author: Ben Gamari Date: Mon Mar 4 17:59:33 2019 -0500 Bump hsc2hs submodule >--------------------------------------------------------------- 74430a5315ad68a1aa9a09671b1c988a8665c45c utils/hsc2hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/hsc2hs b/utils/hsc2hs index fac8b62..efb556c 160000 --- a/utils/hsc2hs +++ b/utils/hsc2hs @@ -1 +1 @@ -Subproject commit fac8b62e48f4c99cfe8f3efff63c8fcd94b2a1d6 +Subproject commit efb556cc2689cae42abadae87d778ae20fbc0a14 From git at git.haskell.org Wed Mar 6 21:49:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:24 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Make it build (ba52df2) Message-ID: <20190306214924.129573A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/ba52df2ca83d3e9cb5cb8e1d69dd25a9f7356384/ghc >--------------------------------------------------------------- commit ba52df2ca83d3e9cb5cb8e1d69dd25a9f7356384 Author: Moritz Angermann Date: Wed Mar 6 15:24:08 2019 +0800 Make it build >--------------------------------------------------------------- ba52df2ca83d3e9cb5cb8e1d69dd25a9f7356384 ghc/ghc.mk | 6 ++++++ libraries/ghc-prim/ghc.mk | 2 +- {compiler => rts/build}/HsVersions.h | 0 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc/ghc.mk b/ghc/ghc.mk index 8099fe2..05354fb 100644 --- a/ghc/ghc.mk +++ b/ghc/ghc.mk @@ -178,6 +178,12 @@ INSTALL_LIBS += settings INSTALL_LIBS += llvm-targets INSTALL_LIBS += llvm-passes +# A rather nasty hack needed because we still have headers in +# ghc-prim and rts. +ghc_stage1_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-boot +ghc_stage2_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-install +ghc_stage3_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-install + ifeq "$(Windows_Host)" "NO" install: install_ghc_link .PHONY: install_ghc_link diff --git a/libraries/ghc-prim/ghc.mk b/libraries/ghc-prim/ghc.mk index f865c0f..87f676f 100644 --- a/libraries/ghc-prim/ghc.mk +++ b/libraries/ghc-prim/ghc.mk @@ -13,7 +13,7 @@ define libraries/ghc-prim_PACKAGE_MAGIC libraries/ghc-prim_dist-install_MODULES := $$(filter-out GHC.Prim,$$(libraries/ghc-prim_dist-install_MODULES)) endef -PRIMOPS_TXT_STAGE1 = libraries/ghc-prim/dist-boot/build/primops.txt +PRIMOPS_TXT_STAGE1 = libraries/ghc-prim/dist-boot/primops.txt libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs : $$(genprimopcode_INPLACE) $(PRIMOPS_TXT_STAGE1) | $$(dir $$@)/. "$(genprimopcode_INPLACE)" --make-haskell-wrappers < $(PRIMOPS_TXT_STAGE1) >$@ diff --git a/compiler/HsVersions.h b/rts/build/HsVersions.h similarity index 100% rename from compiler/HsVersions.h rename to rts/build/HsVersions.h From git at git.haskell.org Wed Mar 6 21:49:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:27 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Migrate flag logic from ghc to ghc-prim; add HsVersion.h to rts (1e1bb0d) Message-ID: <20190306214927.1AF9F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/1e1bb0dc059a190786d49d244a2c5c6386984e42/ghc >--------------------------------------------------------------- commit 1e1bb0dc059a190786d49d244a2c5c6386984e42 Author: Moritz Angermann Date: Wed Mar 6 16:35:08 2019 +0800 Migrate flag logic from ghc to ghc-prim; add HsVersion.h to rts >--------------------------------------------------------------- 1e1bb0dc059a190786d49d244a2c5c6386984e42 ghc/ghc.mk | 4 ---- libraries/ghc-prim/ghc-prim.cabal | 16 ++++++++++++++++ libraries/ghc-prim/ghc.mk | 5 +++++ rts/rts.cabal.in | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ghc/ghc.mk b/ghc/ghc.mk index 05354fb..b062443 100644 --- a/ghc/ghc.mk +++ b/ghc/ghc.mk @@ -14,10 +14,6 @@ ghc_USES_CABAL = YES ghc_PACKAGE = ghc-bin ghc_EXECUTABLE = ghc -ghc_stage1_CONFIGURE_OPTS += --flags=stage1 -ghc_stage2_CONFIGURE_OPTS += --flags=stage2 -ghc_stage3_CONFIGURE_OPTS += --flags=stage3 - ifeq "$(GhcWithInterpreter)" "YES" ghc_stage2_CONFIGURE_OPTS += --flags=ghci ghc_stage3_CONFIGURE_OPTS += --flags=ghci diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index 3bc849b..1432360 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -12,6 +12,16 @@ build-type: Custom description: This package contains the primitive types and operations supplied by GHC. +Flag boot + Description: Is this stage 1? + Default: False + Manual: True + +Flag install + Description: Is this stage 2? + Default: True + Manual: True + extra-source-files: changelog.md source-repository head @@ -82,6 +92,12 @@ Library -- as it's magic. ghc-options: -this-unit-id ghc-prim + if flag(boot) + include-dirs: dist-boot + else + if flag(install) + include-dirs: dist-install + install-includes: primop-data-decl.hs-incl primop-tag.hs-incl diff --git a/libraries/ghc-prim/ghc.mk b/libraries/ghc-prim/ghc.mk index 87f676f..5b09478 100644 --- a/libraries/ghc-prim/ghc.mk +++ b/libraries/ghc-prim/ghc.mk @@ -1,6 +1,11 @@ libraries/ghc-prim_PACKAGE = ghc-prim libraries/ghc-prim_dist-install_GROUP = libraries +libraries/ghc-prim_stage1_CONFIGURE_OPTS += --flags=boot +libraries/ghc-prim_stage2_CONFIGURE_OPTS += --flags=install +libraries/ghc-prim_stage3_CONFIGURE_OPTS += --flags=install + + # ---------------------------------------- # Special magic for the ghc-prim package diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index 4ad733d..23a32ac 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -124,6 +124,7 @@ library CodeGen.Platform.hs platformConstants config.hs-incl + HsVersions.h -- ^ generated rts/Adjustor.h rts/BlockSignals.h From git at git.haskell.org Wed Mar 6 21:49:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:30 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: drop stage logic from ghc.cabal (4b13d8f) Message-ID: <20190306214930.231503A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/4b13d8fb93fd770ce9e74b88f03af07aea81f26f/ghc >--------------------------------------------------------------- commit 4b13d8fb93fd770ce9e74b88f03af07aea81f26f Author: Moritz Angermann Date: Wed Mar 6 17:06:16 2019 +0800 drop stage logic from ghc.cabal >--------------------------------------------------------------- 4b13d8fb93fd770ce9e74b88f03af07aea81f26f compiler/ghc.cabal.in | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index a02ce12..f2b8483 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -25,21 +25,6 @@ Flag ghci Default: False Manual: True -Flag stage1 - Description: Is this stage 1? - Default: False - Manual: True - -Flag stage2 - Description: Is this stage 2? - Default: False - Manual: True - -Flag stage3 - Description: Is this stage 3? - Default: False - Manual: True - Flag terminfo Description: Build GHC with terminfo support on non-Windows platforms. Default: True @@ -143,17 +128,6 @@ Library -- as it's magic. GHC-Options: -this-unit-id ghc - if flag(stage1) - Include-Dirs: stage1 - else - if flag(stage2) - Include-Dirs: stage2 - else - if flag(stage3) - Include-Dirs: stage2 - - Install-Includes: HsVersions.h, ghc_boot_platform.h - c-sources: parser/cutils.c ghci/keepCAFsForGHCi.c From git at git.haskell.org Wed Mar 6 21:49:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:33 +0000 (UTC) Subject: [commit: ghc] wip/andrey/drop-symlink-traversal: Hadrian: Drop remaining symlink traversal code from build scripts (3ed7777) Message-ID: <20190306214933.2E13B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/drop-symlink-traversal Link : http://ghc.haskell.org/trac/ghc/changeset/3ed77774bd07a85ffedb085d7cfe11809e1d2f0f/ghc >--------------------------------------------------------------- commit 3ed77774bd07a85ffedb085d7cfe11809e1d2f0f Author: Andrey Mokhov Date: Wed Mar 6 13:42:27 2019 +0000 Hadrian: Drop remaining symlink traversal code from build scripts This partly resolves #16325 (https://ghc.haskell.org/trac/ghc/ticket/16325). As previously discussed in https://github.com/snowleopard/hadrian/issues/667, we do not need the symlink traversal code in build scripts. However, it appears we forgot to delete this code from our Stack-based build scripts, which led to placing all build artefacts in an unexpected location when using Hadrian in combination with symlink trees. This commit fixes this. >--------------------------------------------------------------- 3ed77774bd07a85ffedb085d7cfe11809e1d2f0f hadrian/build.stack.nix.sh | 32 +------------------------------- hadrian/build.stack.sh | 38 +++++--------------------------------- 2 files changed, 6 insertions(+), 64 deletions(-) diff --git a/hadrian/build.stack.nix.sh b/hadrian/build.stack.nix.sh index 59ac061..b30c114 100755 --- a/hadrian/build.stack.nix.sh +++ b/hadrian/build.stack.nix.sh @@ -1,33 +1,3 @@ #!/usr/bin/env bash -set -euo pipefail - -# readlink on os x, doesn't support -f, to prevent the -# need of installing coreutils (e.g. through brew, just -# for readlink, we use the follownig substitute. -# -# source: http://stackoverflow.com/a/1116890 -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")")" - -HADRIAN_NIX=YES ${absoluteRoot}/build.stack.sh +HADRIAN_NIX=YES hadrian/build.stack.sh diff --git a/hadrian/build.stack.sh b/hadrian/build.stack.sh index 2e6c444..1f59843 100755 --- a/hadrian/build.stack.sh +++ b/hadrian/build.stack.sh @@ -1,38 +1,10 @@ #!/usr/bin/env bash -set -euo pipefail - -# readlink on os x, doesn't support -f, to prevent the -# need of installing coreutils (e.g. through brew, just -# for readlink, we use the follownig substitute. -# -# source: http://stackoverflow.com/a/1116890 -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")")" -cd "$absoluteRoot" - +# Make sure Hadrian is up-to-date +cd hadrian stack build --no-library-profiling ${HADRIAN_NIX:+--nix} -stack exec hadrian -- \ - --directory "$absoluteRoot/.." \ +# Run Hadrian in the top-level GHC directory +stack exec hadrian -- \ + --directory ".." \ "$@" From git at git.haskell.org Wed Mar 6 21:49:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:36 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Make sure headers are copied properly. (e40e8ff) Message-ID: <20190306214936.33B133A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/e40e8ff49f28305c237012762203294117b54343/ghc >--------------------------------------------------------------- commit e40e8ff49f28305c237012762203294117b54343 Author: Moritz Angermann Date: Wed Mar 6 21:51:47 2019 +0800 Make sure headers are copied properly. >--------------------------------------------------------------- e40e8ff49f28305c237012762203294117b54343 includes/ghc.mk | 2 ++ libraries/ghc-prim/ghc-prim.cabal | 1 + 2 files changed, 3 insertions(+) diff --git a/includes/ghc.mk b/includes/ghc.mk index d08ecfb..0b3fcf0 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -229,4 +229,6 @@ install_includes : $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$d/*.h "$(DESTDIR)$(ghcheaderdir)/$d/" && \ ) true $(INSTALL_HEADER) $(INSTALL_OPTS) $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_VERSION) $(includes_DERIVEDCONSTANTS) "$(DESTDIR)$(ghcheaderdir)/" + $(INSTALL_HEADER) rts/build/*.h rts/build/*.hs-incl includes/CodeGen.Platform.hs "$(DESTDIR)$(ghcheaderdir)/" + $(INSTALL_HEADER $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_GHCCONSTANTS_HASKELL_WRAPPERS) $(includes_GHCCONSTANTS_HASKELL_EXPORTS) "$(DESTDIR)$(ghcheaderdir)/" diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index 1432360..132fe12 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -99,6 +99,7 @@ Library include-dirs: dist-install install-includes: + ghc_boot_platform.h primop-data-decl.hs-incl primop-tag.hs-incl primop-list.hs-incl From git at git.haskell.org Wed Mar 6 21:49:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:39 +0000 (UTC) Subject: [commit: ghc] master: Handle absolute paths to build roots in Hadrian. (2ff77b9) Message-ID: <20190306214939.3D2843A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2ff77b9894eecf51fa619ed2266ca196e296cd1e/ghc >--------------------------------------------------------------- commit 2ff77b9894eecf51fa619ed2266ca196e296cd1e Author: P.C. Shyamshankar Date: Thu Jan 24 13:07:34 2019 -0500 Handle absolute paths to build roots in Hadrian. Fixes #16187. This patch fixes various path concatenation issues to allow functioning builds with hadrian when the build root location is specified with an absolute path. Remarks: - The path concatenation operator (-/-) now handles absolute second operands appropriately. Its behavior should match that of POSIX () in this regard. - The `getDirectoryFiles*` family of functions only searches for matches under the directory tree rooted by its first argument; all of the results are also relative to this root. If the first argument is the empty string, the current working directory is used. This patch passes the appropriate directory (almost always either `top` or `root`), and subsequently attaches that directory prefix so that the paths refer to the appropriate files. - Windows `tar` does not like colons (':') in paths to archive files, it tries to resolve them as remote paths. The `--force-local` option remedies this, and is applied on windows builds. >--------------------------------------------------------------- 2ff77b9894eecf51fa619ed2266ca196e296cd1e hadrian/hadrian.cabal | 1 + hadrian/src/Hadrian/Builder/Tar.hs | 2 ++ hadrian/src/Hadrian/Utilities.hs | 1 + hadrian/src/Rules/Gmp.hs | 11 ++++++----- hadrian/src/Rules/Libffi.hs | 10 +++++----- hadrian/src/Rules/Selftest.hs | 14 ++++++++++++++ 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index 56c68aa..a5a1ead 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -121,6 +121,7 @@ executable hadrian , containers >= 0.5 && < 0.7 , directory >= 1.2 && < 1.4 , extra >= 1.4.7 + , filepath , mtl == 2.2.* , parsec >= 3.1 && < 3.2 , QuickCheck >= 2.6 && < 2.13 diff --git a/hadrian/src/Hadrian/Builder/Tar.hs b/hadrian/src/Hadrian/Builder/Tar.hs index 75cf725..1d8f502 100644 --- a/hadrian/src/Hadrian/Builder/Tar.hs +++ b/hadrian/src/Hadrian/Builder/Tar.hs @@ -14,6 +14,7 @@ import Development.Shake import Development.Shake.Classes import GHC.Generics import Hadrian.Expression +import Oracles.Setting -- | Tar can be used to 'Create' an archive or 'Extract' from it. data TarMode = Create | Extract deriving (Eq, Generic, Show) @@ -34,6 +35,7 @@ args Create = mconcat , getInputs ] args Extract = mconcat [ arg "-x" + , windowsHost ? arg "--force-local" , input "*.gz" ? arg "--gzip" , input "*.bz2" ? arg "--bzip2" , input "*.xz" ? arg "--xz" diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs index 3e5d7b3..e5fc712 100644 --- a/hadrian/src/Hadrian/Utilities.hs +++ b/hadrian/src/Hadrian/Utilities.hs @@ -133,6 +133,7 @@ unifyPath = toStandard . normaliseEx -- | Combine paths with a forward slash regardless of platform. (-/-) :: FilePath -> FilePath -> FilePath +_ -/- b | isAbsolute b && not (isAbsolute $ tail b) = b "" -/- b = b a -/- b | last a == '/' = a ++ b diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs index a78170c..e4f7e53 100644 --- a/hadrian/src/Rules/Gmp.hs +++ b/hadrian/src/Rules/Gmp.hs @@ -15,8 +15,8 @@ gmpObjects = do -- The line below causes a Shake Lint failure on Windows, which forced us to -- disable Lint by default. See more details here: -- https://ghc.haskell.org/trac/ghc/ticket/15971. - map unifyPath <$> - liftIO (getDirectoryFilesIO "" [gmpPath -/- gmpObjectsDir -/- "*.o"]) + map (unifyPath . (gmpPath -/-)) <$> + liftIO (getDirectoryFilesIO gmpPath [gmpObjectsDir -/- "*.o"]) gmpBase :: FilePath gmpBase = pkgPath integerGmp -/- "gmp" @@ -103,18 +103,19 @@ gmpRules = do -- Extract in-tree GMP sources and apply patches fmap (gmpPath -/-) ["Makefile.in", "configure"] &%> \_ -> do + top <- topDirectory removeDirectory gmpPath -- Note: We use a tarball like gmp-4.2.4-nodoc.tar.bz2, which is -- gmp-4.2.4.tar.bz2 repacked without the doc/ directory contents. -- That's because the doc/ directory contents are under the GFDL, -- which causes problems for Debian. tarball <- unifyPath . fromSingleton "Exactly one GMP tarball is expected" - <$> getDirectoryFiles "" [gmpBase -/- "gmp-tarballs/gmp*.tar.bz2"] + <$> getDirectoryFiles top [gmpBase -/- "gmp-tarballs/gmp*.tar.bz2"] withTempDir $ \dir -> do let tmp = unifyPath dir - need [tarball] - build $ target gmpContext (Tar Extract) [tarball] [tmp] + need [top -/- tarball] + build $ target gmpContext (Tar Extract) [top -/- tarball] [tmp] let patch = gmpBase -/- "gmpsrc.patch" patchName = takeFileName patch diff --git a/hadrian/src/Rules/Libffi.hs b/hadrian/src/Rules/Libffi.hs index 64f6303..5b25aab 100644 --- a/hadrian/src/Rules/Libffi.hs +++ b/hadrian/src/Rules/Libffi.hs @@ -114,10 +114,10 @@ libffiRules = forM_ [Stage1 ..] $ \stage -> do build $ target context (Make libffiPath) [] [] -- Here we produce 'libffiDependencies' - headers <- liftIO $ getDirectoryFilesIO "" [libffiPath -/- "inst/include/*"] + headers <- liftIO $ getDirectoryFilesIO libffiPath ["inst/include/*"] forM_ headers $ \header -> do let target = rtsPath -/- takeFileName header - copyFileUntracked header target + copyFileUntracked (libffiPath -/- header) target produces [target] -- Find ways. @@ -171,10 +171,11 @@ libffiRules = forM_ [Stage1 ..] $ \stage -> do -- Extract libffi tar file context <- libffiContext stage removeDirectory libffiPath + top <- topDirectory tarball <- unifyPath . fromSingleton "Exactly one LibFFI tarball is expected" - <$> getDirectoryFiles "" ["libffi-tarballs/libffi*.tar.gz"] + <$> getDirectoryFiles top ["libffi-tarballs/libffi*.tar.gz"] - need [tarball] + need [top -/- tarball] -- Go from 'libffi-3.99999+git20171002+77e130c.tar.gz' to 'libffi-3.99999' let libname = takeWhile (/= '+') $ takeFileName tarball @@ -187,7 +188,6 @@ libffiRules = forM_ [Stage1 ..] $ \stage -> do -- And finally: removeFiles (path) [libname "*"] - top <- topDirectory fixFile mkIn (fixLibffiMakefile top) files <- liftIO $ getDirectoryFilesIO "." [libffiPath "*"] diff --git a/hadrian/src/Rules/Selftest.hs b/hadrian/src/Rules/Selftest.hs index 68aa6e3..b931f85 100644 --- a/hadrian/src/Rules/Selftest.hs +++ b/hadrian/src/Rules/Selftest.hs @@ -13,6 +13,8 @@ import Settings import Target import Utilities +import qualified System.FilePath.Posix as Posix (()) + instance Arbitrary Way where arbitrary = wayFromUnits <$> arbitrary @@ -31,6 +33,7 @@ selftestRules = testLookupAll testModuleName testPackages + testPaths testWay testBuilder :: Action () @@ -111,3 +114,14 @@ testWay :: Action () testWay = do putBuild "==== Read Way, Show Way" test $ \(x :: Way) -> read (show x) == x + +testPaths :: Action () +testPaths = do + putBuild "==== Absolute, Relative Path Concatenation" + test $ forAll paths $ \(path1, path2) -> + path1 -/- path2 == path1 Posix. path2 + where + paths = (,) <$> path <*> path + path = frequency [(1, relativePath), (1, absolutePath)] + relativePath = intercalate "/" <$> listOf1 (elements ["a"]) + absolutePath = ('/':) <$> relativePath From git at git.haskell.org Wed Mar 6 21:49:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:42 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: Fix header locations (6185bf4) Message-ID: <20190306214942.561A63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/6185bf466179d6134fc2ebef6520cd5e9d342592/ghc >--------------------------------------------------------------- commit 6185bf466179d6134fc2ebef6520cd5e9d342592 Author: Moritz Angermann Date: Wed Mar 6 22:45:06 2019 +0800 Fix header locations >--------------------------------------------------------------- 6185bf466179d6134fc2ebef6520cd5e9d342592 compiler/cmm/SMRep.hs | 4 ++-- compiler/codeGen/CodeGen/Platform/ARM.hs | 2 +- compiler/codeGen/CodeGen/Platform/ARM64.hs | 2 +- compiler/codeGen/CodeGen/Platform/NoRegs.hs | 2 +- compiler/codeGen/CodeGen/Platform/PPC.hs | 2 +- compiler/codeGen/CodeGen/Platform/SPARC.hs | 2 +- compiler/codeGen/CodeGen/Platform/X86.hs | 2 +- compiler/codeGen/CodeGen/Platform/X86_64.hs | 2 +- compiler/codeGen/StgCmmClosure.hs | 2 +- compiler/codeGen/StgCmmLayout.hs | 2 +- compiler/ghc.cabal.in | 6 ++++++ compiler/ghci/ByteCodeInstr.hs | 2 +- compiler/nativeGen/PPC/CodeGen.hs | 2 +- compiler/nativeGen/SPARC/CodeGen.hs | 2 +- compiler/nativeGen/X86/CodeGen.hs | 2 +- compiler/prelude/PrelRules.hs | 2 +- compiler/utils/Binary.hs | 2 +- includes/ghc.mk | 2 +- utils/genapply/Main.hs | 2 +- 19 files changed, 25 insertions(+), 19 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 6185bf466179d6134fc2ebef6520cd5e9d342592 From git at git.haskell.org Wed Mar 6 21:49:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:45 +0000 (UTC) Subject: [commit: ghc] wip/angerman/reinstallable-lib-ghc: WIP (ea44590) Message-ID: <20190306214945.5B8533A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/ea4459086544d414c1b5ebe2a7381b6edd60ff5d/ghc >--------------------------------------------------------------- commit ea4459086544d414c1b5ebe2a7381b6edd60ff5d Author: Moritz Angermann Date: Wed Mar 6 23:03:25 2019 +0800 WIP >--------------------------------------------------------------- ea4459086544d414c1b5ebe2a7381b6edd60ff5d utils/genapply/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs index a640ffb..5d4d730 100644 --- a/utils/genapply/Main.hs +++ b/utils/genapply/Main.hs @@ -17,7 +17,7 @@ module Main(main) where #include "../../includes/rts/Constants.h" -- Needed for TAG_BITS -#include "../MachDeps.h" +#include "MachDeps.h" import Prelude hiding ((<>)) From git at git.haskell.org Wed Mar 6 21:49:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:49 +0000 (UTC) Subject: [commit: ghc] wip/T16394: testsuite: Add testcase for #16394 (633c43e) Message-ID: <20190306214949.3A4A13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16394 Link : http://ghc.haskell.org/trac/ghc/changeset/633c43e3ad8eb5725b92b4c359e45ab8133060a3/ghc >--------------------------------------------------------------- commit 633c43e3ad8eb5725b92b4c359e45ab8133060a3 Author: Ben Gamari Date: Tue Mar 5 20:33:51 2019 -0500 testsuite: Add testcase for #16394 >--------------------------------------------------------------- 633c43e3ad8eb5725b92b4c359e45ab8133060a3 testsuite/tests/typecheck/should_fail/T16394.hs | 12 ++++++++++++ .../T5951.stderr => typecheck/should_fail/T16394.stderr} | 5 ++--- testsuite/tests/typecheck/should_fail/all.T | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/typecheck/should_fail/T16394.hs b/testsuite/tests/typecheck/should_fail/T16394.hs new file mode 100644 index 0000000..76ca7a7 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16394.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-} + +class C a where + type T (n :: a) + +instance C a => C b => C (a, b) where + type T '(n, m) = (T n, T m) + +-- but this worked fine: +-- +-- instance (C a, C b) => C (a, b) where +-- type T '(n, m) = (T n, T m) diff --git a/testsuite/tests/rename/should_fail/T5951.stderr b/testsuite/tests/typecheck/should_fail/T16394.stderr similarity index 57% copy from testsuite/tests/rename/should_fail/T5951.stderr copy to testsuite/tests/typecheck/should_fail/T16394.stderr index b325493..fff51a6 100644 --- a/testsuite/tests/rename/should_fail/T5951.stderr +++ b/testsuite/tests/typecheck/should_fail/T16394.stderr @@ -1,6 +1,5 @@ - -T5951.hs:8:8: error: - Illegal class instance: ‘A => B => C’ +T16394.hs:6:10: error: + Illegal class instance: ‘C a => C b => C (a, b)’ Class instances must be of the form context => C ty_1 ... ty_n where ‘C’ is a class diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 1a775d3..b92d99c 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -510,3 +510,4 @@ test('T16059e', [extra_files(['T16059b.hs'])], multimod_compile_fail, ['T16059e', '-v0']) test('T16255', normal, compile_fail, ['']) test('T16204c', normal, compile_fail, ['']) +test('T16394', normal, compile, ['']) From git at git.haskell.org Wed Mar 6 21:49:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:52 +0000 (UTC) Subject: [commit: ghc] master: rts: Unglobalize dead_weak_ptr_list and resurrected_threads (5aab1d9) Message-ID: <20190306214952.4405B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5aab1d9ca927a058135ca9a08c10ea3474cbe251/ghc >--------------------------------------------------------------- commit 5aab1d9ca927a058135ca9a08c10ea3474cbe251 Author: Ömer Sinan Ağacan Date: Tue Feb 5 12:45:17 2019 -0500 rts: Unglobalize dead_weak_ptr_list and resurrected_threads In the concurrent nonmoving collector we will need the ability to call `traverseWeakPtrList` concurrently with minor generation collections. This global state stands in the way of this. However, refactoring it away is straightforward since this list only persists the length of a single GC. >--------------------------------------------------------------- 5aab1d9ca927a058135ca9a08c10ea3474cbe251 rts/sm/Compact.c | 2 +- rts/sm/Compact.h | 4 +++- rts/sm/GC.c | 9 +++++++-- rts/sm/MarkWeak.c | 30 +++++++++++------------------- rts/sm/MarkWeak.h | 2 +- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 004e042..bd45489 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -940,7 +940,7 @@ update_bkwd_compact( generation *gen ) } void -compact(StgClosure *static_objects) +compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurrected_threads) { W_ n, g, blocks; generation *gen; diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h index 63abfc7..ba39c30 100644 --- a/rts/sm/Compact.h +++ b/rts/sm/Compact.h @@ -45,6 +45,8 @@ is_marked(StgPtr p, bdescr *bd) return (*bitmap_word & bit_mask); } -void compact (StgClosure *static_objects); +void compact (StgClosure *static_objects, + StgWeak *dead_weak_ptr_list, + StgTSO *resurrected_threads); #include "EndPrivate.h" diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 70d6d8e..b3cc448 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -416,15 +416,20 @@ GarbageCollect (uint32_t collect_gen, * Repeatedly scavenge all the areas we know about until there's no * more scavenging to be done. */ + + StgWeak *dead_weak_ptr_list = NULL; + StgTSO *resurrected_threads = END_TSO_QUEUE; + for (;;) { scavenge_until_all_done(); + // The other threads are now stopped. We might recurse back to // here, but from now on this is the only thread. // must be last... invariant is that everything is fully // scavenged at this point. - if (traverseWeakPtrList()) { // returns true if evaced something + if (traverseWeakPtrList(&dead_weak_ptr_list, &resurrected_threads)) { // returns true if evaced something inc_running(); continue; } @@ -468,7 +473,7 @@ GarbageCollect (uint32_t collect_gen, // Finally: compact or sweep the oldest generation. if (major_gc && oldest_gen->mark) { if (oldest_gen->compact) - compact(gct->scavenged_static_objects); + compact(gct->scavenged_static_objects, dead_weak_ptr_list, resurrected_threads); else sweep(oldest_gen); } diff --git a/rts/sm/MarkWeak.c b/rts/sm/MarkWeak.c index d7b8fe6..3aa2887 100644 --- a/rts/sm/MarkWeak.c +++ b/rts/sm/MarkWeak.c @@ -77,15 +77,9 @@ typedef enum { WeakPtrs, WeakThreads, WeakDone } WeakStage; static WeakStage weak_stage; -// List of weak pointers whose key is dead -StgWeak *dead_weak_ptr_list; - -// List of threads found to be unreachable -StgTSO *resurrected_threads; - -static void collectDeadWeakPtrs (generation *gen); +static void collectDeadWeakPtrs (generation *gen, StgWeak **dead_weak_ptr_list); static bool tidyWeakList (generation *gen); -static bool resurrectUnreachableThreads (generation *gen); +static bool resurrectUnreachableThreads (generation *gen, StgTSO **resurrected_threads); static void tidyThreadList (generation *gen); void @@ -100,12 +94,10 @@ initWeakForGC(void) } weak_stage = WeakThreads; - dead_weak_ptr_list = NULL; - resurrected_threads = END_TSO_QUEUE; } bool -traverseWeakPtrList(void) +traverseWeakPtrList(StgWeak **dead_weak_ptr_list, StgTSO **resurrected_threads) { bool flag = false; @@ -140,7 +132,7 @@ traverseWeakPtrList(void) // Resurrect any threads which were unreachable for (g = 0; g <= N; g++) { - if (resurrectUnreachableThreads(&generations[g])) { + if (resurrectUnreachableThreads(&generations[g], resurrected_threads)) { flag = true; } } @@ -175,7 +167,7 @@ traverseWeakPtrList(void) */ if (flag == false) { for (g = 0; g <= N; g++) { - collectDeadWeakPtrs(&generations[g]); + collectDeadWeakPtrs(&generations[g], dead_weak_ptr_list); } weak_stage = WeakDone; // *now* we're done, @@ -190,7 +182,7 @@ traverseWeakPtrList(void) } } -static void collectDeadWeakPtrs (generation *gen) +static void collectDeadWeakPtrs (generation *gen, StgWeak **dead_weak_ptr_list) { StgWeak *w, *next_w; for (w = gen->old_weak_ptr_list; w != NULL; w = next_w) { @@ -201,12 +193,12 @@ static void collectDeadWeakPtrs (generation *gen) } evacuate(&w->finalizer); next_w = w->link; - w->link = dead_weak_ptr_list; - dead_weak_ptr_list = w; + w->link = *dead_weak_ptr_list; + *dead_weak_ptr_list = w; } } -static bool resurrectUnreachableThreads (generation *gen) +static bool resurrectUnreachableThreads (generation *gen, StgTSO **resurrected_threads) { StgTSO *t, *tmp, *next; bool flag = false; @@ -225,8 +217,8 @@ static bool resurrectUnreachableThreads (generation *gen) default: tmp = t; evacuate((StgClosure **)&tmp); - tmp->global_link = resurrected_threads; - resurrected_threads = tmp; + tmp->global_link = *resurrected_threads; + *resurrected_threads = tmp; flag = true; } } diff --git a/rts/sm/MarkWeak.h b/rts/sm/MarkWeak.h index cd58ec9..2756cb0 100644 --- a/rts/sm/MarkWeak.h +++ b/rts/sm/MarkWeak.h @@ -19,7 +19,7 @@ extern StgTSO *resurrected_threads; void collectFreshWeakPtrs ( void ); void initWeakForGC ( void ); -bool traverseWeakPtrList ( void ); +bool traverseWeakPtrList ( StgWeak **dead_weak_ptr_list, StgTSO **resurrected_threads ); void markWeakPtrList ( void ); void scavengeLiveWeak ( StgWeak * ); From git at git.haskell.org Wed Mar 6 21:49:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:55 +0000 (UTC) Subject: [commit: ghc] master: Fix it (a4944d8) Message-ID: <20190306214955.500D53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a4944d8d98770b869f6aa5fb667877c56c3f8825/ghc >--------------------------------------------------------------- commit a4944d8d98770b869f6aa5fb667877c56c3f8825 Author: Ben Gamari Date: Tue Mar 5 00:07:06 2019 -0500 Fix it >--------------------------------------------------------------- a4944d8d98770b869f6aa5fb667877c56c3f8825 rts/sm/Compact.c | 8 +++++--- rts/sm/Compact.h | 4 ++-- rts/sm/GC.c | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index bd45489..77523ae 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -940,7 +940,9 @@ update_bkwd_compact( generation *gen ) } void -compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurrected_threads) +compact(StgClosure *static_objects, + StgWeak **dead_weak_ptr_list, + StgTSO **resurrected_threads) { W_ n, g, blocks; generation *gen; @@ -958,7 +960,7 @@ compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurre } if (dead_weak_ptr_list != NULL) { - thread((void *)&dead_weak_ptr_list); // tmp + thread((void *)dead_weak_ptr_list); // tmp } // mutable lists @@ -981,7 +983,7 @@ compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurre } // any threads resurrected during this GC - thread((void *)&resurrected_threads); + thread((void *)resurrected_threads); // the task list { diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h index ba39c30..570de7a 100644 --- a/rts/sm/Compact.h +++ b/rts/sm/Compact.h @@ -46,7 +46,7 @@ is_marked(StgPtr p, bdescr *bd) } void compact (StgClosure *static_objects, - StgWeak *dead_weak_ptr_list, - StgTSO *resurrected_threads); + StgWeak **dead_weak_ptr_list, + StgTSO **resurrected_threads); #include "EndPrivate.h" diff --git a/rts/sm/GC.c b/rts/sm/GC.c index b3cc448..0544fd2 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -473,7 +473,9 @@ GarbageCollect (uint32_t collect_gen, // Finally: compact or sweep the oldest generation. if (major_gc && oldest_gen->mark) { if (oldest_gen->compact) - compact(gct->scavenged_static_objects, dead_weak_ptr_list, resurrected_threads); + compact(gct->scavenged_static_objects, + &dead_weak_ptr_list, + &resurrected_threads); else sweep(oldest_gen); } From git at git.haskell.org Wed Mar 6 21:49:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:49:59 +0000 (UTC) Subject: [commit: ghc] master: Fix #16385 by appending _maybe to a use of lookupGlobalOcc (78dd04f) Message-ID: <20190306214959.354683A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/78dd04f9126dc5df966070b8db4b39a517a9d99f/ghc >--------------------------------------------------------------- commit 78dd04f9126dc5df966070b8db4b39a517a9d99f Author: Ryan Scott Date: Mon Mar 4 09:52:14 2019 -0500 Fix #16385 by appending _maybe to a use of lookupGlobalOcc `instance forall c. c` claimed that `c` was out of scope because the renamer was invoking `lookupGlobalOcc` on `c` (in `RnNames.getLocalNonValBinders`) without binding `c` first. To avoid this, this patch changes GHC to invoke `lookupGlobalOcc_maybe` on `c` instead, and if that returns `Nothing`, then bail out, resulting in a better error message. >--------------------------------------------------------------- 78dd04f9126dc5df966070b8db4b39a517a9d99f compiler/rename/RnNames.hs | 32 ++++++++++++++++++------ testsuite/tests/rename/should_fail/T16385.hs | 5 ++++ testsuite/tests/rename/should_fail/T16385.stderr | 8 ++++++ testsuite/tests/rename/should_fail/all.T | 1 + 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs index 09fa815..08f1007 100644 --- a/compiler/rename/RnNames.hs +++ b/compiler/rename/RnNames.hs @@ -733,14 +733,30 @@ getLocalNonValBinders fixity_env ; return ([avail], flds) } new_assoc overload_ok (L _ (ClsInstD _ (ClsInstDecl { cid_poly_ty = inst_ty , cid_datafam_insts = adts }))) - | Just (L loc cls_rdr) <- getLHsInstDeclClass_maybe inst_ty - = do { cls_nm <- setSrcSpan loc $ lookupGlobalOccRn cls_rdr - ; (avails, fldss) - <- mapAndUnzipM (new_loc_di overload_ok (Just cls_nm)) adts - ; return (avails, concat fldss) } - | otherwise - = return ([], []) -- Do not crash on ill-formed instances - -- Eg instance !Show Int Trac #3811c + = do -- First, attempt to grab the name of the class from the instance. + -- This step could fail if the instance is not headed by a class, + -- such as in the following examples: + -- + -- (1) The class is headed by a bang pattern, such as in + -- `instance !Show Int` (Trac #3811c) + -- (2) The class is headed by a type variable, such as in + -- `instance c` (Trac #16385) + -- + -- If looking up the class name fails, then mb_cls_nm will + -- be Nothing. + mb_cls_nm <- runMaybeT $ do + -- See (1) above + L loc cls_rdr <- MaybeT $ pure $ getLHsInstDeclClass_maybe inst_ty + -- See (2) above + MaybeT $ setSrcSpan loc $ lookupGlobalOccRn_maybe cls_rdr + -- Assuming the previous step succeeded, process any associated data + -- family instances. If the previous step failed, bail out. + case mb_cls_nm of + Nothing -> pure ([], []) + Just cls_nm -> do + (avails, fldss) + <- mapAndUnzipM (new_loc_di overload_ok (Just cls_nm)) adts + pure (avails, concat fldss) new_assoc _ (L _ (ClsInstD _ (XClsInstDecl _))) = panic "new_assoc" new_assoc _ (L _ (XInstDecl _)) = panic "new_assoc" diff --git a/testsuite/tests/rename/should_fail/T16385.hs b/testsuite/tests/rename/should_fail/T16385.hs new file mode 100644 index 0000000..174d406 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16385.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE ScopedTypeVariables #-} +module T16385 where + +instance c +instance forall c. c diff --git a/testsuite/tests/rename/should_fail/T16385.stderr b/testsuite/tests/rename/should_fail/T16385.stderr new file mode 100644 index 0000000..b802756 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16385.stderr @@ -0,0 +1,8 @@ + +T16385.hs:4:10: error: + • Instance head is not headed by a class: c + • In the instance declaration for ‘c’ + +T16385.hs:5:10: error: + • Instance head is not headed by a class: c + • In the instance declaration for ‘c’ diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index af382b1..4f1b1fa 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -146,3 +146,4 @@ test('T16114', normal, compile_fail, ['']) test('T16116b', normal, compile_fail, ['']) test('ExplicitForAllRules2', normal, compile_fail, ['']) test('T15957_Fail', normal, compile_fail, ['-Werror -Wall -Wno-missing-signatures']) +test('T16385', normal, compile_fail, ['']) From git at git.haskell.org Wed Mar 6 21:50:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:50:02 +0000 (UTC) Subject: [commit: ghc] master: Move reifyGHCi function into GhciMonad type class (3caeb44) Message-ID: <20190306215002.3D3F33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3caeb443b2bc2c2ef6f43ce59abfc1cfe3ba579f/ghc >--------------------------------------------------------------- commit 3caeb443b2bc2c2ef6f43ce59abfc1cfe3ba579f Author: Zejun Wu Date: Mon Jan 21 16:28:01 2019 -0800 Move reifyGHCi function into GhciMonad type class This was the suggested change in !176 but missed the batch merge (!263). >--------------------------------------------------------------- 3caeb443b2bc2c2ef6f43ce59abfc1cfe3ba579f ghc/GHCi/UI/Monad.hs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 4287c09..51f1366 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -240,19 +240,6 @@ newtype GHCi a = GHCi { unGHCi :: IORef GHCiState -> Ghc a } reflectGHCi :: (Session, IORef GHCiState) -> GHCi a -> IO a reflectGHCi (s, gs) m = unGhc (unGHCi m gs) s -reifyGHCi :: GhciMonad m => ((Session, IORef GHCiState) -> IO a) -> m a -reifyGHCi f = do - s <- GHC.getSession - sRef <- liftIO $ newIORef s - gs <- getGHCiState - gsRef <- liftIO $ newIORef gs - ret <- liftIO (f (Session sRef, gsRef)) `gfinally` do - s' <- liftIO $ readIORef sRef - GHC.setSession s' - gs' <- liftIO $ readIORef gsRef - setGHCiState gs' - return ret - startGHCi :: GHCi a -> GHCiState -> Ghc a startGHCi g state = do ref <- liftIO $ newIORef state; unGHCi g ref @@ -270,16 +257,19 @@ class GhcMonad m => GhciMonad m where getGHCiState :: m GHCiState setGHCiState :: GHCiState -> m () modifyGHCiState :: (GHCiState -> GHCiState) -> m () + reifyGHCi :: ((Session, IORef GHCiState) -> IO a) -> m a instance GhciMonad GHCi where getGHCiState = GHCi $ \r -> liftIO $ readIORef r setGHCiState s = GHCi $ \r -> liftIO $ writeIORef r s modifyGHCiState f = GHCi $ \r -> liftIO $ modifyIORef r f + reifyGHCi f = GHCi $ \r -> reifyGhc $ \s -> f (s, r) instance GhciMonad (InputT GHCi) where getGHCiState = lift getGHCiState setGHCiState = lift . setGHCiState modifyGHCiState = lift . modifyGHCiState + reifyGHCi = lift . reifyGHCi liftGhc :: Ghc a -> GHCi a liftGhc m = GHCi $ \_ -> m From git at git.haskell.org Wed Mar 6 21:50:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 6 Mar 2019 21:50:04 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges's head updated: Cmm: Promote stack arguments to word size (dfef89d) Message-ID: <20190306215004.91C8E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'wip/ghc-8.8-merges' now includes: 1808e0d template-haskell: Document assembler foreign file support 78af4a3 Properly escape character literals in Haddocks ca5b476 Revert "Lexer: Alternate Layout Rule injects actual not virtual braces" f6abc30 Lexer: Alternate Layout Rule injects actual not virtual braces b85a5f1 Bump Cabal submodule 74430a5 Bump hsc2hs submodule b0deeb5 Fix checkStackChunk() call in Interepter.c, enable an assertion dfef89d Cmm: Promote stack arguments to word size From git at git.haskell.org Thu Mar 7 17:41:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:08 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: testsuite: Use fragile modifier for more tests (a65bcbe) Message-ID: <20190307174108.9C1563A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/a65bcbe7db4f39d18012ce28cb99bed2ce18e7f5/ghc >--------------------------------------------------------------- commit a65bcbe7db4f39d18012ce28cb99bed2ce18e7f5 Author: Ben Gamari Date: Tue Feb 26 10:24:31 2019 -0500 testsuite: Use fragile modifier for more tests >--------------------------------------------------------------- a65bcbe7db4f39d18012ce28cb99bed2ce18e7f5 testsuite/tests/concurrent/should_run/all.T | 6 ++---- testsuite/tests/ffi/should_run/all.T | 6 ++---- testsuite/tests/ghci/linking/all.T | 6 ++---- testsuite/tests/ghci/should_run/all.T | 2 +- testsuite/tests/profiling/should_run/all.T | 7 ++----- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 5ba0657..4e60a1d 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -74,8 +74,7 @@ test('T5558', compile_and_run, ['']) test('T5421', normal, compile_and_run, ['']) -# See #12751, the test fails non-deterministically so we skip it. -test('T5611', when ( opsys('darwin'), skip) , compile_and_run, ['']) +test('T5611', when(opsys('darwin'), fragile(12751)) , compile_and_run, ['']) test('T5238', normal, compile_and_run, ['']) test('T5866', exit_code(1), compile_and_run, ['']) @@ -196,8 +195,7 @@ test('conc036', skip, compile_and_run, ['']) # Interrupting foreign calls only makes sense if we are threaded test('foreignInterruptible', [when(fast(), skip), when(opsys('mingw32'),expect_fail), - # Fragile in unregisterised way; see #15467. - when(unregisterised(), skip), + when(unregisterised(), fragile(15467)), # I don't think we support interrupting Sleep() # on Windows. --SDM only_threaded_ways, diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index e9ea975..96ab506 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -87,8 +87,7 @@ 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), + when(unregisterised(), fragile(16085)), pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup')], compile_and_run, ['ffi018_ghci_c.o']) @@ -100,8 +99,7 @@ test('T1679', normal, compile_and_run, ['']) test('T1288', [omit_ways(['ghci'])], compile_and_run, ['T1288_c.c']) test('T1288_ghci', [only_ways(['ghci']), - # This test is fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')], compile_and_run, ['T1288_ghci_c.o']) diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T index 792e91b..88ada22 100644 --- a/testsuite/tests/ghci/linking/all.T +++ b/testsuite/tests/ghci/linking/all.T @@ -6,8 +6,7 @@ test('ghcilink001', makefile_test, ['ghcilink001']) test('ghcilink002', [extra_files(['TestLink.hs', 'f.c']), - # Fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), unless(doing_ghci, skip)], makefile_test, ['ghcilink002']) @@ -21,8 +20,7 @@ test('ghcilink004', test('ghcilink005', [extra_files(['TestLink.hs', 'f.c']), - # Fragile when unregisterised; see #16085 - when(unregisterised(), skip), + when(unregisterised(), fragile(16085)), unless(doing_ghci, skip)], makefile_test, ['ghcilink005']) diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T index 5440019..84693d7 100644 --- a/testsuite/tests/ghci/should_run/all.T +++ b/testsuite/tests/ghci/should_run/all.T @@ -11,7 +11,7 @@ test('T2881', just_ghci, compile_and_run, ['']) test('T3171', [when(opsys('mingw32'),skip), - skip, # This test is quite flaky (#15383) + fragile(15383), req_interp, combined_output], makefile_test, []) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 044d4fe..f6891c3 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -87,9 +87,7 @@ test('prof-doc-fib', [], compile_and_run, ['']) test('prof-doc-last', [], compile_and_run, ['-fno-full-laziness']) # unicode in cost centre names -test('T5559', - [ skip # Skip due to non-deterministic failures on CI, see Trac #16350 - ], compile_and_run, ['']) +test('T5559', fragile(16350), compile_and_run, ['']) # Note [consistent stacks] # Certain optimisations can change the stacks we get out of the @@ -150,6 +148,5 @@ test('T14257', [], makefile_test, ['T14257']) test('T15897', [extra_ways(['profasm']), only_ways(['profasm']), run_timeout_multiplier(2), - # Takes too long and is quite fragile (#15467, #16193) - skip], + fragile(15467)], makefile_test, ['T15897']) From git at git.haskell.org Thu Mar 7 17:41:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:11 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: gitlab-ci: Don't allow i386-deb9 to fail (f624dc1) Message-ID: <20190307174111.A389C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/f624dc15d196507c011079eaad9a31acef87a24c/ghc >--------------------------------------------------------------- commit f624dc15d196507c011079eaad9a31acef87a24c Author: Ben Gamari Date: Tue Feb 26 10:14:15 2019 -0500 gitlab-ci: Don't allow i386-deb9 to fail Also account for testsuite metric drift. Metric Increase: haddock.Cabal haddock.base T14683 >--------------------------------------------------------------- f624dc15d196507c011079eaad9a31acef87a24c .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6fb0c7..f1f5550 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -224,7 +224,6 @@ nightly-aarch64-linux-deb9: extends: .validate-linux stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" - allow_failure: true variables: TEST_ENV: "i386-linux-deb9" cache: From git at git.haskell.org Thu Mar 7 17:41:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:14 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: testsuite: Mark heapprof001 as fragile on i386 (910185a) Message-ID: <20190307174114.C332D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/910185a3eb5fd2148e42d39f6374ab03d098b682/ghc >--------------------------------------------------------------- commit 910185a3eb5fd2148e42d39f6374ab03d098b682 Author: Ben Gamari Date: Tue Feb 26 10:14:02 2019 -0500 testsuite: Mark heapprof001 as fragile on i386 >--------------------------------------------------------------- 910185a3eb5fd2148e42d39f6374ab03d098b682 testsuite/tests/profiling/should_run/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 9b6018c..044d4fe 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,7 @@ expect_broken_for_10037 = expect_broken_for( test('heapprof001', [when(have_profiling(), extra_ways(extra_prof_ways)), - when(arch('i386'), expect_broken_for(15382, ['prof_hc_hb'])), + when(arch('i386'), fragile(15382)), extra_run_opts('7')], compile_and_run, ['']) From git at git.haskell.org Thu Mar 7 17:41:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:17 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: testsuite: Introduce fragile modifier (4ca271d) Message-ID: <20190307174117.CF7093A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/4ca271d1880a6f4c5f49869de7f1920a2073adb6/ghc >--------------------------------------------------------------- commit 4ca271d1880a6f4c5f49869de7f1920a2073adb6 Author: Ben Gamari Date: Tue Feb 26 10:13:44 2019 -0500 testsuite: Introduce fragile modifier Now since we have been a bit more stringent in testsuite cleanliness we have been marking a lot of tests as fragile using the `skip` modifier. However, this unfortunately means that we lose the association with the ticket number documenting the fragility. Here we introduce `fragile` and `fragile_for` to retain this information. >--------------------------------------------------------------- 4ca271d1880a6f4c5f49869de7f1920a2073adb6 testsuite/driver/testlib.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index edd43fb..309a910 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -247,6 +247,30 @@ def _expect_pass(way): # ----- +def fragile( bug ): + """ + Indicates that the test should be skipped due to fragility documented in + the given ticket. + """ + def helper( name, opts, bug=bug ): + record_broken(name, opts, bug) + opts.skip = True + + return helper + +def fragile_for( name, opts, bug, ways ): + """ + Indicates that the test should be skipped due to fragility in the given + test ways as documented in the given ticket. + """ + def helper( name, opts, bug=bug, ways=ways ): + record_broken(name, opts, bug) + opts.omit_ways = ways + + return helper + +# ----- + def omit_ways( ways ): return lambda name, opts, w=ways: _omit_ways( name, opts, w ) From git at git.haskell.org Thu Mar 7 17:41:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:21 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Test Trac #16263 (25c3dd3) Message-ID: <20190307174121.796C53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/25c3dd39f7d446f66b5c967be81f80cd7facb509/ghc >--------------------------------------------------------------- commit 25c3dd39f7d446f66b5c967be81f80cd7facb509 Author: Simon Peyton Jones Date: Wed Mar 6 10:17:12 2019 +0000 Test Trac #16263 >--------------------------------------------------------------- 25c3dd39f7d446f66b5c967be81f80cd7facb509 testsuite/tests/polykinds/T16263.hs | 7 +++++++ testsuite/tests/polykinds/T16263.stderr | 2 ++ testsuite/tests/polykinds/all.T | 1 + 3 files changed, 10 insertions(+) diff --git a/testsuite/tests/polykinds/T16263.hs b/testsuite/tests/polykinds/T16263.hs new file mode 100644 index 0000000..4331c12 --- /dev/null +++ b/testsuite/tests/polykinds/T16263.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE GADTs, TypeInType, EmptyDataDecls #-} + +module T16263 where + +import Data.Kind + +data Q :: Eq a => Type where {} diff --git a/testsuite/tests/polykinds/T16263.stderr b/testsuite/tests/polykinds/T16263.stderr new file mode 100644 index 0000000..821a5fe --- /dev/null +++ b/testsuite/tests/polykinds/T16263.stderr @@ -0,0 +1,2 @@ + +T16263.hs:7:1: error: Illegal constraint in a kind: Eq a => * diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 927319c..5a90ebe 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -210,3 +210,4 @@ test('KindVarOrder', normal, ghci_script, ['KindVarOrder.script']) test('T16221', normal, compile, ['']) test('T16221a', normal, compile_fail, ['']) test('T16342', normal, compile, ['']) +test('T16263', normal, compile_fail, ['']) From git at git.haskell.org Thu Mar 7 17:41:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:25 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Add tests for Trac #16221 and #16342 (07f378c) Message-ID: <20190307174125.5D7903A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/07f378cee37338c5f2655b3a7e46dfef3f1c5cc1/ghc >--------------------------------------------------------------- commit 07f378cee37338c5f2655b3a7e46dfef3f1c5cc1 Author: Simon Peyton Jones Date: Wed Mar 6 09:54:06 2019 +0000 Add tests for Trac #16221 and #16342 >--------------------------------------------------------------- 07f378cee37338c5f2655b3a7e46dfef3f1c5cc1 testsuite/tests/polykinds/T16221.hs | 13 +++++++++++++ testsuite/tests/polykinds/T16221a.hs | 7 +++++++ testsuite/tests/polykinds/T16221a.stderr | 6 ++++++ testsuite/tests/polykinds/T16342.hs | 13 +++++++++++++ testsuite/tests/polykinds/all.T | 3 +++ 5 files changed, 42 insertions(+) diff --git a/testsuite/tests/polykinds/T16221.hs b/testsuite/tests/polykinds/T16221.hs new file mode 100644 index 0000000..56a8374 --- /dev/null +++ b/testsuite/tests/polykinds/T16221.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE GADTs, TypeInType, ExistentialQuantification #-} + +module T16221 where + +-- Failed Lint +data T3 a = forall k (b :: k). MkT3 (T3 b) !Int + +-- Works with GADT +data T4 a where + MkT4 :: T4 b -> !Int -> T4 a + +-- Works with CUSK +data T5 (a :: j) = forall k (b :: k). MkT5 (T5 b) !Int diff --git a/testsuite/tests/polykinds/T16221a.hs b/testsuite/tests/polykinds/T16221a.hs new file mode 100644 index 0000000..50128aa --- /dev/null +++ b/testsuite/tests/polykinds/T16221a.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TypeInType, ExistentialQuantification #-} + +module T16221a where + +data SameKind :: k -> k -> * +data T2 a = forall k (b :: k). MkT2 (SameKind a b) !Int + diff --git a/testsuite/tests/polykinds/T16221a.stderr b/testsuite/tests/polykinds/T16221a.stderr new file mode 100644 index 0000000..27edc2c --- /dev/null +++ b/testsuite/tests/polykinds/T16221a.stderr @@ -0,0 +1,6 @@ + +T16221a.hs:6:49: error: + • Expected kind ‘k1’, but ‘b’ has kind ‘k’ + • In the second argument of ‘SameKind’, namely ‘b’ + In the type ‘(SameKind a b)’ + In the definition of data constructor ‘MkT2’ diff --git a/testsuite/tests/polykinds/T16342.hs b/testsuite/tests/polykinds/T16342.hs new file mode 100644 index 0000000..5eafcee --- /dev/null +++ b/testsuite/tests/polykinds/T16342.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE MultiParamTypeClasses, TypeInType, ConstrainedClassMethods, ScopedTypeVariables #-} + +module T16342 where + +import Data.Proxy + +class C (a::ka) x where + cop :: D a x => x -> Proxy a -> Proxy a + cop _ x = x :: Proxy (a::ka) + +class D (b::kb) y where + dop :: C b y => y -> Proxy b -> Proxy b + dop _ x = x :: Proxy (b::kb) diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 1cfb2aa..927319c 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -207,3 +207,6 @@ test('T14847', normal, compile, ['']) test('T15795', normal, compile, ['']) test('T15795a', normal, compile, ['']) test('KindVarOrder', normal, ghci_script, ['KindVarOrder.script']) +test('T16221', normal, compile, ['']) +test('T16221a', normal, compile_fail, ['']) +test('T16342', normal, compile, ['']) From git at git.haskell.org Thu Mar 7 17:41:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:29 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Add a test case (629fa97) Message-ID: <20190307174129.4E9B13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/629fa9787548601b5c15cc1796d78e3ce1a49368/ghc >--------------------------------------------------------------- commit 629fa9787548601b5c15cc1796d78e3ce1a49368 Author: Sebastian Graf Date: Fri Feb 8 14:13:20 2019 +0100 Add a test case This substantiates comments about demand analysis of trivial right-hand sides and its interaction with CoreArity. >--------------------------------------------------------------- 629fa9787548601b5c15cc1796d78e3ce1a49368 compiler/coreSyn/CoreArity.hs | 5 +++++ compiler/stranal/DmdAnal.hs | 16 ++++++---------- testsuite/tests/stranal/sigs/NewtypeArity.hs | 10 ++++++++++ testsuite/tests/stranal/sigs/NewtypeArity.stderr | 18 ++++++++++++++++++ testsuite/tests/stranal/sigs/all.T | 1 + 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs index 37454eb..828c1c7 100644 --- a/compiler/coreSyn/CoreArity.hs +++ b/compiler/coreSyn/CoreArity.hs @@ -179,6 +179,11 @@ Why is this important? Because - In CorePrep we use etaExpand on each rhs, so that the visible lambdas actually match that arity, which in turn means that the StgRhs has the right number of lambdas + - In demand analysis, we want to analyse trivial right-hand sides like in + let y = x |> co in ... as if we looked directly into the definition of x. + This is the case if y has the same arity as x. + See Note [Newtype arity] and + Note [Demand analysis for trivial right-hand sides] in DmdAnal.hs. An alternative would be to do the eta-expansion in TidyPgm, at least for top-level bindings, in which case we would not need the trim_arity diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index bab6f18..90dcf08 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -704,19 +704,15 @@ Another win for join points! Trac #13543. Note [Demand analysis for trivial right-hand sides] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider - foo = plusInt |> co + foo = plusInt |> co where plusInt is an arity-2 function with known strictness. Clearly we want plusInt's strictness to propagate to foo! But because it has no manifest lambdas, it won't do so automatically, and indeed 'co' might -have type (Int->Int->Int) ~ T, so we *can't* eta-expand. So we have a -special case for right-hand sides that are "trivial", namely variables, -casts, type applications, and the like. - -Note that this can mean that 'foo' has an arity that is smaller than that -indicated by its demand info. e.g. if co :: (Int->Int->Int) ~ T, then -foo's arity will be zero (see Note [exprArity invariant] in CoreArity), -but its demand signature will be that of plusInt. A small example is the -test case of Trac #8963. +have type (Int->Int->Int) ~ T. + +Fortunately, CoreArity gives 'foo' arity 2 and all is well (see the definition +of 'manifestArity' and Note [Newtype arity] in CoreArity)! A small example is +the test case NewtypeArity. Note [Product demands for function body] diff --git a/testsuite/tests/stranal/sigs/NewtypeArity.hs b/testsuite/tests/stranal/sigs/NewtypeArity.hs new file mode 100644 index 0000000..3a8e96b --- /dev/null +++ b/testsuite/tests/stranal/sigs/NewtypeArity.hs @@ -0,0 +1,10 @@ +-- | 't' and 't2' should have a strictness signature for arity 2 here. +module Test where + +newtype T = MkT (Int -> Int -> Int) + +t :: T +t = MkT (\a b -> a + b) + +t2 :: T +t2 = MkT (+) diff --git a/testsuite/tests/stranal/sigs/NewtypeArity.stderr b/testsuite/tests/stranal/sigs/NewtypeArity.stderr new file mode 100644 index 0000000..08ce83f --- /dev/null +++ b/testsuite/tests/stranal/sigs/NewtypeArity.stderr @@ -0,0 +1,18 @@ + +==================== Strictness signatures ==================== +Test.$tc'MkT: m +Test.$tcT: m +Test.$trModule: m +Test.t: m +Test.t2: m + + + +==================== Strictness signatures ==================== +Test.$tc'MkT: m +Test.$tcT: m +Test.$trModule: m +Test.t: m +Test.t2: m + + diff --git a/testsuite/tests/stranal/sigs/all.T b/testsuite/tests/stranal/sigs/all.T index 091a4f4..fca319f 100644 --- a/testsuite/tests/stranal/sigs/all.T +++ b/testsuite/tests/stranal/sigs/all.T @@ -17,3 +17,4 @@ test('BottomFromInnerLambda', normal, compile, ['']) test('DmdAnalGADTs', normal, compile, ['']) test('T12370', normal, compile, ['']) test('CaseBinderCPR', normal, compile, ['']) +test('NewtypeArity', normal, compile, ['']) From git at git.haskell.org Thu Mar 7 17:41:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:32 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Compute strictness signatures assuming exprArity (00a9b1d) Message-ID: <20190307174132.54ED83A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/00a9b1d39abf6fcf6deecdd219db588f906c88f3/ghc >--------------------------------------------------------------- commit 00a9b1d39abf6fcf6deecdd219db588f906c88f3 Author: Sebastian Graf Date: Thu Feb 7 19:02:28 2019 +0100 Compute strictness signatures assuming exprArity >--------------------------------------------------------------- 00a9b1d39abf6fcf6deecdd219db588f906c88f3 compiler/basicTypes/Demand.hs | 6 +----- compiler/stranal/DmdAnal.hs | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs index 52bdf67..a4ba7c9 100644 --- a/compiler/basicTypes/Demand.hs +++ b/compiler/basicTypes/Demand.hs @@ -22,7 +22,7 @@ module Demand ( DmdType(..), dmdTypeDepth, lubDmdType, bothDmdType, nopDmdType, botDmdType, mkDmdType, - addDemand, removeDmdTyArgs, + addDemand, ensureArgs, BothDmdArg, mkBothDmdArg, toBothDmdArg, DmdEnv, emptyDmdEnv, @@ -1207,10 +1207,6 @@ mkDmdType fv ds res = DmdType fv ds res dmdTypeDepth :: DmdType -> Arity dmdTypeDepth (DmdType _ ds _) = length ds --- Remove any demand on arguments. This is used in dmdAnalRhs on the body -removeDmdTyArgs :: DmdType -> DmdType -removeDmdTyArgs = ensureArgs 0 - -- This makes sure we can use the demand type with n arguments, -- It extends the argument list with the correct resTypeArgDmd -- It also adjusts the DmdResult: Divergence survives additional arguments, diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 10b9da6..684d379 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -628,6 +628,7 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs | otherwise = (lazy_fv, id', mkLams bndrs' body') where + rhs_arity = exprArity rhs (bndrs, body, body_dmd) = case isJoinId_maybe id of Just join_arity -- See Note [Demand analysis for join points] @@ -635,15 +636,15 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs -> (bndrs, body, let_dmd) Nothing | (bndrs, body) <- collectBinders rhs - -> (bndrs, body, mkBodyDmd env body) + -> (bndrs, body, mkBodyDmd env (exprArity body) body) env_body = foldl' extendSigsWithLam env bndrs (body_ty, body') = dmdAnal env_body body_dmd body - body_ty' = removeDmdTyArgs body_ty -- zap possible deep CPR info - (DmdType rhs_fv rhs_dmds rhs_res, bndrs') - = annotateLamBndrs env (isDFunId id) body_ty' bndrs + (rhs_ty, bndrs') = annotateLamBndrs env (isDFunId id) body_ty bndrs + DmdType rhs_fv rhs_dmds rhs_res + = ensureArgs rhs_arity rhs_ty -- zap possible deep CPR info sig_ty = mkStrictSig (mkDmdType sig_fv rhs_dmds rhs_res') - id' = set_idStrictness env id sig_ty + id' = set_idStrictness env id rhs_arity sig_ty -- See Note [NOINLINE and strictness] @@ -667,10 +668,14 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs || not (isStrictDmd (idDemandInfo id) || ae_virgin env) -- See Note [Optimistic CPR in the "virgin" case] -mkBodyDmd :: AnalEnv -> CoreExpr -> CleanDemand +-- | Creates a 'CleanDemand' appropriate for unleashing on the given function +-- body, by wrapping a head demand into @arity@ many calls. -- See Note [Product demands for function body] -mkBodyDmd env body - = case deepSplitProductType_maybe (ae_fam_envs env) (exprType body) of +mkBodyDmd :: AnalEnv -> Arity -> CoreExpr -> CleanDemand +mkBodyDmd env arity body + = iterate mkCallDmd base !! arity + where + base = case deepSplitProductType_maybe (ae_fam_envs env) (exprType body) of Nothing -> cleanEvalDmd Just (dc, _, _, _) -> cleanEvalProdDmd (dataConRepArity dc) @@ -1247,9 +1252,10 @@ findBndrDmd env arg_of_dfun dmd_ty id fam_envs = ae_fam_envs env -set_idStrictness :: AnalEnv -> Id -> StrictSig -> Id -set_idStrictness env id sig - = setIdStrictness id (killUsageSig (ae_dflags env) sig) +set_idStrictness :: AnalEnv -> Id -> Arity -> StrictSig -> Id +set_idStrictness env id arity sig + = id `setIdStrictness` (killUsageSig (ae_dflags env) sig) + `setIdArity` arity -- computed by exprArity and must match sig dumpStrSig :: CoreProgram -> SDoc dumpStrSig binds = vcat (map printId ids) From git at git.haskell.org Thu Mar 7 17:41:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:35 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Look at idArity in DmdAnal instead (58860a8) Message-ID: <20190307174135.657B13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/58860a80198860c11efaa02c3fe0f72170c7ce8b/ghc >--------------------------------------------------------------- commit 58860a80198860c11efaa02c3fe0f72170c7ce8b Author: Sebastian Graf Date: Tue Mar 5 12:54:46 2019 +0100 Look at idArity in DmdAnal instead Incorporating exprArity has the unfortunate side-effect that PAPs are automatically eta-expanded. This tries to work around that by looking at idArity directly. >--------------------------------------------------------------- 58860a80198860c11efaa02c3fe0f72170c7ce8b compiler/stranal/DmdAnal.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 90dcf08..31a5969 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -287,7 +287,7 @@ dmdAnal' env dmd (Case scrut case_bndr ty alts) -- This is used for a non-recursive local let without manifest lambdas. -- This is the LetUp rule in the paper “Higher-Order Cardinality Analysis”. dmdAnal' env dmd (Let (NonRec id rhs) body) - | useLetUp id rhs + | useLetUp id = (final_ty, Let (NonRec id' rhs') body') where (body_ty, body') = dmdAnal env dmd body @@ -602,7 +602,7 @@ dmdAnalRhsLetDown :: TopLevelFlag dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs = (lazy_fv, id', mkLams bndrs' body') where - rhs_arity = exprArity rhs + rhs_arity = idArity id (bndrs, body, body_dmd) = case isJoinId_maybe id of Just join_arity -- See Note [Demand analysis for join points] @@ -610,7 +610,8 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs -> (bndrs, body, let_dmd) Nothing | (bndrs, body) <- collectBinders rhs - -> (bndrs, body, mkBodyDmd env (exprArity body) body) + , let body_arity = rhs_arity - count isId bndrs + -> (bndrs, body, mkBodyDmd env body_arity body) env_body = foldl' extendSigsWithLam env bndrs (body_ty, body') = dmdAnal env_body body_dmd body @@ -618,7 +619,7 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs DmdType rhs_fv rhs_dmds rhs_res = ensureArgs rhs_arity rhs_ty -- zap possible deep CPR info sig_ty = mkStrictSig (mkDmdType sig_fv rhs_dmds rhs_res') - id' = set_idStrictness env id rhs_arity sig_ty + id' = set_idStrictness env id sig_ty -- See Note [NOINLINE and strictness] @@ -658,7 +659,7 @@ mkBodyDmd env arity body -- -- We use LetDown if there is a chance to get a useful strictness signature. -- This is the case when it takes any arguments before performing meaningful --- work (cf. 'exprArity') or the binding is a join point (hence always acts like +-- work (cf. 'idArity') or the binding is a join point (hence always acts like -- a function, not a value). -- -- Thus, if the binding is not a join point and its arity is 0, we use LetUp. @@ -667,8 +668,8 @@ mkBodyDmd env arity body -- makes a real difference wrt. usage demands. The other reason is being able to -- unleash a more precise product demand on its RHS once we know how the thunk -- was used in the let body. -useLetUp :: Var -> CoreExpr -> Bool -useLetUp f rhs = exprArity rhs == 0 && not (isJoinId f) +useLetUp :: Var -> Bool +useLetUp f = idArity f == 0 && not (isJoinId f) {- Note [Demand analysis for join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1206,10 +1207,9 @@ findBndrDmd env arg_of_dfun dmd_ty id fam_envs = ae_fam_envs env -set_idStrictness :: AnalEnv -> Id -> Arity -> StrictSig -> Id -set_idStrictness env id arity sig +set_idStrictness :: AnalEnv -> Id -> StrictSig -> Id +set_idStrictness env id sig = id `setIdStrictness` (killUsageSig (ae_dflags env) sig) - `setIdArity` arity -- computed by exprArity and must match sig dumpStrSig :: CoreProgram -> SDoc dumpStrSig binds = vcat (map printId ids) From git at git.haskell.org Thu Mar 7 17:41:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:38 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: IdInfo comments (6b78cd9) Message-ID: <20190307174138.6DFBE3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/6b78cd9fcba184519ad2ddf85734490dbfb41be9/ghc >--------------------------------------------------------------- commit 6b78cd9fcba184519ad2ddf85734490dbfb41be9 Author: Sebastian Graf Date: Thu Feb 7 15:34:07 2019 +0100 IdInfo comments >--------------------------------------------------------------- 6b78cd9fcba184519ad2ddf85734490dbfb41be9 compiler/basicTypes/Id.hs | 1 + compiler/basicTypes/IdInfo.hs | 44 +++++++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/compiler/basicTypes/Id.hs b/compiler/basicTypes/Id.hs index 199842c..4736691 100644 --- a/compiler/basicTypes/Id.hs +++ b/compiler/basicTypes/Id.hs @@ -668,6 +668,7 @@ isBottomingId v | isId v = isBottomingSig (idStrictness v) | otherwise = False +-- | Accesses the 'Id''s 'strictnessInfo'. idStrictness :: Id -> StrictSig idStrictness id = strictnessInfo (idInfo id) diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs index 12ea490..8a59b98 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/basicTypes/IdInfo.hs @@ -237,22 +237,34 @@ pprIdDetails other = brackets (pp other) -- too big. data IdInfo = IdInfo { - arityInfo :: !ArityInfo, -- ^ 'Id' arity - ruleInfo :: RuleInfo, -- ^ Specialisations of the 'Id's function which exist - -- See Note [Specialisations and RULES in IdInfo] - unfoldingInfo :: Unfolding, -- ^ The 'Id's unfolding - cafInfo :: CafInfo, -- ^ 'Id' CAF info - oneShotInfo :: OneShotInfo, -- ^ Info about a lambda-bound variable, if the 'Id' is one - inlinePragInfo :: InlinePragma, -- ^ Any inline pragma atached to the 'Id' - occInfo :: OccInfo, -- ^ How the 'Id' occurs in the program - - strictnessInfo :: StrictSig, -- ^ A strictness signature - - demandInfo :: Demand, -- ^ ID demand information - callArityInfo :: !ArityInfo, -- ^ How this is called. - -- n <=> all calls have at least n arguments - - levityInfo :: LevityInfo -- ^ when applied, will this Id ever have a levity-polymorphic type? + arityInfo :: !ArityInfo, + -- ^ 'Id' arity, as computed by 'CoreArity'. Specifies how many + -- arguments this 'Id' has to be applied to before it doesn any + -- meaningful work. + ruleInfo :: RuleInfo, + -- ^ Specialisations of the 'Id's function which exist. + -- See Note [Specialisations and RULES in IdInfo] + unfoldingInfo :: Unfolding, + -- ^ The 'Id's unfolding + cafInfo :: CafInfo, + -- ^ 'Id' CAF info + oneShotInfo :: OneShotInfo, + -- ^ Info about a lambda-bound variable, if the 'Id' is one + inlinePragInfo :: InlinePragma, + -- ^ Any inline pragma atached to the 'Id' + occInfo :: OccInfo, + -- ^ How the 'Id' occurs in the program + strictnessInfo :: StrictSig, + -- ^ A strictness signature. Digests how a function uses its arguments + -- if applied to at least 'arityInfo' arguments. + demandInfo :: Demand, + -- ^ ID demand information + callArityInfo :: !ArityInfo, + -- ^ How this is called. This is the number of arguments to which a + -- binding can be eta-expanded without losing any sharing. + -- n <=> all calls have at least n arguments + levityInfo :: LevityInfo + -- ^ when applied, will this Id ever have a levity-polymorphic type? } -- Setters From git at git.haskell.org Thu Mar 7 17:41:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:41 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Check idArity matching depth of idStrictness again (5e75a1f) Message-ID: <20190307174141.8582C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/5e75a1f5cbdb67df7f1bfaf574b521b5a4cadf7e/ghc >--------------------------------------------------------------- commit 5e75a1f5cbdb67df7f1bfaf574b521b5a4cadf7e Author: Sebastian Graf Date: Fri Feb 8 14:18:51 2019 +0100 Check idArity matching depth of idStrictness again This was deactivated in 848f5952, but it seems the special case for trivial right-hand sides was removed and the invariant reinstated. >--------------------------------------------------------------- 5e75a1f5cbdb67df7f1bfaf574b521b5a4cadf7e compiler/basicTypes/Demand.hs | 23 ++++++++--------------- compiler/coreSyn/CoreLint.hs | 21 +++++++++------------ compiler/coreSyn/CoreOpt.hs | 13 ++++++++----- 3 files changed, 25 insertions(+), 32 deletions(-) diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs index a4ba7c9..d33e21e 100644 --- a/compiler/basicTypes/Demand.hs +++ b/compiler/basicTypes/Demand.hs @@ -38,7 +38,7 @@ module Demand ( nopSig, botSig, cprProdSig, isTopSig, hasDemandEnvSig, splitStrictSig, strictSigDmdEnv, - increaseStrictSigArity, etaExpandStrictSig, + increaseStrictSigArity, seqDemand, seqDemandList, seqDmdType, seqStrictSig, @@ -1207,7 +1207,7 @@ mkDmdType fv ds res = DmdType fv ds res dmdTypeDepth :: DmdType -> Arity dmdTypeDepth (DmdType _ ds _) = length ds --- This makes sure we can use the demand type with n arguments, +-- | This makes sure we can use the demand type with n arguments, -- It extends the argument list with the correct resTypeArgDmd -- It also adjusts the DmdResult: Divergence survives additional arguments, -- CPR information does not (and definite converge also would not). @@ -1586,25 +1586,18 @@ splitStrictSig :: StrictSig -> ([Demand], DmdResult) splitStrictSig (StrictSig (DmdType _ dmds res)) = (dmds, res) increaseStrictSigArity :: Int -> StrictSig -> StrictSig --- Add extra arguments to a strictness signature +-- ^ Add extra arguments to a strictness signature. +-- In contrast to 'ensureArgs', this /prepends/ additional argument demands +-- and leaves the 'DmdResult' intact. increaseStrictSigArity arity_increase sig@(StrictSig dmd_ty@(DmdType env dmds res)) | isTopDmdType dmd_ty = sig - | arity_increase <= 0 = sig + | arity_increase == 0 = sig + | arity_increase < 0 = WARN (True, text "increaseStrictSigArity: negative arity increase") + nopSig | otherwise = StrictSig (DmdType env dmds' res) where dmds' = replicate arity_increase topDmd ++ dmds -etaExpandStrictSig :: Arity -> StrictSig -> StrictSig --- We are expanding (\x y. e) to (\x y z. e z) --- Add exta demands to the /end/ of the arg demands if necessary -etaExpandStrictSig arity sig@(StrictSig dmd_ty@(DmdType env dmds res)) - | isTopDmdType dmd_ty = sig - | arity_increase <= 0 = sig - | otherwise = StrictSig (DmdType env dmds' res) - where - arity_increase = arity - length dmds - dmds' = dmds ++ replicate arity_increase topDmd - isTopSig :: StrictSig -> Bool isTopSig (StrictSig ty) = isTopDmdType ty diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index 62ddb9f..e9fd0c4 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -61,7 +61,7 @@ import InstEnv ( instanceDFunId ) import OptCoercion ( checkAxInstCo ) import UniqSupply import CoreArity ( typeArity ) -import Demand ( splitStrictSig, isBotRes ) +import Demand import HscTypes import DynFlags @@ -570,15 +570,12 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs) (addWarnL (text "INLINE binder is (non-rule) loop breaker:" <+> ppr binder)) -- Only non-rule loop breakers inhibit inlining - -- Check whether arity and demand type are consistent (only if demand analysis - -- already happened) - -- - -- Note (Apr 2014): this is actually ok. See Note [Demand analysis for trivial right-hand sides] - -- in DmdAnal. After eta-expansion in CorePrep the rhs is no longer trivial. - -- ; let dmdTy = idStrictness binder - -- ; checkL (case dmdTy of - -- StrictSig dmd_ty -> idArity binder >= dmdTypeDepth dmd_ty || exprIsTrivial rhs) - -- (mkArityMsg binder) + -- Check whether arity and demand type are consistent (only if demand analysis + -- already happened) + ; let StrictSig dmd_ty = idStrictness binder + ; checkL + (idArity binder >= dmdTypeDepth dmd_ty || exprIsTrivial rhs) + (mkArityMsg binder) -- Check that the binder's arity is within the bounds imposed by -- the type and the strictness signature. See Note [exprArity invariant] @@ -2562,20 +2559,20 @@ mkKindErrMsg tyvar arg_ty hang (text "Arg type:") 4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))] -{- Not needed now mkArityMsg :: Id -> MsgDoc mkArityMsg binder = vcat [hsep [text "Demand type has", ppr (dmdTypeDepth dmd_ty), text "arguments, rhs has", ppr (idArity binder), + case isJoinId_maybe binder of Just ary -> ppr ary; _ -> empty, text "arguments,", ppr binder], hsep [text "Binder's strictness signature:", ppr dmd_ty] ] where (StrictSig dmd_ty) = idStrictness binder --} + mkCastErr :: CoreExpr -> Coercion -> Type -> Type -> MsgDoc mkCastErr expr = mk_cast_err "expression" "type" (ppr expr) diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index d0dba81..151da04 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -37,7 +37,7 @@ import Var ( isNonCoVarId ) import VarSet import VarEnv import DataCon -import Demand( etaExpandStrictSig ) +import Demand( ensureArgs, nopSig, StrictSig(..) ) import OptCoercion ( optCoercion ) import Type hiding ( substTy, extendTvSubst, extendCvSubst, extendTvSubstList , isInScope, substTyVarBndr, cloneTyVarBndr ) @@ -678,10 +678,13 @@ joinPointBinding_maybe bndr rhs | AlwaysTailCalled join_arity <- tailCallInfo (idOccInfo bndr) , (bndrs, body) <- etaExpandToJoinPoint join_arity rhs - , let str_sig = idStrictness bndr - str_arity = count isId bndrs -- Strictness demands are for Ids only - join_bndr = bndr `asJoinId` join_arity - `setIdStrictness` etaExpandStrictSig str_arity str_sig + , let StrictSig dmd_ty = idStrictness bndr + str_arity = count isId bndrs -- Strictness demands are for Ids only + new_str_sig + | str_arity < idArity bndr = nopSig + | otherwise = StrictSig $ ensureArgs str_arity dmd_ty + join_bndr = bndr `asJoinId` join_arity + `setIdStrictness` new_str_sig = Just (join_bndr, mkLams bndrs body) | otherwise From git at git.haskell.org Thu Mar 7 17:41:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:44 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Look at exprArity in useLetUp (328d6ff) Message-ID: <20190307174144.B10693A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/328d6ff403eaf6aa6b5dccd16a8f3253f24b60cd/ghc >--------------------------------------------------------------- commit 328d6ff403eaf6aa6b5dccd16a8f3253f24b60cd Author: Sebastian Graf Date: Thu Feb 7 15:52:31 2019 +0100 Look at exprArity in useLetUp No changes in allocations. >--------------------------------------------------------------- 328d6ff403eaf6aa6b5dccd16a8f3253f24b60cd compiler/stranal/DmdAnal.hs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 6e10c98..10b9da6 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -18,6 +18,7 @@ import GhcPrelude import DynFlags import WwLib ( findTypeShape, deepSplitProductType_maybe ) import Demand -- All of it +import CoreArity ( exprArity ) import CoreSyn import CoreSeq ( seqBinds ) import Outputable @@ -683,19 +684,22 @@ unpackTrivial (Lam v e) | isTyVar v = unpackTrivial e unpackTrivial (App e a) | isTypeArg a = unpackTrivial e unpackTrivial _ = Nothing --- | If given the RHS of a let-binding, this 'useLetUp' determines --- whether we should process the binding up (body before rhs) or --- down (rhs before body). +-- | If given the let-bound 'Id', 'useLetUp' determines whether we should +-- process the binding up (body before rhs) or down (rhs before body). -- -- We use LetDown if there is a chance to get a useful strictness signature. --- This is the case when there are manifest value lambdas or the binding is a --- join point (hence always acts like a function, not a value). +-- This is the case when it takes any arguments before performing meaningful +-- work (cf. 'exprArity') or the binding is a join point (hence always acts like +-- a function, not a value). +-- +-- Thus, if the binding is not a join point and its arity is 0, we use LetUp. +-- In that case, it's a thunk and we want to unleash its 'DmdEnv' of free vars +-- at most once, regardless of how many times it was forced in the body. This +-- makes a real difference wrt. usage demands. The other reason is being able to +-- unleash a more precise product demand on its RHS once we know how the thunk +-- was used in the let body. useLetUp :: Var -> CoreExpr -> Bool -useLetUp f _ | isJoinId f = False -useLetUp f (Lam v e) | isTyVar v = useLetUp f e -useLetUp _ (Lam _ _) = False -useLetUp _ _ = True - +useLetUp f rhs = exprArity rhs == 0 && not (isJoinId f) {- Note [Demand analysis for join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From git at git.haskell.org Thu Mar 7 17:41:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:47 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity: Don't treat trivial RHS specially (224c2cd) Message-ID: <20190307174147.D1AC23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/dmd-arity Link : http://ghc.haskell.org/trac/ghc/changeset/224c2cdd5d58baa1b414f31cb8501bf6ac0ab1f5/ghc >--------------------------------------------------------------- commit 224c2cdd5d58baa1b414f31cb8501bf6ac0ab1f5 Author: Sebastian Graf Date: Thu Feb 7 19:02:52 2019 +0100 Don't treat trivial RHS specially >--------------------------------------------------------------- 224c2cdd5d58baa1b414f31cb8501bf6ac0ab1f5 compiler/stranal/DmdAnal.hs | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 684d379..bab6f18 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -288,9 +288,6 @@ dmdAnal' env dmd (Case scrut case_bndr ty alts) -- This is the LetUp rule in the paper “Higher-Order Cardinality Analysis”. dmdAnal' env dmd (Let (NonRec id rhs) body) | useLetUp id rhs - , Nothing <- unpackTrivial rhs - -- dmdAnalRhsLetDown treats trivial right hand sides specially - -- so if we have a trival right hand side, fall through to that. = (final_ty, Let (NonRec id' rhs') body') where (body_ty, body') = dmdAnal env dmd body @@ -583,25 +580,6 @@ environment, which effectively assigns them 'nopSig' (see "getStrictness") -} --- Trivial RHS --- See Note [Demand analysis for trivial right-hand sides] -dmdAnalTrivialRhs :: - AnalEnv -> Id -> CoreExpr -> Var -> - (DmdEnv, Id, CoreExpr) -dmdAnalTrivialRhs env id rhs fn - = (fn_fv, set_idStrictness env id fn_str, rhs) - where - fn_str = getStrictness env fn - fn_fv | isLocalId fn = unitVarEnv fn topDmd - | otherwise = emptyDmdEnv - -- Note [Remember to demand the function itself] - -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- fn_fv: don't forget to produce a demand for fn itself - -- Lacking this caused Trac #9128 - -- The demand is very conservative (topDmd), but that doesn't - -- matter; trivial bindings are usually inlined, so it only - -- kicks in for top-level bindings and NOINLINE bindings - -- Let bindings can be processed in two ways: -- Down (RHS before body) or Up (body before RHS). -- dmdAnalRhsLetDown implements the Down variant: @@ -622,10 +600,6 @@ dmdAnalRhsLetDown :: TopLevelFlag -- Process the RHS of the binding, add the strictness signature -- to the Id, and augment the environment with the signature as well. dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs - | Just fn <- unpackTrivial rhs -- See Note [Demand analysis for trivial right-hand sides] - = dmdAnalTrivialRhs env id rhs fn - - | otherwise = (lazy_fv, id', mkLams bndrs' body') where rhs_arity = exprArity rhs @@ -679,16 +653,6 @@ mkBodyDmd env arity body Nothing -> cleanEvalDmd Just (dc, _, _, _) -> cleanEvalProdDmd (dataConRepArity dc) -unpackTrivial :: CoreExpr -> Maybe Id --- Returns (Just v) if the arg is really equal to v, modulo --- casts, type applications etc --- See Note [Demand analysis for trivial right-hand sides] -unpackTrivial (Var v) = Just v -unpackTrivial (Cast e _) = unpackTrivial e -unpackTrivial (Lam v e) | isTyVar v = unpackTrivial e -unpackTrivial (App e a) | isTypeArg a = unpackTrivial e -unpackTrivial _ = Nothing - -- | If given the let-bound 'Id', 'useLetUp' determines whether we should -- process the binding up (body before rhs) or down (rhs before body). -- @@ -1169,12 +1133,6 @@ extendSigEnv top_lvl sigs var sig = extendVarEnv sigs var (sig, top_lvl) lookupSigEnv :: AnalEnv -> Id -> Maybe (StrictSig, TopLevelFlag) lookupSigEnv env id = lookupVarEnv (ae_sigs env) id -getStrictness :: AnalEnv -> Id -> StrictSig -getStrictness env fn - | isGlobalId fn = idStrictness fn - | Just (sig, _) <- lookupSigEnv env fn = sig - | otherwise = nopSig - nonVirgin :: AnalEnv -> AnalEnv nonVirgin env = env { ae_virgin = False } From git at git.haskell.org Thu Mar 7 17:41:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 7 Mar 2019 17:41:51 +0000 (UTC) Subject: [commit: ghc] wip/dmd-arity's head updated: Look at idArity in DmdAnal instead (58860a8) Message-ID: <20190307174151.A7FFD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'wip/dmd-arity' now includes: 626b63b testsuite: Mark print037 as broken when GHC is built with LLVM ef25b59 gitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail 406e43a Add `-fplugin-trustworthy` to avoid marking modules as unsafe ab49342 Refactor splice_exp in Parser.y e88e083 Fix #14579 by defining tyConAppNeedsKindSig, and using it 9292a18 Add int-index as parser/* codeowner c07e7ec Fix #16287 by checking for more unsaturated synonym arguments c32de5f gitlab-ci: Add a devel2 build 0620e59 gitlab-ci: More aggressive artifact expiration 701cfb3 Revert "gitlab-ci: More aggressive artifact expiration" 606db8c testsuite: Mark T11334b as broken in debugged compiler 7e495b4 testsuite: Mark recomp007 as broken in debugged compiler 71d5ab0 testsuite: Mark T14740 and tcfail159 as broken in debugged compiler aad05fb testsuite: Mark T5515 as broken with debugged compiler 2b90356 Fix #14729 by making the normaliser homogeneous 03b7abc Allow resizing the stack for the graph allocator. 14eb23c Update hpc submodule bac64c3 Hadrian: compile libgmp static on Windows d97f0db Fix test for T16180 on Darwin (fix #16128) ee52298 TestEquality instance for Compose a9bef62 Add a changelog for base 4.14.0.0 41df8e3 Update filepath submodule be8a803 Update directory submodule f17a576 ImplicitParams does not imply FlexibleContexts or FlexibleInstances, fixes #16248 be15f74 API Annotations: more explicit foralls fixup cbfc9fc API Annotations: AnnAt disconnected for TYPEAPP 5e9888b API Annotations: parens anns discarded for `(*)` operator c1cf269 Lexer: Alternate Layout Rule injects actual not virtual braces 7ff127f rts/ProfilerReportJson: Fix format string ced729f Cleanup in parser/Ctype.hs 071bef1 Fix optSemi type in Parser.y 0a4bbb5 Remove a few undefined prel names 616b2ef Comments only cefb780 Comments only about the binder-swap in OccurAnal 9bb23d5 Minor refactor of CUSK handling fb031b9 Stack: fix name mangling. 9170daa Replace a few uses of snocView with last/lastMaybe. f4d8e90 Improve snocView implementation. 9adb7f6 Simplify the build.stack.bat script to use 'stack run' 249b0ba Upgrade to the latest stack resolver 3fcf79a Fix inverted position pragma flag in parser API e67384f Fix invalid doc comment 53a870f Make CI via Hadrian build docs 027017f Remove ghctags (#16274) a48753b Capture and simplify constraints arising from running typed splices 224fec6 testsuite: Report stdout and stderr in JUnit output f53ef1a testsuite: Always skip T15897 07f5cbc Fix Int overflow on 32 bit platform b1662e8 Hadrian: add LLVM flavours 180c976 testsuite: Report unexpected passes in junit output 093fa2f Update array submodule 6399965 Add explicit dependencies to cleanup-darwin 012257c Fix #16293 by cleaning up Proxy# infelicities 4a4ae70 Fix #16188 8b476d8 Fix #16299 by deleting incorrect code from IfaceSyn a08f463 Fix #15849 by checking whether there's a do block 2868313 configure: Document CLANG, LLC, and OPT variables 6b890d7 Fix checkStackChunk() call in Interepter.c, enable an assertion 4af0a2d Update parallel submodule e40f00d Fix typos [skip ci] 7f26b74 Add `liftedTyped` to `Lift` class 0f1eb88 Add perf test for #16190 1d9a1d9 NCG: fast compilation of very large strings (#16190) 1962621 Implement -Wredundant-record-wildcards and -Wunused-record-wildcards 6827838 Make a smart mkAppTyM 5c1f268 Fail fast in solveLocalEqualities b31df5c Hadrian: enable -Wcompat=error in the testsuite 887454d 'forall' always a keyword, plus the dot type operator 173d0ce Properly escape character literals in Haddocks bcaba30 Don't wrap the entry map for LiveInfo in Maybe. 0b92bdc Fix and Reapply "Performance tests: recover a baseline from ancestor commits and CI results." 9b39597 Fix tests which were made to pass by "Make a smart mkAppTyM" 5544f60 Remove Simon's special number from typecheck/should_fail/all.t 7752fa5 Minor documentation fix in GHC.ForeignPtr 3cb063c Remove `parallel` as a submodule 69ebf5c HIE: Save module name and module exports af7b0fd Cmm: Promote stack arguments to word size 4a09d30 Run some of Haddock's tests in the testsuite 0fff3ae Testsuite: implement use_specs. 1f1b9e3 Get rid of tcm_smart from TyCoMapper 1ffee94 Fix warnings and fatal parsing errors 2a43164 Uphold AvailTC Invariant for associated data fams 129a800 Fix Haddock comment for Integer datatype 9049bfb Disable binder swap in OccurAnal (Trac #16288) b78cc64 Make constructor wrappers inline only during the final phase 7833cf4 Look through newtype wrappers (Trac #16254) 76ac103 base: Document errno behaviour in haddocks. 9f5b11f Remove arc scripts 908b4b8 Fix two bugs in stg_ap_0_fast in profiling runtime 1dad4fc Hadrian: Fix untracked dependencies eda456f CI: Run `cabal update` before trying to build Hadrian aa79f65 Bump ghc version to 8.9 2e96ce1 Test bit-manipulating primops under respective arch flags like -msse4.2 2209ea8 Add comments about how zip fusion e86606f Tiny refactor in isUnliftedRuntimeRep 5eeefe4 Improve the very simple optimiser slightly 3f73f08 Comments only, in GhcPrelude 2a0be14 Text.ParserCombinators.ReadP: use NonEmpty in Final 32f44ed Fix test runner crash when not in a git repo 2f4af71 Dot/bang operators in export lists (Trac #16339) e204431 Handle the (~) type operator in 'tyconsym' 48aafc2 Testsuite: opt-in to symlinks on Windows 9db92cf Set builder env 0e2d300 compiler: Write .o files atomically. See #14533 e8a08f4 compiler: Refactor: extract `withAtomicRename` 473632d Bump nofib submodule. a07f46e Remove tcTyConUserTyVars 0eb7cf0 Don't do binder-swap for GlobalIds c25b135 Fix exprIsConApp_maybe 44ad721 Use validate flavour rather than devel2 for DEBUG CI job 806cc23 Build and copy libffi shared libraries correctly and enable dynamically linking ghc. 4b752d5 Update CI images to GHC-8.4.4 & cabal-install-2.4.1.0 e87ae47 Drop support for i386 and PowerPC in MachO linker 04b7f4c ghc-in-ghci: Fix capitalization of hieFile 2e9426d hWaitForInput-accurate-socket test ac34e78 Remove bogus assertion 6cce36f Add AnonArgFlag to FunTy e61f6e3 Expression/command ambiguity resolution ee284b8 Fix regression incorrectly advertising TH support a990312 Exit with exit code 1 when tests unexpectedly pass 1059e23 gitlab-ci: Only build x86_64-deb8 and fedora27 for releases b85068f Include closure header size in StgLamLift's estimations 8897018 User's Guide: update info on kind inference ae7d1ff User's Guide: forall is a keyword nowadays 6ba3421 testsuite: Fix whitespace in hp2ps error message 9059343 base: Allow fusion for zip7 and related 14586f5 Disable fragile test cases: T14697 T5559 T3424 f320f3b Fix the ghci063 test on Darwin (Trac #16201) 4dbacba Skip T3424 when fast() 5bc195b Treat kind/type variables identically, demolish FKTV 5c084e0 RTS: Add missing memory barrier 2e8f664 Fix intermittent hie002 failure f838809 Cleanup iserv/iserv-proxy c26d299 Visible dependent quantification f37efb1 Lexer: turn some fatal errors into non-fatal ones 8442103 Hadrian: introduce ways to skip some documentation targets 9aa2727 use --docs=no-sphinx in both Hadrian CI jobs b1c7ffa Fix parsing of expected performance changes for tests with non-alpha characters. b90695c gitlab-ci: Pull docker images from ghc/ci-images registry 161f102 Drop Docker images d298cb9 gitlab-ci: Produce DWARF-enabled binary distribution aeefc90 testsuite: Suppress ticks when comparing -ddump-simpl output 1bceb64 gitlab-ci: Give deb9-unreg job a distinct cache key 1285d6b gitlab-ci: A bit of reorganization f77229e detect 'autoreconf' path during configure, and use it in hadrian e2ae52c Don't leave .hi files after running Haddock tests 22c2713 Hadrian: track mingw, ship it in bindists, more robust install script e7080be Revert "compiler: Refactor: extract `withAtomicRename`" e6ce174 Revert "compiler: Write .o files atomically. See #14533" 80dfcee Be more careful when naming TyCon binders 6c4e45b Test Runner: don't show missing baseline warning for performance tests with expected changes on the current commit. 646b6df Fix map/coerce rule for newtypes with wrappers 37f257a Rip out object splitting 23342e1 rts/Printer: Introduce a few more printing utilities c19a401 rts/Printer: Print forwarding pointers db039a4 Add regression test for #15918 2ff77b9 Handle absolute paths to build roots in Hadrian. 5aab1d9 rts: Unglobalize dead_weak_ptr_list and resurrected_threads a4944d8 Fix it 78dd04f Fix #16385 by appending _maybe to a use of lookupGlobalOcc 3caeb44 Move reifyGHCi function into GhciMonad type class 4ca271d testsuite: Introduce fragile modifier 910185a testsuite: Mark heapprof001 as fragile on i386 a65bcbe testsuite: Use fragile modifier for more tests f624dc1 gitlab-ci: Don't allow i386-deb9 to fail 07f378c Add tests for Trac #16221 and #16342 25c3dd3 Test Trac #16263 6b78cd9 IdInfo comments 328d6ff Look at exprArity in useLetUp 00a9b1d Compute strictness signatures assuming exprArity 224c2cd Don't treat trivial RHS specially 629fa97 Add a test case 5e75a1f Check idArity matching depth of idStrictness again 58860a8 Look at idArity in DmdAnal instead From git at git.haskell.org Fri Mar 8 01:44:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/angerman/backport/8.6/reinstallable-lib-ghc' created Message-ID: <20190308014442.A3C143A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Referencing: 000738d211940413421ace5cc04ee9e83c96c62a From git at git.haskell.org Fri Mar 8 01:44:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:44 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16376' created Message-ID: <20190308014444.A50083A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16376 Referencing: d4a6d17b878c49672b4a7d109f7dadb9d9c440ac From git at git.haskell.org Fri Mar 8 01:44:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:46 +0000 (UTC) Subject: [commit: ghc] branch 'wip/testsuite-fragile' created Message-ID: <20190308014446.A5F693A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/testsuite-fragile Referencing: 00f267e51e8c0852a8234eb531f215775378309c From git at git.haskell.org Fri Mar 8 01:44:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:49 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Set RELEASE=NO (1d5b97c) Message-ID: <20190308014449.B4F223A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/1d5b97c2c1b14e7ae28e2b75d5b3a4d7c8c05c5d/ghc >--------------------------------------------------------------- commit 1d5b97c2c1b14e7ae28e2b75d5b3a4d7c8c05c5d Author: Ben Gamari Date: Tue Mar 5 16:02:06 2019 -0500 Set RELEASE=NO >--------------------------------------------------------------- 1d5b97c2c1b14e7ae28e2b75d5b3a4d7c8c05c5d configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 11c2a34..fd82a96 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ dnl AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.6.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) # Set this to YES for a released version, otherwise NO -: ${RELEASE=YES} +: ${RELEASE=NO} # 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 Mar 8 01:44:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:53 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Move Constants into rts (c42f1e5) Message-ID: <20190308014453.91BEF3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/c42f1e5815b6658bf25beceae4adea163b1f7696/ghc >--------------------------------------------------------------- commit c42f1e5815b6658bf25beceae4adea163b1f7696 Author: Moritz Angermann Date: Tue Mar 5 18:25:45 2019 +0800 Move Constants into rts >--------------------------------------------------------------- c42f1e5815b6658bf25beceae4adea163b1f7696 rts/rts.cabal.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index d41135d..237b40a 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -102,6 +102,8 @@ library ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h -- ^ from ../includes DerivedConstants.h ffi.h ffitarget.h + GHCConstantsHaskellType.hs GHCConstantsHaskellWrappers.hs + platformConstants -- ^ generated rts/Adjustor.h rts/BlockSignals.h From git at git.haskell.org Fri Mar 8 01:44:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:44:56 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Move primops into ghc-prim (0173e72) Message-ID: <20190308014456.9DF473A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/0173e7214a4782866b9bd7d3deacb8f1e3f8daf9/ghc >--------------------------------------------------------------- commit 0173e7214a4782866b9bd7d3deacb8f1e3f8daf9 Author: Moritz Angermann Date: Tue Mar 5 18:26:02 2019 +0800 Move primops into ghc-prim >--------------------------------------------------------------- 0173e7214a4782866b9bd7d3deacb8f1e3f8daf9 compiler/ghc.mk | 79 --------------------------------------- libraries/ghc-prim/ghc-prim.cabal | 17 +++++++++ 2 files changed, 17 insertions(+), 79 deletions(-) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 9bc6b3f..3c46e16 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -236,85 +236,6 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/. compiler/stage3/$(PLATFORM_H) : compiler/stage2/$(PLATFORM_H) "$(CP)" $< $@ -# ---------------------------------------------------------------------------- -# Generate supporting stuff for prelude/PrimOp.hs -# from prelude/primops.txt - -PRIMOP_BITS_NAMES = primop-data-decl.hs-incl \ - primop-tag.hs-incl \ - primop-list.hs-incl \ - primop-has-side-effects.hs-incl \ - primop-out-of-line.hs-incl \ - primop-commutable.hs-incl \ - primop-code-size.hs-incl \ - primop-can-fail.hs-incl \ - primop-strictness.hs-incl \ - primop-fixity.hs-incl \ - primop-primop-info.hs-incl \ - primop-vector-uniques.hs-incl \ - primop-vector-tys.hs-incl \ - primop-vector-tys-exports.hs-incl \ - primop-vector-tycons.hs-incl - -PRIMOP_BITS_STAGE1 = $(addprefix compiler/stage1/build/,$(PRIMOP_BITS_NAMES)) -PRIMOP_BITS_STAGE2 = $(addprefix compiler/stage2/build/,$(PRIMOP_BITS_NAMES)) -PRIMOP_BITS_STAGE3 = $(addprefix compiler/stage3/build/,$(PRIMOP_BITS_NAMES)) - -compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) -compiler_CPP_OPTS += ${GhcCppOpts} - -# We add these paths to the Haskell compiler's #include search path list since -# we must avoid #including files by paths relative to the source file as Hadrian -# moves the build artifacts out of the source tree. See #8040. -compiler_HC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) - -define preprocessCompilerFiles -# $0 = stage -compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp compiler/stage$1/$$(PLATFORM_H) - $$(HS_CPP) -P $$(compiler_CPP_OPTS) -Icompiler/stage$1 -x c $$< | grep -v '^#pragma GCC' > $$@ - -compiler/stage$1/build/primop-data-decl.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --data-decl < $$< > $$@ -compiler/stage$1/build/primop-tag.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-tag < $$< > $$@ -compiler/stage$1/build/primop-list.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-list < $$< > $$@ -compiler/stage$1/build/primop-has-side-effects.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --has-side-effects < $$< > $$@ -compiler/stage$1/build/primop-out-of-line.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --out-of-line < $$< > $$@ -compiler/stage$1/build/primop-commutable.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --commutable < $$< > $$@ -compiler/stage$1/build/primop-code-size.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --code-size < $$< > $$@ -compiler/stage$1/build/primop-can-fail.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --can-fail < $$< > $$@ -compiler/stage$1/build/primop-strictness.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --strictness < $$< > $$@ -compiler/stage$1/build/primop-fixity.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --fixity < $$< > $$@ -compiler/stage$1/build/primop-primop-info.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-primop-info < $$< > $$@ -compiler/stage$1/build/primop-vector-uniques.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-uniques < $$< > $$@ -compiler/stage$1/build/primop-vector-tys.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tys < $$< > $$@ -compiler/stage$1/build/primop-vector-tys-exports.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tys-exports < $$< > $$@ -compiler/stage$1/build/primop-vector-tycons.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --primop-vector-tycons < $$< > $$@ - -# Usages aren't used any more; but the generator -# can still generate them if we want them back -compiler/stage$1/build/primop-usage.hs-incl: compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE) - "$$(genprimopcode_INPLACE)" --usage < $$< > $$@ - -endef - -$(eval $(call preprocessCompilerFiles,1)) -$(eval $(call preprocessCompilerFiles,2)) -$(eval $(call preprocessCompilerFiles,3)) - # ----------------------------------------------------------------------------- # Configuration diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index a95f1ec..3bc849b 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -81,3 +81,20 @@ Library -- We need to set the unit ID to ghc-prim (without a version number) -- as it's magic. ghc-options: -this-unit-id ghc-prim + + install-includes: + primop-data-decl.hs-incl + primop-tag.hs-incl + primop-list.hs-incl + primop-has-side-effects.hs-incl + primop-out-of-line.hs-incl + primop-commutable.hs-incl + primop-code-size.hs-incl + primop-can-fail.hs-incl + primop-strictness.hs-incl + primop-fixity.hs-incl + primop-primop-info.hs-incl + primop-vector-uniques.hs-incl + primop-vector-tys.hs-incl + primop-vector-tys-exports.hs-incl + primop-vector-tycons.hs-incl \ No newline at end of file From git at git.haskell.org Fri Mar 8 01:45:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:00 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Move boot_platform and primops.txt.pp into ghc-prim (ac69611) Message-ID: <20190308014500.503763A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/ac696118e2f1bfc571b400a045cf4139a3f2f323/ghc >--------------------------------------------------------------- commit ac696118e2f1bfc571b400a045cf4139a3f2f323 Author: Moritz Angermann Date: Tue Mar 5 18:34:26 2019 +0800 Move boot_platform and primops.txt.pp into ghc-prim >--------------------------------------------------------------- ac696118e2f1bfc571b400a045cf4139a3f2f323 compiler/ghc.mk | 94 ---------- ghc.mk | 20 --- libraries/ghc-prim/ghc.mk | 198 +++++++++++++++++++++ .../prelude => libraries/ghc-prim}/primops.txt.pp | 0 4 files changed, 198 insertions(+), 114 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 ac696118e2f1bfc571b400a045cf4139a3f2f323 From git at git.haskell.org Fri Mar 8 01:45:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:04 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Split Config.hs into Config.hs + config.hs-incl, and place config.hs-incl into the rts. (9b95240) Message-ID: <20190308014504.131B53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/9b95240737b13494675ff51622919d75ef74e338/ghc >--------------------------------------------------------------- commit 9b95240737b13494675ff51622919d75ef74e338 Author: Moritz Angermann Date: Tue Mar 5 22:43:47 2019 +0800 Split Config.hs into Config.hs + config.hs-incl, and place config.hs-incl into the rts. >--------------------------------------------------------------- 9b95240737b13494675ff51622919d75ef74e338 compiler/ghc.mk | 101 +----------------------------------------------- compiler/main/Config.hs | 7 ++++ rts/ghc.mk | 89 ++++++++++++++++++++++++++++++++++++++++++ rts/rts.cabal.in | 1 + 4 files changed, 98 insertions(+), 100 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 9b95240737b13494675ff51622919d75ef74e338 From git at git.haskell.org Fri Mar 8 01:45:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:07 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: WIP (e7a8461) Message-ID: <20190308014507.31B533A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/e7a84611fcc887088b8a888e1375a27fbdb757c2/ghc >--------------------------------------------------------------- commit e7a84611fcc887088b8a888e1375a27fbdb757c2 Author: Moritz Angermann Date: Wed Mar 6 09:51:16 2019 +0800 WIP >--------------------------------------------------------------- e7a84611fcc887088b8a888e1375a27fbdb757c2 compiler/ghc.mk | 14 +++++++------- ghc/ghc.mk | 6 +++--- libraries/ghc-prim/ghc.mk | 41 ++++++++++++++++++++--------------------- rts/rts.cabal.in | 1 + 4 files changed, 31 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 e7a84611fcc887088b8a888e1375a27fbdb757c2 From git at git.haskell.org Fri Mar 8 01:45:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:10 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Migrate flag logic from ghc to ghc-prim; add HsVersion.h to rts (9a03279) Message-ID: <20190308014510.38ABC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/9a03279d3d5e684c7777ef04eab990420e4365f9/ghc >--------------------------------------------------------------- commit 9a03279d3d5e684c7777ef04eab990420e4365f9 Author: Moritz Angermann Date: Wed Mar 6 16:35:08 2019 +0800 Migrate flag logic from ghc to ghc-prim; add HsVersion.h to rts >--------------------------------------------------------------- 9a03279d3d5e684c7777ef04eab990420e4365f9 ghc/ghc.mk | 4 ---- libraries/ghc-prim/ghc-prim.cabal | 16 ++++++++++++++++ libraries/ghc-prim/ghc.mk | 5 +++++ rts/rts.cabal.in | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ghc/ghc.mk b/ghc/ghc.mk index 05354fb..b062443 100644 --- a/ghc/ghc.mk +++ b/ghc/ghc.mk @@ -14,10 +14,6 @@ ghc_USES_CABAL = YES ghc_PACKAGE = ghc-bin ghc_EXECUTABLE = ghc -ghc_stage1_CONFIGURE_OPTS += --flags=stage1 -ghc_stage2_CONFIGURE_OPTS += --flags=stage2 -ghc_stage3_CONFIGURE_OPTS += --flags=stage3 - ifeq "$(GhcWithInterpreter)" "YES" ghc_stage2_CONFIGURE_OPTS += --flags=ghci ghc_stage3_CONFIGURE_OPTS += --flags=ghci diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index 3bc849b..1432360 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -12,6 +12,16 @@ build-type: Custom description: This package contains the primitive types and operations supplied by GHC. +Flag boot + Description: Is this stage 1? + Default: False + Manual: True + +Flag install + Description: Is this stage 2? + Default: True + Manual: True + extra-source-files: changelog.md source-repository head @@ -82,6 +92,12 @@ Library -- as it's magic. ghc-options: -this-unit-id ghc-prim + if flag(boot) + include-dirs: dist-boot + else + if flag(install) + include-dirs: dist-install + install-includes: primop-data-decl.hs-incl primop-tag.hs-incl diff --git a/libraries/ghc-prim/ghc.mk b/libraries/ghc-prim/ghc.mk index 87f676f..5b09478 100644 --- a/libraries/ghc-prim/ghc.mk +++ b/libraries/ghc-prim/ghc.mk @@ -1,6 +1,11 @@ libraries/ghc-prim_PACKAGE = ghc-prim libraries/ghc-prim_dist-install_GROUP = libraries +libraries/ghc-prim_stage1_CONFIGURE_OPTS += --flags=boot +libraries/ghc-prim_stage2_CONFIGURE_OPTS += --flags=install +libraries/ghc-prim_stage3_CONFIGURE_OPTS += --flags=install + + # ---------------------------------------- # Special magic for the ghc-prim package diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index 508f5ec..4ab75bc 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -106,6 +106,7 @@ library CodeGen.Platform.hs platformConstants config.hs-incl + HsVersions.h -- ^ generated rts/Adjustor.h rts/BlockSignals.h From git at git.haskell.org Fri Mar 8 01:45:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:13 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Fix header locations (d49b0e0) Message-ID: <20190308014513.52F173A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/d49b0e03d5792b5a49c0f2db460308439434bc12/ghc >--------------------------------------------------------------- commit d49b0e03d5792b5a49c0f2db460308439434bc12 Author: Moritz Angermann Date: Wed Mar 6 22:45:06 2019 +0800 Fix header locations >--------------------------------------------------------------- d49b0e03d5792b5a49c0f2db460308439434bc12 compiler/cmm/SMRep.hs | 4 ++-- compiler/codeGen/CodeGen/Platform/ARM.hs | 2 +- compiler/codeGen/CodeGen/Platform/ARM64.hs | 2 +- compiler/codeGen/CodeGen/Platform/NoRegs.hs | 2 +- compiler/codeGen/CodeGen/Platform/PPC.hs | 2 +- compiler/codeGen/CodeGen/Platform/SPARC.hs | 2 +- compiler/codeGen/CodeGen/Platform/X86.hs | 2 +- compiler/codeGen/CodeGen/Platform/X86_64.hs | 2 +- compiler/codeGen/StgCmmClosure.hs | 2 +- compiler/codeGen/StgCmmLayout.hs | 2 +- compiler/ghc.cabal.in | 6 ++++++ compiler/ghci/ByteCodeInstr.hs | 2 +- compiler/nativeGen/PPC/CodeGen.hs | 2 +- compiler/nativeGen/SPARC/CodeGen.hs | 2 +- compiler/nativeGen/X86/CodeGen.hs | 2 +- compiler/prelude/PrelRules.hs | 2 +- compiler/utils/Binary.hs | 2 +- includes/ghc.mk | 2 +- utils/genapply/Main.hs | 2 +- 19 files changed, 25 insertions(+), 19 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 d49b0e03d5792b5a49c0f2db460308439434bc12 From git at git.haskell.org Fri Mar 8 01:45:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:16 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: drop stage logic from ghc.cabal (326d383) Message-ID: <20190308014516.664E23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/326d38302c9943d4695e87e64a3b493f8266072a/ghc >--------------------------------------------------------------- commit 326d38302c9943d4695e87e64a3b493f8266072a Author: Moritz Angermann Date: Wed Mar 6 17:06:16 2019 +0800 drop stage logic from ghc.cabal >--------------------------------------------------------------- 326d38302c9943d4695e87e64a3b493f8266072a compiler/ghc.cabal.in | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 01628dc..44ce668 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -25,21 +25,6 @@ Flag ghci Default: False Manual: True -Flag stage1 - Description: Is this stage 1? - Default: False - Manual: True - -Flag stage2 - Description: Is this stage 2? - Default: False - Manual: True - -Flag stage3 - Description: Is this stage 3? - Default: False - Manual: True - Flag terminfo Description: Build GHC with terminfo support on non-Windows platforms. Default: True @@ -119,17 +104,6 @@ Library -- as it's magic. GHC-Options: -this-unit-id ghc - if flag(stage1) - Include-Dirs: stage1 - else - if flag(stage2) - Include-Dirs: stage2 - else - if flag(stage3) - Include-Dirs: stage2 - - Install-Includes: HsVersions.h, ghc_boot_platform.h - c-sources: parser/cutils.c ghci/keepCAFsForGHCi.c From git at git.haskell.org Fri Mar 8 01:45:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:19 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Make it build (19a6f31) Message-ID: <20190308014519.6E2163A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/19a6f315a227b69725db360667075a9247517bb6/ghc >--------------------------------------------------------------- commit 19a6f315a227b69725db360667075a9247517bb6 Author: Moritz Angermann Date: Wed Mar 6 15:24:08 2019 +0800 Make it build >--------------------------------------------------------------- 19a6f315a227b69725db360667075a9247517bb6 ghc/ghc.mk | 6 ++++++ libraries/ghc-prim/ghc.mk | 2 +- {compiler => rts/build}/HsVersions.h | 0 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc/ghc.mk b/ghc/ghc.mk index 8099fe2..05354fb 100644 --- a/ghc/ghc.mk +++ b/ghc/ghc.mk @@ -178,6 +178,12 @@ INSTALL_LIBS += settings INSTALL_LIBS += llvm-targets INSTALL_LIBS += llvm-passes +# A rather nasty hack needed because we still have headers in +# ghc-prim and rts. +ghc_stage1_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-boot +ghc_stage2_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-install +ghc_stage3_HC_OPTS += -Irts/build -Ilibraries/ghc-prim/dist-install + ifeq "$(Windows_Host)" "NO" install: install_ghc_link .PHONY: install_ghc_link diff --git a/libraries/ghc-prim/ghc.mk b/libraries/ghc-prim/ghc.mk index f865c0f..87f676f 100644 --- a/libraries/ghc-prim/ghc.mk +++ b/libraries/ghc-prim/ghc.mk @@ -13,7 +13,7 @@ define libraries/ghc-prim_PACKAGE_MAGIC libraries/ghc-prim_dist-install_MODULES := $$(filter-out GHC.Prim,$$(libraries/ghc-prim_dist-install_MODULES)) endef -PRIMOPS_TXT_STAGE1 = libraries/ghc-prim/dist-boot/build/primops.txt +PRIMOPS_TXT_STAGE1 = libraries/ghc-prim/dist-boot/primops.txt libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs : $$(genprimopcode_INPLACE) $(PRIMOPS_TXT_STAGE1) | $$(dir $$@)/. "$(genprimopcode_INPLACE)" --make-haskell-wrappers < $(PRIMOPS_TXT_STAGE1) >$@ diff --git a/compiler/HsVersions.h b/rts/build/HsVersions.h similarity index 100% rename from compiler/HsVersions.h rename to rts/build/HsVersions.h From git at git.haskell.org Fri Mar 8 01:45:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:22 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Make sure headers are copied properly. (4a32ec7) Message-ID: <20190308014522.7555A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/4a32ec7e3ddda7294a03a65c8f5033ccab023aa6/ghc >--------------------------------------------------------------- commit 4a32ec7e3ddda7294a03a65c8f5033ccab023aa6 Author: Moritz Angermann Date: Wed Mar 6 21:51:47 2019 +0800 Make sure headers are copied properly. >--------------------------------------------------------------- 4a32ec7e3ddda7294a03a65c8f5033ccab023aa6 includes/ghc.mk | 2 ++ libraries/ghc-prim/ghc-prim.cabal | 1 + 2 files changed, 3 insertions(+) diff --git a/includes/ghc.mk b/includes/ghc.mk index d08ecfb..0b3fcf0 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -229,4 +229,6 @@ install_includes : $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$d/*.h "$(DESTDIR)$(ghcheaderdir)/$d/" && \ ) true $(INSTALL_HEADER) $(INSTALL_OPTS) $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_VERSION) $(includes_DERIVEDCONSTANTS) "$(DESTDIR)$(ghcheaderdir)/" + $(INSTALL_HEADER) rts/build/*.h rts/build/*.hs-incl includes/CodeGen.Platform.hs "$(DESTDIR)$(ghcheaderdir)/" + $(INSTALL_HEADER $(includes_GHCCONSTANTS_HASKELL_TYPE) $(includes_GHCCONSTANTS_HASKELL_VALUE) $(includes_GHCCONSTANTS_HASKELL_WRAPPERS) $(includes_GHCCONSTANTS_HASKELL_EXPORTS) "$(DESTDIR)$(ghcheaderdir)/" diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index 1432360..132fe12 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -99,6 +99,7 @@ Library include-dirs: dist-install install-includes: + ghc_boot_platform.h primop-data-decl.hs-incl primop-tag.hs-incl primop-list.hs-incl From git at git.haskell.org Fri Mar 8 01:45:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:25 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: WIP (e224900) Message-ID: <20190308014525.7BF713A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/e224900ee58e404348fae96c2f8d706d973b2047/ghc >--------------------------------------------------------------- commit e224900ee58e404348fae96c2f8d706d973b2047 Author: Moritz Angermann Date: Wed Mar 6 23:03:25 2019 +0800 WIP >--------------------------------------------------------------- e224900ee58e404348fae96c2f8d706d973b2047 utils/genapply/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs index 02155c0..150c8c8 100644 --- a/utils/genapply/Main.hs +++ b/utils/genapply/Main.hs @@ -17,7 +17,7 @@ module Main(main) where #include "../../includes/rts/Constants.h" -- Needed for TAG_BITS -#include "../MachDeps.h" +#include "MachDeps.h" #if MIN_VERSION_base(4,11,0) import Prelude hiding ((<>)) From git at git.haskell.org Fri Mar 8 01:45:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:28 +0000 (UTC) Subject: [commit: ghc] wip/angerman/backport/8.6/reinstallable-lib-ghc: Fix PPC_Darwin (000738d) Message-ID: <20190308014528.89DE53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/backport/8.6/reinstallable-lib-ghc Link : http://ghc.haskell.org/trac/ghc/changeset/000738d211940413421ace5cc04ee9e83c96c62a/ghc >--------------------------------------------------------------- commit 000738d211940413421ace5cc04ee9e83c96c62a Author: Moritz Angermann Date: Thu Mar 7 10:29:26 2019 +0800 Fix PPC_Darwin >--------------------------------------------------------------- 000738d211940413421ace5cc04ee9e83c96c62a compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs b/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs index 91923fd..b0eb097 100644 --- a/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs +++ b/compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs @@ -7,5 +7,5 @@ import GhcPrelude #define MACHREGS_NO_REGS 0 #define MACHREGS_powerpc 1 #define MACHREGS_darwin 1 -#include "../../../../includes/CodeGen.Platform.hs" +#include "CodeGen.Platform.hs" From git at git.haskell.org Fri Mar 8 01:45:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:31 +0000 (UTC) Subject: [commit: ghc] wip/testsuite-fragile: Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 (00f267e) Message-ID: <20190308014531.8BC383A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/testsuite-fragile Link : http://ghc.haskell.org/trac/ghc/changeset/00f267e51e8c0852a8234eb531f215775378309c/ghc >--------------------------------------------------------------- commit 00f267e51e8c0852a8234eb531f215775378309c Author: Vladislav Zavialov Date: Thu Mar 7 10:33:41 2019 +0300 Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 Also, replace some tabs with spaces to avoid a "mixed indent" warning that vim gives me. >--------------------------------------------------------------- 00f267e51e8c0852a8234eb531f215775378309c testsuite/tests/perf/compiler/all.T | 7 +++---- testsuite/tests/rts/all.T | 16 +++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index c6548c1..ff80c74 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -356,10 +356,9 @@ test('T13719', test('T14697', [ collect_compiler_stats('bytes allocated',10), # This generates too large of a command-line for poor Windows and - # Darwin. The failure is non-deterministic, so we 'skip' it rather than - # 'expect_broken'. The solution is to teach the testsuite driver to - # invoke GHC with a response file, see Trac #15072 - when(opsys('mingw32') or opsys('darwin'), skip), + # Darwin. The solution is to teach the testsuite driver to + # invoke GHC with a response file. + when(opsys('mingw32') or opsys('darwin'), fragile(15072)), pre_cmd('./genT14697'), extra_files(['genT14697']), extra_hc_opts('$(cat T14697-flags)'), # 10k -optP arguments diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index ac0fbff..4d2be2b 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -74,7 +74,7 @@ test('T2047', [ignore_stdout, extra_run_opts('+RTS -c -RTS')], # Skip GHCi due to #2786 test('T2783', [ omit_ways(['ghci']), exit_code(1) , expect_broken_for(2783, ['threaded1']) - ], compile_and_run, ['']) + ], compile_and_run, ['']) # Test the work-stealing deque implementation. We run this test in # both threaded1 (-threaded -debug) and threaded2 (-threaded) ways. @@ -99,17 +99,15 @@ test('stack003', [ omit_ways('ghci'), # uses unboxed tuples # Test that +RTS -K0 (e.g. no stack limit) parses correctly test('stack004', [ extra_run_opts('+RTS -K0 -RTS') - , expect_broken_for(14913, ['ghci']) - ], compile_and_run, ['']) + , expect_broken_for(14913, ['ghci']) + ], compile_and_run, ['']) test('atomicinc', [ c_src, only_ways(['normal','threaded1', 'threaded2']) ], compile_and_run, ['']) test('atomicxchg', [ c_src, only_ways(['threaded1', 'threaded2']) ], compile_and_run, ['']) test('T3424', - [ # Skip due to non-deterministic timeouts on CI, see Trac #16349 - when(unregisterised(), skip), - # And it's slow in general + [ when(unregisterised(), fragile(16349)), when(fast(), skip), only_ways(['normal','threaded1','ghci']) ], @@ -219,7 +217,7 @@ test('T5435_v_asm_a', [extra_files(['T5435.hs', 'T5435_asm.c']), test('T5435_v_asm_b', [extra_files(['T5435.hs', 'T5435_asm.c']), when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)), - when(opsys('darwin') or opsys('mingw32'), skip)], + when(opsys('darwin') or opsys('mingw32'), skip)], makefile_test, ['T5435_v_asm_b']) test('T5435_v_gcc', [extra_files(['T5435.hs', 'T5435_gcc.c']), when(arch('powerpc64') or arch('powerpc64le'), @@ -413,8 +411,8 @@ test('T13617', [ unless(opsys('mingw32'), skip)], # Test is being skipped on darwin due to it's flakiness. test('T12903', [ when(opsys('mingw32'), skip) , when(opsys('darwin'), skip) - , omit_ways(['ghci', 'profasm'])] - , compile_and_run, ['']) + , omit_ways(['ghci', 'profasm'])] + , compile_and_run, ['']) test('T13832', exit_code(1), compile_and_run, ['-threaded']) test('T13894', normal, compile_and_run, ['']) From git at git.haskell.org Fri Mar 8 01:45:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:35 +0000 (UTC) Subject: [commit: ghc] wip/T16376: Use captureTopConstraints in TcRnDriver calls (d4a6d17) Message-ID: <20190308014535.88DC63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16376 Link : http://ghc.haskell.org/trac/ghc/changeset/d4a6d17b878c49672b4a7d109f7dadb9d9c440ac/ghc >--------------------------------------------------------------- commit d4a6d17b878c49672b4a7d109f7dadb9d9c440ac Author: Simon Peyton Jones Date: Thu Mar 7 09:09:13 2019 +0000 Use captureTopConstraints in TcRnDriver calls Trac #16376 showed the danger of failing to report an error that exists only in the unsolved constraints, if an exception is raised (via failM). Well, the commit 5c1f268e (Fail fast in solveLocalEqualities) did just that -- i.e. it found errors in the constraints, and called failM to avoid a misleading cascade. So we need to be sure to call captureTopConstraints to report those insolubles. This was wrong in TcRnDriver.tcRnExpr and in TcRnDriver.tcRnType. As a result the error messages from test T13466 improved slightly, a happy outcome. >--------------------------------------------------------------- d4a6d17b878c49672b4a7d109f7dadb9d9c440ac compiler/typecheck/TcRnDriver.hs | 19 ++++++++++++------- compiler/typecheck/TcRnMonad.hs | 2 +- compiler/typecheck/TcSimplify.hs | 17 +++++++++++++++-- testsuite/tests/ghci/scripts/T13466.stderr | 2 ++ testsuite/tests/ghci/scripts/T16376.script | 4 ++++ testsuite/tests/ghci/scripts/T16376.stderr | 12 ++++++++++++ testsuite/tests/ghci/scripts/all.T | 1 + 7 files changed, 47 insertions(+), 10 deletions(-) diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs index fcac5cb..9c60709 100644 --- a/compiler/typecheck/TcRnDriver.hs +++ b/compiler/typecheck/TcRnDriver.hs @@ -399,8 +399,8 @@ tcRnSrcDecls explicit_mod_hdr decls -- Check for the 'main' declaration -- Must do this inside the captureTopConstraints + -- NB: always set envs *before* captureTopConstraints ; (tcg_env, lie_main) <- setEnvs (tcg_env, tcl_env) $ - -- always set envs *before* captureTopConstraints captureTopConstraints $ checkMain explicit_mod_hdr @@ -502,10 +502,13 @@ run_th_modfinalizers = do let run_finalizer (lcl_env, f) = setLclEnv lcl_env (runRemoteModFinalizers f) - (_, lie_th) <- captureTopConstraints $ mapM_ run_finalizer th_modfinalizers + (_, lie_th) <- captureTopConstraints $ + mapM_ run_finalizer th_modfinalizers + -- Finalizers can add top-level declarations with addTopDecls, so -- we have to run tc_rn_src_decls to get them (tcg_env, tcl_env, lie_top_decls) <- tc_rn_src_decls [] + setEnvs (tcg_env, tcl_env) $ do -- Subsequent rounds of finalizers run after any new constraints are -- simplified, or some types might not be complete when using reify @@ -616,11 +619,12 @@ tcRnHsBootDecls hsc_src decls , hs_defds = def_decls , hs_ruleds = rule_decls , hs_annds = _ - , hs_valds - = XValBindsLR (NValBinds val_binds val_sigs) }) + , hs_valds = XValBindsLR (NValBinds val_binds val_sigs) }) <- rnTopSrcDecls first_group + -- The empty list is for extra dependencies coming from .hs-boot files -- See Note [Extra dependencies from .hs-boot files] in RnSource + ; (gbl_env, lie) <- setGblEnv tcg_env $ captureTopConstraints $ do { -- NB: setGblEnv **before** captureTopConstraints so that -- if the latter reports errors, it knows what's in scope @@ -2360,8 +2364,9 @@ tcRnExpr hsc_env mode rdr_expr uniq <- newUnique ; let { fresh_it = itName uniq (getLoc rdr_expr) ; orig = lexprCtOrigin rn_expr } ; - (tclvl, lie, res_ty) - <- pushLevelAndCaptureConstraints $ + ((tclvl, res_ty), lie) + <- captureTopConstraints $ + pushTcLevelM $ do { (_tc_expr, expr_ty) <- tcInferSigma rn_expr ; if inst then snd <$> deeplyInstantiate orig expr_ty @@ -2430,7 +2435,7 @@ tcRnType hsc_env normalise rdr_type -- First bring into scope any wildcards ; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_type]) ; ((ty, kind), lie) <- - captureConstraints $ + captureTopConstraints $ tcWildCardBinders wcs $ \ wcs' -> do { emitWildCardHoleConstraints wcs' ; tcLHsTypeUnsaturated rn_type } diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs index 77ea116..8b720d6 100644 --- a/compiler/typecheck/TcRnMonad.hs +++ b/compiler/typecheck/TcRnMonad.hs @@ -1684,7 +1684,7 @@ Hence: - insolublesOnly in tryCaptureConstraints - emitConstraints in the Left case of captureConstraints -Hover note that fresly-generated constraints like (Int ~ Bool), or +However note that freshly-generated constraints like (Int ~ Bool), or ((a -> b) ~ Int) are all CNonCanonical, and hence won't be flagged as insoluble. The constraint solver does that. So they'll be discarded. That's probably ok; but see th/5358 as a not-so-good example: diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index f50b33e..418aa98 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -81,8 +81,21 @@ captureTopConstraints :: TcM a -> TcM (a, WantedConstraints) -- generates plus the constraints produced by static forms inside. -- If it fails with an exception, it reports any insolubles -- (out of scope variables) before doing so --- NB: bring any environments into scope before calling this, so that --- the reportUnsolved has access to the most complete GlobalRdrEnv +-- +-- captureTopConstraints is used exclusively by TcRnDriver at the top +-- level of a module. +-- +-- Importantly, if captureTopConstraints propagates an exception, it +-- reports any insoluble constraints first, lest they be lost +-- altogether. This is important, because solveLocalEqualities (maybe +-- other things too) throws an exception without adding any error +-- messages; it just puts the unsolved constraints back into the +-- monad. See TcRnMonad Note [Constraints and errors] +-- Trac #16376 is an example of what goes wrong if you don't do this. +-- +-- NB: the caller should bring any environments into scope before +-- calling this, so that the reportUnsolved has access to the most +-- complete GlobalRdrEnv captureTopConstraints thing_inside = do { static_wc_var <- TcM.newTcRef emptyWC ; ; (mb_res, lie) <- TcM.updGblEnv (\env -> env { tcg_static_wc = static_wc_var } ) $ diff --git a/testsuite/tests/ghci/scripts/T13466.stderr b/testsuite/tests/ghci/scripts/T13466.stderr index ba3d5fd..edd05c5 100644 --- a/testsuite/tests/ghci/scripts/T13466.stderr +++ b/testsuite/tests/ghci/scripts/T13466.stderr @@ -1,4 +1,6 @@ +:1:1: error: Variable not in scope: out_of_scope + :1:1: error: • Cannot apply expression of type ‘t1’ to a visible type argument ‘[]’ diff --git a/testsuite/tests/ghci/scripts/T16376.script b/testsuite/tests/ghci/scripts/T16376.script new file mode 100644 index 0000000..7bdc872 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16376.script @@ -0,0 +1,4 @@ +:set -XTypeApplications -XPolyKinds -XDataKinds +:t id @Maybe +type Id (a :: k) = a +:k Id @Maybe diff --git a/testsuite/tests/ghci/scripts/T16376.stderr b/testsuite/tests/ghci/scripts/T16376.stderr new file mode 100644 index 0000000..7b34531 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16376.stderr @@ -0,0 +1,12 @@ + +:1:5: error: + • Expecting one more argument to ‘Maybe’ + Expected a type, but ‘Maybe’ has kind ‘* -> *’ + • In the type ‘Maybe’ + In the expression: id @Maybe + +:1:5: error: + • Expecting one more argument to ‘Maybe’ + Expected a type, but ‘Maybe’ has kind ‘* -> *’ + • In the first argument of ‘Id’, namely ‘Maybe’ + In the type ‘Id @Maybe’ diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 946c6ef..dd76a07 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -292,3 +292,4 @@ test('T16030', normal, ghci_script, ['T16030.script']) test('T11606', normal, ghci_script, ['T11606.script']) test('T16089', normal, ghci_script, ['T16089.script']) test('T14828', expect_broken(14828), ghci_script, ['T14828.script']) +test('T16376', normal, ghci_script, ['T16376.script']) From git at git.haskell.org Fri Mar 8 01:45:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:38 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: Try again (cbb1dd2) Message-ID: <20190308014538.91A5E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/cbb1dd2494619d4e22d897233f9e0b5908a1e429/ghc >--------------------------------------------------------------- commit cbb1dd2494619d4e22d897233f9e0b5908a1e429 Author: Ben Gamari Date: Wed Mar 6 23:34:52 2019 -0500 Try again >--------------------------------------------------------------- cbb1dd2494619d4e22d897233f9e0b5908a1e429 testsuite/tests/plugins/all.T | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index f345e21..aea3748 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -5,9 +5,11 @@ setTestOpts([ # sequentially until this is fixed. This likely means that #13194 isn't fully # solved. See also #15313. when(opsys('mingw32'), multi_cpu_race), - # The Windows toolchain, particularly linking, is remarkably slow, give it - # time to do its thing - when(opsys('mingw32'), compile_timeout_multiplier(2)) + # Unfortunately even with the above these tests are incredibly flaky on Windows. + # In any given testsuite run at least half a dozen fail for one reason of another + # (typically a cmmbination of timeouts, some missing static archive errors from ld, + # and a few plain crashes). + when(opsys('mingw32'), fragile(16405)) ]) From git at git.haskell.org Fri Mar 8 01:45:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:41 +0000 (UTC) Subject: [commit: ghc] wip/mark-fragile-windows-tests: testsuite: Display observed exit code on failure due to bad exit code (671338c) Message-ID: <20190308014541.980573A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mark-fragile-windows-tests Link : http://ghc.haskell.org/trac/ghc/changeset/671338c5bac7b6169e6a990c09fcf14dcc752dec/ghc >--------------------------------------------------------------- commit 671338c5bac7b6169e6a990c09fcf14dcc752dec Author: Ben Gamari Date: Thu Mar 7 10:13:13 2019 -0500 testsuite: Display observed exit code on failure due to bad exit code >--------------------------------------------------------------- 671338c5bac7b6169e6a990c09fcf14dcc752dec 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 edd43fb..6a588a8 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1378,7 +1378,7 @@ def simple_run(name, way, prog, extra_run_opts): print('Wrong exit code for ' + name + '(' + way + ')' + '(expected', opts.exit_code, ', actual', exit_code, ')') dump_stdout(name) dump_stderr(name) - return failBecause('bad exit code') + return failBecause('bad exit code (' + exit_code + ')') if not (opts.ignore_stderr or stderr_ok(name, way) or opts.combined_output): return failBecause('bad stderr') From git at git.haskell.org Fri Mar 8 01:45:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:45 +0000 (UTC) Subject: [commit: ghc] master: Fix #16392: revertCAFs in external interpreter when necessary (7a68254) Message-ID: <20190308014545.6B7093A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7a68254a7284db5bf8f1fa82aba4a6825d8f050a/ghc >--------------------------------------------------------------- commit 7a68254a7284db5bf8f1fa82aba4a6825d8f050a Author: Phuong Trinh Date: Tue Mar 5 15:48:46 2019 +0000 Fix #16392: revertCAFs in external interpreter when necessary We revert CAFs when loading/adding modules in ghci (presumably to refresh execution states and to allow for object code to be unloaded from the runtime). However, with `-fexternal-interpreter` enabled, we are only doing it in the ghci process instead of the external interpreter process where the cafs are allocated and computed. This makes sure that revertCAFs is done in the appropriate process no matter if that flag is present or not. >--------------------------------------------------------------- 7a68254a7284db5bf8f1fa82aba4a6825d8f050a ghc/GHCi/UI/Monad.hs | 5 ++--- libraries/ghci/GHCi/Message.hs | 6 +++++- libraries/ghci/GHCi/Run.hs | 4 ++++ testsuite/tests/ghci/T16392/A.hs | 11 +++++++++++ testsuite/tests/ghci/T16392/T16392.script | 5 +++++ testsuite/tests/ghci/T16392/T16392.stderr | 2 ++ .../tests/{boxy/T2193.stdout => ghci/T16392/T16392.stdout} | 1 + testsuite/tests/ghci/T16392/all.T | 4 ++++ 8 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 51f1366..fb88727 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -456,14 +456,13 @@ printStats dflags ActionStats{actionAllocs = mallocs, actionElapsedTime = secs} revertCAFs :: GhciMonad m => m () revertCAFs = do - liftIO rts_revertCAFs + hsc_env <- GHC.getSession + liftIO $ iservCmd hsc_env RtsRevertCAFs s <- getGHCiState when (not (ghc_e s)) turnOffBuffering -- Have to turn off buffering again, because we just -- reverted stdout, stderr & stdin to their defaults. -foreign import ccall "revertCAFs" rts_revertCAFs :: IO () - -- Make it "safe", just in case ----------------------------------------------------------------------------- -- To flush buffers for the *interpreted* computation we need diff --git a/libraries/ghci/GHCi/Message.hs b/libraries/ghci/GHCi/Message.hs index 959942e..319eebd 100644 --- a/libraries/ghci/GHCi/Message.hs +++ b/libraries/ghci/GHCi/Message.hs @@ -61,6 +61,7 @@ import System.IO.Error data Message a where -- | Exit the iserv process Shutdown :: Message () + RtsRevertCAFs :: Message () -- RTS Linker ------------------------------------------- @@ -485,7 +486,9 @@ getMessage = do 33 -> Msg <$> (AddSptEntry <$> get <*> get) 34 -> Msg <$> (RunTH <$> get <*> get <*> get <*> get) 35 -> Msg <$> (GetClosure <$> get) - _ -> Msg <$> (Seq <$> get) + 36 -> Msg <$> (Seq <$> get) + 37 -> Msg <$> return RtsRevertCAFs + _ -> error $ "Unknown Message code " ++ (show b) putMessage :: Message a -> Put putMessage m = case m of @@ -526,6 +529,7 @@ putMessage m = case m of RunTH st q loc ty -> putWord8 34 >> put st >> put q >> put loc >> put ty GetClosure a -> putWord8 35 >> put a Seq a -> putWord8 36 >> put a + RtsRevertCAFs -> putWord8 37 -- ----------------------------------------------------------------------------- -- Reading/writing messages diff --git a/libraries/ghci/GHCi/Run.hs b/libraries/ghci/GHCi/Run.hs index 72099b2..a931e62 100644 --- a/libraries/ghci/GHCi/Run.hs +++ b/libraries/ghci/GHCi/Run.hs @@ -44,9 +44,13 @@ import Unsafe.Coerce -- ----------------------------------------------------------------------------- -- Implement messages +foreign import ccall "revertCAFs" rts_revertCAFs :: IO () + -- Make it "safe", just in case + run :: Message a -> IO a run m = case m of InitLinker -> initObjLinker RetainCAFs + RtsRevertCAFs -> rts_revertCAFs LookupSymbol str -> fmap toRemotePtr <$> lookupSymbol str LookupClosure str -> lookupClosure str LoadDLL str -> loadDLL str diff --git a/testsuite/tests/ghci/T16392/A.hs b/testsuite/tests/ghci/T16392/A.hs new file mode 100644 index 0000000..31bfb7f --- /dev/null +++ b/testsuite/tests/ghci/T16392/A.hs @@ -0,0 +1,11 @@ +module A (caf, c_two) where + +import Debug.Trace (trace) + +data C = C Int Int + +caf :: C +caf = C 3 (trace "value forced" 4) + +c_two :: C -> Int +c_two (C _ b) = b diff --git a/testsuite/tests/ghci/T16392/T16392.script b/testsuite/tests/ghci/T16392/T16392.script new file mode 100644 index 0000000..5fdcb17 --- /dev/null +++ b/testsuite/tests/ghci/T16392/T16392.script @@ -0,0 +1,5 @@ +:set -fobject-code +:load A.hs +c_two caf +:load A.hs +c_two caf diff --git a/testsuite/tests/ghci/T16392/T16392.stderr b/testsuite/tests/ghci/T16392/T16392.stderr new file mode 100644 index 0000000..3473a38 --- /dev/null +++ b/testsuite/tests/ghci/T16392/T16392.stderr @@ -0,0 +1,2 @@ +value forced +value forced diff --git a/testsuite/tests/boxy/T2193.stdout b/testsuite/tests/ghci/T16392/T16392.stdout similarity index 50% copy from testsuite/tests/boxy/T2193.stdout copy to testsuite/tests/ghci/T16392/T16392.stdout index b8626c4..7290ba8 100644 --- a/testsuite/tests/boxy/T2193.stdout +++ b/testsuite/tests/ghci/T16392/T16392.stdout @@ -1 +1,2 @@ 4 +4 diff --git a/testsuite/tests/ghci/T16392/all.T b/testsuite/tests/ghci/T16392/all.T new file mode 100644 index 0000000..a77e0fd --- /dev/null +++ b/testsuite/tests/ghci/T16392/all.T @@ -0,0 +1,4 @@ +test('T16392', + [extra_files(['A.hs']), + extra_ways(['ghci-ext'])], + ghci_script, ['T16392.script']) From git at git.haskell.org Fri Mar 8 01:45:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:49 +0000 (UTC) Subject: [commit: ghc] master: Fix #16391 by using occCheckExpand in TcValidity (068b7e9) Message-ID: <20190308014549.9AB933A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/068b7e983f4a0b35f453aa5e609998efd0c3f334/ghc >--------------------------------------------------------------- commit 068b7e983f4a0b35f453aa5e609998efd0c3f334 Author: Ryan Scott Date: Wed Mar 6 14:42:02 2019 -0500 Fix #16391 by using occCheckExpand in TcValidity The type-variables-escaping-their-scope-via-kinds check in `TcValidity` was failing to properly expand type synonyms, which led to #16391. This is easily fixed by using `occCheckExpand` before performing the validity check. Along the way, I refactored this check out into its own function, and sprinkled references to Notes to better explain all of the moving parts. Many thanks to @simonpj for the suggestions. Bumps the haddock submodule. >--------------------------------------------------------------- 068b7e983f4a0b35f453aa5e609998efd0c3f334 compiler/basicTypes/OccName.hs | 2 +- compiler/typecheck/TcValidity.hs | 68 ++++++++++++++++------ compiler/types/TyCoRep.hs | 6 +- compiler/types/Type.hs | 38 ++++++++++-- .../tests/dependent/should_compile/T16391a.hs | 16 +++++ testsuite/tests/dependent/should_compile/all.T | 1 + testsuite/tests/dependent/should_fail/T16391b.hs | 11 ++++ .../tests/dependent/should_fail/T16391b.stderr | 6 ++ testsuite/tests/dependent/should_fail/all.T | 1 + testsuite/tests/ghci/scripts/T11524a.stdout | 10 ++-- .../tests/patsyn/should_compile/T11213.stderr | 6 +- utils/haddock | 2 +- 12 files changed, 132 insertions(+), 35 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 068b7e983f4a0b35f453aa5e609998efd0c3f334 From git at git.haskell.org Fri Mar 8 01:45:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:52 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-ghc-in-ghci: Hacky (c31b64a) Message-ID: <20190308014552.A47CE3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-ghc-in-ghci Link : http://ghc.haskell.org/trac/ghc/changeset/c31b64a4161923aef5c40d0e1bab8c9343669421/ghc >--------------------------------------------------------------- commit c31b64a4161923aef5c40d0e1bab8c9343669421 Author: Matthew Pickering Date: Thu Mar 7 20:45:52 2019 +0000 Hacky >--------------------------------------------------------------- c31b64a4161923aef5c40d0e1bab8c9343669421 hadrian/src/Context.hs | 2 +- hadrian/src/Hadrian/Utilities.hs | 16 +++++++++------- hadrian/src/Oracles/Setting.hs | 2 +- hadrian/src/Rules.hs | 2 +- hadrian/src/Settings/Builders/Ghc.hs | 25 +++++++++++++++++++------ hadrian/src/Settings/Default.hs | 2 +- hadrian/src/Settings/Flavours/Development.hs | 6 +++--- 7 files changed, 35 insertions(+), 20 deletions(-) diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index f8a07d7..cf6381c 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -57,7 +57,7 @@ distDir = do version <- setting ProjectVersion hostOs <- cabalOsString <$> setting BuildOs hostArch <- cabalArchString <$> setting BuildArch - return $ hostArch ++ "-" ++ hostOs ++ "-ghc-" ++ version + return $ hostArch ++ "-" ++ hostOs ++ "-ghc-" ++ "8.4.4" pkgFile :: Context -> String -> String -> Action FilePath pkgFile context at Context {..} prefix suffix = do diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs index 3e5d7b3..9ac3109 100644 --- a/hadrian/src/Hadrian/Utilities.hs +++ b/hadrian/src/Hadrian/Utilities.hs @@ -52,6 +52,7 @@ import qualified Data.HashMap.Strict as Map import qualified System.Directory.Extra as IO import qualified System.Info.Extra as IO import qualified System.IO as IO +import Debug.Trace -- | Extract a value from a singleton list, or terminate with an error message -- if the list does not contain exactly one value. @@ -165,14 +166,15 @@ makeRelativeNoSysLink a b -- Use removePrefix to get the relative paths relative to a new -- base directory as high in the directory tree as possible. (baseToA, baseToB) = removePrefix aRelSplit bRelSplit - aToBase = if isDirUp (head baseToA) - -- if baseToA contains any '..' then there is no way to get - -- a path from a to the base directory. - -- E.g. if baseToA == "../u/v" - -- then aToBase == "../../" - then error $ "Impossible to find relatieve path from " + aToBase = case baseToA of + (p: _) | isDirUp p -> + -- if baseToA contains any '..' then there is no way to get + -- a path from a to the base directory. + -- E.g. if baseToA == "../u/v" + -- then aToBase == "../../" + error $ "Impossible to find relatieve path from " ++ a ++ " to " ++ b - else".." <$ baseToA + _ -> ".." <$ baseToA aToB = aToBase ++ baseToB -- removePrefix "pre123" "prefix456" == ("123", "fix456") diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index 02ac42e..2a88df4 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -226,4 +226,4 @@ libsuf way extension <- setting DynamicExtension -- e.g., .dll or .so version <- setting ProjectVersion -- e.g., 7.11.20141222 let suffix = waySuffix (removeWayUnit Dynamic way) - return (suffix ++ "-ghc" ++ version ++ extension) + return (suffix ++ "-ghc" ++ "8.4.4" ++ extension) diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs index 3e62584..f5655a7 100644 --- a/hadrian/src/Rules.hs +++ b/hadrian/src/Rules.hs @@ -32,7 +32,7 @@ dumpArgsTarget :: Rules () dumpArgsTarget = do "dump-args" ~> do root <- buildRoot - let fake_target = target (vanillaContext Stage0 compiler) + let fake_target = target (Context Stage0 compiler dynamic) (Ghc GhcInGhci Stage0) [] ["ignored"] -- need the autogenerated files so that they are precompiled diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index ea5cebc..44a58bc 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -10,12 +10,23 @@ import Settings.Warnings import qualified Context as Context import Rules.Libffi (libffiName) +import Debug.Trace + ghcBuilderArgs :: Args ghcBuilderArgs = mconcat [compileAndLinkHs, compileC, findHsDependencies, ghcInGhciArgs] ghcInGhciArgs :: Args -ghcInGhciArgs = builder (Ghc GhcInGhci) ? mconcat [commonGhcArgs, arg "-fno-worker-wrapper" - , arg "-O0" ] +ghcInGhciArgs = do + builder (Ghc GhcInGhci) ? mconcat + [ arg "-O0" + , packageGhcArgs + , includeGhcArgs + , map ("-optc" ++) <$> getStagedSettingList ConfCcArgs + , map ("-optP" ++) <$> getStagedSettingList ConfCppArgs + , map ("-optP" ++) <$> getContextData cppOpts + + --, ghcLinkArgs + ] compileAndLinkHs :: Args compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do @@ -46,23 +57,26 @@ compileC = builder (Ghc CompileCWithGhc) ? do , arg =<< getOutput ] ghcLinkArgs :: Args -ghcLinkArgs = builder (Ghc LinkHs) ? do +ghcLinkArgs = builder (Ghc LinkHs) ||^ builder (Ghc GhcInGhci) ? do pkg <- getPackage libs <- getContextData extraLibs libDirs <- getContextData extraLibDirs fmwks <- getContextData frameworks darwin <- expr osxHost way <- getWay - +-- traceShowM (pkg, libs, libDirs, fmwks, darwin, way) -- Relative path from the output (rpath $ORIGIN). originPath <- dropFileName <$> getOutput context <- getContext libPath' <- expr (libPath context) distDir <- expr Context.distDir +-- traceShowM (originPath, context, libPath', distDir) useSystemFfi <- expr (flag UseSystemFfi) buildPath <- getBuildPath libffiName' <- libffiName +-- traceShowM (useSystemFfi, buildPath, libffiName') +-- traceShowM (originPath, libPath' -/- distDir) let dynamic = Dynamic `wayUnit` way @@ -86,8 +100,7 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do [ arg "-dynamic" -- TODO what about windows? , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] - , notStage0 ? - hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) + , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) ] , arg "-no-auto-link-packages" , nonHsMainPackage pkg ? arg "-no-hs-main" diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs index de52613..0088260 100644 --- a/hadrian/src/Settings/Default.hs +++ b/hadrian/src/Settings/Default.hs @@ -147,7 +147,7 @@ defaultLibraryWays :: Ways defaultLibraryWays = mconcat [ pure [vanilla] , notStage0 ? pure [profiling] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] + , platformSupportsSharedLibs ? pure [dynamic] ] -- | Default build ways for the RTS. diff --git a/hadrian/src/Settings/Flavours/Development.hs b/hadrian/src/Settings/Flavours/Development.hs index 5fcc88b..9f06f7d 100644 --- a/hadrian/src/Settings/Flavours/Development.hs +++ b/hadrian/src/Settings/Flavours/Development.hs @@ -9,9 +9,9 @@ developmentFlavour :: Stage -> Flavour developmentFlavour ghcStage = defaultFlavour { name = "devel" ++ show (fromEnum ghcStage) , args = defaultBuilderArgs <> developmentArgs ghcStage <> defaultPackageArgs - , libraryWays = pure [vanilla] - , rtsWays = pure [vanilla, threaded] - , dynamicGhcPrograms = return False } + , libraryWays = pure [vanilla, dynamic] + , rtsWays = pure [vanilla, threaded, dynamic] + , dynamicGhcPrograms = return True } developmentArgs :: Stage -> Args developmentArgs ghcStage = do From git at git.haskell.org Fri Mar 8 01:45:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 8 Mar 2019 01:45:55 +0000 (UTC) Subject: [commit: ghc] master's head updated: Fix #16391 by using occCheckExpand in TcValidity (068b7e9) Message-ID: <20190308014555.9233A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 4ca271d testsuite: Introduce fragile modifier 910185a testsuite: Mark heapprof001 as fragile on i386 a65bcbe testsuite: Use fragile modifier for more tests f624dc1 gitlab-ci: Don't allow i386-deb9 to fail 07f378c Add tests for Trac #16221 and #16342 25c3dd3 Test Trac #16263 7a68254 Fix #16392: revertCAFs in external interpreter when necessary 068b7e9 Fix #16391 by using occCheckExpand in TcValidity From git at git.haskell.org Sat Mar 9 07:08:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:38 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T11371' created Message-ID: <20190309070838.CF1003A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T11371 Referencing: 542cf3341ff3856f4fd8d36f6a886bb2c02dae03 From git at git.haskell.org Sat Mar 9 07:08:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:40 +0000 (UTC) Subject: [commit: ghc] branch 'wip/windows-release-profiling' created Message-ID: <20190309070840.D04D83A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/windows-release-profiling Referencing: 57805f8373a60f9692af34890aca45bd2efa0bc7 From git at git.haskell.org Sat Mar 9 07:08:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/rip-out-perl' created Message-ID: <20190309070842.D162E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/rip-out-perl Referencing: a69ab41963a634c187a4f3705af91af550aa2bf9 From git at git.haskell.org Sat Mar 9 07:08:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:46 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Always do the worker/wrapper split for NOINLINEs (1675d40) Message-ID: <20190309070846.C9BD63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/1675d40afe07b9c414eaa37d85819f37f8420118/ghc >--------------------------------------------------------------- commit 1675d40afe07b9c414eaa37d85819f37f8420118 Author: Sebastian Graf Date: Tue Feb 19 13:52:11 2019 +0100 Always do the worker/wrapper split for NOINLINEs Trac #10069 revealed that small NOINLINE functions didn't get split into worker and wrapper. This was due to `certainlyWillInline` saying that any unfoldings with a guidance of `UnfWhen` inline unconditionally. That isn't the case for NOINLINE functions, so we catch this case earlier now. Nofib results: -------------------------------------------------------------------------------- Program Allocs Instrs -------------------------------------------------------------------------------- fannkuch-redux -0.3% 0.0% gg +0.0% +0.1% maillist -0.2% -0.2% minimax 0.0% -0.8% -------------------------------------------------------------------------------- Min -0.3% -0.8% Max +0.0% +0.1% Geometric Mean -0.0% -0.0% Fixes #10069. ------------------------- Metric Increase: T9233 ------------------------- >--------------------------------------------------------------- 1675d40afe07b9c414eaa37d85819f37f8420118 compiler/coreSyn/CoreUnfold.hs | 13 +++++---- compiler/stranal/WorkWrap.hs | 31 ++++++++++++++++++++++ testsuite/tests/profiling/should_run/all.T | 2 +- testsuite/tests/simplCore/should_compile/T13543.hs | 2 +- .../tests/simplCore/should_compile/T4201.stdout | 2 +- .../tests/simplCore/should_compile/T7360.stderr | 10 +------ testsuite/tests/simplCore/should_run/all.T | 2 +- testsuite/tests/simplStg/should_compile/all.T | 10 +------ testsuite/tests/stranal/should_compile/T10069.hs | 11 ++++++++ .../tests/stranal/should_compile/T10069.stderr | 1 + testsuite/tests/stranal/should_compile/all.T | 1 + utils/genprimopcode/Main.hs | 8 +++++- 12 files changed, 63 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 1675d40afe07b9c414eaa37d85819f37f8420118 From git at git.haskell.org Sat Mar 9 07:08:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:49 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Hadrian: various improvements around the 'test' rule (48927a9) Message-ID: <20190309070849.E025C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/48927a9a1e6b455bdf9dc4d47695795f10fc1988/ghc >--------------------------------------------------------------- commit 48927a9a1e6b455bdf9dc4d47695795f10fc1988 Author: Alp Mestanogullari Date: Tue Mar 5 13:22:46 2019 +0100 Hadrian: various improvements around the 'test' rule - introduce a -k/--keep-test-files flag to prevent cleanup - add -dstg-lint to the options that are always passed to tests - infer library ways from the compiler to be tested instead of getting them from the flavour (like make) - likewise for figuring out whether the compiler to be tested is "debugged" - specify config.exeext - correctly specify config.in_tree_compiler, instead of always passing True - fix formatting of how we pass a few test options - add (potential) extensions to check-* program names - build check-* programs with the compiler to be tested - set TEST_HC_OPTS_INTERACTIVE and PYTHON env vars when running tests >--------------------------------------------------------------- 48927a9a1e6b455bdf9dc4d47695795f10fc1988 hadrian/src/CommandLine.hs | 21 +++-- hadrian/src/Oracles/TestSettings.hs | 28 +++++- hadrian/src/Rules/Test.hs | 143 +++++++++++++++++++++---------- hadrian/src/Settings/Builders/Make.hs | 6 +- hadrian/src/Settings/Builders/RunTest.hs | 123 +++++++++++++++----------- hadrian/src/Settings/Default.hs | 3 +- 6 files changed, 218 insertions(+), 106 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 48927a9a1e6b455bdf9dc4d47695795f10fc1988 From git at git.haskell.org Sat Mar 9 07:08:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:52 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Hadrian: Drop remaining symlink traversal code from build scripts (5d74414) Message-ID: <20190309070852.E98773A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/5d7441432e4c00a463f645248b354707d7d8335e/ghc >--------------------------------------------------------------- commit 5d7441432e4c00a463f645248b354707d7d8335e Author: Andrey Mokhov Date: Wed Mar 6 13:42:27 2019 +0000 Hadrian: Drop remaining symlink traversal code from build scripts This partly resolves #16325 (https://ghc.haskell.org/trac/ghc/ticket/16325). As previously discussed in https://github.com/snowleopard/hadrian/issues/667, we do not need the symlink traversal code in build scripts. However, it appears we forgot to delete this code from our Stack-based build scripts, which led to placing all build artefacts in an unexpected location when using Hadrian in combination with symlink trees. This commit fixes this. >--------------------------------------------------------------- 5d7441432e4c00a463f645248b354707d7d8335e hadrian/build.stack.nix.sh | 32 +------------------------------- hadrian/build.stack.sh | 38 +++++--------------------------------- 2 files changed, 6 insertions(+), 64 deletions(-) diff --git a/hadrian/build.stack.nix.sh b/hadrian/build.stack.nix.sh index 59ac061..b30c114 100755 --- a/hadrian/build.stack.nix.sh +++ b/hadrian/build.stack.nix.sh @@ -1,33 +1,3 @@ #!/usr/bin/env bash -set -euo pipefail - -# readlink on os x, doesn't support -f, to prevent the -# need of installing coreutils (e.g. through brew, just -# for readlink, we use the follownig substitute. -# -# source: http://stackoverflow.com/a/1116890 -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")")" - -HADRIAN_NIX=YES ${absoluteRoot}/build.stack.sh +HADRIAN_NIX=YES hadrian/build.stack.sh diff --git a/hadrian/build.stack.sh b/hadrian/build.stack.sh index 2e6c444..1f59843 100755 --- a/hadrian/build.stack.sh +++ b/hadrian/build.stack.sh @@ -1,38 +1,10 @@ #!/usr/bin/env bash -set -euo pipefail - -# readlink on os x, doesn't support -f, to prevent the -# need of installing coreutils (e.g. through brew, just -# for readlink, we use the follownig substitute. -# -# source: http://stackoverflow.com/a/1116890 -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")")" -cd "$absoluteRoot" - +# Make sure Hadrian is up-to-date +cd hadrian stack build --no-library-profiling ${HADRIAN_NIX:+--nix} -stack exec hadrian -- \ - --directory "$absoluteRoot/.." \ +# Run Hadrian in the top-level GHC directory +stack exec hadrian -- \ + --directory ".." \ "$@" From git at git.haskell.org Sat Mar 9 07:08:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:55 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 (8262825) Message-ID: <20190309070855.F2D473A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/826282540492d64c59cd3ba9df5fd0b2e92f76ef/ghc >--------------------------------------------------------------- commit 826282540492d64c59cd3ba9df5fd0b2e92f76ef Author: Vladislav Zavialov Date: Thu Mar 7 10:33:41 2019 +0300 Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 Also, replace some tabs with spaces to avoid a "mixed indent" warning that vim gives me. >--------------------------------------------------------------- 826282540492d64c59cd3ba9df5fd0b2e92f76ef testsuite/tests/perf/compiler/all.T | 7 +++---- testsuite/tests/rts/all.T | 16 +++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index c6548c1..ff80c74 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -356,10 +356,9 @@ test('T13719', test('T14697', [ collect_compiler_stats('bytes allocated',10), # This generates too large of a command-line for poor Windows and - # Darwin. The failure is non-deterministic, so we 'skip' it rather than - # 'expect_broken'. The solution is to teach the testsuite driver to - # invoke GHC with a response file, see Trac #15072 - when(opsys('mingw32') or opsys('darwin'), skip), + # Darwin. The solution is to teach the testsuite driver to + # invoke GHC with a response file. + when(opsys('mingw32') or opsys('darwin'), fragile(15072)), pre_cmd('./genT14697'), extra_files(['genT14697']), extra_hc_opts('$(cat T14697-flags)'), # 10k -optP arguments diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index ac0fbff..4d2be2b 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -74,7 +74,7 @@ test('T2047', [ignore_stdout, extra_run_opts('+RTS -c -RTS')], # Skip GHCi due to #2786 test('T2783', [ omit_ways(['ghci']), exit_code(1) , expect_broken_for(2783, ['threaded1']) - ], compile_and_run, ['']) + ], compile_and_run, ['']) # Test the work-stealing deque implementation. We run this test in # both threaded1 (-threaded -debug) and threaded2 (-threaded) ways. @@ -99,17 +99,15 @@ test('stack003', [ omit_ways('ghci'), # uses unboxed tuples # Test that +RTS -K0 (e.g. no stack limit) parses correctly test('stack004', [ extra_run_opts('+RTS -K0 -RTS') - , expect_broken_for(14913, ['ghci']) - ], compile_and_run, ['']) + , expect_broken_for(14913, ['ghci']) + ], compile_and_run, ['']) test('atomicinc', [ c_src, only_ways(['normal','threaded1', 'threaded2']) ], compile_and_run, ['']) test('atomicxchg', [ c_src, only_ways(['threaded1', 'threaded2']) ], compile_and_run, ['']) test('T3424', - [ # Skip due to non-deterministic timeouts on CI, see Trac #16349 - when(unregisterised(), skip), - # And it's slow in general + [ when(unregisterised(), fragile(16349)), when(fast(), skip), only_ways(['normal','threaded1','ghci']) ], @@ -219,7 +217,7 @@ test('T5435_v_asm_a', [extra_files(['T5435.hs', 'T5435_asm.c']), test('T5435_v_asm_b', [extra_files(['T5435.hs', 'T5435_asm.c']), when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)), - when(opsys('darwin') or opsys('mingw32'), skip)], + when(opsys('darwin') or opsys('mingw32'), skip)], makefile_test, ['T5435_v_asm_b']) test('T5435_v_gcc', [extra_files(['T5435.hs', 'T5435_gcc.c']), when(arch('powerpc64') or arch('powerpc64le'), @@ -413,8 +411,8 @@ test('T13617', [ unless(opsys('mingw32'), skip)], # Test is being skipped on darwin due to it's flakiness. test('T12903', [ when(opsys('mingw32'), skip) , when(opsys('darwin'), skip) - , omit_ways(['ghci', 'profasm'])] - , compile_and_run, ['']) + , omit_ways(['ghci', 'profasm'])] + , compile_and_run, ['']) test('T13832', exit_code(1), compile_and_run, ['-threaded']) test('T13894', normal, compile_and_run, ['']) From git at git.haskell.org Sat Mar 9 07:08:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:08:59 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Use captureTopConstraints in TcRnDriver calls (5be7ad7) Message-ID: <20190309070859.F1F843A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/5be7ad7861c8d39f60b7101fd8d8e816ff50353a/ghc >--------------------------------------------------------------- commit 5be7ad7861c8d39f60b7101fd8d8e816ff50353a Author: Simon Peyton Jones Date: Thu Mar 7 09:09:13 2019 +0000 Use captureTopConstraints in TcRnDriver calls Trac #16376 showed the danger of failing to report an error that exists only in the unsolved constraints, if an exception is raised (via failM). Well, the commit 5c1f268e (Fail fast in solveLocalEqualities) did just that -- i.e. it found errors in the constraints, and called failM to avoid a misleading cascade. So we need to be sure to call captureTopConstraints to report those insolubles. This was wrong in TcRnDriver.tcRnExpr and in TcRnDriver.tcRnType. As a result the error messages from test T13466 improved slightly, a happy outcome. >--------------------------------------------------------------- 5be7ad7861c8d39f60b7101fd8d8e816ff50353a compiler/typecheck/TcRnDriver.hs | 19 ++++++++++++------- compiler/typecheck/TcRnMonad.hs | 2 +- compiler/typecheck/TcSimplify.hs | 17 +++++++++++++++-- testsuite/tests/ghci/scripts/T13466.stderr | 2 ++ testsuite/tests/ghci/scripts/T16376.script | 4 ++++ testsuite/tests/ghci/scripts/T16376.stderr | 12 ++++++++++++ testsuite/tests/ghci/scripts/all.T | 1 + 7 files changed, 47 insertions(+), 10 deletions(-) diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs index fcac5cb..9c60709 100644 --- a/compiler/typecheck/TcRnDriver.hs +++ b/compiler/typecheck/TcRnDriver.hs @@ -399,8 +399,8 @@ tcRnSrcDecls explicit_mod_hdr decls -- Check for the 'main' declaration -- Must do this inside the captureTopConstraints + -- NB: always set envs *before* captureTopConstraints ; (tcg_env, lie_main) <- setEnvs (tcg_env, tcl_env) $ - -- always set envs *before* captureTopConstraints captureTopConstraints $ checkMain explicit_mod_hdr @@ -502,10 +502,13 @@ run_th_modfinalizers = do let run_finalizer (lcl_env, f) = setLclEnv lcl_env (runRemoteModFinalizers f) - (_, lie_th) <- captureTopConstraints $ mapM_ run_finalizer th_modfinalizers + (_, lie_th) <- captureTopConstraints $ + mapM_ run_finalizer th_modfinalizers + -- Finalizers can add top-level declarations with addTopDecls, so -- we have to run tc_rn_src_decls to get them (tcg_env, tcl_env, lie_top_decls) <- tc_rn_src_decls [] + setEnvs (tcg_env, tcl_env) $ do -- Subsequent rounds of finalizers run after any new constraints are -- simplified, or some types might not be complete when using reify @@ -616,11 +619,12 @@ tcRnHsBootDecls hsc_src decls , hs_defds = def_decls , hs_ruleds = rule_decls , hs_annds = _ - , hs_valds - = XValBindsLR (NValBinds val_binds val_sigs) }) + , hs_valds = XValBindsLR (NValBinds val_binds val_sigs) }) <- rnTopSrcDecls first_group + -- The empty list is for extra dependencies coming from .hs-boot files -- See Note [Extra dependencies from .hs-boot files] in RnSource + ; (gbl_env, lie) <- setGblEnv tcg_env $ captureTopConstraints $ do { -- NB: setGblEnv **before** captureTopConstraints so that -- if the latter reports errors, it knows what's in scope @@ -2360,8 +2364,9 @@ tcRnExpr hsc_env mode rdr_expr uniq <- newUnique ; let { fresh_it = itName uniq (getLoc rdr_expr) ; orig = lexprCtOrigin rn_expr } ; - (tclvl, lie, res_ty) - <- pushLevelAndCaptureConstraints $ + ((tclvl, res_ty), lie) + <- captureTopConstraints $ + pushTcLevelM $ do { (_tc_expr, expr_ty) <- tcInferSigma rn_expr ; if inst then snd <$> deeplyInstantiate orig expr_ty @@ -2430,7 +2435,7 @@ tcRnType hsc_env normalise rdr_type -- First bring into scope any wildcards ; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_type]) ; ((ty, kind), lie) <- - captureConstraints $ + captureTopConstraints $ tcWildCardBinders wcs $ \ wcs' -> do { emitWildCardHoleConstraints wcs' ; tcLHsTypeUnsaturated rn_type } diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs index 77ea116..8b720d6 100644 --- a/compiler/typecheck/TcRnMonad.hs +++ b/compiler/typecheck/TcRnMonad.hs @@ -1684,7 +1684,7 @@ Hence: - insolublesOnly in tryCaptureConstraints - emitConstraints in the Left case of captureConstraints -Hover note that fresly-generated constraints like (Int ~ Bool), or +However note that freshly-generated constraints like (Int ~ Bool), or ((a -> b) ~ Int) are all CNonCanonical, and hence won't be flagged as insoluble. The constraint solver does that. So they'll be discarded. That's probably ok; but see th/5358 as a not-so-good example: diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index f50b33e..418aa98 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -81,8 +81,21 @@ captureTopConstraints :: TcM a -> TcM (a, WantedConstraints) -- generates plus the constraints produced by static forms inside. -- If it fails with an exception, it reports any insolubles -- (out of scope variables) before doing so --- NB: bring any environments into scope before calling this, so that --- the reportUnsolved has access to the most complete GlobalRdrEnv +-- +-- captureTopConstraints is used exclusively by TcRnDriver at the top +-- level of a module. +-- +-- Importantly, if captureTopConstraints propagates an exception, it +-- reports any insoluble constraints first, lest they be lost +-- altogether. This is important, because solveLocalEqualities (maybe +-- other things too) throws an exception without adding any error +-- messages; it just puts the unsolved constraints back into the +-- monad. See TcRnMonad Note [Constraints and errors] +-- Trac #16376 is an example of what goes wrong if you don't do this. +-- +-- NB: the caller should bring any environments into scope before +-- calling this, so that the reportUnsolved has access to the most +-- complete GlobalRdrEnv captureTopConstraints thing_inside = do { static_wc_var <- TcM.newTcRef emptyWC ; ; (mb_res, lie) <- TcM.updGblEnv (\env -> env { tcg_static_wc = static_wc_var } ) $ diff --git a/testsuite/tests/ghci/scripts/T13466.stderr b/testsuite/tests/ghci/scripts/T13466.stderr index ba3d5fd..edd05c5 100644 --- a/testsuite/tests/ghci/scripts/T13466.stderr +++ b/testsuite/tests/ghci/scripts/T13466.stderr @@ -1,4 +1,6 @@ +:1:1: error: Variable not in scope: out_of_scope + :1:1: error: • Cannot apply expression of type ‘t1’ to a visible type argument ‘[]’ diff --git a/testsuite/tests/ghci/scripts/T16376.script b/testsuite/tests/ghci/scripts/T16376.script new file mode 100644 index 0000000..7bdc872 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16376.script @@ -0,0 +1,4 @@ +:set -XTypeApplications -XPolyKinds -XDataKinds +:t id @Maybe +type Id (a :: k) = a +:k Id @Maybe diff --git a/testsuite/tests/ghci/scripts/T16376.stderr b/testsuite/tests/ghci/scripts/T16376.stderr new file mode 100644 index 0000000..7b34531 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16376.stderr @@ -0,0 +1,12 @@ + +:1:5: error: + • Expecting one more argument to ‘Maybe’ + Expected a type, but ‘Maybe’ has kind ‘* -> *’ + • In the type ‘Maybe’ + In the expression: id @Maybe + +:1:5: error: + • Expecting one more argument to ‘Maybe’ + Expected a type, but ‘Maybe’ has kind ‘* -> *’ + • In the first argument of ‘Id’, namely ‘Maybe’ + In the type ‘Id @Maybe’ diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 946c6ef..dd76a07 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -292,3 +292,4 @@ test('T16030', normal, ghci_script, ['T16030.script']) test('T11606', normal, ghci_script, ['T11606.script']) test('T16089', normal, ghci_script, ['T16089.script']) test('T14828', expect_broken(14828), ghci_script, ['T14828.script']) +test('T16376', normal, ghci_script, ['T16376.script']) From git at git.haskell.org Sat Mar 9 07:09:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:03 +0000 (UTC) Subject: [commit: ghc] wip/windows-release-profiling: gitlab-ci: Do full `perf` build when building Windows releases (57805f8) Message-ID: <20190309070903.09EBD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/windows-release-profiling Link : http://ghc.haskell.org/trac/ghc/changeset/57805f8373a60f9692af34890aca45bd2efa0bc7/ghc >--------------------------------------------------------------- commit 57805f8373a60f9692af34890aca45bd2efa0bc7 Author: Ben Gamari Date: Fri Mar 8 10:05:45 2019 -0500 gitlab-ci: Do full `perf` build when building Windows releases >--------------------------------------------------------------- 57805f8373a60f9692af34890aca45bd2efa0bc7 .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1f5550..ee13580 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -418,6 +418,7 @@ validate-x86_64-windows: # due to #16084 allow_failure: true variables: + BUILD_FLAVOUR: "quick" GHC_VERSION: "8.6.2" LANG: "en_US.UTF-8" script: @@ -425,7 +426,7 @@ validate-x86_64-windows: set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" + - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - | bash -c "make binary-dist TAR_COMP_OPTS=-1" @@ -443,6 +444,14 @@ validate-x86_64-windows: - ghc.tar.xz - junit.xml +# Normal Windows validate builds are profiled; that won't do for releases. +release-x86_64-windows: + extends: validate-x86_64-windows + variables: + BUILD_FLAVOUR: "perf" + only: + - tags + ############################################################ # Cleanup ############################################################ From git at git.haskell.org Sat Mar 9 07:09:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:06 +0000 (UTC) Subject: [commit: ghc] wip/rip-out-perl: Drop utils/count_lines (a69ab41) Message-ID: <20190309070906.1100C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/rip-out-perl Link : http://ghc.haskell.org/trac/ghc/changeset/a69ab41963a634c187a4f3705af91af550aa2bf9/ghc >--------------------------------------------------------------- commit a69ab41963a634c187a4f3705af91af550aa2bf9 Author: Ben Gamari Date: Fri Mar 8 10:29:42 2019 -0500 Drop utils/count_lines This doesn't appear to be used anywhere in the build system and it relies on perl. Drop it. >--------------------------------------------------------------- a69ab41963a634c187a4f3705af91af550aa2bf9 ghc.mk | 1 - utils/count_lines/count_lines.pl | 69 ---------------------------------------- utils/count_lines/ghc.mk | 4 --- 3 files changed, 74 deletions(-) diff --git a/ghc.mk b/ghc.mk index 0eae0fc..fea964b 100644 --- a/ghc.mk +++ b/ghc.mk @@ -665,7 +665,6 @@ BUILD_DIRS += utils/hpc BUILD_DIRS += utils/runghc BUILD_DIRS += ghc BUILD_DIRS += docs/users_guide -BUILD_DIRS += utils/count_lines BUILD_DIRS += utils/compare_sizes BUILD_DIRS += utils/iserv diff --git a/utils/count_lines/count_lines.pl b/utils/count_lines/count_lines.pl deleted file mode 100644 index a54f163..0000000 --- a/utils/count_lines/count_lines.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env perl - -use FindBin; - -%DirCount = (); -%ModCount = (); -%DirComments = (); -%ModComments = (); - -my $binPath = $FindBin::Bin; - -foreach $f ( @ARGV ) { - - if ( $f =~ /\.lhs$/ ) { - open(INF, "$binPath/../../inplace/lib/unlit $f - |") || die "Couldn't unlit $f!\n"; - } else { - open(INF, "< $f") || die "Couldn't open $f!\n"; - } - $cnt = 0; - while () { - s/--.*//; - s/{-.*-}//; - s/\/\/.*//; - next if /^\s*$/; - $cnt++; - } - close(INF); - - $f_wc = `wc $f`; die "wc failed: $f\n" if $? != 0; - if ( $f_wc =~ /\s*(\d+)\s*(\d+)\s*(\d+)/ ) { - $comments = $1 - $cnt; - } else { - die "Can't grok wc format: $f_wc"; - } - - if ( $f =~ /(.*)\/(.*)/ ) { - local($dir) = $1; - local($mod) = $2; - $DirCount{$dir} += $cnt; - $ModCount{$mod} += $cnt; - $DirComments{$dir} += $comments; - $ModComments{$mod} += $comments; - } else { - print STDERR "not counted in a directory: $f\n"; - $ModCount{$f} += $cnt; - $ModComments{$f} += $comments; - } -} - -# print the info -$tot = 0; -$totcmts = 0; -printf "\n Code Comments\n"; -foreach $d (sort (keys %DirCount)) { - printf "%-20s %6d %6d\n", $d, $DirCount{$d}, $DirComments{$d}; - $tot += $DirCount{$d}; - $totcmts += $DirComments{$d}; -} -printf "\n%-20s %6d %6d\n\n\n", 'TOTAL:', $tot, $totcmts; - -$tot = 0; -$totcmts = 0; -printf "\n Code Comments\n"; -foreach $m (sort (keys %ModCount)) { - printf "%-20s %6d %6d\n", $m, $ModCount{$m}, $ModComments{$m}; - $tot += $ModCount{$m}; - $totcmts += $ModComments{$m}; -} -printf "\n%-20s %6d %6d\n", 'TOTAL:', $tot, $totcmts; diff --git a/utils/count_lines/ghc.mk b/utils/count_lines/ghc.mk deleted file mode 100644 index 5fec518..0000000 --- a/utils/count_lines/ghc.mk +++ /dev/null @@ -1,4 +0,0 @@ -utils/count_lines_PERL_SRC = count_lines.pl -utils/count_lines_dist_PROGNAME = count_lines - -$(eval $(call build-perl,utils/count_lines,dist)) From git at git.haskell.org Sat Mar 9 07:09:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:09 +0000 (UTC) Subject: [commit: ghc] wip/rip-out-perl: Rip out perl dependency (ac0d7f5) Message-ID: <20190309070909.1A4E23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/rip-out-perl Link : http://ghc.haskell.org/trac/ghc/changeset/ac0d7f532a06c24fbb2ff1b4c6d5e6b6d677d140/ghc >--------------------------------------------------------------- commit ac0d7f532a06c24fbb2ff1b4c6d5e6b6d677d140 Author: Ben Gamari Date: Fri Mar 8 10:24:17 2019 -0500 Rip out perl dependency The object splitter was the last major user of perl. There remain a few uses in nofib but we can just rely on the system's perl for this since it's not critical to the build. >--------------------------------------------------------------- ac0d7f532a06c24fbb2ff1b4c6d5e6b6d677d140 distrib/configure.ac.in | 10 ---------- ghc.mk | 6 ------ hadrian/cfg/system.config.in | 1 - hadrian/src/Builder.hs | 2 -- hadrian/src/Rules/Nofib.hs | 3 +-- mk/config.mk.in | 1 - mk/get-win32-tarballs.sh | 1 - mk/tree.mk | 1 - settings.in | 1 - utils/vagrant/bootstrap-rhel.sh | 2 +- 10 files changed, 2 insertions(+), 26 deletions(-) diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index dd0eb2e..f9f14d1 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -51,16 +51,6 @@ Unregisterised="@Unregisterised@" AC_SUBST(Unregisterised) # -dnl ** Check Perl installation ** -# -AC_PATH_PROG(PerlCmd,perl) -if test -z "$PerlCmd"; then - echo "You must install perl before you can continue" - echo "Perhaps it is already installed, but not in your PATH?" - exit 1 -fi - -# dnl ** figure out how to do a BSD-ish install ** # AC_PROG_INSTALL diff --git a/ghc.mk b/ghc.mk index bc92b87..0eae0fc 100644 --- a/ghc.mk +++ b/ghc.mk @@ -815,11 +815,6 @@ install : install_mingw install_mingw : $(INPLACE_MINGW) "$(CP)" -Rp $(INPLACE_MINGW) $(prefix) -install : install_perl -.PHONY: install_perl -install_perl : $(INPLACE_PERL) - "$(CP)" -Rp $(INPLACE_PERL) $(prefix) - endif # Windows_Host ifneq "$(BINDIST)" "YES" @@ -1025,7 +1020,6 @@ $(eval $(call bindist-list,.,\ $(INPLACE_BIN)/mkdirhier \ utils/ghc-cabal/dist-install/build/tmp/ghc-cabal \ $(BINDIST_WRAPPERS) \ - $(BINDIST_PERL_SOURCES) \ $(BINDIST_LIBS) \ $(BINDIST_HI) \ $(BINDIST_EXTRAS) \ diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in index affeeaa..e3c612e 100644 --- a/hadrian/cfg/system.config.in +++ b/hadrian/cfg/system.config.in @@ -23,7 +23,6 @@ system-ghc = @WithGhc@ system-ghc-pkg = @GhcPkgCmd@ tar = @TarCmd@ patch = @PatchCmd@ -perl = @PerlCmd@ xelatex = @XELATEX@ # Python 3 is required to run test driver. diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 6c14eb4..6d334d8 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -127,7 +127,6 @@ data Builder = Alex | Nm | Objdump | Patch - | Perl | Python | Ranlib | RunTest @@ -305,7 +304,6 @@ systemBuilderPath builder = case builder of Nm -> fromKey "nm" Objdump -> fromKey "objdump" Patch -> fromKey "patch" - Perl -> fromKey "perl" Python -> fromKey "python" Ranlib -> fromKey "ranlib" RunTest -> fromKey "python" diff --git a/hadrian/src/Rules/Nofib.hs b/hadrian/src/Rules/Nofib.hs index 0950605..016f7e7 100644 --- a/hadrian/src/Rules/Nofib.hs +++ b/hadrian/src/Rules/Nofib.hs @@ -29,7 +29,6 @@ nofibRules = do makePath <- builderPath (Make "nofib") top <- topDirectory ghcPath <- builderPath (Ghc CompileHs Stage2) - perlPath <- builderPath Perl -- some makefiles in nofib rely on a $MAKE -- env var being defined @@ -39,7 +38,7 @@ nofibRules = do -- subdirectory, passing the path to -- the GHC to benchmark and perl to -- nofib's makefiles. - let nofibArgs = ["WithNofibHc=" ++ (top -/- ghcPath), "PERL=" ++ perlPath] + let nofibArgs = ["WithNofibHc=" ++ (top -/- ghcPath)] unit $ cmd (Cwd "nofib") [makePath] ["clean"] unit $ cmd (Cwd "nofib") [makePath] (nofibArgs ++ ["boot"]) (Exit e, Stdouterr log) <- cmd (Cwd "nofib") [makePath] nofibArgs diff --git a/mk/config.mk.in b/mk/config.mk.in index 55fb808..22a3d39 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -701,7 +701,6 @@ INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL)) LN_S = @LN_S@ MV = mv -PERL = @PerlCmd@ PIC = pic RANLIB_CMD = @RANLIB_CMD@ REAL_RANLIB_CMD = @REAL_RANLIB_CMD@ diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index 32f2705..fd47232 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -117,7 +117,6 @@ download_tarballs() { if test "$mingw_arch" != "sources"; then download_mingw "${format_url}-mpc-1.0.3-2-any.pkg.tar.xz" download_mingw "${format_url}-gcc-libs-7.2.0-1-any.pkg.tar.xz" - download_file "https://downloads.haskell.org/~ghc/mingw/ghc-perl-1.tar.gz" "ghc-tarballs/perl/ghc-perl-1.tar.gz" "Windows Perl binary distributions" "" "" else local format_url="${mingw_base_url}/${mingw_arch}/${package_prefix}" download_mingw "${format_url}-i686-mpc-1.0.3-2.src.tar.gz" diff --git a/mk/tree.mk b/mk/tree.mk index b333e64..5a61a4a 100644 --- a/mk/tree.mk +++ b/mk/tree.mk @@ -19,7 +19,6 @@ INPLACE_BIN = $(INPLACE)/bin INPLACE_LIB = $(INPLACE)/lib INPLACE_TOPDIR = $(INPLACE)/lib INPLACE_MINGW = $(INPLACE)/mingw -INPLACE_PERL = $(INPLACE)/perl ################################################################################ # diff --git a/settings.in b/settings.in index 30bfe70..6037d53 100644 --- a/settings.in +++ b/settings.in @@ -19,7 +19,6 @@ ("dllwrap command", "@SettingsDllWrapCommand@"), ("windres command", "@SettingsWindresCommand@"), ("libtool command", "@SettingsLibtoolCommand@"), - ("perl command", "@SettingsPerlCommand@"), ("cross compiling", "@CrossCompiling@"), ("target os", "@HaskellTargetOs@"), ("target arch", "@HaskellTargetArch@"), diff --git a/utils/vagrant/bootstrap-rhel.sh b/utils/vagrant/bootstrap-rhel.sh index 52cc5fc..eb28f07 100755 --- a/utils/vagrant/bootstrap-rhel.sh +++ b/utils/vagrant/bootstrap-rhel.sh @@ -1,4 +1,4 @@ #!/bin/sh yum update -y yum install -y glibc-devel ncurses-devel gmp-devel autoconf automake libtool \ - gcc make perl python ghc git + gcc make python ghc git From git at git.haskell.org Sat Mar 9 07:09:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:12 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: TH: support raw bytes literals (#14741) (224a6b8) Message-ID: <20190309070912.C89E93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/224a6b864c6aa0d851fcbf79469e5702b1116dbc/ghc >--------------------------------------------------------------- commit 224a6b864c6aa0d851fcbf79469e5702b1116dbc Author: Sylvain Henry Date: Fri Jan 18 12:30:31 2019 +0100 TH: support raw bytes literals (#14741) GHC represents String literals as ByteString internally for efficiency reasons. However, until now it wasn't possible to efficiently create large string literals with TH (e.g. to embed a file in a binary, cf #14741): TH code had to unpack the bytes into a [Word8] that GHC then had to re-pack into a ByteString. This patch adds the possibility to efficiently create a "string" literal from raw bytes. We get the following compile times for different sizes of TH created literals: || Size || Before || After || Gain || || 30K || 2.307s || 2.299 || 0% || || 3M || 3.073s || 2.400s || 21% || || 30M || 8.517s || 3.390s || 60% || Ticket #14741 can be fixed if the original code uses this new TH feature. >--------------------------------------------------------------- 224a6b864c6aa0d851fcbf79469e5702b1116dbc compiler/basicTypes/Literal.hs | 14 +++++++++++ compiler/hsSyn/Convert.hs | 8 +++++++ libraries/ghci/GHCi/TH/Binary.hs | 8 +++++++ .../template-haskell/Language/Haskell/TH/Lib.hs | 18 +++++++++++++- .../Language/Haskell/TH/Lib/Internal.hs | 2 ++ .../template-haskell/Language/Haskell/TH/Ppr.hs | 1 + .../template-haskell/Language/Haskell/TH/Syntax.hs | 20 ++++++++++++++++ libraries/template-haskell/changelog.md | 3 +++ testsuite/tests/th/T14741.hs | 28 ++++++++++++++++++++++ testsuite/tests/th/T14741.stdout | 1 + testsuite/tests/th/all.T | 1 + 11 files changed, 103 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 224a6b864c6aa0d851fcbf79469e5702b1116dbc From git at git.haskell.org Sat Mar 9 07:09:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:16 +0000 (UTC) Subject: [commit: ghc] master, wip/T11371: Fix #13839: GHCi warnings do not respect the default module header (2762f94) Message-ID: <20190309070916.881F83A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/2762f94dc27cc065dded7755f99c66cba26683dd/ghc >--------------------------------------------------------------- commit 2762f94dc27cc065dded7755f99c66cba26683dd Author: Roland Senn Date: Sat Mar 2 16:53:06 2019 +0100 Fix #13839: GHCi warnings do not respect the default module header >--------------------------------------------------------------- 2762f94dc27cc065dded7755f99c66cba26683dd compiler/typecheck/TcRnExports.hs | 38 +++++++++++++++++++--- .../tests/rename/should_compile/T13839.script | 4 +++ .../tests/rename/should_compile/T13839.stdout | 5 +++ testsuite/tests/rename/should_compile/T13839a.hs | 10 ++++++ .../tests/rename/should_compile/T13839a.stderr | 3 ++ testsuite/tests/rename/should_compile/T13839b.hs | 10 ++++++ testsuite/tests/rename/should_compile/all.T | 2 ++ testsuite/tests/rename/should_fail/T13839b.hs | 10 ++++++ .../should_fail/T13839b.stderr} | 2 +- testsuite/tests/rename/should_fail/all.T | 1 + 10 files changed, 80 insertions(+), 5 deletions(-) diff --git a/compiler/typecheck/TcRnExports.hs b/compiler/typecheck/TcRnExports.hs index b3baf6c..ea52b12 100644 --- a/compiler/typecheck/TcRnExports.hs +++ b/compiler/typecheck/TcRnExports.hs @@ -170,22 +170,24 @@ tcRnExports explicit_mod exports -- list, to avoid bleating about re-exporting a deprecated -- thing (especially via 'module Foo' export item) do { - -- In interactive mode, we behave as if he had - -- written "module Main where ..." ; dflags <- getDynFlags ; let is_main_mod = mainModIs dflags == this_mod ; let default_main = case mainFunIs dflags of Just main_fun | is_main_mod -> mkUnqual varName (fsLit main_fun) _ -> main_RDR_Unqual + ; has_main <- lookupGlobalOccRn_maybe default_main >>= return . isJust + -- If the module has no explicit header, and it has a main function, + -- then we add a header like "module Main(main) where ..." (#13839) + -- See Note [Modules without a module header] ; let real_exports | explicit_mod = exports - | ghcLink dflags == LinkInMemory = Nothing - | otherwise + | has_main = Just (noLoc [noLoc (IEVar noExt (noLoc (IEName $ noLoc default_main)))]) -- ToDo: the 'noLoc' here is unhelpful if 'main' -- turns out to be out of scope + | otherwise = Nothing ; let do_it = exports_from_avail real_exports rdr_env imports this_mod ; (rn_exports, final_avails) @@ -436,6 +438,34 @@ isDoc _ = False -- Renaming and typechecking of exports happens after everything else has -- been typechecked. +{- +Note [Modules without a module header] +-------------------------------------------------- + +The Haskell 2010 report says in section 5.1: + +>> An abbreviated form of module, consisting only of the module body, is +>> permitted. If this is used, the header is assumed to be +>> ‘module Main(main) where’. + +For modules without a module header, this is implemented the +following way: + +If the module has a main function: + Then create a module header and export the main function. + This has the effect to mark the main function and all top level + functions called directly or indirectly via main as 'used', + and later on, unused top-level functions can be reported correctly. + There is no distinction between GHC and GHCi. +If the module has NO main function: + Then export all top-level functions. This marks all top level + functions as 'used'. + In GHCi this has the effect, that we don't get any 'non-used' warnings. + In GHC, however, the 'has-main-module' check in the module + compiler/typecheck/TcRnDriver (functions checkMain / check-main) fires, + and we get the error: + The IO action ‘main’ is not defined in module ‘Main’ +-} -- Renaming exports lists is a minefield. Five different things can appear in diff --git a/testsuite/tests/rename/should_compile/T13839.script b/testsuite/tests/rename/should_compile/T13839.script new file mode 100644 index 0000000..212d7f7 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T13839.script @@ -0,0 +1,4 @@ +:l T13839a.hs +:t nonUsed +:l T13839b.hs +:t nonUsed diff --git a/testsuite/tests/rename/should_compile/T13839.stdout b/testsuite/tests/rename/should_compile/T13839.stdout new file mode 100644 index 0000000..a700b14 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T13839.stdout @@ -0,0 +1,5 @@ + +T13839a.hs:10:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)] + Defined but not used: ‘nonUsed’ +nonUsed :: () +nonUsed :: () diff --git a/testsuite/tests/rename/should_compile/T13839a.hs b/testsuite/tests/rename/should_compile/T13839a.hs new file mode 100644 index 0000000..74235be --- /dev/null +++ b/testsuite/tests/rename/should_compile/T13839a.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_GHC -Wall #-} + +main :: IO () +main = putStrLn used + +used :: String +used = "T13839" + +nonUsed :: () +nonUsed = () diff --git a/testsuite/tests/rename/should_compile/T13839a.stderr b/testsuite/tests/rename/should_compile/T13839a.stderr new file mode 100644 index 0000000..84b9873 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T13839a.stderr @@ -0,0 +1,3 @@ + +T13839a.hs:10:1: warning: [-Wunused-top-binds (in -Wextra, -Wunused-binds)] + Defined but not used: ‘nonUsed’ diff --git a/testsuite/tests/rename/should_compile/T13839b.hs b/testsuite/tests/rename/should_compile/T13839b.hs new file mode 100644 index 0000000..da7b0f4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T13839b.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_GHC -Wall #-} + +nomain :: IO () +nomain = putStrLn used + +used :: String +used = "T13839" + +nonUsed :: () +nonUsed = () diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 4d427de..51684f1 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -155,6 +155,8 @@ test('T12597', normal, compile, ['']) test('T12548', normal, compile, ['']) test('T13132', normal, compile, ['']) test('T13646', normal, compile, ['']) +test('T13839', combined_output, ghci_script, ['T13839.script']) +test('T13839a', normal, compile, ['']) test('LookupSub', [], multimod_compile, ['LookupSub', '-v0']) test('T14881', [], multimod_compile, ['T14881', '-W']) test('T14487', [], multimod_compile, ['T14487', '-v0']) diff --git a/testsuite/tests/rename/should_fail/T13839b.hs b/testsuite/tests/rename/should_fail/T13839b.hs new file mode 100644 index 0000000..da7b0f4 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T13839b.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_GHC -Wall #-} + +nomain :: IO () +nomain = putStrLn used + +used :: String +used = "T13839" + +nonUsed :: () +nonUsed = () diff --git a/testsuite/tests/parser/should_fail/readFail021.stderr b/testsuite/tests/rename/should_fail/T13839b.stderr similarity index 74% copy from testsuite/tests/parser/should_fail/readFail021.stderr copy to testsuite/tests/rename/should_fail/T13839b.stderr index fe9c64b..93846bd 100644 --- a/testsuite/tests/parser/should_fail/readFail021.stderr +++ b/testsuite/tests/rename/should_fail/T13839b.stderr @@ -1,3 +1,3 @@ -readFail021.hs:1:1: +T13839b.hs:1:1: error: The IO action ‘main’ is not defined in module ‘Main’ diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 4f1b1fa..4b5e9e9 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -126,6 +126,7 @@ test('T11592', normal, compile_fail, ['']) test('T12879', normal, compile_fail, ['']) test('T13644', normal, multimod_compile_fail, ['T13644','-v0']) test('T13568', normal, multimod_compile_fail, ['T13568','-v0']) +test('T13839b', normal, compile_fail, ['']) test('T13947', normal, compile_fail, ['']) test('T13847', normal, multimod_compile_fail, ['T13847','-v0']) test('T14225', normal, ghci_script, ['T14225.script']) From git at git.haskell.org Sat Mar 9 07:09:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:19 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-ghc-in-ghci: David's rpath hack and -fno-code (d1688d8) Message-ID: <20190309070919.8B4783A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-ghc-in-ghci Link : http://ghc.haskell.org/trac/ghc/changeset/d1688d82429c02959e848886c834a947f0ddec69/ghc >--------------------------------------------------------------- commit d1688d82429c02959e848886c834a947f0ddec69 Author: Matthew Pickering Date: Fri Mar 8 20:01:58 2019 +0000 David's rpath hack and -fno-code >--------------------------------------------------------------- d1688d82429c02959e848886c834a947f0ddec69 hadrian/src/Settings/Builders/Ghc.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 44a58bc..70b9f08 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -24,8 +24,7 @@ ghcInGhciArgs = do , map ("-optc" ++) <$> getStagedSettingList ConfCcArgs , map ("-optP" ++) <$> getStagedSettingList ConfCppArgs , map ("-optP" ++) <$> getContextData cppOpts - - --, ghcLinkArgs + , arg "-fno-code" ] compileAndLinkHs :: Args @@ -101,6 +100,7 @@ ghcLinkArgs = builder (Ghc LinkHs) ||^ builder (Ghc GhcInGhci) ? do -- TODO what about windows? , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) + , hostSupportsRPaths ? arg ("-optl-Wl,-rpath,$ORIGIN") ] , arg "-no-auto-link-packages" , nonHsMainPackage pkg ? arg "-no-hs-main" From git at git.haskell.org Sat Mar 9 07:09:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:22 +0000 (UTC) Subject: [commit: ghc] wip/T11371: Change the warning in substTy back to an assertion (736cebd) Message-ID: <20190309070922.9C85C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/736cebde2b716498a0a5e63af9d7f9a45c1b8495/ghc >--------------------------------------------------------------- commit 736cebde2b716498a0a5e63af9d7f9a45c1b8495 Author: Krzysztof Gogolewski Date: Thu Mar 7 17:19:45 2019 +0100 Change the warning in substTy back to an assertion We'd like to enforce the substitution invariant (Trac #11371). In a492af06d326453 the assertion was downgraded to a warning; I'm restoring the assertion and making the calls that don't maintain the invariant as unchecked. >--------------------------------------------------------------- 736cebde2b716498a0a5e63af9d7f9a45c1b8495 compiler/coreSyn/CoreArity.hs | 2 +- compiler/typecheck/TcGenGenerics.hs | 2 +- compiler/typecheck/TcSigs.hs | 2 +- compiler/types/TyCoRep.hs | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs index 37454eb..afd6759 100644 --- a/compiler/coreSyn/CoreArity.hs +++ b/compiler/coreSyn/CoreArity.hs @@ -1153,7 +1153,7 @@ freshEtaId :: Int -> TCvSubst -> Type -> (TCvSubst, Id) freshEtaId n subst ty = (subst', eta_id') where - ty' = Type.substTy subst ty + ty' = Type.substTyUnchecked subst ty eta_id' = uniqAway (getTCvInScope subst) $ mkSysLocalOrCoVar (fsLit "eta") (mkBuiltinUnique n) ty' subst' = extendTCvInScope subst eta_id' diff --git a/compiler/typecheck/TcGenGenerics.hs b/compiler/typecheck/TcGenGenerics.hs index abc7d59..123cfd3 100644 --- a/compiler/typecheck/TcGenGenerics.hs +++ b/compiler/typecheck/TcGenGenerics.hs @@ -431,7 +431,7 @@ tc_mkRepFamInsts gk tycon inst_tys = env = zipTyEnv env_tyvars env_inst_args in_scope = mkInScopeSet (tyCoVarsOfTypes inst_tys) subst = mkTvSubst in_scope env - repTy' = substTy subst repTy + repTy' = substTyUnchecked subst repTy tcv' = tyCoVarsOfTypeList inst_ty (tv', cv') = partition isTyVar tcv' tvs' = scopedSort tv' diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs index 9146b10..7b00165 100644 --- a/compiler/typecheck/TcSigs.hs +++ b/compiler/typecheck/TcSigs.hs @@ -505,7 +505,7 @@ tcInstSig hs_sig@(PartialSig { psig_hs_ty = hs_ty , sig_inst_wcs = wcs , sig_inst_wcx = wcx , sig_inst_theta = substTys subst theta - , sig_inst_tau = substTy subst tau } + , sig_inst_tau = substTyUnchecked subst tau } ; traceTc "End partial sig }" (ppr inst_sig) ; return inst_sig } diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index 9ccfaae..27fde88 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -3196,8 +3196,7 @@ isValidTCvSubst (TCvSubst in_scope tenv cenv) = -- Note [The substitution invariant]. checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a --- TODO (RAE): Change back to ASSERT - = WARN( not (isValidTCvSubst subst), + = ASSERT2( isValidTCvSubst subst, text "in_scope" <+> ppr in_scope $$ text "tenv" <+> ppr tenv $$ text "tenvFVs" <+> ppr (tyCoVarsOfTypesSet tenv) $$ @@ -3205,7 +3204,7 @@ checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a text "cenvFVs" <+> ppr (tyCoVarsOfCosSet cenv) $$ text "tys" <+> ppr tys $$ text "cos" <+> ppr cos ) - WARN( not tysCosFVsInScope, + ASSERT2( tysCosFVsInScope, text "in_scope" <+> ppr in_scope $$ text "tenv" <+> ppr tenv $$ text "cenv" <+> ppr cenv $$ From git at git.haskell.org Sat Mar 9 07:09:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 9 Mar 2019 07:09:26 +0000 (UTC) Subject: [commit: ghc] wip/T11371: Add a test for Trac #13951 (542cf33) Message-ID: <20190309070926.36B4F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T11371 Link : http://ghc.haskell.org/trac/ghc/changeset/542cf3341ff3856f4fd8d36f6a886bb2c02dae03/ghc >--------------------------------------------------------------- commit 542cf3341ff3856f4fd8d36f6a886bb2c02dae03 Author: Krzysztof Gogolewski Date: Thu Mar 7 19:08:59 2019 +0100 Add a test for Trac #13951 It no longer gives a warning. >--------------------------------------------------------------- 542cf3341ff3856f4fd8d36f6a886bb2c02dae03 testsuite/tests/typecheck/should_compile/T13951.hs | 19 +++++++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 2 files changed, 20 insertions(+) diff --git a/testsuite/tests/typecheck/should_compile/T13951.hs b/testsuite/tests/typecheck/should_compile/T13951.hs new file mode 100644 index 0000000..8cbeb8c --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T13951.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE PolyKinds, GADTs, Rank2Types, ScopedTypeVariables, Trustworthy #-} +module Control.Monad.Skeleton.Internal where + +data Cat k a b where + Empty :: Cat k a a + Leaf :: k a b -> Cat k a b + Tree :: Cat k a b -> Cat k b c -> Cat k a c + +viewL :: forall k a b r. Cat k a b + -> ((a ~ b) => r) + -> (forall x. k a x -> Cat k x b -> r) + -> r +viewL Empty e _ = e +viewL (Leaf k) _ r = k `r` Empty +viewL (Tree a b) e r = go a b where + go :: Cat k a x -> Cat k x b -> r + go Empty t = viewL t e r + go (Leaf k) t = r k t + go (Tree c d) t = go c (Tree d t) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index dae5b6f..1284d8a 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -669,3 +669,4 @@ test('T16188', normal, compile, ['']) test('T16204a', normal, compile, ['']) test('T16204b', normal, compile, ['']) test('T16225', normal, compile, ['']) +test('T13951', normal, compile, ['']) From git at git.haskell.org Sun Mar 10 14:31:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:29 +0000 (UTC) Subject: [commit: ghc] master: Stop inferring over-polymorphic kinds (1f5cc9d) Message-ID: <20190310143129.9D56D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1f5cc9dc8aeeafa439d6d12c3c4565ada524b926/ghc >--------------------------------------------------------------- commit 1f5cc9dc8aeeafa439d6d12c3c4565ada524b926 Author: Simon Peyton Jones Date: Thu Feb 21 15:27:17 2019 +0000 Stop inferring over-polymorphic kinds Before this patch GHC was trying to be too clever (Trac #16344); it succeeded in kind-checking this polymorphic-recursive declaration data T ka (a::ka) b = MkT (T Type Int Bool) (T (Type -> Type) Maybe Bool) As Note [No polymorphic recursion] discusses, the "solution" was horribly fragile. So this patch deletes the key lines in TcHsType, and a wodge of supporting stuff in the renamer. There were two regressions, both the same: a closed type family decl like this (T12785b) does not have a CUSK: type family Payload (n :: Peano) (s :: HTree n x) where Payload Z (Point a) = a Payload (S n) (a `Branch` stru) = a To kind-check the equations we need a dependent kind for Payload, and we don't get that any more. Solution: make it a CUSK by giving the result kind -- probably a good thing anyway. The other case (T12442) was very similar: a close type family declaration without a CUSK. >--------------------------------------------------------------- 1f5cc9dc8aeeafa439d6d12c3c4565ada524b926 compiler/deSugar/DsMeta.hs | 15 +-- compiler/hieFile/HieAst.hs | 2 +- compiler/hsSyn/HsTypes.hs | 32 +++--- compiler/rename/RnSource.hs | 4 +- compiler/rename/RnTypes.hs | 14 +-- compiler/typecheck/TcHsType.hs | 116 ++++++++++----------- compiler/typecheck/TcTyClsDecls.hs | 6 +- testsuite/tests/dependent/should_compile/T12442.hs | 3 +- .../dependent/should_compile/T16326_Compile1.hs | 4 +- .../tests/dependent/should_compile/T16344b.hs | 10 ++ testsuite/tests/dependent/should_compile/all.T | 2 + testsuite/tests/dependent/should_fail/T16344.hs | 8 ++ .../tests/dependent/should_fail/T16344.stderr | 6 ++ testsuite/tests/dependent/should_fail/T16344a.hs | 11 ++ .../tests/dependent/should_fail/T16344a.stderr | 6 ++ testsuite/tests/dependent/should_fail/all.T | 2 + .../parser/should_compile/DumpRenamedAst.stderr | 32 ++---- .../tests/parser/should_compile/T14189.stderr | 15 ++- testsuite/tests/typecheck/should_fail/T12785b.hs | 4 +- utils/haddock | 2 +- 20 files changed, 146 insertions(+), 148 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 1f5cc9dc8aeeafa439d6d12c3c4565ada524b926 From git at git.haskell.org Sun Mar 10 14:31:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:32 +0000 (UTC) Subject: [commit: ghc] master: compiler: Refactor: extract `withAtomicRename` (08ad38a) Message-ID: <20190310143132.B23203A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/08ad38a93cb7037bbafcd3e12b27c876d714c5c0/ghc >--------------------------------------------------------------- commit 08ad38a93cb7037bbafcd3e12b27c876d714c5c0 Author: Niklas Hambüchen Date: Sun Feb 17 21:09:29 2019 +0100 compiler: Refactor: extract `withAtomicRename` >--------------------------------------------------------------- 08ad38a93cb7037bbafcd3e12b27c876d714c5c0 compiler/main/DriverPipeline.hs | 13 ++++++------- compiler/utils/Util.hs | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 70c2d7a..9989287 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1305,7 +1305,10 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags let local_includes = [ SysTools.Option ("-iquote" ++ p) | p <- includePathsQuote cmdline_include_paths ] let runAssembler inputFilename outputFilename - = liftIO $ as_prog dflags + = liftIO $ do + withAtomicRename outputFilename $ \temp_outputFilename -> do + as_prog + dflags (local_includes ++ global_includes -- See Note [-fPIC for assembler] ++ map SysTools.Option pic_c_flags @@ -1335,15 +1338,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags , SysTools.Option "-c" , SysTools.FileOption "" inputFilename , SysTools.Option "-o" - , SysTools.FileOption "" outputFilename + , SysTools.FileOption "" temp_outputFilename ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - - -- Atomic write by writing to temp file and then renaming - let temp_output_fn = output_fn <.> "tmp" - runAssembler input_fn temp_output_fn - liftIO $ renameFile temp_output_fn output_fn + runAssembler input_fn output_fn return (RealPhase next_phase, output_fn) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 16864fe..41f63f2 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -99,6 +99,7 @@ module Util ( doesDirNameExist, getModificationUTCTime, modificationTimeIfExists, + withAtomicRename, global, consIORef, globalM, sharedGlobal, sharedGlobalM, @@ -145,9 +146,10 @@ import GHC.Stack (HasCallStack) import Control.Applicative ( liftA2 ) import Control.Monad ( liftM, guard ) +import Control.Monad.IO.Class ( MonadIO, liftIO ) import GHC.Conc.Sync ( sharedCAF ) import System.IO.Error as IO ( isDoesNotExistError ) -import System.Directory ( doesDirectoryExist, getModificationTime ) +import System.Directory ( doesDirectoryExist, getModificationTime, renameFile ) import System.FilePath import Data.Char ( isUpper, isAlphaNum, isSpace, chr, ord, isDigit, toUpper @@ -1304,6 +1306,26 @@ modificationTimeIfExists f = do else ioError e -- -------------------------------------------------------------- +-- atomic file writing by writing to a temporary file first (see #14533) +-- +-- This should be used in all cases where GHC writes files to disk +-- and uses their modification time to skip work later, +-- as otherwise a partially written file (e.g. due to crash or Ctrl+C) +-- also results in a skip. + +withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a +withAtomicRename targetFile f = do + -- The temp file must be on the same file system (mount) as the target file + -- to result in an atomic move on most platforms. + -- The standard way to ensure that is to place it into the same directory. + -- This can still be fooled when somebody mounts a different file system + -- at just the right time, but that is not a case we aim to cover here. + let temp = targetFile <.> "tmp" + res <- f temp + liftIO $ renameFile temp targetFile + return res + +-- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string -- up (but not including) the last character for which 'pred' returned From git at git.haskell.org Sun Mar 10 14:31:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:35 +0000 (UTC) Subject: [commit: ghc] master: compiler: Write .o files atomically. See #14533 (cfbedf1) Message-ID: <20190310143135.C13213A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cfbedf1780002f4f76aa9c6c754818a436888e9f/ghc >--------------------------------------------------------------- commit cfbedf1780002f4f76aa9c6c754818a436888e9f Author: Niklas Hambüchen Date: Sun Feb 17 20:48:45 2019 +0100 compiler: Write .o files atomically. See #14533 This issue was reproduced with, and the fix confirmed with, the `hatrace` tool for syscall-based fault injection: https://github.com/nh2/hatrace The concrete test case for GHC is at https://github.com/nh2/hatrace/blob/e23d35a2d2c79e8bf49e9e2266b3ff7094267f29/test/HatraceSpec.hs#L185 A previous, nondeterministic reproducer for the issue was provided by Alexey Kuleshevich in https://github.com/lehins/exec-kill-loop Signed-off-by: Niklas Hambüchen Reviewed-by: Alexey Kuleshevich >--------------------------------------------------------------- cfbedf1780002f4f76aa9c6c754818a436888e9f compiler/main/DriverPipeline.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 04576e7..70c2d7a 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1339,7 +1339,12 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags ]) liftIO $ debugTraceMsg dflags 4 (text "Running the assembler") - runAssembler input_fn output_fn + + -- Atomic write by writing to temp file and then renaming + let temp_output_fn = output_fn <.> "tmp" + runAssembler input_fn temp_output_fn + liftIO $ renameFile temp_output_fn output_fn + return (RealPhase next_phase, output_fn) From git at git.haskell.org Sun Mar 10 14:31:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:38 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-ghc-in-ghci: Make libsuf aware of Stage so that it gets the suffix right (b2be17c) Message-ID: <20190310143138.CAEC63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-ghc-in-ghci Link : http://ghc.haskell.org/trac/ghc/changeset/b2be17ce41f85e9772640f77254f8143e97d2fa2/ghc >--------------------------------------------------------------- commit b2be17ce41f85e9772640f77254f8143e97d2fa2 Author: Matthew Pickering Date: Sat Mar 9 10:45:00 2019 +0000 Make libsuf aware of Stage so that it gets the suffix right >--------------------------------------------------------------- b2be17ce41f85e9772640f77254f8143e97d2fa2 hadrian/src/Context.hs | 2 +- hadrian/src/Oracles/Setting.hs | 12 ++++++++---- hadrian/src/Rules/Libffi.hs | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index cf6381c..d8f24fe 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -85,7 +85,7 @@ pkgHaddockFile Context {..} = do -- @_build/stage1/libraries/array/build/libHSarray-0.5.1.0.a at . pkgLibraryFile :: Context -> Action FilePath pkgLibraryFile context at Context {..} = do - extension <- libsuf way + extension <- libsuf stage way pkgFile context "libHS" extension -- | Path to the GHCi library file of a given 'Context', e.g.: diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index 2a88df4..4666539 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -210,6 +210,10 @@ ghcCanonVersion = do topDirectory :: Action FilePath topDirectory = fixAbsolutePathOnWindows =<< setting GhcSourcePath +ghcVersionStage :: Stage -> Action String +ghcVersionStage Stage0 = setting GhcVersion +ghcVersionStage _ = setting ProjectVersion + -- | The file suffix used for libraries of a given build 'Way'. For example, -- @_p.a@ corresponds to a static profiled library, and @-ghc7.11.20141222.so@ -- is a dynamic vanilly library. Why do we need GHC version number in the @@ -219,11 +223,11 @@ topDirectory = fixAbsolutePathOnWindows =<< setting GhcSourcePath -- live in their own per-package directory and hence do not need a unique -- filename. We also need to respect the system's dynamic extension, e.g. @.dll@ -- or @.so at . -libsuf :: Way -> Action String -libsuf way +libsuf :: Stage -> Way -> Action String +libsuf st way | not (wayUnit Dynamic way) = return (waySuffix way ++ ".a") -- e.g., _p.a | otherwise = do extension <- setting DynamicExtension -- e.g., .dll or .so - version <- setting ProjectVersion -- e.g., 7.11.20141222 + version <- ghcVersionStage st -- e.g. 8.4.4 or 8.9.xxxx let suffix = waySuffix (removeWayUnit Dynamic way) - return (suffix ++ "-ghc" ++ "8.4.4" ++ extension) + return (suffix ++ "-ghc" ++ version ++ extension) diff --git a/hadrian/src/Rules/Libffi.hs b/hadrian/src/Rules/Libffi.hs index 64f6303..908b45a 100644 --- a/hadrian/src/Rules/Libffi.hs +++ b/hadrian/src/Rules/Libffi.hs @@ -60,7 +60,7 @@ libffiLibrary = "inst/lib/libffi.a" rtsLibffiLibrary :: Stage -> Way -> Action FilePath rtsLibffiLibrary stage way = do name <- libffiLibraryName - suf <- libsuf way + suf <- libsuf stage way rtsPath <- rtsBuildPath stage return $ rtsPath -/- "lib" ++ name ++ suf From git at git.haskell.org Sun Mar 10 14:31:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:42 +0000 (UTC) Subject: [commit: ghc] master: rts: Factor out large bitmap walking (e76ee67) Message-ID: <20190310143142.535AE3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e76ee67510be951cea13636a763daae53108197c/ghc >--------------------------------------------------------------- commit e76ee67510be951cea13636a763daae53108197c Author: Ben Gamari Date: Tue Feb 5 10:59:32 2019 -0500 rts: Factor out large bitmap walking This will be needed by the mark phase of the non-moving collector so let's factor it out. >--------------------------------------------------------------- e76ee67510be951cea13636a763daae53108197c rts/sm/HeapUtils.h | 33 +++++++++++++++++++++++++++++++++ rts/sm/Scav.c | 23 +++++++---------------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/rts/sm/HeapUtils.h b/rts/sm/HeapUtils.h new file mode 100644 index 0000000..2e9ca34 --- /dev/null +++ b/rts/sm/HeapUtils.h @@ -0,0 +1,33 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team 1998-2008 + * + * General utilities for walking the heap + * + * ---------------------------------------------------------------------------*/ + +#pragma once + +typedef void (walk_closures_cb)(StgClosure **, void *); + +INLINE_HEADER void +walk_large_bitmap(walk_closures_cb *cb, + StgClosure **p, + StgLargeBitmap *large_bitmap, + StgWord size, + void *user) +{ + uint32_t b = 0; + + for (uint32_t i = 0; i < size; b++) { + StgWord bitmap = large_bitmap->bitmap[b]; + uint32_t j = stg_min(size-i, BITS_IN(W_)); + i += j; + for (; j > 0; j--, p++) { + if ((bitmap & 1) == 0) { + cb(p, user); + } + bitmap = bitmap >> 1; + } + } +} diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index 8bc7029..36592af 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -58,6 +58,7 @@ #include "Sanity.h" #include "Capability.h" #include "LdvProfile.h" +#include "HeapUtils.h" #include "Hash.h" #include "sm/MarkWeak.h" @@ -77,6 +78,11 @@ static void scavenge_large_bitmap (StgPtr p, # define scavenge_capability_mut_lists(cap) scavenge_capability_mut_Lists1(cap) #endif +static void do_evacuate(StgClosure **p, void *user STG_UNUSED) +{ + evacuate(p); +} + /* ----------------------------------------------------------------------------- Scavenge a TSO. -------------------------------------------------------------------------- */ @@ -1777,22 +1783,7 @@ scavenge_static(void) static void scavenge_large_bitmap( StgPtr p, StgLargeBitmap *large_bitmap, StgWord size ) { - uint32_t i, j, b; - StgWord bitmap; - - b = 0; - - for (i = 0; i < size; b++) { - bitmap = large_bitmap->bitmap[b]; - j = stg_min(size-i, BITS_IN(W_)); - i += j; - for (; j > 0; j--, p++) { - if ((bitmap & 1) == 0) { - evacuate((StgClosure **)p); - } - bitmap = bitmap >> 1; - } - } + walk_large_bitmap(do_evacuate, (StgClosure **) p, large_bitmap, size, NULL); } From git at git.haskell.org Sun Mar 10 14:31:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:45 +0000 (UTC) Subject: [commit: ghc] master: Make bkpcabal01 test compatible with new ordering requirements. (6e3e537) Message-ID: <20190310143145.6786B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6e3e537e419ba8d02dac306d596fba3c1029f123/ghc >--------------------------------------------------------------- commit 6e3e537e419ba8d02dac306d596fba3c1029f123 Author: Edward Z. Yang Date: Thu Mar 7 23:47:07 2019 -0500 Make bkpcabal01 test compatible with new ordering requirements. Previously, our test did something like this: 1. Typecheck p 2. Typecheck q (which made use of an instantiated p) 3. Build instantiated p 4. Build instantiated q Cabal previously permitted this, under the reasoning that during typechecking there's no harm in using the instantiated p even if we haven't build it yet; we'll just instantiate it on the fly with p. However, this is not true! If q makes use of a Template Haskell splice from p, we absolutely must have built the instantiated p before we typecheck q, since this typechecking will need to run some splices. Cabal now complains that you haven't done it correctly, which we indeed have not! Reordering so that we do this: 1. Typecheck p 3. Build instantiated p 2. Typecheck q (which made use of an instantiated p) 4. Build instantiated q Fixes the problem. If Cabal had managed the ordering itself, it would have gotten it right. Signed-off-by: Edward Z. Yang >--------------------------------------------------------------- 6e3e537e419ba8d02dac306d596fba3c1029f123 testsuite/tests/backpack/cabal/bkpcabal01/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/testsuite/tests/backpack/cabal/bkpcabal01/Makefile b/testsuite/tests/backpack/cabal/bkpcabal01/Makefile index 01744da..4aaa814 100644 --- a/testsuite/tests/backpack/cabal/bkpcabal01/Makefile +++ b/testsuite/tests/backpack/cabal/bkpcabal01/Makefile @@ -21,13 +21,13 @@ bkpcabal01: clean $(SETUP) build $(SETUP) copy $(SETUP) register - # typecheck q - $(CONFIGURE) --cid "q-0.1" q + # build p + $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" $(SETUP) build $(SETUP) copy $(SETUP) register - # build p - $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" + # typecheck q + $(CONFIGURE) --cid "q-0.1" q $(SETUP) build $(SETUP) copy $(SETUP) register @@ -44,13 +44,13 @@ bkpcabal01: clean $(SETUP) build $(SETUP) copy $(SETUP) register - # re-typecheck q (if buggy, this is what would fail) - $(CONFIGURE) --cid "q-0.1" q + # re-build p + $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" $(SETUP) build $(SETUP) copy $(SETUP) register - # re-build p - $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" + # re-typecheck q (if buggy, this is what would fail) + $(CONFIGURE) --cid "q-0.1" q $(SETUP) build $(SETUP) copy $(SETUP) register From git at git.haskell.org Sun Mar 10 14:31:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:48 +0000 (UTC) Subject: [commit: ghc] master: NCG: correctly escape path strings on Windows (#16389) (6b2f099) Message-ID: <20190310143148.7B73F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6b2f09916e0c8c5f37c9fbe08eb076476501c8d6/ghc >--------------------------------------------------------------- commit 6b2f09916e0c8c5f37c9fbe08eb076476501c8d6 Author: Sylvain Henry Date: Fri Mar 8 12:53:43 2019 +0100 NCG: correctly escape path strings on Windows (#16389) GHC native code generator generates .incbin and .file directives. We need to escape those strings correctly on Windows (see #16389). >--------------------------------------------------------------- 6b2f09916e0c8c5f37c9fbe08eb076476501c8d6 compiler/nativeGen/AsmCodeGen.hs | 2 +- compiler/nativeGen/PprBase.hs | 4 +++- compiler/utils/Outputable.hs | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs index b866741..84c6a84 100644 --- a/compiler/nativeGen/AsmCodeGen.hs +++ b/compiler/nativeGen/AsmCodeGen.hs @@ -461,7 +461,7 @@ cmmNativeGens dflags this_mod modLoc ncgImpl h dbgMap = go nonDetEltsUFM $ fileIds' `minusUFM` fileIds -- See Note [Unique Determinism and code generation] pprDecl (f,n) = text "\t.file " <> ppr n <+> - doubleQuotes (ftext f) + pprFilePathString (unpackFS f) emitNativeCode dflags h $ vcat $ map pprDecl newFileIds ++ diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs index 1f068c2..84f9492 100644 --- a/compiler/nativeGen/PprBase.hs +++ b/compiler/nativeGen/PprBase.hs @@ -143,7 +143,9 @@ pprBytes bs = sdocWithDynFlags $ \dflags -> else unsafePerformIO $ do bFile <- newTempName dflags TFL_CurrentModule ".dat" BS.writeFile bFile bs - return $ text "\t.incbin \"" <> text bFile <> text "\"\n\t.byte 0" + return $ text "\t.incbin " + <> pprFilePathString bFile -- proper escape (see #16389) + <> text "\n\t.byte 0" {- Note [Embedding large binary blobs] diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index 768d247..7c2eaed 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -56,7 +56,7 @@ module Outputable ( pprPrimChar, pprPrimInt, pprPrimWord, pprPrimInt64, pprPrimWord64, - pprFastFilePath, + pprFastFilePath, pprFilePathString, -- * Controlling the style in which output is printed BindingSite(..), @@ -999,6 +999,16 @@ pprInfixVar is_operator pp_v pprFastFilePath :: FastString -> SDoc pprFastFilePath path = text $ normalise $ unpackFS path +-- | Normalise, escape and render a string representing a path +-- +-- e.g. "c:\\whatever" +pprFilePathString :: FilePath -> SDoc +pprFilePathString path = doubleQuotes $ text (escape (normalise path)) + where + escape [] = [] + escape ('\\':xs) = '\\':'\\':escape xs + escape (x:xs) = x:escape xs + {- ************************************************************************ * * From git at git.haskell.org Sun Mar 10 14:31:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:51 +0000 (UTC) Subject: [commit: ghc] master: Drop utils/count_lines (0cd9895) Message-ID: <20190310143151.989103A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/0cd989577a8b8d2666741fcac4fd3032ae212b80/ghc >--------------------------------------------------------------- commit 0cd989577a8b8d2666741fcac4fd3032ae212b80 Author: Ben Gamari Date: Fri Mar 8 10:29:42 2019 -0500 Drop utils/count_lines This doesn't appear to be used anywhere in the build system and it relies on perl. Drop it. >--------------------------------------------------------------- 0cd989577a8b8d2666741fcac4fd3032ae212b80 ghc.mk | 1 - utils/count_lines/count_lines.pl | 69 ---------------------------------------- utils/count_lines/ghc.mk | 4 --- 3 files changed, 74 deletions(-) diff --git a/ghc.mk b/ghc.mk index 0eae0fc..fea964b 100644 --- a/ghc.mk +++ b/ghc.mk @@ -665,7 +665,6 @@ BUILD_DIRS += utils/hpc BUILD_DIRS += utils/runghc BUILD_DIRS += ghc BUILD_DIRS += docs/users_guide -BUILD_DIRS += utils/count_lines BUILD_DIRS += utils/compare_sizes BUILD_DIRS += utils/iserv diff --git a/utils/count_lines/count_lines.pl b/utils/count_lines/count_lines.pl deleted file mode 100644 index a54f163..0000000 --- a/utils/count_lines/count_lines.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env perl - -use FindBin; - -%DirCount = (); -%ModCount = (); -%DirComments = (); -%ModComments = (); - -my $binPath = $FindBin::Bin; - -foreach $f ( @ARGV ) { - - if ( $f =~ /\.lhs$/ ) { - open(INF, "$binPath/../../inplace/lib/unlit $f - |") || die "Couldn't unlit $f!\n"; - } else { - open(INF, "< $f") || die "Couldn't open $f!\n"; - } - $cnt = 0; - while () { - s/--.*//; - s/{-.*-}//; - s/\/\/.*//; - next if /^\s*$/; - $cnt++; - } - close(INF); - - $f_wc = `wc $f`; die "wc failed: $f\n" if $? != 0; - if ( $f_wc =~ /\s*(\d+)\s*(\d+)\s*(\d+)/ ) { - $comments = $1 - $cnt; - } else { - die "Can't grok wc format: $f_wc"; - } - - if ( $f =~ /(.*)\/(.*)/ ) { - local($dir) = $1; - local($mod) = $2; - $DirCount{$dir} += $cnt; - $ModCount{$mod} += $cnt; - $DirComments{$dir} += $comments; - $ModComments{$mod} += $comments; - } else { - print STDERR "not counted in a directory: $f\n"; - $ModCount{$f} += $cnt; - $ModComments{$f} += $comments; - } -} - -# print the info -$tot = 0; -$totcmts = 0; -printf "\n Code Comments\n"; -foreach $d (sort (keys %DirCount)) { - printf "%-20s %6d %6d\n", $d, $DirCount{$d}, $DirComments{$d}; - $tot += $DirCount{$d}; - $totcmts += $DirComments{$d}; -} -printf "\n%-20s %6d %6d\n\n\n", 'TOTAL:', $tot, $totcmts; - -$tot = 0; -$totcmts = 0; -printf "\n Code Comments\n"; -foreach $m (sort (keys %ModCount)) { - printf "%-20s %6d %6d\n", $m, $ModCount{$m}, $ModComments{$m}; - $tot += $ModCount{$m}; - $totcmts += $ModComments{$m}; -} -printf "\n%-20s %6d %6d\n", 'TOTAL:', $tot, $totcmts; diff --git a/utils/count_lines/ghc.mk b/utils/count_lines/ghc.mk deleted file mode 100644 index 5fec518..0000000 --- a/utils/count_lines/ghc.mk +++ /dev/null @@ -1,4 +0,0 @@ -utils/count_lines_PERL_SRC = count_lines.pl -utils/count_lines_dist_PROGNAME = count_lines - -$(eval $(call build-perl,utils/count_lines,dist)) From git at git.haskell.org Sun Mar 10 14:31:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:54 +0000 (UTC) Subject: [commit: ghc] master: Rip out perl dependency (b760269) Message-ID: <20190310143154.B2D923A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b760269c5914e128c07c66bacdbe86168003e82e/ghc >--------------------------------------------------------------- commit b760269c5914e128c07c66bacdbe86168003e82e Author: Ben Gamari Date: Fri Mar 8 10:24:17 2019 -0500 Rip out perl dependency The object splitter was the last major user of perl. There remain a few uses in nofib but we can just rely on the system's perl for this since it's not critical to the build. >--------------------------------------------------------------- b760269c5914e128c07c66bacdbe86168003e82e distrib/configure.ac.in | 10 ---------- ghc.mk | 6 ------ hadrian/cfg/system.config.in | 1 - hadrian/src/Builder.hs | 2 -- hadrian/src/Rules/Nofib.hs | 3 +-- mk/config.mk.in | 1 - mk/get-win32-tarballs.sh | 1 - mk/tree.mk | 1 - settings.in | 1 - utils/vagrant/bootstrap-rhel.sh | 2 +- 10 files changed, 2 insertions(+), 26 deletions(-) diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index dd0eb2e..f9f14d1 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -51,16 +51,6 @@ Unregisterised="@Unregisterised@" AC_SUBST(Unregisterised) # -dnl ** Check Perl installation ** -# -AC_PATH_PROG(PerlCmd,perl) -if test -z "$PerlCmd"; then - echo "You must install perl before you can continue" - echo "Perhaps it is already installed, but not in your PATH?" - exit 1 -fi - -# dnl ** figure out how to do a BSD-ish install ** # AC_PROG_INSTALL diff --git a/ghc.mk b/ghc.mk index bc92b87..0eae0fc 100644 --- a/ghc.mk +++ b/ghc.mk @@ -815,11 +815,6 @@ install : install_mingw install_mingw : $(INPLACE_MINGW) "$(CP)" -Rp $(INPLACE_MINGW) $(prefix) -install : install_perl -.PHONY: install_perl -install_perl : $(INPLACE_PERL) - "$(CP)" -Rp $(INPLACE_PERL) $(prefix) - endif # Windows_Host ifneq "$(BINDIST)" "YES" @@ -1025,7 +1020,6 @@ $(eval $(call bindist-list,.,\ $(INPLACE_BIN)/mkdirhier \ utils/ghc-cabal/dist-install/build/tmp/ghc-cabal \ $(BINDIST_WRAPPERS) \ - $(BINDIST_PERL_SOURCES) \ $(BINDIST_LIBS) \ $(BINDIST_HI) \ $(BINDIST_EXTRAS) \ diff --git a/hadrian/cfg/system.config.in b/hadrian/cfg/system.config.in index affeeaa..e3c612e 100644 --- a/hadrian/cfg/system.config.in +++ b/hadrian/cfg/system.config.in @@ -23,7 +23,6 @@ system-ghc = @WithGhc@ system-ghc-pkg = @GhcPkgCmd@ tar = @TarCmd@ patch = @PatchCmd@ -perl = @PerlCmd@ xelatex = @XELATEX@ # Python 3 is required to run test driver. diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 6c14eb4..6d334d8 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -127,7 +127,6 @@ data Builder = Alex | Nm | Objdump | Patch - | Perl | Python | Ranlib | RunTest @@ -305,7 +304,6 @@ systemBuilderPath builder = case builder of Nm -> fromKey "nm" Objdump -> fromKey "objdump" Patch -> fromKey "patch" - Perl -> fromKey "perl" Python -> fromKey "python" Ranlib -> fromKey "ranlib" RunTest -> fromKey "python" diff --git a/hadrian/src/Rules/Nofib.hs b/hadrian/src/Rules/Nofib.hs index 0950605..016f7e7 100644 --- a/hadrian/src/Rules/Nofib.hs +++ b/hadrian/src/Rules/Nofib.hs @@ -29,7 +29,6 @@ nofibRules = do makePath <- builderPath (Make "nofib") top <- topDirectory ghcPath <- builderPath (Ghc CompileHs Stage2) - perlPath <- builderPath Perl -- some makefiles in nofib rely on a $MAKE -- env var being defined @@ -39,7 +38,7 @@ nofibRules = do -- subdirectory, passing the path to -- the GHC to benchmark and perl to -- nofib's makefiles. - let nofibArgs = ["WithNofibHc=" ++ (top -/- ghcPath), "PERL=" ++ perlPath] + let nofibArgs = ["WithNofibHc=" ++ (top -/- ghcPath)] unit $ cmd (Cwd "nofib") [makePath] ["clean"] unit $ cmd (Cwd "nofib") [makePath] (nofibArgs ++ ["boot"]) (Exit e, Stdouterr log) <- cmd (Cwd "nofib") [makePath] nofibArgs diff --git a/mk/config.mk.in b/mk/config.mk.in index 55fb808..22a3d39 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -701,7 +701,6 @@ INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL)) LN_S = @LN_S@ MV = mv -PERL = @PerlCmd@ PIC = pic RANLIB_CMD = @RANLIB_CMD@ REAL_RANLIB_CMD = @REAL_RANLIB_CMD@ diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index 32f2705..fd47232 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -117,7 +117,6 @@ download_tarballs() { if test "$mingw_arch" != "sources"; then download_mingw "${format_url}-mpc-1.0.3-2-any.pkg.tar.xz" download_mingw "${format_url}-gcc-libs-7.2.0-1-any.pkg.tar.xz" - download_file "https://downloads.haskell.org/~ghc/mingw/ghc-perl-1.tar.gz" "ghc-tarballs/perl/ghc-perl-1.tar.gz" "Windows Perl binary distributions" "" "" else local format_url="${mingw_base_url}/${mingw_arch}/${package_prefix}" download_mingw "${format_url}-i686-mpc-1.0.3-2.src.tar.gz" diff --git a/mk/tree.mk b/mk/tree.mk index b333e64..5a61a4a 100644 --- a/mk/tree.mk +++ b/mk/tree.mk @@ -19,7 +19,6 @@ INPLACE_BIN = $(INPLACE)/bin INPLACE_LIB = $(INPLACE)/lib INPLACE_TOPDIR = $(INPLACE)/lib INPLACE_MINGW = $(INPLACE)/mingw -INPLACE_PERL = $(INPLACE)/perl ################################################################################ # diff --git a/settings.in b/settings.in index 30bfe70..6037d53 100644 --- a/settings.in +++ b/settings.in @@ -19,7 +19,6 @@ ("dllwrap command", "@SettingsDllWrapCommand@"), ("windres command", "@SettingsWindresCommand@"), ("libtool command", "@SettingsLibtoolCommand@"), - ("perl command", "@SettingsPerlCommand@"), ("cross compiling", "@CrossCompiling@"), ("target os", "@HaskellTargetOs@"), ("target arch", "@HaskellTargetArch@"), diff --git a/utils/vagrant/bootstrap-rhel.sh b/utils/vagrant/bootstrap-rhel.sh index 52cc5fc..eb28f07 100755 --- a/utils/vagrant/bootstrap-rhel.sh +++ b/utils/vagrant/bootstrap-rhel.sh @@ -1,4 +1,4 @@ #!/bin/sh yum update -y yum install -y glibc-devel ncurses-devel gmp-devel autoconf automake libtool \ - gcc make perl python ghc git + gcc make python ghc git From git at git.haskell.org Sun Mar 10 14:31:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 10 Mar 2019 14:31:58 +0000 (UTC) Subject: [commit: ghc] wip/magic-carpet-ride's head updated: Fix #13839: GHCi warnings do not respect the default module header (2762f94) Message-ID: <20190310143158.E1AE53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'wip/magic-carpet-ride' now includes: 37f257a Rip out object splitting 23342e1 rts/Printer: Introduce a few more printing utilities c19a401 rts/Printer: Print forwarding pointers db039a4 Add regression test for #15918 2ff77b9 Handle absolute paths to build roots in Hadrian. 5aab1d9 rts: Unglobalize dead_weak_ptr_list and resurrected_threads a4944d8 Fix it 78dd04f Fix #16385 by appending _maybe to a use of lookupGlobalOcc 3caeb44 Move reifyGHCi function into GhciMonad type class 4ca271d testsuite: Introduce fragile modifier 910185a testsuite: Mark heapprof001 as fragile on i386 a65bcbe testsuite: Use fragile modifier for more tests f624dc1 gitlab-ci: Don't allow i386-deb9 to fail 07f378c Add tests for Trac #16221 and #16342 25c3dd3 Test Trac #16263 7a68254 Fix #16392: revertCAFs in external interpreter when necessary 068b7e9 Fix #16391 by using occCheckExpand in TcValidity 1675d40 Always do the worker/wrapper split for NOINLINEs 48927a9 Hadrian: various improvements around the 'test' rule 5d74414 Hadrian: Drop remaining symlink traversal code from build scripts 8262825 Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 5be7ad7 Use captureTopConstraints in TcRnDriver calls 224a6b8 TH: support raw bytes literals (#14741) 2762f94 Fix #13839: GHCi warnings do not respect the default module header From git at git.haskell.org Tue Mar 12 00:28:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:28:49 +0000 (UTC) Subject: [commit: ghc] branch 'wip/issue15622' created Message-ID: <20190312002849.583233A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/issue15622 Referencing: 15d9fb580736f880455f40368b4ee402f3d307f5 From git at git.haskell.org Tue Mar 12 00:28:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:28:51 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16414' created Message-ID: <20190312002851.596C33A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16414 Referencing: cfea70bbe8c9a374edcdabf4363d211b66fce281 From git at git.haskell.org Tue Mar 12 00:28:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:28:55 +0000 (UTC) Subject: [commit: ghc] wip/T16414: Use transSuperClasses in TcErrors (cfea70b) Message-ID: <20190312002855.3D4FA3A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16414 Link : http://ghc.haskell.org/trac/ghc/changeset/cfea70bbe8c9a374edcdabf4363d211b66fce281/ghc >--------------------------------------------------------------- commit cfea70bbe8c9a374edcdabf4363d211b66fce281 Author: Simon Peyton Jones Date: Mon Mar 11 10:02:31 2019 +0000 Use transSuperClasses in TcErrors Code in TcErrors was recursively using immSuperClasses, which loops in the presence of UndecidableSuperClasses. Better to use transSuperClasses instead, which has a loop-breaker mechanism built in. Fixes issue #16414. >--------------------------------------------------------------- cfea70bbe8c9a374edcdabf4363d211b66fce281 compiler/typecheck/TcErrors.hs | 20 +++++++++---------- compiler/typecheck/TcType.hs | 23 ++++++++++++++++++++-- testsuite/tests/typecheck/should_fail/T16414.hs | 17 ++++++++++++++++ .../tests/typecheck/should_fail/T16414.stderr | 13 ++++++++++++ testsuite/tests/typecheck/should_fail/all.T | 1 + 5 files changed, 62 insertions(+), 12 deletions(-) diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index d56e344..3f0f82c 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -2577,15 +2577,15 @@ mk_dict_err ctxt@(CEC {cec_encl = implics}) (ct, (matches, unifiers, unsafe_over 2 (sep [ text "bound by" <+> ppr skol_info , text "at" <+> ppr (tcl_loc (implicLclEnv implic)) ]) - where ev_vars_matching = filter ev_var_matches (map evVarPred evvars) - ev_var_matches ty = case getClassPredTys_maybe ty of - Just (clas', tys') - | clas' == clas - , Just _ <- tcMatchTys tys tys' - -> True - | otherwise - -> any ev_var_matches (immSuperClasses clas' tys') - Nothing -> False + where ev_vars_matching = [ pred + | ev_var <- evvars + , let pred = evVarPred ev_var + , any can_match (pred : transSuperClasses pred) ] + can_match pred + = case getClassPredTys_maybe pred of + Just (clas', tys') -> clas' == clas + && isJust (tcMatchTys tys tys') + Nothing -> False -- Overlap error because of Safe Haskell (first -- match should be the most specific match) @@ -2716,7 +2716,7 @@ the alleged "provided" constraints, Show a. So we suppress that Implication in discardProvCtxtGivens. It's painfully ad-hoc but the truth is that adding it to the "required" -constraints would work. Suprressing it solves two problems. First, +constraints would work. Suppressing it solves two problems. First, we never tell the user that we could not deduce a "provided" constraint from the "required" context. Second, we never give a possible fix that suggests to add a "provided" constraint to the diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 155037b..d4bac5c 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -2011,8 +2011,25 @@ isInsolubleOccursCheck eq_rel tv ty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we expand superclasses, we use the following algorithm: -expand( so_far, pred ) returns the transitive superclasses of pred, - not including pred itself +transSuperClasses( C tys ) returns the transitive superclasses + of (C tys), not including C itself + +For example + class C a b => D a b + class D b a => C a b + +Then + transSuperClasses( Ord ty ) = [Eq ty] + transSuperClasses( C ta tb ) = [D tb ta, C tb ta] + +Notice that in the recursive-superclass case we include C again at +the end of the chain. One could exclude C in this case, but +the code is more awkward and there seems no good reason to do so. +(However C.f. TcCanonical.mk_strict_superclasses, which /does/ +appear to do so.) + +The algorithm is expand( so_far, pred ): + 1. If pred is not a class constraint, return empty set Otherwise pred = C ts 2. If C is in so_far, return empty set (breaks loops) @@ -2024,6 +2041,8 @@ Notice that * With normal Haskell-98 classes, the loop-detector will never bite, so we'll get all the superclasses. + * We need the loop-breaker in case we have UndecidableSuperClasses on + * Since there is only a finite number of distinct classes, expansion must terminate. diff --git a/testsuite/tests/typecheck/should_fail/T16414.hs b/testsuite/tests/typecheck/should_fail/T16414.hs new file mode 100644 index 0000000..27807e8 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16414.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE FlexibleContexts, FlexibleInstances, AllowAmbiguousTypes #-} +{-# LANGUAGE UndecidableSuperClasses #-} +module T16414 where + +data I = I + +class All2 x => All x +class All x => All2 x + +class AllZip2 f +instance AllZip2 f + +f1 :: (All x, AllZip2 I) => x -> () +f1 = f2 + +f2 :: AllZip2 f => x -> () +f2 _ = () diff --git a/testsuite/tests/typecheck/should_fail/T16414.stderr b/testsuite/tests/typecheck/should_fail/T16414.stderr new file mode 100644 index 0000000..5cfbf75 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16414.stderr @@ -0,0 +1,13 @@ + +T16414.hs:14:6: error: + • Overlapping instances for AllZip2 f0 arising from a use of ‘f2’ + Matching givens (or their superclasses): + AllZip2 I + bound by the type signature for: + f1 :: forall x. (All x, AllZip2 I) => x -> () + at T16414.hs:13:1-35 + Matching instances: + instance AllZip2 f -- Defined at T16414.hs:11:10 + (The choice depends on the instantiation of ‘f0’) + • In the expression: f2 + In an equation for ‘f1’: f1 = f2 diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 1a775d3..54cd211 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -510,3 +510,4 @@ test('T16059e', [extra_files(['T16059b.hs'])], multimod_compile_fail, ['T16059e', '-v0']) test('T16255', normal, compile_fail, ['']) test('T16204c', normal, compile_fail, ['']) +test('T16414', normal, compile_fail, ['']) From git at git.haskell.org Tue Mar 12 00:28:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:28:58 +0000 (UTC) Subject: [commit: ghc] wip/issue15622: Data.Fixed fix for issue 15622 (15d9fb5) Message-ID: <20190312002858.495973A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/issue15622 Link : http://ghc.haskell.org/trac/ghc/changeset/15d9fb580736f880455f40368b4ee402f3d307f5/ghc >--------------------------------------------------------------- commit 15d9fb580736f880455f40368b4ee402f3d307f5 Author: Ashley Yakeley Date: Mon Mar 11 13:02:13 2019 -0700 Data.Fixed fix for issue 15622 >--------------------------------------------------------------- 15d9fb580736f880455f40368b4ee402f3d307f5 libraries/base/Data/Fixed.hs | 57 +++++++++++++++++--------------------------- libraries/time | 2 +- 2 files changed, 23 insertions(+), 36 deletions(-) diff --git a/libraries/base/Data/Fixed.hs b/libraries/base/Data/Fixed.hs index 482ec0a..d7930be 100644 --- a/libraries/base/Data/Fixed.hs +++ b/libraries/base/Data/Fixed.hs @@ -1,5 +1,10 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE ExplicitNamespaces #-} ----------------------------------------------------------------------------- -- | @@ -37,6 +42,7 @@ module Data.Fixed ) where import Data.Data +import GHC.TypeLits (KnownNat, natVal, type (^)) import GHC.Read import Text.ParserCombinators.ReadPrec import Text.Read.Lex @@ -58,7 +64,7 @@ mod' n d = n - (fromInteger f) * d where f = div' n d -- | The type parameter should be an instance of 'HasResolution'. -newtype Fixed a = MkFixed Integer +newtype Fixed (a :: k) = MkFixed Integer deriving ( Eq -- ^ @since 2.01 , Ord -- ^ @since 2.01 ) @@ -71,17 +77,20 @@ conMkFixed :: Constr conMkFixed = mkConstr tyFixed "MkFixed" [] Prefix -- | @since 4.1.0.0 -instance (Typeable a) => Data (Fixed a) where +instance (Typeable k,Typeable a) => Data (Fixed (a :: k)) where gfoldl k z (MkFixed a) = k (z MkFixed) a gunfold k z _ = k (z MkFixed) dataTypeOf _ = tyFixed toConstr _ = conMkFixed -class HasResolution a where +class HasResolution (a :: k) where resolution :: p a -> Integer -withType :: (p a -> f a) -> f a -withType foo = foo undefined +instance KnownNat n => HasResolution n where + resolution _ = natVal (Proxy :: Proxy n) + +withType :: (Proxy a -> f a) -> f a +withType foo = foo Proxy withResolution :: (HasResolution a) => (Integer -> f a) -> f a withResolution foo = withType (foo . resolution) @@ -170,65 +179,43 @@ convertFixed :: forall a . HasResolution a => Lexeme -> ReadPrec (Fixed a) convertFixed (Number n) | Just (i, f) <- numberToFixed e n = return (fromInteger i + (fromInteger f / (10 ^ e))) - where r = resolution (undefined :: Fixed a) + where r = resolution (Proxy :: Proxy a) -- round 'e' up to help make the 'read . show == id' property -- possible also for cases where 'resolution' is not a -- power-of-10, such as e.g. when 'resolution = 128' e = ceiling (logBase 10 (fromInteger r) :: Double) convertFixed _ = pfail -data E0 +type E0 = 10 ^ 0 --- | @since 4.1.0.0 -instance HasResolution E0 where - resolution _ = 1 -- | resolution of 1, this works the same as Integer type Uni = Fixed E0 -data E1 +type E1 = 10 ^ 1 --- | @since 4.1.0.0 -instance HasResolution E1 where - resolution _ = 10 -- | resolution of 10^-1 = .1 type Deci = Fixed E1 -data E2 +type E2 = 10 ^ 2 --- | @since 4.1.0.0 -instance HasResolution E2 where - resolution _ = 100 -- | resolution of 10^-2 = .01, useful for many monetary currencies type Centi = Fixed E2 -data E3 +type E3 = 10 ^ 3 --- | @since 4.1.0.0 -instance HasResolution E3 where - resolution _ = 1000 -- | resolution of 10^-3 = .001 type Milli = Fixed E3 -data E6 +type E6 = 10 ^ 6 --- | @since 2.01 -instance HasResolution E6 where - resolution _ = 1000000 -- | resolution of 10^-6 = .000001 type Micro = Fixed E6 -data E9 +type E9 = 10 ^ 9 --- | @since 4.1.0.0 -instance HasResolution E9 where - resolution _ = 1000000000 -- | resolution of 10^-9 = .000000001 type Nano = Fixed E9 -data E12 - --- | @since 2.01 -instance HasResolution E12 where - resolution _ = 1000000000000 +type E12 = 10 ^ 12 -- | resolution of 10^-12 = .000000000001 type Pico = Fixed E12 diff --git a/libraries/time b/libraries/time index 9e96c26..4302fdb 160000 --- a/libraries/time +++ b/libraries/time @@ -1 +1 @@ -Subproject commit 9e96c26132fef01a3113c8b152b1be96c0eccd86 +Subproject commit 4302fdbcff75a16296aab2ef6e46194ef147b886 From git at git.haskell.org Tue Mar 12 00:29:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:29:01 +0000 (UTC) Subject: [commit: ghc] master: Ignore more version numbers in the testsuite (bcb6769) Message-ID: <20190312002901.6505B3A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bcb6769c83744c211d3ddddbc7fd9dec88452c88/ghc >--------------------------------------------------------------- commit bcb6769c83744c211d3ddddbc7fd9dec88452c88 Author: Alec Theriault Date: Mon Mar 4 08:45:54 2019 -0800 Ignore more version numbers in the testsuite Prevents some tests from failing just due to mismatched version numbers. These version numbers shouldn't cause tests to fail, especially since we *expect* them to be regularly incremented. The motivation for this particular set of changes came from the changes that came along with the `base` version bump in 8f19ecc95fbaf2cc977531d721085d8441dc09b7. >--------------------------------------------------------------- bcb6769c83744c211d3ddddbc7fd9dec88452c88 testsuite/tests/ado/all.T | 2 +- testsuite/tests/backpack/should_compile/all.T | 2 +- testsuite/tests/backpack/should_fail/all.T | 6 +++--- testsuite/tests/determinism/determ021/all.T | 3 ++- testsuite/tests/driver/all.T | 2 +- testsuite/tests/ghci/scripts/all.T | 3 ++- testsuite/tests/indexed-types/should_compile/all.T | 2 +- testsuite/tests/partial-sigs/should_compile/all.T | 2 ++ testsuite/tests/rename/should_fail/all.T | 2 +- testsuite/tests/roles/should_compile/all.T | 2 ++ testsuite/tests/safeHaskell/check/all.T | 1 + testsuite/tests/safeHaskell/check/pkg01/all.T | 4 ++-- testsuite/tests/safeHaskell/flags/all.T | 2 +- testsuite/tests/typecheck/should_compile/all.T | 6 +++--- testsuite/tests/typecheck/should_fail/all.T | 4 ++-- 15 files changed, 25 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 bcb6769c83744c211d3ddddbc7fd9dec88452c88 From git at git.haskell.org Tue Mar 12 00:29:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:29:04 +0000 (UTC) Subject: [commit: ghc] master: Change the warning in substTy back to an assertion (60b03ad) Message-ID: <20190312002904.70E453A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/60b03adea8cc55ff65fbf6458487c3baf12bb0a1/ghc >--------------------------------------------------------------- commit 60b03adea8cc55ff65fbf6458487c3baf12bb0a1 Author: Krzysztof Gogolewski Date: Thu Mar 7 17:19:45 2019 +0100 Change the warning in substTy back to an assertion We'd like to enforce the substitution invariant (Trac #11371). In a492af06d326453 the assertion was downgraded to a warning; I'm restoring the assertion and making the calls that don't maintain the invariant as unchecked. >--------------------------------------------------------------- 60b03adea8cc55ff65fbf6458487c3baf12bb0a1 compiler/coreSyn/CoreArity.hs | 2 +- compiler/typecheck/TcGenGenerics.hs | 2 +- compiler/typecheck/TcSigs.hs | 2 +- compiler/types/TyCoRep.hs | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs index 37454eb..afd6759 100644 --- a/compiler/coreSyn/CoreArity.hs +++ b/compiler/coreSyn/CoreArity.hs @@ -1153,7 +1153,7 @@ freshEtaId :: Int -> TCvSubst -> Type -> (TCvSubst, Id) freshEtaId n subst ty = (subst', eta_id') where - ty' = Type.substTy subst ty + ty' = Type.substTyUnchecked subst ty eta_id' = uniqAway (getTCvInScope subst) $ mkSysLocalOrCoVar (fsLit "eta") (mkBuiltinUnique n) ty' subst' = extendTCvInScope subst eta_id' diff --git a/compiler/typecheck/TcGenGenerics.hs b/compiler/typecheck/TcGenGenerics.hs index abc7d59..123cfd3 100644 --- a/compiler/typecheck/TcGenGenerics.hs +++ b/compiler/typecheck/TcGenGenerics.hs @@ -431,7 +431,7 @@ tc_mkRepFamInsts gk tycon inst_tys = env = zipTyEnv env_tyvars env_inst_args in_scope = mkInScopeSet (tyCoVarsOfTypes inst_tys) subst = mkTvSubst in_scope env - repTy' = substTy subst repTy + repTy' = substTyUnchecked subst repTy tcv' = tyCoVarsOfTypeList inst_ty (tv', cv') = partition isTyVar tcv' tvs' = scopedSort tv' diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs index 9146b10..7b00165 100644 --- a/compiler/typecheck/TcSigs.hs +++ b/compiler/typecheck/TcSigs.hs @@ -505,7 +505,7 @@ tcInstSig hs_sig@(PartialSig { psig_hs_ty = hs_ty , sig_inst_wcs = wcs , sig_inst_wcx = wcx , sig_inst_theta = substTys subst theta - , sig_inst_tau = substTy subst tau } + , sig_inst_tau = substTyUnchecked subst tau } ; traceTc "End partial sig }" (ppr inst_sig) ; return inst_sig } diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index 9ccfaae..27fde88 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -3196,8 +3196,7 @@ isValidTCvSubst (TCvSubst in_scope tenv cenv) = -- Note [The substitution invariant]. checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a --- TODO (RAE): Change back to ASSERT - = WARN( not (isValidTCvSubst subst), + = ASSERT2( isValidTCvSubst subst, text "in_scope" <+> ppr in_scope $$ text "tenv" <+> ppr tenv $$ text "tenvFVs" <+> ppr (tyCoVarsOfTypesSet tenv) $$ @@ -3205,7 +3204,7 @@ checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a text "cenvFVs" <+> ppr (tyCoVarsOfCosSet cenv) $$ text "tys" <+> ppr tys $$ text "cos" <+> ppr cos ) - WARN( not tysCosFVsInScope, + ASSERT2( tysCosFVsInScope, text "in_scope" <+> ppr in_scope $$ text "tenv" <+> ppr tenv $$ text "cenv" <+> ppr cenv $$ From git at git.haskell.org Tue Mar 12 00:29:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 00:29:08 +0000 (UTC) Subject: [commit: ghc] master: Add a test for Trac #13951 (2f45341) Message-ID: <20190312002908.052343A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2f453414c5b1b27b6a84a3b5c7cd1bb5449f1f5d/ghc >--------------------------------------------------------------- commit 2f453414c5b1b27b6a84a3b5c7cd1bb5449f1f5d Author: Krzysztof Gogolewski Date: Thu Mar 7 19:08:59 2019 +0100 Add a test for Trac #13951 It no longer gives a warning. >--------------------------------------------------------------- 2f453414c5b1b27b6a84a3b5c7cd1bb5449f1f5d testsuite/tests/typecheck/should_compile/T13951.hs | 19 +++++++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 2 files changed, 20 insertions(+) diff --git a/testsuite/tests/typecheck/should_compile/T13951.hs b/testsuite/tests/typecheck/should_compile/T13951.hs new file mode 100644 index 0000000..8cbeb8c --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T13951.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE PolyKinds, GADTs, Rank2Types, ScopedTypeVariables, Trustworthy #-} +module Control.Monad.Skeleton.Internal where + +data Cat k a b where + Empty :: Cat k a a + Leaf :: k a b -> Cat k a b + Tree :: Cat k a b -> Cat k b c -> Cat k a c + +viewL :: forall k a b r. Cat k a b + -> ((a ~ b) => r) + -> (forall x. k a x -> Cat k x b -> r) + -> r +viewL Empty e _ = e +viewL (Leaf k) _ r = k `r` Empty +viewL (Tree a b) e r = go a b where + go :: Cat k a x -> Cat k x b -> r + go Empty t = viewL t e r + go (Leaf k) t = r k t + go (Tree c d) t = go c (Tree d t) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index d312f50..b94f021 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -669,3 +669,4 @@ test('T16188', normal, compile, ['']) test('T16204a', normal, compile, ['']) test('T16204b', normal, compile, ['']) test('T16225', normal, compile, ['']) +test('T13951', normal, compile, ['']) From git at git.haskell.org Tue Mar 12 13:14:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:14:46 +0000 (UTC) Subject: [commit: ghc] branch 'wip/hadrian-sys-cabal' created Message-ID: <20190312131446.F29C43A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/hadrian-sys-cabal Referencing: f0b315b95ed18b31f6134f8bad3dc914ac8d59fb From git at git.haskell.org Tue Mar 12 13:14:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:14:50 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges: Make bkpcabal01 test compatible with new ordering requirements. (bde5d45) Message-ID: <20190312131450.20C003A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.8-merges Link : http://ghc.haskell.org/trac/ghc/changeset/bde5d45cc76f7fedd5ab424dca5d675fceb12581/ghc >--------------------------------------------------------------- commit bde5d45cc76f7fedd5ab424dca5d675fceb12581 Author: Edward Z. Yang Date: Thu Mar 7 23:47:07 2019 -0500 Make bkpcabal01 test compatible with new ordering requirements. Previously, our test did something like this: 1. Typecheck p 2. Typecheck q (which made use of an instantiated p) 3. Build instantiated p 4. Build instantiated q Cabal previously permitted this, under the reasoning that during typechecking there's no harm in using the instantiated p even if we haven't build it yet; we'll just instantiate it on the fly with p. However, this is not true! If q makes use of a Template Haskell splice from p, we absolutely must have built the instantiated p before we typecheck q, since this typechecking will need to run some splices. Cabal now complains that you haven't done it correctly, which we indeed have not! Reordering so that we do this: 1. Typecheck p 3. Build instantiated p 2. Typecheck q (which made use of an instantiated p) 4. Build instantiated q Fixes the problem. If Cabal had managed the ordering itself, it would have gotten it right. Signed-off-by: Edward Z. Yang (cherry picked from commit 6e3e537e419ba8d02dac306d596fba3c1029f123) >--------------------------------------------------------------- bde5d45cc76f7fedd5ab424dca5d675fceb12581 testsuite/tests/backpack/cabal/bkpcabal01/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/testsuite/tests/backpack/cabal/bkpcabal01/Makefile b/testsuite/tests/backpack/cabal/bkpcabal01/Makefile index 01744da..4aaa814 100644 --- a/testsuite/tests/backpack/cabal/bkpcabal01/Makefile +++ b/testsuite/tests/backpack/cabal/bkpcabal01/Makefile @@ -21,13 +21,13 @@ bkpcabal01: clean $(SETUP) build $(SETUP) copy $(SETUP) register - # typecheck q - $(CONFIGURE) --cid "q-0.1" q + # build p + $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" $(SETUP) build $(SETUP) copy $(SETUP) register - # build p - $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" + # typecheck q + $(CONFIGURE) --cid "q-0.1" q $(SETUP) build $(SETUP) copy $(SETUP) register @@ -44,13 +44,13 @@ bkpcabal01: clean $(SETUP) build $(SETUP) copy $(SETUP) register - # re-typecheck q (if buggy, this is what would fail) - $(CONFIGURE) --cid "q-0.1" q + # re-build p + $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" $(SETUP) build $(SETUP) copy $(SETUP) register - # re-build p - $(CONFIGURE) --cid "p-0.1" p --instantiate-with "H=impl-0.1:H" + # re-typecheck q (if buggy, this is what would fail) + $(CONFIGURE) --cid "q-0.1" q $(SETUP) build $(SETUP) copy $(SETUP) register From git at git.haskell.org Tue Mar 12 13:14:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:14:53 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.8-merges: Bump version to 8.8 (0300ea7) Message-ID: <20190312131453.39F473A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.8-merges Link : http://ghc.haskell.org/trac/ghc/changeset/0300ea748279efd22ba9d6e6f491550e4aaf5932/ghc >--------------------------------------------------------------- commit 0300ea748279efd22ba9d6e6f491550e4aaf5932 Author: Ben Gamari Date: Fri Mar 1 20:03:56 2019 -0500 Bump version to 8.8 >--------------------------------------------------------------- 0300ea748279efd22ba9d6e6f491550e4aaf5932 configure.ac | 2 +- libraries/template-haskell/template-haskell.cabal | 2 +- utils/haddock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b75220d..7e508c9 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.7], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.8], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) # Set this to YES for a released version, otherwise NO : ${RELEASE=NO} diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal index cdb60c4..ecd42a6 100644 --- a/libraries/template-haskell/template-haskell.cabal +++ b/libraries/template-haskell/template-haskell.cabal @@ -52,7 +52,7 @@ Library build-depends: base >= 4.11 && < 4.14, - ghc-boot-th == 8.7.*, + ghc-boot-th == 8.8.*, pretty == 1.1.* ghc-options: -Wall diff --git a/utils/haddock b/utils/haddock index 21e4f3f..3e4d6cf 160000 --- a/utils/haddock +++ b/utils/haddock @@ -1 +1 @@ -Subproject commit 21e4f3fa6f73a9b25f3deed80da0e56024238ea5 +Subproject commit 3e4d6cfb2b4c79d5121487a623bd2944eba0e068 From git at git.haskell.org Tue Mar 12 13:14:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:14:56 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-sys-cabal: WIP: Use system cabal to install user packages (f0b315b) Message-ID: <20190312131456.E50B73A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-sys-cabal Link : http://ghc.haskell.org/trac/ghc/changeset/f0b315b95ed18b31f6134f8bad3dc914ac8d59fb/ghc >--------------------------------------------------------------- commit f0b315b95ed18b31f6134f8bad3dc914ac8d59fb Author: Matthew Pickering Date: Tue Mar 12 11:30:54 2019 +0000 WIP: Use system cabal to install user packages >--------------------------------------------------------------- f0b315b95ed18b31f6134f8bad3dc914ac8d59fb hadrian/cfg/system.config.in | 1 + hadrian/hadrian.cabal | 3 ++- hadrian/src/Builder.hs | 2 ++ hadrian/src/Hadrian/Package.hs | 22 ++++++++++++++++++---- hadrian/src/Oracles/Setting.hs | 2 ++ hadrian/src/Rules/Register.hs | 8 +++++++- hadrian/src/Settings/Builders/SysCabal.hs | 23 +++++++++++++++++++++++ hadrian/src/Settings/Default.hs | 2 ++ 8 files changed, 57 insertions(+), 6 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 f0b315b95ed18b31f6134f8bad3dc914ac8d59fb From git at git.haskell.org Tue Mar 12 13:15:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:01 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Add ./hadrian/ghci.sh script for fast development feedback (2d7dd02) Message-ID: <20190312131501.6C0183A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2d7dd0285bbc364f89d4d97928674f7ea73ed2c8/ghc >--------------------------------------------------------------- commit 2d7dd0285bbc364f89d4d97928674f7ea73ed2c8 Author: Matthew Pickering Date: Sun Mar 10 17:43:10 2019 +0000 Hadrian: Add ./hadrian/ghci.sh script for fast development feedback Running the `./hadrian/ghci` target will load the main compiler into a ghci session. This is intended for fast development feedback, modules are only typechecked so it isn't possible to run any functions in the repl. You can also use this target with `ghcid`. The first time this command is run hadrian will need to compile a few dependencies which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds. Internally this works by calling a new hadrian target called `tool-args`. This target prints out the package and include flags which are necessary to load files into ghci. The same target is intended to be used by other tooling which uses the GHC API in order to set up the correct GHC API session. For example, using this target it is also possible to use HIE when developing on GHC. >--------------------------------------------------------------- 2d7dd0285bbc364f89d4d97928674f7ea73ed2c8 hadrian/README.md | 38 ++++++++++++++++++++++++++++++ hadrian/ghci.sh | 3 +++ hadrian/hadrian.cabal | 1 + hadrian/src/Builder.hs | 6 ++++- hadrian/src/Main.hs | 1 + hadrian/src/Oracles/Setting.hs | 2 +- hadrian/src/Rules.hs | 35 ++++++++++++++++++++++++++- hadrian/src/Settings.hs | 4 +++- hadrian/src/Settings/Builders/Ghc.hs | 13 +++++++++- hadrian/src/Settings/Flavours/GhcInGhci.hs | 25 ++++++++++++++++++++ 10 files changed, 123 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 2d7dd0285bbc364f89d4d97928674f7ea73ed2c8 From git at git.haskell.org Tue Mar 12 13:15:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:04 +0000 (UTC) Subject: [commit: ghc] master: Remove training whitespace (bb684e6) Message-ID: <20190312131504.88E1A3A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bb684e650166bc2f95d53e1582813e6f2ab31121/ghc >--------------------------------------------------------------- commit bb684e650166bc2f95d53e1582813e6f2ab31121 Author: Matthew Pickering Date: Sun Mar 10 17:46:00 2019 +0000 Remove training whitespace >--------------------------------------------------------------- bb684e650166bc2f95d53e1582813e6f2ab31121 hadrian/src/Settings/Default.hs | 0 1 file changed, 0 insertions(+), 0 deletions(-) From git at git.haskell.org Tue Mar 12 13:15:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:07 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Allow passing CABFLAGS into build.cabal.sh (b232231) Message-ID: <20190312131507.A6EAC3A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b232231065f5e40ae3a6bd515bb42330cf484fcc/ghc >--------------------------------------------------------------- commit b232231065f5e40ae3a6bd515bb42330cf484fcc Author: Matthew Pickering Date: Sun Mar 10 17:32:47 2019 +0000 Hadrian: Allow passing CABFLAGS into build.cabal.sh Setting `CABFLAGS=args` will pass the additional arguments to cabal when it is invoked. >--------------------------------------------------------------- b232231065f5e40ae3a6bd515bb42330cf484fcc hadrian/build.cabal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/build.cabal.sh b/hadrian/build.cabal.sh index 13ef927..55ae958 100755 --- a/hadrian/build.cabal.sh +++ b/hadrian/build.cabal.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash CABAL=cabal -CABFLAGS="--disable-documentation --disable-profiling --disable-library-profiling" +CABFLAGS="--disable-documentation --disable-profiling --disable-library-profiling $CABFLAGS" # It is currently more robust to pass Cabal an absolute path to the project file. PROJ="$PWD/hadrian/cabal.project" From git at git.haskell.org Tue Mar 12 13:15:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:10 +0000 (UTC) Subject: [commit: ghc] master: Remove trailing whitespace (5165378) Message-ID: <20190312131510.BA1A13A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5165378d87602a8ce24776d220039fc05075d31f/ghc >--------------------------------------------------------------- commit 5165378d87602a8ce24776d220039fc05075d31f Author: Matthew Pickering Date: Sun Mar 10 17:56:07 2019 +0000 Remove trailing whitespace >--------------------------------------------------------------- 5165378d87602a8ce24776d220039fc05075d31f .gitlab-ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) From git at git.haskell.org Tue Mar 12 13:15:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:13 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Fix rpath so shared objects work after being copied (4cf2160) Message-ID: <20190312131513.D47F33A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4cf2160afe0e08fe29576895a1eced863d3a521d/ghc >--------------------------------------------------------------- commit 4cf2160afe0e08fe29576895a1eced863d3a521d Author: Matthew Pickering Date: Sun Mar 10 17:37:48 2019 +0000 Hadrian: Fix rpath so shared objects work after being copied After being copied all the shared objects end up in the same directory. Therefore the correct rpath is `$ORIGIN` rather than the computed path which is relative to the directory where it is built. >--------------------------------------------------------------- 4cf2160afe0e08fe29576895a1eced863d3a521d hadrian/src/Settings/Builders/Ghc.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 7fb3082..0d0d58a 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -82,8 +82,8 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do [ arg "-dynamic" -- TODO what about windows? , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] - , notStage0 ? - hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) + , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) + , hostSupportsRPaths ? arg ("-optl-Wl,-rpath,$ORIGIN") ] , arg "-no-auto-link-packages" , nonHsMainPackage pkg ? arg "-no-hs-main" From git at git.haskell.org Tue Mar 12 13:15:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:16 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Make makeRelativeNoSysLink total (705fa21) Message-ID: <20190312131516.DDED43A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/705fa21d674a5a799712346e01033db98b16e71d/ghc >--------------------------------------------------------------- commit 705fa21d674a5a799712346e01033db98b16e71d Author: Matthew Pickering Date: Sun Mar 10 17:36:32 2019 +0000 Hadrian: Make makeRelativeNoSysLink total makeRelativeNoSysLink would previously crash for no reason if the first argument as `./` due to the call to `head`. This refactoring keeps the behaviour the same but doesn't crash in this corner case. >--------------------------------------------------------------- 705fa21d674a5a799712346e01033db98b16e71d hadrian/src/Hadrian/Utilities.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs index e5fc712..42a6fff 100644 --- a/hadrian/src/Hadrian/Utilities.hs +++ b/hadrian/src/Hadrian/Utilities.hs @@ -166,14 +166,15 @@ makeRelativeNoSysLink a b -- Use removePrefix to get the relative paths relative to a new -- base directory as high in the directory tree as possible. (baseToA, baseToB) = removePrefix aRelSplit bRelSplit - aToBase = if isDirUp (head baseToA) - -- if baseToA contains any '..' then there is no way to get - -- a path from a to the base directory. - -- E.g. if baseToA == "../u/v" - -- then aToBase == "../../" - then error $ "Impossible to find relatieve path from " + aToBase = case baseToA of + (p: _) | isDirUp p -> + -- if baseToA contains any '..' then there is no way to get + -- a path from a to the base directory. + -- E.g. if baseToA == "../u/v" + -- then aToBase == "../../" + error $ "Impossible to find relatieve path from " ++ a ++ " to " ++ b - else".." <$ baseToA + _ -> ".." <$ baseToA aToB = aToBase ++ baseToB -- removePrefix "pre123" "prefix456" == ("123", "fix456") From git at git.haskell.org Tue Mar 12 13:15:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:20 +0000 (UTC) Subject: [commit: ghc] master: Hadrian: Make libsuf and distDir stage aware (6126455) Message-ID: <20190312131520.0084C3A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/61264556d5c817b55332a199b03fa1f559e92ee2/ghc >--------------------------------------------------------------- commit 61264556d5c817b55332a199b03fa1f559e92ee2 Author: Matthew Pickering Date: Sun Mar 10 17:34:42 2019 +0000 Hadrian: Make libsuf and distDir stage aware The version suffix needs to be the version of the stage 0 compiler when building shared libraries with the stage 0 compiler. >--------------------------------------------------------------- 61264556d5c817b55332a199b03fa1f559e92ee2 hadrian/src/Context.hs | 8 ++++---- hadrian/src/Oracles/Setting.hs | 10 +++++++--- hadrian/src/Rules/BinaryDist.hs | 2 +- hadrian/src/Rules/Libffi.hs | 2 +- hadrian/src/Settings/Builders/Ghc.hs | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index f8a07d7..4ecf101 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -52,9 +52,9 @@ libPath Context {..} = buildRoot <&> (-/- (stageString stage -/- "lib")) -- -- We preform some renaming to accomodate Cabal's slightly different naming -- conventions (see 'cabalOsString' and 'cabalArchString'). -distDir :: Action FilePath -distDir = do - version <- setting ProjectVersion +distDir :: Stage -> Action FilePath +distDir st = do + version <- ghcVersionStage st hostOs <- cabalOsString <$> setting BuildOs hostArch <- cabalArchString <$> setting BuildArch return $ hostArch ++ "-" ++ hostOs ++ "-ghc-" ++ version @@ -85,7 +85,7 @@ pkgHaddockFile Context {..} = do -- @_build/stage1/libraries/array/build/libHSarray-0.5.1.0.a at . pkgLibraryFile :: Context -> Action FilePath pkgLibraryFile context at Context {..} = do - extension <- libsuf way + extension <- libsuf stage way pkgFile context "libHS" extension -- | Path to the GHCi library file of a given 'Context', e.g.: diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index 02ac42e..4666539 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -210,6 +210,10 @@ ghcCanonVersion = do topDirectory :: Action FilePath topDirectory = fixAbsolutePathOnWindows =<< setting GhcSourcePath +ghcVersionStage :: Stage -> Action String +ghcVersionStage Stage0 = setting GhcVersion +ghcVersionStage _ = setting ProjectVersion + -- | The file suffix used for libraries of a given build 'Way'. For example, -- @_p.a@ corresponds to a static profiled library, and @-ghc7.11.20141222.so@ -- is a dynamic vanilly library. Why do we need GHC version number in the @@ -219,11 +223,11 @@ topDirectory = fixAbsolutePathOnWindows =<< setting GhcSourcePath -- live in their own per-package directory and hence do not need a unique -- filename. We also need to respect the system's dynamic extension, e.g. @.dll@ -- or @.so at . -libsuf :: Way -> Action String -libsuf way +libsuf :: Stage -> Way -> Action String +libsuf st way | not (wayUnit Dynamic way) = return (waySuffix way ++ ".a") -- e.g., _p.a | otherwise = do extension <- setting DynamicExtension -- e.g., .dll or .so - version <- setting ProjectVersion -- e.g., 7.11.20141222 + version <- ghcVersionStage st -- e.g. 8.4.4 or 8.9.xxxx let suffix = waySuffix (removeWayUnit Dynamic way) return (suffix ++ "-ghc" ++ version ++ extension) diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index 609766d..610e668 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -98,7 +98,7 @@ bindistRules = do version <- setting ProjectVersion targetPlatform <- setting TargetPlatformFull - distDir <- Context.distDir + distDir <- Context.distDir Stage1 rtsDir <- pkgIdentifier rts windows <- windowsHost diff --git a/hadrian/src/Rules/Libffi.hs b/hadrian/src/Rules/Libffi.hs index 5b25aab..ddc739d 100644 --- a/hadrian/src/Rules/Libffi.hs +++ b/hadrian/src/Rules/Libffi.hs @@ -60,7 +60,7 @@ libffiLibrary = "inst/lib/libffi.a" rtsLibffiLibrary :: Stage -> Way -> Action FilePath rtsLibffiLibrary stage way = do name <- libffiLibraryName - suf <- libsuf way + suf <- libsuf stage way rtsPath <- rtsBuildPath stage return $ rtsPath -/- "lib" ++ name ++ suf diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index b952a01..7fb3082 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -53,7 +53,8 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do originPath <- dropFileName <$> getOutput context <- getContext libPath' <- expr (libPath context) - distDir <- expr Context.distDir + st <- getStage + distDir <- expr (Context.distDir st) useSystemFfi <- expr (flag UseSystemFfi) buildPath <- getBuildPath From git at git.haskell.org Tue Mar 12 13:15:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 13:15:23 +0000 (UTC) Subject: [commit: ghc] master: CI: Add ghc-in-ghci build job (72c455a) Message-ID: <20190312131523.0D0F63A5FE@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/72c455a4a1d2dbeeed9c9d4e80cf333bdf98fcf2/ghc >--------------------------------------------------------------- commit 72c455a4a1d2dbeeed9c9d4e80cf333bdf98fcf2 Author: Matthew Pickering Date: Sun Mar 10 17:54:59 2019 +0000 CI: Add ghc-in-ghci build job This is a separate build job to the other hadrian jobs as it only takes about 2-3 minutes to run from cold. The CI tests that the `./hadrian/ghci` script loads `ghc/Main.hs` successfully. >--------------------------------------------------------------- 72c455a4a1d2dbeeed9c9d4e80cf333bdf98fcf2 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1f5550..13e9d8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,6 +85,32 @@ validate-x86_64-linux-deb8-hadrian: tags: - x86_64-linux +hadrian-ghc-in-ghci: + stage: build + image: ghcci/x86_64-linux-deb8:0.1 + 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 + script: + - cabal update + - 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 + - ./configure $CONFIGURE_ARGS + # Load ghc-in-ghci then immediately exit + - echo ":q" | hadrian/ghci.sh + cache: + key: hadrian-ghci + paths: + - cabal-cache + ############################################################ # Validation via Pipelines (make) ############################################################ From git at git.haskell.org Tue Mar 12 14:59:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:25 +0000 (UTC) Subject: [commit: ghc] branch 'wip/test-ci-images-commit' created Message-ID: <20190312145925.F24953A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/test-ci-images-commit Referencing: a480daf2c2ec7ef65cf24f7bbdd918892d945e7f From git at git.haskell.org Tue Mar 12 14:59:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:29 +0000 (UTC) Subject: [commit: ghc] master, wip/test-ci-images-commit: Use transSuperClasses in TcErrors (50249a9) Message-ID: <20190312145929.C9D073A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/50249a9f652ae3440e9462fdc9914edc924091f1/ghc >--------------------------------------------------------------- commit 50249a9f652ae3440e9462fdc9914edc924091f1 Author: Simon Peyton Jones Date: Mon Mar 11 10:02:31 2019 +0000 Use transSuperClasses in TcErrors Code in TcErrors was recursively using immSuperClasses, which loops in the presence of UndecidableSuperClasses. Better to use transSuperClasses instead, which has a loop-breaker mechanism built in. Fixes issue #16414. >--------------------------------------------------------------- 50249a9f652ae3440e9462fdc9914edc924091f1 compiler/typecheck/TcErrors.hs | 20 +++++++++---------- compiler/typecheck/TcType.hs | 23 ++++++++++++++++++++-- testsuite/tests/typecheck/should_fail/T16414.hs | 17 ++++++++++++++++ .../tests/typecheck/should_fail/T16414.stderr | 13 ++++++++++++ testsuite/tests/typecheck/should_fail/all.T | 1 + 5 files changed, 62 insertions(+), 12 deletions(-) diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index d56e344..3f0f82c 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -2577,15 +2577,15 @@ mk_dict_err ctxt@(CEC {cec_encl = implics}) (ct, (matches, unifiers, unsafe_over 2 (sep [ text "bound by" <+> ppr skol_info , text "at" <+> ppr (tcl_loc (implicLclEnv implic)) ]) - where ev_vars_matching = filter ev_var_matches (map evVarPred evvars) - ev_var_matches ty = case getClassPredTys_maybe ty of - Just (clas', tys') - | clas' == clas - , Just _ <- tcMatchTys tys tys' - -> True - | otherwise - -> any ev_var_matches (immSuperClasses clas' tys') - Nothing -> False + where ev_vars_matching = [ pred + | ev_var <- evvars + , let pred = evVarPred ev_var + , any can_match (pred : transSuperClasses pred) ] + can_match pred + = case getClassPredTys_maybe pred of + Just (clas', tys') -> clas' == clas + && isJust (tcMatchTys tys tys') + Nothing -> False -- Overlap error because of Safe Haskell (first -- match should be the most specific match) @@ -2716,7 +2716,7 @@ the alleged "provided" constraints, Show a. So we suppress that Implication in discardProvCtxtGivens. It's painfully ad-hoc but the truth is that adding it to the "required" -constraints would work. Suprressing it solves two problems. First, +constraints would work. Suppressing it solves two problems. First, we never tell the user that we could not deduce a "provided" constraint from the "required" context. Second, we never give a possible fix that suggests to add a "provided" constraint to the diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 155037b..d4bac5c 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -2011,8 +2011,25 @@ isInsolubleOccursCheck eq_rel tv ty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we expand superclasses, we use the following algorithm: -expand( so_far, pred ) returns the transitive superclasses of pred, - not including pred itself +transSuperClasses( C tys ) returns the transitive superclasses + of (C tys), not including C itself + +For example + class C a b => D a b + class D b a => C a b + +Then + transSuperClasses( Ord ty ) = [Eq ty] + transSuperClasses( C ta tb ) = [D tb ta, C tb ta] + +Notice that in the recursive-superclass case we include C again at +the end of the chain. One could exclude C in this case, but +the code is more awkward and there seems no good reason to do so. +(However C.f. TcCanonical.mk_strict_superclasses, which /does/ +appear to do so.) + +The algorithm is expand( so_far, pred ): + 1. If pred is not a class constraint, return empty set Otherwise pred = C ts 2. If C is in so_far, return empty set (breaks loops) @@ -2024,6 +2041,8 @@ Notice that * With normal Haskell-98 classes, the loop-detector will never bite, so we'll get all the superclasses. + * We need the loop-breaker in case we have UndecidableSuperClasses on + * Since there is only a finite number of distinct classes, expansion must terminate. diff --git a/testsuite/tests/typecheck/should_fail/T16414.hs b/testsuite/tests/typecheck/should_fail/T16414.hs new file mode 100644 index 0000000..27807e8 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16414.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE FlexibleContexts, FlexibleInstances, AllowAmbiguousTypes #-} +{-# LANGUAGE UndecidableSuperClasses #-} +module T16414 where + +data I = I + +class All2 x => All x +class All x => All2 x + +class AllZip2 f +instance AllZip2 f + +f1 :: (All x, AllZip2 I) => x -> () +f1 = f2 + +f2 :: AllZip2 f => x -> () +f2 _ = () diff --git a/testsuite/tests/typecheck/should_fail/T16414.stderr b/testsuite/tests/typecheck/should_fail/T16414.stderr new file mode 100644 index 0000000..5cfbf75 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16414.stderr @@ -0,0 +1,13 @@ + +T16414.hs:14:6: error: + • Overlapping instances for AllZip2 f0 arising from a use of ‘f2’ + Matching givens (or their superclasses): + AllZip2 I + bound by the type signature for: + f1 :: forall x. (All x, AllZip2 I) => x -> () + at T16414.hs:13:1-35 + Matching instances: + instance AllZip2 f -- Defined at T16414.hs:11:10 + (The choice depends on the instantiation of ‘f0’) + • In the expression: f2 + In an equation for ‘f1’: f1 = f2 diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index a5d1847..b3c25ea 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -510,3 +510,4 @@ test('T16059e', [extra_files(['T16059b.hs'])], multimod_compile_fail, ['T16059e', '-v0']) test('T16255', normal, compile_fail, ['']) test('T16204c', normal, compile_fail, ['']) +test('T16414', normal, compile_fail, ['']) From git at git.haskell.org Tue Mar 12 14:59:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:32 +0000 (UTC) Subject: [commit: ghc] master, wip/test-ci-images-commit: Remove duplicate functions in StgCmmUtils, use functions from CgUtils (62db929) Message-ID: <20190312145932.DBF583A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/62db9295ba79d5229585fb08530fff944179c609/ghc >--------------------------------------------------------------- commit 62db9295ba79d5229585fb08530fff944179c609 Author: Ömer Sinan Ağacan Date: Mon Mar 11 14:44:28 2019 +0300 Remove duplicate functions in StgCmmUtils, use functions from CgUtils Also remove unused arg from get_Regtable_addr_from_offset >--------------------------------------------------------------- 62db9295ba79d5229585fb08530fff944179c609 compiler/codeGen/CgUtils.hs | 16 ++++++++------ compiler/codeGen/StgCmmUtils.hs | 46 +---------------------------------------- 2 files changed, 11 insertions(+), 51 deletions(-) diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 6a28402..0ff9bd8 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -8,7 +8,13 @@ -- ----------------------------------------------------------------------------- -module CgUtils ( fixStgRegisters ) where +module CgUtils ( + fixStgRegisters, + baseRegOffset, + get_Regtable_addr_from_offset, + regTableOffset, + get_GlobalReg_addr, + ) where import GhcPrelude @@ -104,8 +110,7 @@ baseRegOffset _ UnwindReturnReg = panic "CgUtils.baseRegOffset:UnwindRe get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0 get_GlobalReg_addr dflags mid - = get_Regtable_addr_from_offset dflags - (globalRegType dflags mid) (baseRegOffset dflags mid) + = get_Regtable_addr_from_offset dflags (baseRegOffset dflags mid) -- Calculate a literal representing an offset into the register table. -- Used when we don't have an actual BaseReg to offset from. @@ -113,8 +118,8 @@ regTableOffset :: DynFlags -> Int -> CmmExpr regTableOffset dflags n = CmmLit (CmmLabelOff mkMainCapabilityLabel (oFFSET_Capability_r dflags + n)) -get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr -get_Regtable_addr_from_offset dflags _ offset = +get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr +get_Regtable_addr_from_offset dflags offset = if haveRegBase (targetPlatform dflags) then CmmRegOff baseReg offset else regTableOffset dflags offset @@ -179,4 +184,3 @@ fixStgRegStmt dflags stmt = fixAssign $ mapExpDeep fixExpr stmt (wordWidth dflags))] other_expr -> other_expr - diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs index 64af5c5..766584e 100644 --- a/compiler/codeGen/StgCmmUtils.hs +++ b/compiler/codeGen/StgCmmUtils.hs @@ -54,6 +54,7 @@ import CodeGen.Platform import CLabel import CmmUtils import CmmSwitch +import CgUtils import ForeignCall import IdInfo @@ -257,51 +258,6 @@ callerSaveVolatileRegs dflags = (caller_save, caller_load) = mkAssign (CmmGlobal reg) (CmmLoad (get_GlobalReg_addr dflags reg) (globalRegType dflags reg)) --- ----------------------------------------------------------------------------- --- Global registers - --- We map STG registers onto appropriate CmmExprs. Either they map --- to real machine registers or stored as offsets from BaseReg. Given --- a GlobalReg, get_GlobalReg_addr always produces the --- register table address for it. --- (See also get_GlobalReg_reg_or_addr in MachRegs) - -get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr -get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0 -get_GlobalReg_addr dflags mid - = get_Regtable_addr_from_offset dflags - (globalRegType dflags mid) (baseRegOffset dflags mid) - --- Calculate a literal representing an offset into the register table. --- Used when we don't have an actual BaseReg to offset from. -regTableOffset :: DynFlags -> Int -> CmmExpr -regTableOffset dflags n = - CmmLit (CmmLabelOff mkMainCapabilityLabel (oFFSET_Capability_r dflags + n)) - -get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr -get_Regtable_addr_from_offset dflags _rep offset = - if haveRegBase (targetPlatform dflags) - then CmmRegOff baseReg offset - else regTableOffset dflags offset - - --- ----------------------------------------------------------------------------- --- Information about global registers - -baseRegOffset :: DynFlags -> GlobalReg -> Int - -baseRegOffset dflags Sp = oFFSET_StgRegTable_rSp dflags -baseRegOffset dflags SpLim = oFFSET_StgRegTable_rSpLim dflags -baseRegOffset dflags (LongReg 1) = oFFSET_StgRegTable_rL1 dflags -baseRegOffset dflags Hp = oFFSET_StgRegTable_rHp dflags -baseRegOffset dflags HpLim = oFFSET_StgRegTable_rHpLim dflags -baseRegOffset dflags CCCS = oFFSET_StgRegTable_rCCCS dflags -baseRegOffset dflags CurrentTSO = oFFSET_StgRegTable_rCurrentTSO dflags -baseRegOffset dflags CurrentNursery = oFFSET_StgRegTable_rCurrentNursery dflags -baseRegOffset dflags HpAlloc = oFFSET_StgRegTable_rHpAlloc dflags -baseRegOffset dflags GCEnter1 = oFFSET_stgGCEnter1 dflags -baseRegOffset dflags GCFun = oFFSET_stgGCFun dflags -baseRegOffset _ reg = pprPanic "StgCmmUtils.baseRegOffset:" (ppr reg) ------------------------------------------------------------------------- -- From git at git.haskell.org Tue Mar 12 14:59:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:36 +0000 (UTC) Subject: [commit: ghc] master, wip/test-ci-images-commit: Add regression test for #16347 (4db9bdd) Message-ID: <20190312145936.81B343A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/4db9bdd91549b4eada5324cd7452e7e74ada28f5/ghc >--------------------------------------------------------------- commit 4db9bdd91549b4eada5324cd7452e7e74ada28f5 Author: Ryan Scott Date: Mon Mar 11 09:21:12 2019 -0400 Add regression test for #16347 Commit 1f5cc9dc8aeeafa439d6d12c3c4565ada524b926 ended up fixing #16347. Let's add a regression test to ensure that it stays fixed. >--------------------------------------------------------------- 4db9bdd91549b4eada5324cd7452e7e74ada28f5 testsuite/tests/dependent/should_compile/T16347.hs | 8 ++++++++ testsuite/tests/dependent/should_compile/all.T | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/dependent/should_compile/T16347.hs b/testsuite/tests/dependent/should_compile/T16347.hs new file mode 100644 index 0000000..8f4afba --- /dev/null +++ b/testsuite/tests/dependent/should_compile/T16347.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeInType #-} +module T16347 where + +import Data.Kind + +data T f :: f Type -> Type where + MkT :: T f a diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T index 4e162ae..60f8b76 100644 --- a/testsuite/tests/dependent/should_compile/all.T +++ b/testsuite/tests/dependent/should_compile/all.T @@ -69,4 +69,4 @@ test('T16326_Compile1', normal, compile, ['']) test('T16326_Compile2', normal, compile, ['']) test('T16391a', normal, compile, ['']) test('T16344b', normal, compile, ['']) - +test('T16347', normal, compile, ['']) From git at git.haskell.org Tue Mar 12 14:59:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:39 +0000 (UTC) Subject: [commit: ghc] master, wip/test-ci-images-commit: CI: Update ci-images commit (02ddf94) Message-ID: <20190312145939.94BCB3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/02ddf947f40837c3aa0a196a4b2faf254764cfc3/ghc >--------------------------------------------------------------- commit 02ddf947f40837c3aa0a196a4b2faf254764cfc3 Author: Matthew Pickering Date: Tue Mar 12 09:42:53 2019 -0400 CI: Update ci-images commit >--------------------------------------------------------------- 02ddf947f40837c3aa0a196a4b2faf254764cfc3 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae41dd0..76bd9da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f + DOCKER_REV: cf1da0b5efda2f751e56c2f1ce9ff53447ae17bc before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Tue Mar 12 14:59:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:42 +0000 (UTC) Subject: [commit: ghc] master, wip/test-ci-images-commit: Revert: Update ci-images commit (a0cab87) Message-ID: <20190312145942.B0FE23A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/a0cab873b592290b2b389f88069ee03a89f32291/ghc >--------------------------------------------------------------- commit a0cab873b592290b2b389f88069ee03a89f32291 Author: Matthew Pickering Date: Tue Mar 12 09:44:45 2019 -0400 Revert: Update ci-images commit >--------------------------------------------------------------- a0cab873b592290b2b389f88069ee03a89f32291 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76bd9da..ae41dd0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: cf1da0b5efda2f751e56c2f1ce9ff53447ae17bc + DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Tue Mar 12 14:59:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 12 Mar 2019 14:59:45 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Update ci-images commit (a480daf) Message-ID: <20190312145945.C33A43A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/a480daf2c2ec7ef65cf24f7bbdd918892d945e7f/ghc >--------------------------------------------------------------- commit a480daf2c2ec7ef65cf24f7bbdd918892d945e7f Author: Matthew Pickering Date: Tue Mar 12 09:45:48 2019 -0400 Update ci-images commit >--------------------------------------------------------------- a480daf2c2ec7ef65cf24f7bbdd918892d945e7f .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae41dd0..76bd9da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f + DOCKER_REV: cf1da0b5efda2f751e56c2f1ce9ff53447ae17bc before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Wed Mar 13 15:21:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 15:21:49 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16427' created Message-ID: <20190313152149.8A64C3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16427 Referencing: 4806545a9408c65cafb90d51bf541f6a5b692121 From git at git.haskell.org Wed Mar 13 15:21:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 15:21:52 +0000 (UTC) Subject: [commit: ghc] wip/issue15622: Data.Fixed: fix test (fbcafa8) Message-ID: <20190313152152.A2D943A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/issue15622 Link : http://ghc.haskell.org/trac/ghc/changeset/fbcafa801cb61cfa71e7b363f81798a31ba0737a/ghc >--------------------------------------------------------------- commit fbcafa801cb61cfa71e7b363f81798a31ba0737a Author: Ashley Yakeley Date: Tue Mar 12 11:14:58 2019 -0700 Data.Fixed: fix test >--------------------------------------------------------------- fbcafa801cb61cfa71e7b363f81798a31ba0737a libraries/base/tests/fixed.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/base/tests/fixed.hs b/libraries/base/tests/fixed.hs index d19bda0..355987c 100644 --- a/libraries/base/tests/fixed.hs +++ b/libraries/base/tests/fixed.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE PolyKinds #-} {-# OPTIONS_GHC -Wall -Werror #-} module Main where From git at git.haskell.org Wed Mar 13 15:21:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 15:21:55 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Try another commit (87cd451) Message-ID: <20190313152155.C0F0B3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/87cd451f8002908b08fcd1d5699a87100147c810/ghc >--------------------------------------------------------------- commit 87cd451f8002908b08fcd1d5699a87100147c810 Author: Matthew Pickering Date: Tue Mar 12 14:59:57 2019 -0400 Try another commit >--------------------------------------------------------------- 87cd451f8002908b08fcd1d5699a87100147c810 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76bd9da..33003eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: cf1da0b5efda2f751e56c2f1ce9ff53447ae17bc + DOCKER_REV: 9c646def35dad1179051462281eaba1eff42f2c8 before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Wed Mar 13 15:21:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 15:21:59 +0000 (UTC) Subject: [commit: ghc] wip/T16427: Report better suggestion for GADT data constructor (4806545) Message-ID: <20190313152159.C7CAE3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16427 Link : http://ghc.haskell.org/trac/ghc/changeset/4806545a9408c65cafb90d51bf541f6a5b692121/ghc >--------------------------------------------------------------- commit 4806545a9408c65cafb90d51bf541f6a5b692121 Author: Simon Peyton Jones Date: Wed Mar 13 13:27:22 2019 +0000 Report better suggestion for GADT data constructor This addresses issue #16427. An easy fix. >--------------------------------------------------------------- 4806545a9408c65cafb90d51bf541f6a5b692121 compiler/typecheck/TcTyClsDecls.hs | 22 +++++++++------------- testsuite/tests/gadt/T12087.stderr | 8 ++++---- testsuite/tests/gadt/T16427.hs | 5 +++++ testsuite/tests/gadt/T16427.stderr | 7 +++++++ testsuite/tests/gadt/all.T | 1 + 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index 2c9a672..4aa8d50 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -3021,9 +3021,8 @@ checkValidDataCon dflags existential_ok tc con , ppr orig_res_ty <+> dcolon <+> ppr (tcTypeKind orig_res_ty)]) - ; checkTc (isJust (tcMatchTy res_ty_tmpl - orig_res_ty)) - (badDataConTyCon con res_ty_tmpl orig_res_ty) + ; checkTc (isJust (tcMatchTy res_ty_tmpl orig_res_ty)) + (badDataConTyCon con res_ty_tmpl) -- Note that checkTc aborts if it finds an error. This is -- critical to avoid panicking when we call dataConUserType -- on an un-rejiggable datacon! @@ -3745,9 +3744,9 @@ noClassTyVarErr clas fam_tc , text "mentions none of the type or kind variables of the class" <+> quotes (ppr clas <+> hsep (map ppr (classTyVars clas)))] -badDataConTyCon :: DataCon -> Type -> Type -> SDoc -badDataConTyCon data_con res_ty_tmpl actual_res_ty - | ASSERT( all isTyVar actual_ex_tvs ) +badDataConTyCon :: DataCon -> Type -> SDoc +badDataConTyCon data_con res_ty_tmpl + | ASSERT( all isTyVar tvs ) tcIsForAllTy actual_res_ty = nested_foralls_contexts_suggestion | isJust (tcSplitPredFunTy_maybe actual_res_ty) @@ -3757,6 +3756,8 @@ badDataConTyCon data_con res_ty_tmpl actual_res_ty text "returns type" <+> quotes (ppr actual_res_ty)) 2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl)) where + actual_res_ty = dataConOrigResTy data_con + -- This suggestion is useful for suggesting how to correct code like what -- was reported in Trac #12087: -- @@ -3786,13 +3787,8 @@ badDataConTyCon data_con res_ty_tmpl actual_res_ty -- underneath the nested foralls and contexts. -- 3) Smash together the type variables and class predicates from 1) and -- 2), and prepend them to the rho type from 2). - actual_ex_tvs = dataConExTyCoVars data_con - actual_theta = dataConTheta data_con - (actual_res_tvs, actual_res_theta, actual_res_rho) - = tcSplitNestedSigmaTys actual_res_ty - suggested_ty = mkSpecForAllTys (actual_ex_tvs ++ actual_res_tvs) $ - mkPhiTy (actual_theta ++ actual_res_theta) - actual_res_rho + (tvs, theta, rho) = tcSplitNestedSigmaTys (dataConUserType data_con) + suggested_ty = mkSpecSigmaTy tvs theta rho badGadtDecl :: Name -> SDoc badGadtDecl tc_name diff --git a/testsuite/tests/gadt/T12087.stderr b/testsuite/tests/gadt/T12087.stderr index 03f2465..0039e98 100644 --- a/testsuite/tests/gadt/T12087.stderr +++ b/testsuite/tests/gadt/T12087.stderr @@ -9,27 +9,27 @@ T12087.hs:6:3: error: T12087.hs:9:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF2 :: forall a. (Ord a, Eq a) => F2 a + MkF2 :: forall a. (Ord a, Eq a) => a -> F2 a • In the definition of data constructor ‘MkF2’ In the data type declaration for ‘F2’ T12087.hs:12:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF3 :: forall a b. (Eq a, Eq b) => b -> F3 a + MkF3 :: forall a b. (Eq a, Eq b) => a -> b -> F3 a • In the definition of data constructor ‘MkF3’ In the data type declaration for ‘F3’ T12087.hs:15:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF4 :: forall a b. (Eq a, Eq b) => b -> F4 a + MkF4 :: forall a b. (Eq a, Eq b) => a -> b -> F4 a • In the definition of data constructor ‘MkF4’ In the data type declaration for ‘F4’ T12087.hs:18:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF5 :: forall a b. a -> Int -> Int -> b -> F5 a + MkF5 :: forall a b. Int -> Int -> a -> Int -> Int -> b -> F5 a • In the definition of data constructor ‘MkF5’ In the data type declaration for ‘F5’ diff --git a/testsuite/tests/gadt/T16427.hs b/testsuite/tests/gadt/T16427.hs new file mode 100644 index 0000000..3bcbb7a --- /dev/null +++ b/testsuite/tests/gadt/T16427.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE RankNTypes, GADTs #-} + +module T16427 where + +data D where C :: Int -> forall b . b -> D diff --git a/testsuite/tests/gadt/T16427.stderr b/testsuite/tests/gadt/T16427.stderr new file mode 100644 index 0000000..1c80190 --- /dev/null +++ b/testsuite/tests/gadt/T16427.stderr @@ -0,0 +1,7 @@ + +T16427.hs:5:14: error: + • GADT constructor type signature cannot contain nested ‘forall’s or contexts + Suggestion: instead use this type signature: + C :: forall b. Int -> b -> D + • In the definition of data constructor ‘C’ + In the data type declaration for ‘D’ diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T index 86a9b0c..bffb34a 100644 --- a/testsuite/tests/gadt/all.T +++ b/testsuite/tests/gadt/all.T @@ -119,3 +119,4 @@ test('T14719', normal, compile_fail, ['-fdiagnostics-show-caret']) test('T14808', normal, compile, ['']) test('T15009', normal, compile, ['']) test('T15558', normal, compile, ['']) +test('T16427', normal, compile_fail, ['']) From git at git.haskell.org Wed Mar 13 23:44:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:09 +0000 (UTC) Subject: [commit: ghc] branch 'wip/closure-size' created Message-ID: <20190313234409.F1C8B3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/closure-size Referencing: 18a9b51a2bef1ab00383fd21586bbbd2f4c73634 From git at git.haskell.org Wed Mar 13 23:44:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:11 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16418' created Message-ID: <20190313234411.F2F333A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16418 Referencing: 08d5241c7c77ff945b23d453aecbc5f2ee20b739 From git at git.haskell.org Wed Mar 13 23:44:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:16 +0000 (UTC) Subject: [commit: ghc] wip/T16418: Improve error recovery in the typechecker (9edc8f2) Message-ID: <20190313234416.321483A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16418 Link : http://ghc.haskell.org/trac/ghc/changeset/9edc8f2645cd3f01ad96fd24db4802e85382625f/ghc >--------------------------------------------------------------- commit 9edc8f2645cd3f01ad96fd24db4802e85382625f Author: Simon Peyton Jones Date: Wed Mar 13 11:15:20 2019 +0000 Improve error recovery in the typechecker Issue #16418 showed that we were carrying on too eagerly after a bogus type signature was identified (a bad telescope in fact), leading to a subsequent crash. This led me in to a maze of twisty little passages in the typechecker's error recovery, and I ended up doing some refactoring in TcRnMonad. Some specfifics * TcRnMonad.try_m is now called attemptM. * I switched the order of the result pair in tryTc, to make it consistent with other similar functions. * The actual exception used in the Tc monad is irrelevant so, to avoid polluting type signatures, I made tcTryM, a simple wrapper around tryM, and used it. The more important changes are in * TcSimplify.captureTopConstraints, where we should have been calling simplifyTop rather than reportUnsolved, so that levity defaulting takes place properly. * TcUnify.emitResidualTvConstraint, where we need to set the correct status for a new implication constraint. (Previously we ended up with an Insoluble constraint wrapped in an Unsolved implication, which meant that insolubleWC gave the wrong answer. >--------------------------------------------------------------- 9edc8f2645cd3f01ad96fd24db4802e85382625f compiler/ghci/RtClosureInspect.hs | 4 +- compiler/typecheck/TcBackpack.hs | 2 +- compiler/typecheck/TcBinds.hs | 12 +- compiler/typecheck/TcRnExports.hs | 8 +- compiler/typecheck/TcRnMonad.hs | 354 ++++++++++++--------- compiler/typecheck/TcSigs.hs | 28 +- compiler/typecheck/TcSimplify.hs | 8 +- compiler/typecheck/TcUnify.hs | 9 +- .../tests/dependent/should_fail/BadTelescope2.hs | 3 - .../dependent/should_fail/BadTelescope2.stderr | 9 +- .../{BadTelescope2.hs => BadTelescope5.hs} | 5 +- .../dependent/should_fail/BadTelescope5.stderr | 7 + testsuite/tests/dependent/should_fail/T16418.hs | 13 + .../tests/dependent/should_fail/T16418.stderr | 7 + testsuite/tests/dependent/should_fail/all.T | 4 +- testsuite/tests/patsyn/should_fail/T9161-1.hs | 2 + testsuite/tests/patsyn/should_fail/T9161-1.stderr | 2 +- testsuite/tests/patsyn/should_fail/T9161-2.hs | 2 + testsuite/tests/patsyn/should_fail/T9161-2.stderr | 2 +- .../tests/typecheck/should_fail/tcfail212.stderr | 22 -- 20 files changed, 283 insertions(+), 220 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 9edc8f2645cd3f01ad96fd24db4802e85382625f From git at git.haskell.org Wed Mar 13 23:44:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:19 +0000 (UTC) Subject: [commit: ghc] wip/T16418: Add location to the extra-constraints wildcard (08d5241) Message-ID: <20190313234419.57EBD3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16418 Link : http://ghc.haskell.org/trac/ghc/changeset/08d5241c7c77ff945b23d453aecbc5f2ee20b739/ghc >--------------------------------------------------------------- commit 08d5241c7c77ff945b23d453aecbc5f2ee20b739 Author: Simon Peyton Jones Date: Wed Mar 13 13:09:19 2019 +0000 Add location to the extra-constraints wildcard The extra-constraints wildcard had lost its location (issue #16431). Happily this is easy to fix. Lots of error improvements. >--------------------------------------------------------------- 08d5241c7c77ff945b23d453aecbc5f2ee20b739 compiler/typecheck/TcHsType.hs | 7 ++++--- testsuite/tests/partial-sigs/should_compile/SuperCls.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T10519.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T11016.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T12844.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T12845.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T13482.stderr | 8 ++++---- testsuite/tests/partial-sigs/should_compile/T14217.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T14643.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T14643a.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T14715.stderr | 2 +- .../should_compile/WarningWildcardInstantiations.stderr | 8 ++++---- .../should_fail/InstantiatedNamedWildcardsInConstraints.stderr | 8 ++++---- testsuite/tests/partial-sigs/should_fail/T11515.stderr | 2 +- .../tests/partial-sigs/should_fail/WildcardInstantiations.stderr | 8 ++++---- 15 files changed, 33 insertions(+), 32 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 08d5241c7c77ff945b23d453aecbc5f2ee20b739 From git at git.haskell.org Wed Mar 13 23:44:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:22 +0000 (UTC) Subject: [commit: ghc] master, wip/closure-size: testsuite: Mark heapprof001 as fragile on all platforms (23fc615) Message-ID: <20190313234422.743F33A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/closure-size Link : http://ghc.haskell.org/trac/ghc/changeset/23fc615679072a6fa433460a92f597af2ae388b2/ghc >--------------------------------------------------------------- commit 23fc615679072a6fa433460a92f597af2ae388b2 Author: Ben Gamari Date: Fri Mar 1 22:57:55 2019 -0500 testsuite: Mark heapprof001 as fragile on all platforms See #15382. >--------------------------------------------------------------- 23fc615679072a6fa433460a92f597af2ae388b2 testsuite/tests/profiling/should_run/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index c250ea9..a56223d 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,7 @@ expect_broken_for_10037 = expect_broken_for( test('heapprof001', [when(have_profiling(), extra_ways(extra_prof_ways)), - when(arch('i386'), fragile(15382)), + fragile(15382), extra_run_opts('7')], compile_and_run, ['']) From git at git.haskell.org Wed Mar 13 23:44:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:25 +0000 (UTC) Subject: [commit: ghc] master, wip/closure-size: Hadrian: build (and retrieve) binary distributions in CI (cb17c2d) Message-ID: <20190313234425.8E3823A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/closure-size Link : http://ghc.haskell.org/trac/ghc/changeset/cb17c2da1774a2565946f43261140f2a8b328840/ghc >--------------------------------------------------------------- commit cb17c2da1774a2565946f43261140f2a8b328840 Author: Alp Mestanogullari Date: Tue Mar 5 19:01:54 2019 +0100 Hadrian: build (and retrieve) binary distributions in CI With all the recent fixes to the binary-dist rule in Hadrian, we can now run that rule in CI and keep the bindists around in gitlab as artifacts, just like we do for the make CI jobs. To get 'autoreconf' to work in the Windows CI, we have to run it through the shell interpreter, so this commit does that along the way. >--------------------------------------------------------------- cb17c2da1774a2565946f43261140f2a8b328840 .gitlab-ci.yml | 20 +++++++++++++------- hadrian/src/Builder.hs | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae41dd0..483fd89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,12 +63,16 @@ ghc-linters: - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi - ./boot - ./configure $CONFIGURE_ARGS - - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` - - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx docs + - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --docs=no-sphinx binary-dist + - mv _build/bindist/ghc*.tar.xz ghc.tar.xz cache: key: hadrian paths: - cabal-cache + artifacts: + when: always + paths: + - ghc.tar.xz validate-x86_64-linux-deb8-hadrian: extends: .validate-hadrian @@ -427,16 +431,18 @@ validate-x86_64-windows-hadrian: set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick" - - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx docs - # FIXME: Bindist disabled due to #16073 - #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" + - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx binary-dist" + - mv _build/bindist/ghc*.tar.xz ghc.tar.xz # FIXME: Testsuite disabled due to #16156. - #- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' + # - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: key: x86_64-windows tags: - x86_64-windows + artifacts: + when: always + paths: + - ghc.tar.xz validate-x86_64-windows: extends: .validate-windows diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index d855aa5..1cf2325 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -238,7 +238,7 @@ instance H.Builder Builder where Ar Unpack _ -> cmd echo [Cwd output] [path] buildArgs - Autoreconf dir -> cmd echo [Cwd dir] [path] buildArgs + Autoreconf dir -> cmd echo [Cwd dir] ["sh", path] buildArgs Configure dir -> do -- Inject /bin/bash into `libtool`, instead of /bin/sh, -- otherwise Windows breaks. TODO: Figure out why. From git at git.haskell.org Wed Mar 13 23:44:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:29 +0000 (UTC) Subject: [commit: ghc] master, wip/closure-size: Fix #16411 by making dataConCannotMatch aware of (~~) (36546a4) Message-ID: <20190313234429.421933A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/closure-size Link : http://ghc.haskell.org/trac/ghc/changeset/36546a43e490ea6f989e6cad369d1a251c94a42b/ghc >--------------------------------------------------------------- commit 36546a43e490ea6f989e6cad369d1a251c94a42b Author: Ryan Scott Date: Fri Mar 8 19:02:44 2019 -0500 Fix #16411 by making dataConCannotMatch aware of (~~) The `dataConCannotMatch` function (which powers the `-Wpartial-fields` warning, among other things) had special reasoning for explicit equality constraints of the form `a ~ b`, but it did not extend that reasoning to `a ~~ b` constraints, leading to #16411. Easily fixed. >--------------------------------------------------------------- 36546a43e490ea6f989e6cad369d1a251c94a42b compiler/basicTypes/DataCon.hs | 11 +++++++---- testsuite/tests/typecheck/should_compile/T16411.hs | 14 ++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs index 8baf43c..690ed68 100644 --- a/compiler/basicTypes/DataCon.hs +++ b/compiler/basicTypes/DataCon.hs @@ -1403,10 +1403,13 @@ dataConCannotMatch tys con -- TODO: could gather equalities from superclasses too predEqs pred = case classifyPredType pred of - EqPred NomEq ty1 ty2 -> [(ty1, ty2)] - ClassPred eq [_, ty1, ty2] - | eq `hasKey` eqTyConKey -> [(ty1, ty2)] - _ -> [] + EqPred NomEq ty1 ty2 -> [(ty1, ty2)] + ClassPred eq args + | eq `hasKey` eqTyConKey + , [_, ty1, ty2] <- args -> [(ty1, ty2)] + | eq `hasKey` heqTyConKey + , [_, _, ty1, ty2] <- args -> [(ty1, ty2)] + _ -> [] -- | Were the type variables of the data con written in a different order -- than the regular order (universal tyvars followed by existential tyvars)? diff --git a/testsuite/tests/typecheck/should_compile/T16411.hs b/testsuite/tests/typecheck/should_compile/T16411.hs new file mode 100644 index 0000000..5cbd255 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16411.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeOperators #-} +{-# OPTIONS_GHC -Wpartial-fields #-} +module T16411 where + +import Data.Type.Equality + +data T1 z where + MkT1a :: { rec1 :: () } -> T1 Int + MkT1b :: (z ~ Bool) => T1 z + +data T2 z where + MkT2a :: { rec2 :: () } -> T2 Int + MkT2b :: (z ~~ Bool) => T2 z diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index b94f021..81a63c5 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -670,3 +670,4 @@ test('T16204a', normal, compile, ['']) test('T16204b', normal, compile, ['']) test('T16225', normal, compile, ['']) test('T13951', normal, compile, ['']) +test('T16411', normal, compile, ['']) From git at git.haskell.org Wed Mar 13 23:44:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 13 Mar 2019 23:44:32 +0000 (UTC) Subject: [commit: ghc] wip/closure-size: ghc-heap: Introduce closureSize (18a9b51) Message-ID: <20190313234432.CBDD03A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/closure-size Link : http://ghc.haskell.org/trac/ghc/changeset/18a9b51a2bef1ab00383fd21586bbbd2f4c73634/ghc >--------------------------------------------------------------- commit 18a9b51a2bef1ab00383fd21586bbbd2f4c73634 Author: Ben Gamari Date: Wed Mar 13 19:42:47 2019 -0400 ghc-heap: Introduce closureSize This function allows the user to compute the (non-transitive) size of a heap object in words. The "closure" in the name is admittedly confusing but we are stuck with this nomenclature at this point. >--------------------------------------------------------------- 18a9b51a2bef1ab00383fd21586bbbd2f4c73634 libraries/ghc-heap/GHC/Exts/Heap/Closures.hs | 10 ++++++++ libraries/ghc-heap/cbits/HeapPrim.cmm | 7 +++++ libraries/ghc-heap/tests/all.T | 3 +++ libraries/ghc-heap/tests/closure_size.hs | 30 ++++++++++++++++++++++ .../tests/closure_size.stdout} | 0 5 files changed, 50 insertions(+) diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs index e624a17..d04cde5 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs @@ -13,6 +13,7 @@ module GHC.Exts.Heap.Closures ( , GenClosure(..) , PrimType(..) , allClosures + , closureSize -- * Boxes , Box(..) @@ -49,6 +50,9 @@ foreign import prim "aToWordzh" aToWord# :: Any -> Word# foreign import prim "reallyUnsafePtrEqualityUpToTag" reallyUnsafePtrEqualityUpToTag# :: Any -> Any -> Int# +foreign import prim "closureSizezh" + closureSize# :: Any -> Int# + -- | An arbitrary Haskell value in a safe Box. The point is that even -- unevaluated thunks can safely be moved around inside the Box, and when -- required, e.g. in 'getBoxedClosureData', the function knows how far it has @@ -321,3 +325,9 @@ allClosures (FunClosure {..}) = ptrArgs allClosures (BlockingQueueClosure {..}) = [link, blackHole, owner, queue] allClosures (OtherClosure {..}) = hvalues allClosures _ = [] + +-- | Get the size of a closure in words. +-- +-- @since 8.10.1 +closureSize :: Box -> Int +closureSize x = closureSize# x diff --git a/libraries/ghc-heap/cbits/HeapPrim.cmm b/libraries/ghc-heap/cbits/HeapPrim.cmm index 915786d..cc5b8a6 100644 --- a/libraries/ghc-heap/cbits/HeapPrim.cmm +++ b/libraries/ghc-heap/cbits/HeapPrim.cmm @@ -11,3 +11,10 @@ reallyUnsafePtrEqualityUpToTag (W_ clos1, W_ clos2) clos2 = UNTAG(clos2); return (clos1 == clos2); } + +closureSizezh (P_ clos) +{ + W_ len; + (len) = foreign "C" heap_view_closureSize(clos "ptr"); + return (len); +} diff --git a/libraries/ghc-heap/tests/all.T b/libraries/ghc-heap/tests/all.T index a676b49..9fc3fbe 100644 --- a/libraries/ghc-heap/tests/all.T +++ b/libraries/ghc-heap/tests/all.T @@ -6,3 +6,6 @@ test('heap_all', omit_ways(['ghci', 'hpc']) ], compile_and_run, ['']) +test('closure_size', + omit_ways(['ghci', 'hpc']), + compile_and_run, ['']) diff --git a/libraries/ghc-heap/tests/closure_size.hs b/libraries/ghc-heap/tests/closure_size.hs new file mode 100644 index 0000000..40e904e --- /dev/null +++ b/libraries/ghc-heap/tests/closure_size.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE ScopedTypeVariables #-} + +import Control.Monad +import Type.Reflection + +import GHC.Exts.Heap.Closures + +assertSize :: forall a. Typeable a => a -> Int -> IO () +assertSize !x n = do + let !size = closureSize (asBox x) + when (size != expected) $ do + putStrLn $ "closureSize ("++show (typeRep @a)++") == "++show size++", expected "++show expected +{-# NOINLINE assertSize #-} + +pap :: Int -> Char -> Int +pap x _ = x +{-# NOINLINE pap #-} + +main :: IO () +main = do + assertSize 'a' 2 + assertSize (Just ()) 2 + assertSize (1,2) 3 + assertSize (1,2,3) 4 + assertSize id 1 + assertSize fst 1 + assertSize (pap 1) 2 + diff --git a/libraries/ghc-compact/tests/compact_serialize.stderr b/libraries/ghc-heap/tests/closure_size.stdout similarity index 100% copy from libraries/ghc-compact/tests/compact_serialize.stderr copy to libraries/ghc-heap/tests/closure_size.stdout From git at git.haskell.org Thu Mar 14 17:35:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 14 Mar 2019 17:35:08 +0000 (UTC) Subject: [commit: ghc] branch 'wip/hadrian-wibbles' created Message-ID: <20190314173508.935CF3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/hadrian-wibbles Referencing: ae72b54256e79a648a18d54773355c32d9a93507 From git at git.haskell.org Thu Mar 14 17:35:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 14 Mar 2019 17:35:10 +0000 (UTC) Subject: [commit: ghc] branch 'wip/andrey/trace-cabal' created Message-ID: <20190314173510.93CFB3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/andrey/trace-cabal Referencing: 19a99beeaa83fdeff132dbd54f1785bccf52a939 From git at git.haskell.org Thu Mar 14 17:35:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 14 Mar 2019 17:35:13 +0000 (UTC) Subject: [commit: ghc] wip/andrey/trace-cabal: Hadrian: Bump Shake to 0.17.6 (d381f54) Message-ID: <20190314173513.A8A5C3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/trace-cabal Link : http://ghc.haskell.org/trac/ghc/changeset/d381f543a006bec132c0b7c51f808df0cf25921d/ghc >--------------------------------------------------------------- commit d381f543a006bec132c0b7c51f808df0cf25921d Author: Andrey Mokhov Date: Thu Mar 14 11:40:08 2019 +0000 Hadrian: Bump Shake to 0.17.6 The new release of Shake comes with these relevant features: * use symlinks for --shared * add --compact for a Bazel/Buck style output >--------------------------------------------------------------- d381f543a006bec132c0b7c51f808df0cf25921d hadrian/hadrian.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index a0b3648..435d22a 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -126,7 +126,7 @@ executable hadrian , mtl == 2.2.* , parsec >= 3.1 && < 3.2 , QuickCheck >= 2.6 && < 2.13 - , shake >= 0.17.5 + , shake >= 0.17.6 , transformers >= 0.4 && < 0.6 , unordered-containers >= 0.2.1 && < 0.3 build-tools: alex >= 3.1 From git at git.haskell.org Thu Mar 14 17:35:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 14 Mar 2019 17:35:16 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-wibbles: Add flavours link (ae72b54) Message-ID: <20190314173516.B6A4B3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-wibbles Link : http://ghc.haskell.org/trac/ghc/changeset/ae72b54256e79a648a18d54773355c32d9a93507/ghc >--------------------------------------------------------------- commit ae72b54256e79a648a18d54773355c32d9a93507 Author: Simon Peyton Jones Date: Thu Mar 14 08:05:28 2019 -0400 Add flavours link >--------------------------------------------------------------- ae72b54256e79a648a18d54773355c32d9a93507 hadrian/doc/make.md | 1 + 1 file changed, 1 insertion(+) diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md index 15bd6bd..e2b790d 100644 --- a/hadrian/doc/make.md +++ b/hadrian/doc/make.md @@ -92,6 +92,7 @@ time you fire up a build. This is not possible with the Make build system. # Hadrian build --flavour=quickest ``` + See [flavours documentation](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md) for info on flavours. - Building with `integer-simple` as the integer library From git at git.haskell.org Thu Mar 14 17:35:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 14 Mar 2019 17:35:20 +0000 (UTC) Subject: [commit: ghc] wip/andrey/trace-cabal: Hadrian: trace the execution of expensive Cabal calls (19a99be) Message-ID: <20190314173520.D2FC73A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/trace-cabal Link : http://ghc.haskell.org/trac/ghc/changeset/19a99beeaa83fdeff132dbd54f1785bccf52a939/ghc >--------------------------------------------------------------- commit 19a99beeaa83fdeff132dbd54f1785bccf52a939 Author: Andrey Mokhov Date: Thu Mar 14 14:12:20 2019 +0000 Hadrian: trace the execution of expensive Cabal calls We use Cabal to parse, configure, register and copy packages, which are expensive operations that are currently not visible to Shake's profiling infrastructure. By using `traced` we tell Shake to add these IO actions to the profiling report, helping us to identify performance bottlenecks. >--------------------------------------------------------------- 19a99beeaa83fdeff132dbd54f1785bccf52a939 hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs index d53aabd..055a27a 100644 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs @@ -55,7 +55,8 @@ import Settings -- "Hadrian.Oracles.TextFile.readPackageData" oracle. parsePackageData :: Package -> Action PackageData parsePackageData pkg = do - gpd <- liftIO $ C.readGenericPackageDescription C.verbose (pkgCabalFile pkg) + gpd <- traced ("Cabal parse " ++ pkgCabalFile pkg) $ + C.readGenericPackageDescription C.verbose (pkgCabalFile pkg) let pd = C.packageDescription gpd pkgId = C.package pd name = C.unPackageName (C.pkgName pkgId) @@ -141,8 +142,9 @@ configurePackage context at Context {..} = do argList <- interpret (target context (Cabal Setup stage) [] []) flavourArgs verbosity <- getVerbosity let v = if verbosity >= Loud then "-v3" else "-v0" - liftIO $ C.defaultMainWithHooksNoReadArgs hooks gpd - (argList ++ ["--flags=" ++ unwords flagList, v]) + traced ("Cabal configure " ++ quote (pkgName package)) $ + C.defaultMainWithHooksNoReadArgs hooks gpd + (argList ++ ["--flags=" ++ unwords flagList, v]) dir <- Context.buildPath context files <- liftIO $ getDirectoryFilesIO "." [ dir -/- "include" "*" @@ -161,8 +163,9 @@ copyPackage context at Context {..} = do pkgDbPath <- packageDbPath stage verbosity <- getVerbosity let v = if verbosity >= Loud then "-v3" else "-v0" - liftIO $ C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd - [ "copy", "--builddir", ctxPath, "--target-package-db", pkgDbPath, v ] + traced ("Cabal copy " ++ quote (pkgName package)) $ + C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd + [ "copy", "--builddir", ctxPath, "--target-package-db", pkgDbPath, v ] -- | Register the 'Package' of a given 'Context' into the package database. registerPackage :: Context -> Action () @@ -172,8 +175,9 @@ registerPackage context at Context {..} = do gpd <- pkgGenericDescription package verbosity <- getVerbosity let v = if verbosity >= Loud then "-v3" else "-v0" - liftIO $ C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd - [ "register", "--builddir", ctxPath, v ] + traced ("Cabal register " ++ quote (pkgName package)) $ + C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd + [ "register", "--builddir", ctxPath, v ] -- | Parse the 'ContextData' of a given 'Context'. resolveContextData :: Context -> Action ContextData @@ -286,14 +290,14 @@ resolveContextData context at Context {..} = do -- | Build autogenerated files @autogen/cabal_macros.h@ and @autogen/Paths_*.hs at . buildAutogenFiles :: Context -> Action () -buildAutogenFiles context = do +buildAutogenFiles context at Context {..} = do cPath <- Context.contextPath context setupConfig <- pkgSetupConfigFile context need [setupConfig] -- This triggers 'configurePackage' pd <- packageDescription <$> readContextData context -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path -- from the local build info @lbi at . - liftIO $ do + traced ("Cabal build autogen files for " ++ quote (pkgName package)) $ do lbi <- C.getPersistBuildConfig cPath C.initialBuildSteps cPath pd (lbi { C.localPkgDescr = pd }) C.silent From git at git.haskell.org Fri Mar 15 19:06:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:12 +0000 (UTC) Subject: [commit: ghc] branch 'wip/hadrian-bench' created Message-ID: <20190315190612.975FB3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/hadrian-bench Referencing: 0ac7b9fa230cfc919dde0adb6b9ffe1631331219 From git at git.haskell.org Fri Mar 15 19:06:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:14 +0000 (UTC) Subject: [commit: ghc] branch 'wip/rejig-stages' created Message-ID: <20190315190614.984A13A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/rejig-stages Referencing: b6500e8a3a352365b50f46290e1a291f77b7d1bf From git at git.haskell.org Fri Mar 15 19:06:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:18 +0000 (UTC) Subject: [commit: ghc] master, wip/rejig-stages: testsuite: Add testcase for #16394 (10a9712) Message-ID: <20190315190618.895203A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/10a971208dcd537742fe4e15b2713eb0f3052a3a/ghc >--------------------------------------------------------------- commit 10a971208dcd537742fe4e15b2713eb0f3052a3a Author: Ben Gamari Date: Tue Mar 5 20:33:51 2019 -0500 testsuite: Add testcase for #16394 >--------------------------------------------------------------- 10a971208dcd537742fe4e15b2713eb0f3052a3a testsuite/tests/typecheck/should_fail/T16394.hs | 12 ++++++++++++ .../T5951.stderr => typecheck/should_fail/T16394.stderr} | 5 ++--- testsuite/tests/typecheck/should_fail/all.T | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/typecheck/should_fail/T16394.hs b/testsuite/tests/typecheck/should_fail/T16394.hs new file mode 100644 index 0000000..76ca7a7 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T16394.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-} + +class C a where + type T (n :: a) + +instance C a => C b => C (a, b) where + type T '(n, m) = (T n, T m) + +-- but this worked fine: +-- +-- instance (C a, C b) => C (a, b) where +-- type T '(n, m) = (T n, T m) diff --git a/testsuite/tests/rename/should_fail/T5951.stderr b/testsuite/tests/typecheck/should_fail/T16394.stderr similarity index 57% copy from testsuite/tests/rename/should_fail/T5951.stderr copy to testsuite/tests/typecheck/should_fail/T16394.stderr index b325493..fff51a6 100644 --- a/testsuite/tests/rename/should_fail/T5951.stderr +++ b/testsuite/tests/typecheck/should_fail/T16394.stderr @@ -1,6 +1,5 @@ - -T5951.hs:8:8: error: - Illegal class instance: ‘A => B => C’ +T16394.hs:6:10: error: + Illegal class instance: ‘C a => C b => C (a, b)’ Class instances must be of the form context => C ty_1 ... ty_n where ‘C’ is a class diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index b3c25ea..bd13b2f 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -510,4 +510,5 @@ test('T16059e', [extra_files(['T16059b.hs'])], multimod_compile_fail, ['T16059e', '-v0']) test('T16255', normal, compile_fail, ['']) test('T16204c', normal, compile_fail, ['']) +test('T16394', normal, compile_fail, ['']) test('T16414', normal, compile_fail, ['']) From git at git.haskell.org Fri Mar 15 19:06:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:21 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Update .gitlab-ci.yml (28435cb) Message-ID: <20190315190621.9E11D3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/28435cb4a93af40528e9bc0de380eba76fe6755c/ghc >--------------------------------------------------------------- commit 28435cb4a93af40528e9bc0de380eba76fe6755c Author: Matthew Pickering Date: Fri Mar 15 04:15:18 2019 -0400 Update .gitlab-ci.yml >--------------------------------------------------------------- 28435cb4a93af40528e9bc0de380eba76fe6755c .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33003eb..d90c943 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 9c646def35dad1179051462281eaba1eff42f2c8 + DOCKER_REV: cef670aaef61107b106fe99a4b5b1792ae10add6 before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Fri Mar 15 19:06:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:25 +0000 (UTC) Subject: [commit: ghc] master, wip/rejig-stages: Remove the GHCi debugger's panicking isUnliftedType check (8162eab) Message-ID: <20190315190625.6DABE3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/8162eab27101cddb0c822347300640f07110379a/ghc >--------------------------------------------------------------- commit 8162eab27101cddb0c822347300640f07110379a Author: Ryan Scott Date: Tue Mar 12 10:06:38 2019 -0400 Remove the GHCi debugger's panicking isUnliftedType check The GHCi debugger has never been that robust in the face of higher-rank types, or even types that are _interally_ higher-rank, such as the types of many class methods (e.g., `fmap`). In GHC 8.2, however, things became even worse, as the debugger would start to _panic_ when a user tries passing the name of a higher-rank thing to `:print`. This all ties back to a strange `isUnliftedType` check in `Debugger` that was mysteriously added 11 years ago (in commit 4d71f5ee6dbbfedb4a55767e4375f4c0aadf70bb) with no explanation whatsoever. After some experimentation, no one is quite sure what this `isUnliftedType` check is actually accomplishing. The test suite still passes if it's removed, and I am unable to observe any differences in debugger before even with data types that _do_ have fields of unlifted types (e.g., `data T = MkT Int#`). Given that this is actively causing problems (see #14828), the prudent thing to do seems to be just removing this `isUnliftedType` check, and waiting to see if anyone shouts about it. This patch accomplishes just that. Note that this patch fix the underlying issues behind #14828, as the debugger will still print unhelpful info if you try this: ``` λ> f :: (forall a. a -> a) -> b -> b; f g x = g x λ> :print f f = (_t1::t1) ``` But fixing this will require much more work, so let's start with the simple stuff for now. >--------------------------------------------------------------- 8162eab27101cddb0c822347300640f07110379a compiler/ghci/Debugger.hs | 3 +-- testsuite/tests/ghci/scripts/T14828.script | 4 ++++ testsuite/tests/ghci/scripts/T14828.stdout | 12 ++++++++++++ testsuite/tests/ghci/scripts/all.T | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index 38d1588..888d00e 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -77,8 +77,7 @@ pprintClosureCommand bindThings force str = do let id' = id `setIdType` substTy subst (idType id) term_ <- GHC.obtainTermFromId maxBound force id' term <- tidyTermTyVars term_ - term' <- if bindThings && - (not (isUnliftedType (termType term))) + term' <- if bindThings then bindSuspensions term else return term -- Before leaving, we compare the type obtained to see if it's more specific diff --git a/testsuite/tests/ghci/scripts/T14828.script b/testsuite/tests/ghci/scripts/T14828.script index bb0650f..59d616a 100644 --- a/testsuite/tests/ghci/scripts/T14828.script +++ b/testsuite/tests/ghci/scripts/T14828.script @@ -16,3 +16,7 @@ :m + Data.List :p foldl' + +:set -XRankNTypes +f :: (forall a. a -> a) -> b -> b; f g x = g x +:p f diff --git a/testsuite/tests/ghci/scripts/T14828.stdout b/testsuite/tests/ghci/scripts/T14828.stdout new file mode 100644 index 0000000..3ef2e60 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T14828.stdout @@ -0,0 +1,12 @@ +foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b +foldl = (_t1::t1) +fmap :: Functor f => (a -> b) -> f a -> f b +fmap = (_t2::t1) +return :: Monad m => a -> m a +return = (_t3::t1) +pure :: Applicative f => a -> f a +pure = (_t4::t1) +mempty = (_t5::Monoid a => a) +mappend = (_t6::Monoid a => a -> a -> a) +foldl' = (_t7::t1) +f = (_t8::t1) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 4eea5c3..115dfc5 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -292,5 +292,5 @@ test('T15941', normal, ghci_script, ['T15941.script']) test('T16030', normal, ghci_script, ['T16030.script']) test('T11606', normal, ghci_script, ['T11606.script']) test('T16089', normal, ghci_script, ['T16089.script']) -test('T14828', expect_broken(14828), ghci_script, ['T14828.script']) +test('T14828', normal, ghci_script, ['T14828.script']) test('T16376', normal, ghci_script, ['T16376.script']) From git at git.haskell.org Fri Mar 15 19:06:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:28 +0000 (UTC) Subject: [commit: ghc] master, wip/rejig-stages: Hadrian: remove unneeded imports. (d10e236) Message-ID: <20190315190628.87DCF3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/d10e23687d166ea6656fe0caf9c6eb2642a61b7b/ghc >--------------------------------------------------------------- commit d10e23687d166ea6656fe0caf9c6eb2642a61b7b Author: David Eichmann Date: Tue Mar 12 12:00:18 2019 +0000 Hadrian: remove unneeded imports. >--------------------------------------------------------------- d10e23687d166ea6656fe0caf9c6eb2642a61b7b hadrian/src/Rules/Library.hs | 3 --- hadrian/src/Settings/Builders/Ghc.hs | 1 - hadrian/src/Settings/Builders/RunTest.hs | 2 -- 3 files changed, 6 deletions(-) diff --git a/hadrian/src/Rules/Library.hs b/hadrian/src/Rules/Library.hs index edec160..f0ec50b 100644 --- a/hadrian/src/Rules/Library.hs +++ b/hadrian/src/Rules/Library.hs @@ -3,18 +3,15 @@ module Rules.Library (libraryRules) where import Hadrian.BuildPath import Hadrian.Haskell.Cabal import Hadrian.Haskell.Cabal.Type -import qualified System.Directory as IO import qualified Text.Parsec as Parsec import Base import Context import Expression hiding (way, package) -import Flavour import Oracles.ModuleFiles import Packages import Rules.Gmp import Rules.Libffi (libffiDependencies) -import Settings import Target import Utilities diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 940eab5..76c44ef 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -3,7 +3,6 @@ module Settings.Builders.Ghc (ghcBuilderArgs, haddockGhcArgs) where import Hadrian.Haskell.Cabal import Hadrian.Haskell.Cabal.Type -import Flavour import Packages import Settings.Builders.Common import Settings.Warnings diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index ae85cf5..837e688 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -4,8 +4,6 @@ import Hadrian.Utilities import System.Environment import CommandLine -import Flavour -import Oracles.Setting (setting) import Oracles.TestSettings import Packages import Settings.Builders.Common From git at git.haskell.org Fri Mar 15 19:06:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:31 +0000 (UTC) Subject: [commit: ghc] master, wip/rejig-stages: Hadrian: remove unneeded rpaths. (4df7577) Message-ID: <20190315190631.C511A3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/4df757729dab0a5be07f111843ed3ca9de6c3771/ghc >--------------------------------------------------------------- commit 4df757729dab0a5be07f111843ed3ca9de6c3771 Author: David Eichmann Date: Tue Mar 12 17:06:04 2019 +0000 Hadrian: remove unneeded rpaths. Issue #12770 >--------------------------------------------------------------- 4df757729dab0a5be07f111843ed3ca9de6c3771 hadrian/src/Settings/Builders/Ghc.hs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 76c44ef..92f1e68 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -74,8 +74,15 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do dynamic = Dynamic `wayUnit` way distPath = libPath' -/- distDir originToLibsDir = makeRelativeNoSysLink originPath distPath - rpath | darwin = "@loader_path" -/- originToLibsDir - | otherwise = "$ORIGIN" -/- originToLibsDir + rpath + -- Programs will end up in the bin dir ($ORIGIN) and will link to + -- libraries in the lib dir. + | isProgram pkg = metaOrigin -/- originToLibsDir + -- libraries will all end up in the lib dir, so just use $ORIGIN + | otherwise = metaOrigin + where + metaOrigin | darwin = "@loader_path" + | otherwise = "$ORIGIN" -- TODO: an alternative would be to generalize by linking with extra -- bundled libraries, but currently the rts is the only use case. It is @@ -92,8 +99,10 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do [ arg "-dynamic" -- TODO what about windows? , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] - , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) - , hostSupportsRPaths ? arg ("-optl-Wl,-rpath,$ORIGIN") + , hostSupportsRPaths ? pure + [ "-optl-Wl,-rpath," ++ rpath + , "-optl-Wl,-zorigin" + ] ] , arg "-no-auto-link-packages" , nonHsMainPackage pkg ? arg "-no-hs-main" From git at git.haskell.org Fri Mar 15 19:06:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:34 +0000 (UTC) Subject: [commit: ghc] master, wip/rejig-stages: Git ignore .hadrian_ghci (generated by the ./hadrian/ghci.sh) (afc8073) Message-ID: <20190315190634.D322C3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/afc80730fd235f5c5b2d0b9fc5a10c16ef9865f6/ghc >--------------------------------------------------------------- commit afc80730fd235f5c5b2d0b9fc5a10c16ef9865f6 Author: David Eichmann Date: Tue Mar 12 17:13:12 2019 +0000 Git ignore .hadrian_ghci (generated by the ./hadrian/ghci.sh) [skip ci] >--------------------------------------------------------------- afc80730fd235f5c5b2d0b9fc5a10c16ef9865f6 .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e4e5420..aab7b86 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ stage0 stage1 stage2 _build +.hadrian_ghci # ----------------------------------------------------------------------------- # Ignore any overlapped darcs repos and back up files From git at git.haskell.org Fri Mar 15 19:06:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:39 +0000 (UTC) Subject: [commit: ghc] master: Update Trac ticket URLs to point to GitLab (610ec22) Message-ID: <20190315190639.825603A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/610ec224a49e092c802a336570fd9613ea15ef3c/ghc >--------------------------------------------------------------- commit 610ec224a49e092c802a336570fd9613ea15ef3c Author: Ryan Scott Date: Tue Mar 12 18:15:38 2019 -0400 Update Trac ticket URLs to point to GitLab This moves all URL references to Trac tickets to their corresponding GitLab counterparts. >--------------------------------------------------------------- 610ec224a49e092c802a336570fd9613ea15ef3c HACKING.md | 6 +- Makefile | 2 +- README.md | 2 +- aclocal.m4 | 2 +- compiler/basicTypes/Demand.hs | 32 +++++------ compiler/basicTypes/Id.hs | 8 +-- compiler/basicTypes/Lexeme.hs | 4 +- compiler/basicTypes/MkId.hs | 18 +++--- compiler/basicTypes/Module.hs | 4 +- compiler/basicTypes/NameCache.hs | 2 +- compiler/basicTypes/OccName.hs | 2 +- compiler/basicTypes/PatSyn.hs | 2 +- compiler/basicTypes/RdrName.hs | 4 +- compiler/cmm/CmmSink.hs | 2 +- compiler/cmm/CmmUtils.hs | 2 +- compiler/cmm/PprC.hs | 2 +- compiler/codeGen/StgCmmClosure.hs | 6 +- compiler/codeGen/StgCmmExpr.hs | 4 +- compiler/codeGen/StgCmmHeap.hs | 2 +- compiler/coreSyn/CoreArity.hs | 16 +++--- compiler/coreSyn/CoreFVs.hs | 4 +- compiler/coreSyn/CoreLint.hs | 20 +++---- compiler/coreSyn/CoreMap.hs | 2 +- compiler/coreSyn/CoreOpt.hs | 12 ++-- compiler/coreSyn/CorePrep.hs | 8 +-- compiler/coreSyn/CoreSubst.hs | 2 +- compiler/coreSyn/CoreSyn.hs | 18 +++--- compiler/coreSyn/CoreUnfold.hs | 14 ++--- compiler/coreSyn/CoreUtils.hs | 32 +++++------ compiler/coreSyn/MkCore.hs | 2 +- compiler/deSugar/Check.hs | 12 ++-- compiler/deSugar/Desugar.hs | 2 +- compiler/deSugar/DsBinds.hs | 10 ++-- compiler/deSugar/DsExpr.hs | 4 +- compiler/deSugar/DsMeta.hs | 2 +- compiler/deSugar/DsMonad.hs | 2 +- compiler/deSugar/DsUsage.hs | 2 +- compiler/deSugar/DsUtils.hs | 8 +-- compiler/deSugar/Match.hs | 10 ++-- compiler/deSugar/MatchCon.hs | 2 +- compiler/deSugar/MatchLit.hs | 6 +- compiler/ghci/ByteCodeGen.hs | 8 +-- compiler/ghci/Linker.hs | 2 +- compiler/ghci/RtClosureInspect.hs | 2 +- compiler/hsSyn/Convert.hs | 8 +-- compiler/hsSyn/HsBinds.hs | 4 +- compiler/hsSyn/HsDecls.hs | 2 +- compiler/hsSyn/HsExpr.hs | 6 +- compiler/hsSyn/HsPat.hs | 4 +- compiler/hsSyn/HsTypes.hs | 8 +-- compiler/hsSyn/HsUtils.hs | 8 +-- compiler/iface/BuildTyCl.hs | 2 +- compiler/iface/FlagChecker.hs | 4 +- compiler/iface/IfaceSyn.hs | 2 +- compiler/iface/IfaceType.hs | 4 +- compiler/iface/LoadIface.hs | 2 +- compiler/iface/MkIface.hs | 6 +- compiler/iface/TcIface.hs | 10 ++-- compiler/iface/ToIface.hs | 8 +-- compiler/llvmGen/Llvm/Types.hs | 2 +- compiler/llvmGen/LlvmCodeGen.hs | 2 +- compiler/main/Ar.hs | 4 +- compiler/main/CmdLineParser.hs | 6 +- compiler/main/Constants.hs | 2 +- compiler/main/DriverPipeline.hs | 8 +-- compiler/main/DynFlags.hs | 14 ++--- compiler/main/ErrUtils.hs | 2 +- compiler/main/GHC.hs | 4 +- compiler/main/GhcMake.hs | 8 +-- compiler/main/HscTypes.hs | 8 +-- compiler/main/InteractiveEval.hs | 6 +- compiler/main/Packages.hs | 2 +- compiler/main/SysTools.hs | 4 +- compiler/main/SysTools/Info.hs | 8 +-- compiler/main/SysTools/Process.hs | 2 +- compiler/main/TidyPgm.hs | 16 +++--- compiler/nativeGen/PPC/Ppr.hs | 4 +- compiler/nativeGen/PprBase.hs | 4 +- compiler/nativeGen/X86/Ppr.hs | 2 +- compiler/parser/Lexer.x | 2 +- compiler/parser/Parser.y | 4 +- compiler/parser/RdrHsSyn.hs | 4 +- compiler/prelude/PrelRules.hs | 16 +++--- compiler/prelude/PrimOp.hs | 8 +-- compiler/prelude/TysPrim.hs | 4 +- compiler/prelude/primops.txt.pp | 4 +- compiler/rename/RnBinds.hs | 6 +- compiler/rename/RnEnv.hs | 18 +++--- compiler/rename/RnExpr.hs | 4 +- compiler/rename/RnFixity.hs | 4 +- compiler/rename/RnNames.hs | 20 +++---- compiler/rename/RnPat.hs | 6 +- compiler/rename/RnSource.hs | 22 ++++---- compiler/rename/RnSplice.hs | 12 ++-- compiler/rename/RnTypes.hs | 4 +- compiler/rename/RnUtils.hs | 6 +- compiler/simplCore/CSE.hs | 10 ++-- compiler/simplCore/CallArity.hs | 2 +- compiler/simplCore/CoreMonad.hs | 4 +- compiler/simplCore/Exitify.hs | 2 +- compiler/simplCore/FloatIn.hs | 12 ++-- compiler/simplCore/FloatOut.hs | 2 +- compiler/simplCore/OccurAnal.hs | 22 ++++---- compiler/simplCore/SetLevels.hs | 12 ++-- compiler/simplCore/SimplCore.hs | 2 +- compiler/simplCore/SimplMonad.hs | 2 +- compiler/simplCore/SimplUtils.hs | 20 +++---- compiler/simplCore/Simplify.hs | 36 ++++++------ compiler/simplStg/StgCse.hs | 2 +- compiler/simplStg/StgLiftLams.hs | 2 +- compiler/specialise/Rules.hs | 10 ++-- compiler/specialise/SpecConstr.hs | 28 ++++----- compiler/specialise/Specialise.hs | 24 ++++---- compiler/stgSyn/CoreToStg.hs | 2 +- compiler/stranal/DmdAnal.hs | 14 ++--- compiler/stranal/WorkWrap.hs | 8 +-- compiler/stranal/WwLib.hs | 22 ++++---- compiler/typecheck/ClsInst.hs | 8 +-- compiler/typecheck/FunDeps.hs | 18 +++--- compiler/typecheck/Inst.hs | 2 +- compiler/typecheck/TcAnnotations.hs | 4 +- compiler/typecheck/TcBinds.hs | 18 +++--- compiler/typecheck/TcCanonical.hs | 28 ++++----- compiler/typecheck/TcDeriv.hs | 36 ++++++------ compiler/typecheck/TcDerivInfer.hs | 4 +- compiler/typecheck/TcDerivUtils.hs | 8 +-- compiler/typecheck/TcEnv.hs | 16 +++--- compiler/typecheck/TcErrors.hs | 38 ++++++------- compiler/typecheck/TcEvidence.hs | 4 +- compiler/typecheck/TcExpr.hs | 22 ++++---- compiler/typecheck/TcFlatten.hs | 12 ++-- compiler/typecheck/TcForeign.hs | 2 +- compiler/typecheck/TcGenDeriv.hs | 24 ++++---- compiler/typecheck/TcGenFunctor.hs | 6 +- compiler/typecheck/TcGenGenerics.hs | 4 +- compiler/typecheck/TcHoleErrors.hs | 2 +- compiler/typecheck/TcHsSyn.hs | 8 +-- compiler/typecheck/TcHsType.hs | 26 ++++----- compiler/typecheck/TcInstDcls.hs | 22 ++++---- compiler/typecheck/TcInteract.hs | 38 ++++++------- compiler/typecheck/TcMType.hs | 16 +++--- compiler/typecheck/TcMatches.hs | 6 +- compiler/typecheck/TcPat.hs | 6 +- compiler/typecheck/TcPatSyn.hs | 28 ++++----- compiler/typecheck/TcRnDriver.hs | 16 +++--- compiler/typecheck/TcRnExports.hs | 8 +-- compiler/typecheck/TcRnMonad.hs | 6 +- compiler/typecheck/TcRnTypes.hs | 18 +++--- compiler/typecheck/TcRules.hs | 4 +- compiler/typecheck/TcSMonad.hs | 28 ++++----- compiler/typecheck/TcSigs.hs | 12 ++-- compiler/typecheck/TcSimplify.hs | 66 +++++++++++----------- compiler/typecheck/TcSplice.hs | 12 ++-- compiler/typecheck/TcTyClsDecls.hs | 42 +++++++------- compiler/typecheck/TcTyDecls.hs | 4 +- compiler/typecheck/TcType.hs | 16 +++--- compiler/typecheck/TcUnify.hs | 34 +++++------ compiler/typecheck/TcValidity.hs | 66 +++++++++++----------- compiler/types/Coercion.hs | 14 ++--- compiler/types/FamInstEnv.hs | 6 +- compiler/types/InstEnv.hs | 8 +-- compiler/types/Kind.hs | 2 +- compiler/types/OptCoercion.hs | 4 +- compiler/types/TyCoRep.hs | 20 +++---- compiler/types/TyCon.hs | 6 +- compiler/types/Type.hs | 16 +++--- compiler/types/Unify.hs | 14 ++--- compiler/utils/Binary.hs | 2 +- compiler/utils/MonadUtils.hs | 2 +- compiler/utils/Pretty.hs | 4 +- configure.ac | 6 +- distrib/remilestoning.pl | 2 +- docs/users_guide/bugs.rst | 2 +- docs/users_guide/editing-guide.rst | 6 +- docs/users_guide/ghc_config.py.in | 4 +- docs/users_guide/glasgow_exts.rst | 8 +-- docs/users_guide/using-optimisation.rst | 2 +- ghc/GHCi/UI.hs | 12 ++-- ghc/Main.hs | 2 +- hadrian/README.md | 4 +- hadrian/src/Rules/Gmp.hs | 2 +- hadrian/src/Rules/Register.hs | 2 +- hadrian/src/Rules/Test.hs | 2 +- hadrian/src/Settings/Builders/RunTest.hs | 2 +- hadrian/src/Settings/Flavours/Common.hs | 2 +- includes/MachDeps.h | 2 +- includes/Stg.h | 4 +- libraries/base/Control/Arrow.hs | 2 +- libraries/base/Control/Category.hs | 4 +- libraries/base/Control/Monad.hs | 4 +- libraries/base/Control/Monad/ST/Imp.hs | 2 +- libraries/base/Control/Monad/Zip.hs | 2 +- libraries/base/Data/Data.hs | 2 +- libraries/base/Data/Foldable.hs | 8 +-- libraries/base/Data/OldList.hs | 2 +- libraries/base/Data/Typeable/Internal.hs | 2 +- libraries/base/Debug/Trace.hs | 2 +- libraries/base/Foreign/Ptr.hs | 4 +- libraries/base/GHC/Arr.hs | 10 ++-- libraries/base/GHC/Event/Manager.hs | 2 +- libraries/base/GHC/Float.hs | 2 +- libraries/base/GHC/IO.hs | 2 +- libraries/base/GHC/Int.hs | 2 +- libraries/base/GHC/List.hs | 2 +- libraries/base/GHC/Read.hs | 4 +- libraries/base/GHC/Real.hs | 4 +- .../base/System/Environment/ExecutablePath.hsc | 2 +- libraries/base/System/Mem/Weak.hs | 2 +- libraries/base/cbits/inputReady.c | 4 +- libraries/base/tests/IO/hReady001.hs | 2 +- libraries/base/tests/T11760.hs | 2 +- libraries/base/tests/fromJust.hs | 2 +- libraries/base/tests/genericNegative001.hs | 2 +- libraries/ghc-prim/cbits/atomic.c | 2 +- libraries/integer-gmp/changelog.md | 2 +- .../src/GHC/Integer/Logarithms/Internals.hs | 2 +- .../template-haskell/Language/Haskell/TH/Ppr.hs | 2 +- .../template-haskell/Language/Haskell/TH/Syntax.hs | 10 ++-- mk/build.mk.sample | 2 +- mk/flavours/validate.mk | 2 +- mk/install.mk.in | 2 +- packages | 2 +- rts/Apply.cmm | 2 +- rts/Linker.c | 4 +- rts/ProfHeap.c | 2 +- rts/RtsAPI.c | 2 +- rts/RtsFlags.c | 8 +-- rts/RtsUtils.c | 2 +- rts/Schedule.c | 2 +- rts/StablePtr.c | 2 +- rts/StgPrimFloat.c | 2 +- rts/linker/LoadArchive.c | 2 +- rts/posix/OSMem.c | 2 +- rts/posix/Select.c | 2 +- rts/sm/Storage.c | 2 +- rts/win32/GetTime.c | 2 +- rules/build-prog.mk | 2 +- testsuite/driver/testlib.py | 4 +- testsuite/mk/test.mk | 2 +- .../tests/annotations/should_fail/T10826.stderr | 2 +- testsuite/tests/arrows/should_compile/arrowpat.hs | 2 +- testsuite/tests/arrows/should_fail/T2111.hs | 2 +- testsuite/tests/arrows/should_fail/all.T | 2 +- testsuite/tests/arrows/should_fail/arrowfail004.hs | 2 +- testsuite/tests/boxy/Compose.hs | 2 +- testsuite/tests/codeGen/should_run/cgrun058.hs | 2 +- testsuite/tests/codeGen/should_run/cgrun063.hs | 2 +- testsuite/tests/codeGen/should_run/cgrun071.hs | 2 +- testsuite/tests/deSugar/should_compile/T2409.hs | 2 +- testsuite/tests/deSugar/should_compile/T3263-1.hs | 2 +- testsuite/tests/deSugar/should_compile/T3263-2.hs | 2 +- testsuite/tests/deSugar/should_compile/T5252.hs | 2 +- testsuite/tests/deSugar/should_compile/ds062.hs | 2 +- testsuite/tests/deSugar/should_compile/ds063.hs | 2 +- testsuite/tests/deSugar/should_run/T12595.hs | 2 +- testsuite/tests/deSugar/should_run/T246.hs | 2 +- .../dependent/should_compile/T16326_Compile1.hs | 2 +- testsuite/tests/deriving/should_compile/T2378.hs | 2 +- testsuite/tests/deriving/should_compile/T2721.hs | 2 +- testsuite/tests/deriving/should_compile/T2856.hs | 2 +- testsuite/tests/deriving/should_compile/all.T | 2 +- .../tests/deriving/should_compile/deriving-1935.hs | 2 +- testsuite/tests/deriving/should_compile/drv012.hs | 2 +- testsuite/tests/deriving/should_fail/T2394.hs | 2 +- testsuite/tests/deriving/should_fail/T2851.hs | 2 +- testsuite/tests/deriving/should_fail/drvfail012.hs | 2 +- testsuite/tests/deriving/should_run/T2529.hs | 2 +- testsuite/tests/eyeball/T3116.hs | 2 +- testsuite/tests/eyeball/record1.hs | 2 +- testsuite/tests/ffi/should_fail/ccfail001.hs | 2 +- testsuite/tests/ffi/should_fail/ccfail002.hs | 2 +- testsuite/tests/gadt/CasePrune.hs | 2 +- testsuite/tests/gadt/Session.hs | 2 +- testsuite/tests/gadt/T1999a.hs | 2 +- testsuite/tests/gadt/T2587.hs | 2 +- testsuite/tests/gadt/T3013.hs | 2 +- testsuite/tests/gadt/T3163.hs | 2 +- testsuite/tests/gadt/data1.hs | 2 +- testsuite/tests/gadt/data2.hs | 2 +- testsuite/tests/gadt/gadt-fd.hs | 2 +- testsuite/tests/gadt/gadt17.hs | 2 +- testsuite/tests/gadt/gadt24.hs | 2 +- testsuite/tests/gadt/karl1.hs | 2 +- testsuite/tests/gadt/karl2.hs | 2 +- testsuite/tests/gadt/records-fail1.hs | 2 +- testsuite/tests/ghci/prog003/prog003.T | 2 +- testsuite/tests/ghci/scripts/T11098.script | 2 +- testsuite/tests/ghci/scripts/T2766.script | 2 +- testsuite/tests/ghci/scripts/T3263.hs | 2 +- testsuite/tests/ghci/scripts/ghci019.hs | 2 +- testsuite/tests/ghci/scripts/ghci030.hs | 2 +- testsuite/tests/ghci/scripts/ghci031.hs | 2 +- testsuite/tests/ghci/scripts/ghci033.hs | 2 +- testsuite/tests/ghci/scripts/ghci063.script | 2 +- .../should_compile/IndTypesPerfMerge.hs | 2 +- .../should_compile/PushedInAsGivens.hs | 2 +- .../tests/indexed-types/should_compile/Records.hs | 2 +- .../tests/indexed-types/should_compile/T2238.hs | 2 +- .../tests/indexed-types/should_compile/T2944.hs | 2 +- .../tests/indexed-types/should_compile/T3017.hs | 2 +- .../tests/indexed-types/should_compile/T3590.hs | 2 +- .../tests/indexed-types/should_compile/T4178.hs | 2 +- .../should_compile/UnusedTyVarWarnings.hs | 2 +- .../should_compile/UnusedTyVarWarningsNamedWCs.hs | 2 +- .../tests/indexed-types/should_fail/T2334A.hs | 2 +- testsuite/tests/indexed-types/should_fail/T4272.hs | 2 +- testsuite/tests/indexed-types/should_fail/T9357.hs | 2 +- testsuite/tests/indexed-types/should_run/T2985.hs | 2 +- testsuite/tests/lib/integer/integerGmpInternals.hs | 2 +- testsuite/tests/llvm/should_compile/T5486.hs | 2 +- testsuite/tests/llvm/should_compile/T5681.hs | 2 +- .../llvm/should_run/subsections_via_symbols/all.T | 2 +- testsuite/tests/module/T3776.hs | 2 +- testsuite/tests/parser/should_compile/read066.hs | 2 +- testsuite/tests/parser/should_compile/read_1821.hs | 2 +- .../parser/should_fail/NoNumericUnderscores0.hs | 2 +- .../parser/should_fail/NoNumericUnderscores1.hs | 2 +- .../parser/should_fail/NumericUnderscoresFail0.hs | 2 +- .../parser/should_fail/NumericUnderscoresFail1.hs | 2 +- testsuite/tests/parser/should_fail/T3095.hs | 2 +- .../tests/parser/should_run/NumericUnderscores0.hs | 2 +- .../tests/parser/should_run/NumericUnderscores1.hs | 2 +- testsuite/tests/parser/should_run/readRun004.hs | 2 +- testsuite/tests/parser/unicode/brackets.hs | 2 +- .../should_compile/NamedWildcardsAsTyVars.hs | 2 +- .../tests/partial-sigs/should_compile/T12033.hs | 2 +- .../should_fail/NamedWildcardExplicitForall.hs | 2 +- testsuite/tests/patsyn/should_fail/T14380.stderr | 2 +- testsuite/tests/perf/compiler/T9872d.hs | 2 +- testsuite/tests/perf/should_run/T14936.hs | 2 +- testsuite/tests/perf/should_run/T149_A.hs | 2 +- testsuite/tests/perf/should_run/T149_B.hs | 2 +- testsuite/tests/perf/should_run/T5549.hs | 2 +- testsuite/tests/pmcheck/should_compile/T12957a.hs | 2 +- testsuite/tests/polykinds/T11248.hs | 2 +- testsuite/tests/polykinds/T11480b.hs | 2 +- testsuite/tests/polykinds/T7594.hs | 2 +- testsuite/tests/polykinds/T8566a.hs | 2 +- testsuite/tests/quotes/T2931.hs | 2 +- testsuite/tests/quotes/T3572.hs | 2 +- testsuite/tests/quotes/TH_scope.hs | 2 +- testsuite/tests/rebindable/T303.hs | 2 +- testsuite/tests/rebindable/all.T | 2 +- testsuite/tests/rebindable/rebindable8.hs | 2 +- testsuite/tests/rebindable/rebindable9.hs | 2 +- testsuite/tests/rename/should_compile/T1789.hs | 2 +- testsuite/tests/rename/should_compile/T1789_2.hs | 2 +- testsuite/tests/rename/should_compile/T17a.hs | 2 +- testsuite/tests/rename/should_compile/T17b.hs | 2 +- testsuite/tests/rename/should_compile/T17c.hs | 2 +- testsuite/tests/rename/should_compile/T17d.hs | 2 +- testsuite/tests/rename/should_compile/T17e.hs | 2 +- testsuite/tests/rename/should_compile/T1972.hs | 2 +- testsuite/tests/rename/should_compile/T2205.hs | 2 +- testsuite/tests/rename/should_compile/T2506.hs | 2 +- testsuite/tests/rename/should_compile/T3221.hs | 2 +- testsuite/tests/rename/should_compile/T3262.hs | 2 +- testsuite/tests/rename/should_compile/rn051.hs | 2 +- testsuite/tests/rename/should_compile/rn058.hs | 2 +- testsuite/tests/rename/should_compile/rn062.hs | 2 +- testsuite/tests/rename/should_fail/T12146.hs | 2 +- testsuite/tests/rename/should_fail/T2490.hs | 2 +- testsuite/tests/rename/should_fail/T2901.hs | 2 +- testsuite/tests/rename/should_fail/T2993.hs | 2 +- testsuite/tests/rename/should_fail/T3265.hs | 2 +- testsuite/tests/rename/should_fail/T4042.hs | 2 +- testsuite/tests/rename/should_fail/rnfail048.hs | 2 +- testsuite/tests/rename/should_fail/rnfail052.hs | 2 +- testsuite/tests/rename/should_fail/rnfail053.hs | 2 +- testsuite/tests/rts/T10590.hs | 2 +- testsuite/tests/simplCore/T9646/readme.txt | 2 +- testsuite/tests/simplCore/should_compile/Makefile | 4 +- testsuite/tests/simplCore/should_compile/T11562.hs | 2 +- testsuite/tests/simplCore/should_compile/T2520.hs | 2 +- testsuite/tests/simplCore/should_compile/T3016.hs | 4 +- testsuite/tests/simplCore/should_compile/T3118.hs | 2 +- testsuite/tests/simplCore/should_compile/T3234.hs | 2 +- testsuite/tests/simplCore/should_compile/T4306.hs | 2 +- testsuite/tests/simplCore/should_compile/T7702.hs | 2 +- .../should_compile/T7702plugin/T7702plugin.cabal | 2 +- testsuite/tests/simplCore/should_compile/rule1.hs | 2 +- .../tests/simplCore/should_compile/simpl-T1370.hs | 2 +- .../tests/simplCore/should_compile/simpl014.hs | 2 +- .../tests/simplCore/should_compile/simpl017.hs | 2 +- .../tests/simplCore/should_compile/simpl018.hs | 2 +- .../tests/simplCore/should_compile/simpl019.hs | 2 +- .../tests/simplCore/should_compile/spec003.hs | 2 +- testsuite/tests/simplCore/should_run/T13429_2.hs | 2 +- testsuite/tests/simplCore/should_run/T2486.hs | 2 +- testsuite/tests/simplCore/should_run/T3403.hs | 2 +- testsuite/tests/simplCore/should_run/T3437.hs | 2 +- testsuite/tests/simplCore/should_run/T5587.hs | 2 +- testsuite/tests/simplCore/should_run/T9128.hs | 2 +- testsuite/tests/stage1/T2632.hs | 2 +- testsuite/tests/stranal/should_compile/T10482a.hs | 2 +- testsuite/tests/stranal/should_compile/T1988.hs | 2 +- testsuite/tests/stranal/should_compile/T9208.hs | 2 +- testsuite/tests/stranal/should_compile/all.T | 4 +- testsuite/tests/stranal/should_run/T11555a.hs | 2 +- testsuite/tests/th/Makefile | 2 +- testsuite/tests/th/T11629.hs | 2 +- testsuite/tests/th/T2386.hs | 2 +- testsuite/tests/th/T2597a.hs | 2 +- testsuite/tests/th/T2597b.hs | 2 +- testsuite/tests/th/T2674.hs | 2 +- testsuite/tests/th/T3100.hs | 2 +- testsuite/tests/th/T3467.hs | 2 +- testsuite/tests/th/TH_1tuple.hs | 2 +- testsuite/tests/th/TH_emptycase.hs | 2 +- testsuite/tests/th/TH_reifyMkName.hs | 2 +- testsuite/tests/th/TH_runIO.hs | 2 +- testsuite/tests/th/TH_spliceGuard.hs | 2 +- testsuite/tests/typecheck/should_compile/FD1.hs | 2 +- testsuite/tests/typecheck/should_compile/FD2.hs | 4 +- testsuite/tests/typecheck/should_compile/FD3.hs | 2 +- testsuite/tests/typecheck/should_compile/FD4.hs | 2 +- testsuite/tests/typecheck/should_compile/Makefile | 2 +- .../tests/typecheck/should_compile/T12734a.hs | 2 +- testsuite/tests/typecheck/should_compile/T13651.hs | 2 +- testsuite/tests/typecheck/should_compile/T1470.hs | 2 +- testsuite/tests/typecheck/should_compile/T1495.hs | 2 +- testsuite/tests/typecheck/should_compile/T2045.hs | 2 +- testsuite/tests/typecheck/should_compile/T2433.hs | 2 +- .../tests/typecheck/should_compile/T2494-2.hs | 2 +- testsuite/tests/typecheck/should_compile/T2494.hs | 2 +- testsuite/tests/typecheck/should_compile/T2497.hs | 4 +- testsuite/tests/typecheck/should_compile/T2572.hs | 2 +- testsuite/tests/typecheck/should_compile/T2735.hs | 2 +- testsuite/tests/typecheck/should_compile/T3018.hs | 2 +- testsuite/tests/typecheck/should_compile/T3219.hs | 2 +- testsuite/tests/typecheck/should_compile/T3346.hs | 2 +- testsuite/tests/typecheck/should_compile/T3391.hs | 2 +- testsuite/tests/typecheck/should_compile/T3955.hs | 2 +- testsuite/tests/typecheck/should_compile/T9708.hs | 2 +- testsuite/tests/typecheck/should_compile/T9971.hs | 2 +- testsuite/tests/typecheck/should_compile/T9973.hs | 2 +- testsuite/tests/typecheck/should_compile/all.T | 2 +- .../tests/typecheck/should_compile/syn-perf2.hs | 2 +- testsuite/tests/typecheck/should_compile/tc208.hs | 2 +- testsuite/tests/typecheck/should_compile/tc217.hs | 4 +- testsuite/tests/typecheck/should_compile/tc220.hs | 2 +- testsuite/tests/typecheck/should_compile/tc226.hs | 2 +- testsuite/tests/typecheck/should_compile/tc227.hs | 2 +- testsuite/tests/typecheck/should_compile/tc228.hs | 2 +- testsuite/tests/typecheck/should_compile/tc230.hs | 2 +- testsuite/tests/typecheck/should_compile/tc231.hs | 2 +- testsuite/tests/typecheck/should_compile/tc232.hs | 2 +- testsuite/tests/typecheck/should_compile/tc235.hs | 2 +- testsuite/tests/typecheck/should_compile/tc239.hs | 2 +- testsuite/tests/typecheck/should_compile/tc241.hs | 2 +- testsuite/tests/typecheck/should_compile/tc242.hs | 2 +- .../tests/typecheck/should_fail/FDsFromGivens.hs | 2 +- testsuite/tests/typecheck/should_fail/T10715.hs | 4 +- testsuite/tests/typecheck/should_fail/T11948.hs | 2 +- testsuite/tests/typecheck/should_fail/T1633.hs | 2 +- testsuite/tests/typecheck/should_fail/T1899.hs | 2 +- testsuite/tests/typecheck/should_fail/T2126.hs | 2 +- testsuite/tests/typecheck/should_fail/T2307.hs | 2 +- testsuite/tests/typecheck/should_fail/T2414.hs | 2 +- testsuite/tests/typecheck/should_fail/T2538.hs | 2 +- testsuite/tests/typecheck/should_fail/T2714.hs | 2 +- testsuite/tests/typecheck/should_fail/T2806.hs | 2 +- testsuite/tests/typecheck/should_fail/T2994.hs | 2 +- testsuite/tests/typecheck/should_fail/T3155.hs | 2 +- testsuite/tests/typecheck/should_fail/T3176.hs | 2 +- testsuite/tests/typecheck/should_fail/T3323.hs | 2 +- testsuite/tests/typecheck/should_fail/T3406.hs | 2 +- testsuite/tests/typecheck/should_fail/T3613.hs | 2 +- testsuite/tests/typecheck/should_fail/T5236.hs | 2 +- testsuite/tests/typecheck/should_fail/T8392a.hs | 2 +- testsuite/tests/typecheck/should_fail/T8806.hs | 2 +- testsuite/tests/typecheck/should_fail/T8883.hs | 2 +- testsuite/tests/typecheck/should_fail/T9858a.hs | 2 +- .../tests/typecheck/should_fail/TcCoercibleFail.hs | 2 +- testsuite/tests/typecheck/should_fail/all.T | 2 +- testsuite/tests/typecheck/should_fail/tcfail138.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail169.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail175.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail177.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail178.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail185.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail186.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail187.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail188.hs | 2 +- testsuite/tests/typecheck/should_fail/tcfail204.hs | 2 +- testsuite/tests/typecheck/should_run/Defer01.hs | 2 +- utils/gen-dll/Main.hs | 2 +- utils/ghc-in-ghci/settings.ghci | 2 +- utils/ghc-pkg/Main.hs | 2 +- utils/runghc/Main.hs | 2 +- 490 files changed, 1220 insertions(+), 1220 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 610ec224a49e092c802a336570fd9613ea15ef3c From git at git.haskell.org Fri Mar 15 19:06:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:43 +0000 (UTC) Subject: [commit: ghc] master: Report better suggestion for GADT data constructor (97032ed) Message-ID: <20190315190643.95D673A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/97032ed9b2594c8939cab776ff871051d6dba30a/ghc >--------------------------------------------------------------- commit 97032ed9b2594c8939cab776ff871051d6dba30a Author: Simon Peyton Jones Date: Wed Mar 13 13:27:22 2019 +0000 Report better suggestion for GADT data constructor This addresses issue #16427. An easy fix. >--------------------------------------------------------------- 97032ed9b2594c8939cab776ff871051d6dba30a compiler/typecheck/TcTyClsDecls.hs | 22 +++++++++------------- testsuite/tests/gadt/T12087.stderr | 8 ++++---- testsuite/tests/gadt/T16427.hs | 5 +++++ testsuite/tests/gadt/T16427.stderr | 7 +++++++ testsuite/tests/gadt/all.T | 1 + 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index a3e39ad..1ac12b0 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -3021,9 +3021,8 @@ checkValidDataCon dflags existential_ok tc con , ppr orig_res_ty <+> dcolon <+> ppr (tcTypeKind orig_res_ty)]) - ; checkTc (isJust (tcMatchTy res_ty_tmpl - orig_res_ty)) - (badDataConTyCon con res_ty_tmpl orig_res_ty) + ; checkTc (isJust (tcMatchTy res_ty_tmpl orig_res_ty)) + (badDataConTyCon con res_ty_tmpl) -- Note that checkTc aborts if it finds an error. This is -- critical to avoid panicking when we call dataConUserType -- on an un-rejiggable datacon! @@ -3745,9 +3744,9 @@ noClassTyVarErr clas fam_tc , text "mentions none of the type or kind variables of the class" <+> quotes (ppr clas <+> hsep (map ppr (classTyVars clas)))] -badDataConTyCon :: DataCon -> Type -> Type -> SDoc -badDataConTyCon data_con res_ty_tmpl actual_res_ty - | ASSERT( all isTyVar actual_ex_tvs ) +badDataConTyCon :: DataCon -> Type -> SDoc +badDataConTyCon data_con res_ty_tmpl + | ASSERT( all isTyVar tvs ) tcIsForAllTy actual_res_ty = nested_foralls_contexts_suggestion | isJust (tcSplitPredFunTy_maybe actual_res_ty) @@ -3757,6 +3756,8 @@ badDataConTyCon data_con res_ty_tmpl actual_res_ty text "returns type" <+> quotes (ppr actual_res_ty)) 2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl)) where + actual_res_ty = dataConOrigResTy data_con + -- This suggestion is useful for suggesting how to correct code like what -- was reported in #12087: -- @@ -3786,13 +3787,8 @@ badDataConTyCon data_con res_ty_tmpl actual_res_ty -- underneath the nested foralls and contexts. -- 3) Smash together the type variables and class predicates from 1) and -- 2), and prepend them to the rho type from 2). - actual_ex_tvs = dataConExTyCoVars data_con - actual_theta = dataConTheta data_con - (actual_res_tvs, actual_res_theta, actual_res_rho) - = tcSplitNestedSigmaTys actual_res_ty - suggested_ty = mkSpecForAllTys (actual_ex_tvs ++ actual_res_tvs) $ - mkPhiTy (actual_theta ++ actual_res_theta) - actual_res_rho + (tvs, theta, rho) = tcSplitNestedSigmaTys (dataConUserType data_con) + suggested_ty = mkSpecSigmaTy tvs theta rho badGadtDecl :: Name -> SDoc badGadtDecl tc_name diff --git a/testsuite/tests/gadt/T12087.stderr b/testsuite/tests/gadt/T12087.stderr index 03f2465..0039e98 100644 --- a/testsuite/tests/gadt/T12087.stderr +++ b/testsuite/tests/gadt/T12087.stderr @@ -9,27 +9,27 @@ T12087.hs:6:3: error: T12087.hs:9:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF2 :: forall a. (Ord a, Eq a) => F2 a + MkF2 :: forall a. (Ord a, Eq a) => a -> F2 a • In the definition of data constructor ‘MkF2’ In the data type declaration for ‘F2’ T12087.hs:12:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF3 :: forall a b. (Eq a, Eq b) => b -> F3 a + MkF3 :: forall a b. (Eq a, Eq b) => a -> b -> F3 a • In the definition of data constructor ‘MkF3’ In the data type declaration for ‘F3’ T12087.hs:15:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF4 :: forall a b. (Eq a, Eq b) => b -> F4 a + MkF4 :: forall a b. (Eq a, Eq b) => a -> b -> F4 a • In the definition of data constructor ‘MkF4’ In the data type declaration for ‘F4’ T12087.hs:18:3: error: • GADT constructor type signature cannot contain nested ‘forall’s or contexts Suggestion: instead use this type signature: - MkF5 :: forall a b. a -> Int -> Int -> b -> F5 a + MkF5 :: forall a b. Int -> Int -> a -> Int -> Int -> b -> F5 a • In the definition of data constructor ‘MkF5’ In the data type declaration for ‘F5’ diff --git a/testsuite/tests/gadt/T16427.hs b/testsuite/tests/gadt/T16427.hs new file mode 100644 index 0000000..3bcbb7a --- /dev/null +++ b/testsuite/tests/gadt/T16427.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE RankNTypes, GADTs #-} + +module T16427 where + +data D where C :: Int -> forall b . b -> D diff --git a/testsuite/tests/gadt/T16427.stderr b/testsuite/tests/gadt/T16427.stderr new file mode 100644 index 0000000..1c80190 --- /dev/null +++ b/testsuite/tests/gadt/T16427.stderr @@ -0,0 +1,7 @@ + +T16427.hs:5:14: error: + • GADT constructor type signature cannot contain nested ‘forall’s or contexts + Suggestion: instead use this type signature: + C :: forall b. Int -> b -> D + • In the definition of data constructor ‘C’ + In the data type declaration for ‘D’ diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T index 86a9b0c..bffb34a 100644 --- a/testsuite/tests/gadt/all.T +++ b/testsuite/tests/gadt/all.T @@ -119,3 +119,4 @@ test('T14719', normal, compile_fail, ['-fdiagnostics-show-caret']) test('T14808', normal, compile, ['']) test('T15009', normal, compile, ['']) test('T15558', normal, compile, ['']) +test('T16427', normal, compile_fail, ['']) From git at git.haskell.org Fri Mar 15 19:06:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:46 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Use liveness information in CmmCall (83e09d3) Message-ID: <20190315190646.AB2FF3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/83e09d3c2b2e84b85fa25e271eff2747fc783f09/ghc >--------------------------------------------------------------- commit 83e09d3c2b2e84b85fa25e271eff2747fc783f09 Author: Peter Trommler Date: Tue Dec 11 16:43:49 2018 +0100 PPC NCG: Use liveness information in CmmCall We make liveness information for global registers available on `JMP` and `BCTR`, which were the last instructions missing. With complete liveness information we do not need to reserve global registers in `freeReg` anymore. Moreover we assign R9 and R10 to callee saves registers. Cleanup by removing `Reg_Su`, which was unused, from `freeReg` and removing unused register definitions. The calculation of the number of floating point registers is too conservative. Just follow X86 and specify the constants directly. Overall on PowerPC this results in 0.3 % smaller code size in nofib while runtime is slightly better in some tests. >--------------------------------------------------------------- 83e09d3c2b2e84b85fa25e271eff2747fc783f09 compiler/nativeGen/PPC/CodeGen.hs | 40 +++++++++++++--------- compiler/nativeGen/PPC/Instr.hs | 35 +++++++++++-------- compiler/nativeGen/PPC/Ppr.hs | 4 +-- compiler/nativeGen/PPC/Regs.hs | 12 +++---- includes/CodeGen.Platform.hs | 72 --------------------------------------- includes/stg/MachRegs.h | 13 ++++--- 6 files changed, 57 insertions(+), 119 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 83e09d3c2b2e84b85fa25e271eff2747fc783f09 From git at git.haskell.org Fri Mar 15 19:06:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:49 +0000 (UTC) Subject: [commit: ghc] master: Add flavours link (57201be) Message-ID: <20190315190649.B7B093A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/57201bebaeb15c5635ac5ea153b0141b55670199/ghc >--------------------------------------------------------------- commit 57201bebaeb15c5635ac5ea153b0141b55670199 Author: Simon Peyton Jones Date: Thu Mar 14 08:05:28 2019 -0400 Add flavours link >--------------------------------------------------------------- 57201bebaeb15c5635ac5ea153b0141b55670199 hadrian/doc/make.md | 1 + 1 file changed, 1 insertion(+) diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md index 15bd6bd..e2b790d 100644 --- a/hadrian/doc/make.md +++ b/hadrian/doc/make.md @@ -92,6 +92,7 @@ time you fire up a build. This is not possible with the Make build system. # Hadrian build --flavour=quickest ``` + See [flavours documentation](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/flavours.md) for info on flavours. - Building with `integer-simple` as the integer library From git at git.haskell.org Fri Mar 15 19:06:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:52 +0000 (UTC) Subject: [commit: ghc] wip/rejig-stages: ci: Move validate-x86_64-linux-deb9 to full-build stage (1ce607b) Message-ID: <20190315190652.CE3AF3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/1ce607bae51680a9f5306149943323feea250a34/ghc >--------------------------------------------------------------- commit 1ce607bae51680a9f5306149943323feea250a34 Author: Ben Gamari Date: Fri Mar 15 10:45:44 2019 -0400 ci: Move validate-x86_64-linux-deb9 to full-build stage The `build` stage is meant to be a minimal smoke test to weed out broken commits. The `validate-x86_64-linux-deb9` build will generally catch a subset of issues caught by `validate-x86_64-linux-deb9-debug` so only the latter should be in `build`. >--------------------------------------------------------------- 1ce607bae51680a9f5306149943323feea250a34 .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 483fd89..3b16a76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -282,7 +282,7 @@ nightly-i386-linux-deb9: .build-x86_64-linux-deb9: extends: .validate-linux - stage: build + stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb9" @@ -308,6 +308,7 @@ nightly-x86_64-linux-deb9: # N.B. Has DEBUG assertions enabled in stage2 validate-x86_64-linux-deb9-debug: extends: .build-x86_64-linux-deb9 + stage: build variables: BUILD_FLAVOUR: validate TEST_ENV: "x86_64-linux-deb9-debug" From git at git.haskell.org Fri Mar 15 19:06:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:55 +0000 (UTC) Subject: [commit: ghc] wip/rejig-stages: ci: Add some descriptions of the stages (b6500e8) Message-ID: <20190315190655.DE1663A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/rejig-stages Link : http://ghc.haskell.org/trac/ghc/changeset/b6500e8a3a352365b50f46290e1a291f77b7d1bf/ghc >--------------------------------------------------------------- commit b6500e8a3a352365b50f46290e1a291f77b7d1bf Author: Ben Gamari Date: Fri Mar 15 10:48:51 2019 -0400 ci: Add some descriptions of the stages >--------------------------------------------------------------- b6500e8a3a352365b50f46290e1a291f77b7d1bf .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b16a76..22a0be2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,10 +12,10 @@ before_script: - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true" stages: - - lint - - build - - full-build - - cleanup # See Note [Cleanup on Windows] + - lint # Source linting + - build # A quick smoke-test to weed out broken commits + - full-build # Build all the things + - cleanup # See Note [Cleanup on Windows] ############################################################ # Runner Tags From git at git.haskell.org Fri Mar 15 19:06:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 15 Mar 2019 19:06:59 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-bench: Add a bench flavour to Hadrian (0ac7b9f) Message-ID: <20190315190659.670953A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-bench Link : http://ghc.haskell.org/trac/ghc/changeset/0ac7b9fa230cfc919dde0adb6b9ffe1631331219/ghc >--------------------------------------------------------------- commit 0ac7b9fa230cfc919dde0adb6b9ffe1631331219 Author: Sebastian Graf Date: Fri Mar 15 17:06:21 2019 +0100 Add a bench flavour to Hadrian >--------------------------------------------------------------- 0ac7b9fa230cfc919dde0adb6b9ffe1631331219 hadrian/hadrian.cabal | 1 + hadrian/src/Settings.hs | 7 ++++--- hadrian/src/Settings/Flavours/Benchmark.hs | 23 +++++++++++++++++++++++ hadrian/src/Settings/Flavours/Llvm.hs | 5 ++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index a5a1ead..2c54382 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -89,6 +89,7 @@ executable hadrian , Settings.Builders.RunTest , Settings.Builders.Xelatex , Settings.Default + , Settings.Flavours.Benchmark , Settings.Flavours.Common , Settings.Flavours.Development , Settings.Flavours.Llvm diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs index bc0f8ce..ef88ef4 100755 --- a/hadrian/src/Settings.hs +++ b/hadrian/src/Settings.hs @@ -11,6 +11,7 @@ import Packages import UserSettings (userFlavours, userPackages, userDefaultFlavour) import {-# SOURCE #-} Settings.Default +import Settings.Flavours.Benchmark import Settings.Flavours.Development import Settings.Flavours.Llvm import Settings.Flavours.Performance @@ -35,9 +36,9 @@ stagePackages stage = do hadrianFlavours :: [Flavour] hadrianFlavours = - [ defaultFlavour, developmentFlavour Stage1, developmentFlavour Stage2 - , performanceFlavour, profiledFlavour, quickFlavour, quickestFlavour - , quickCrossFlavour + [ benchmarkFlavour, defaultFlavour, developmentFlavour Stage1 + , developmentFlavour Stage2, performanceFlavour, profiledFlavour + , quickFlavour, quickestFlavour, quickCrossFlavour, benchmarkLlvmFlavour , performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour ] flavour :: Action Flavour diff --git a/hadrian/src/Settings/Flavours/Benchmark.hs b/hadrian/src/Settings/Flavours/Benchmark.hs new file mode 100644 index 0000000..46a4a18 --- /dev/null +++ b/hadrian/src/Settings/Flavours/Benchmark.hs @@ -0,0 +1,23 @@ +module Settings.Flavours.Benchmark (benchmarkFlavour) where + +import Expression +import Flavour +import {-# SOURCE #-} Settings.Default + +-- Please update doc/flavours.md when changing this file. +benchmarkFlavour :: Flavour +benchmarkFlavour = defaultFlavour + { name = "bench" + , args = defaultBuilderArgs <> benchmarkArgs <> defaultPackageArgs + , libraryWays = pure [vanilla] + , rtsWays = pure [vanilla, threaded] } + +benchmarkArgs :: Args +benchmarkArgs = sourceArgs SourceArgs + { hsDefault = pure ["-O", "-H64m"] + , hsLibrary = pure ["-O2"] + -- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't + -- really measuring the overhead of a potential new optimisation we want + -- to benchmark. This has to happen in sync with the Makefile build, though. + , hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O0"] + , hsGhc = pure ["-O2"] } \ No newline at end of file diff --git a/hadrian/src/Settings/Flavours/Llvm.hs b/hadrian/src/Settings/Flavours/Llvm.hs index 2752c9e..ddf07a2 100644 --- a/hadrian/src/Settings/Flavours/Llvm.hs +++ b/hadrian/src/Settings/Flavours/Llvm.hs @@ -1,4 +1,5 @@ module Settings.Flavours.Llvm ( + benchmarkLlvmFlavour, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour, @@ -7,12 +8,14 @@ module Settings.Flavours.Llvm ( import Expression import Flavour +import Settings.Flavours.Benchmark import Settings.Flavours.Performance import Settings.Flavours.Profiled import Settings.Flavours.Quick -- Please update doc/flavours.md when changing this file. -performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour +benchmarkLlvmFlavour, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour +benchmarkLlvmFlavour = mkLlvmFlavour benchmarkFlavour performanceLlvmFlavour = mkLlvmFlavour performanceFlavour profiledLlvmFlavour = mkLlvmFlavour profiledFlavour quickLlvmFlavour = mkLlvmFlavour quickFlavour From git at git.haskell.org Sat Mar 16 14:45:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 16 Mar 2019 14:45:00 +0000 (UTC) Subject: [commit: ghc] branch 'wip/disable-atomic-rename-on-windows' created Message-ID: <20190316144500.E0ADB3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/disable-atomic-rename-on-windows Referencing: 6d7bfba77b8400e9ea56eb016dccae04c43cb08f From git at git.haskell.org Sat Mar 16 14:45:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 16 Mar 2019 14:45:05 +0000 (UTC) Subject: [commit: ghc] master, wip/disable-atomic-rename-on-windows: Improve error recovery in the typechecker (4927117) Message-ID: <20190316144505.144373A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/disable-atomic-rename-on-windows Link : http://ghc.haskell.org/trac/ghc/changeset/4927117cd6166a97455d788dbf7433c95441b57a/ghc >--------------------------------------------------------------- commit 4927117cd6166a97455d788dbf7433c95441b57a Author: Simon Peyton Jones Date: Wed Mar 13 11:15:20 2019 +0000 Improve error recovery in the typechecker Issue #16418 showed that we were carrying on too eagerly after a bogus type signature was identified (a bad telescope in fact), leading to a subsequent crash. This led me in to a maze of twisty little passages in the typechecker's error recovery, and I ended up doing some refactoring in TcRnMonad. Some specfifics * TcRnMonad.try_m is now called attemptM. * I switched the order of the result pair in tryTc, to make it consistent with other similar functions. * The actual exception used in the Tc monad is irrelevant so, to avoid polluting type signatures, I made tcTryM, a simple wrapper around tryM, and used it. The more important changes are in * TcSimplify.captureTopConstraints, where we should have been calling simplifyTop rather than reportUnsolved, so that levity defaulting takes place properly. * TcUnify.emitResidualTvConstraint, where we need to set the correct status for a new implication constraint. (Previously we ended up with an Insoluble constraint wrapped in an Unsolved implication, which meant that insolubleWC gave the wrong answer. >--------------------------------------------------------------- 4927117cd6166a97455d788dbf7433c95441b57a compiler/ghci/RtClosureInspect.hs | 4 +- compiler/typecheck/TcBackpack.hs | 2 +- compiler/typecheck/TcBinds.hs | 12 +- compiler/typecheck/TcRnExports.hs | 8 +- compiler/typecheck/TcRnMonad.hs | 376 ++++++++++++--------- compiler/typecheck/TcSigs.hs | 23 +- compiler/typecheck/TcSimplify.hs | 8 +- compiler/typecheck/TcUnify.hs | 9 +- .../tests/dependent/should_fail/BadTelescope2.hs | 3 - .../dependent/should_fail/BadTelescope2.stderr | 9 +- .../{BadTelescope2.hs => BadTelescope5.hs} | 5 +- .../dependent/should_fail/BadTelescope5.stderr | 7 + .../tests/dependent/should_fail/T15743c.stderr | 15 + testsuite/tests/dependent/should_fail/T16418.hs | 13 + .../tests/dependent/should_fail/T16418.stderr | 7 + testsuite/tests/dependent/should_fail/all.T | 4 +- testsuite/tests/patsyn/should_fail/T9161-1.hs | 2 + testsuite/tests/patsyn/should_fail/T9161-1.stderr | 2 +- testsuite/tests/patsyn/should_fail/T9161-2.hs | 2 + testsuite/tests/patsyn/should_fail/T9161-2.stderr | 2 +- .../tests/typecheck/should_fail/tcfail212.stderr | 22 -- 21 files changed, 317 insertions(+), 218 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 4927117cd6166a97455d788dbf7433c95441b57a From git at git.haskell.org Sat Mar 16 14:45:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 16 Mar 2019 14:45:08 +0000 (UTC) Subject: [commit: ghc] master, wip/disable-atomic-rename-on-windows: Add location to the extra-constraints wildcard (600a1ac) Message-ID: <20190316144508.2E2DA3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/disable-atomic-rename-on-windows Link : http://ghc.haskell.org/trac/ghc/changeset/600a1ac3829c2b216d2cc23a1e8256841ffe6466/ghc >--------------------------------------------------------------- commit 600a1ac3829c2b216d2cc23a1e8256841ffe6466 Author: Simon Peyton Jones Date: Wed Mar 13 13:09:19 2019 +0000 Add location to the extra-constraints wildcard The extra-constraints wildcard had lost its location (issue #16431). Happily this is easy to fix. Lots of error improvements. >--------------------------------------------------------------- 600a1ac3829c2b216d2cc23a1e8256841ffe6466 compiler/typecheck/TcHsType.hs | 7 ++++--- testsuite/tests/partial-sigs/should_compile/SuperCls.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T10519.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T11016.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T12844.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T12845.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T13482.stderr | 8 ++++---- testsuite/tests/partial-sigs/should_compile/T14217.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/T14643.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T14643a.stderr | 4 ++-- testsuite/tests/partial-sigs/should_compile/T14715.stderr | 2 +- .../should_compile/WarningWildcardInstantiations.stderr | 8 ++++---- .../should_fail/InstantiatedNamedWildcardsInConstraints.stderr | 8 ++++---- testsuite/tests/partial-sigs/should_fail/T11515.stderr | 2 +- .../tests/partial-sigs/should_fail/WildcardInstantiations.stderr | 8 ++++---- 15 files changed, 33 insertions(+), 32 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 600a1ac3829c2b216d2cc23a1e8256841ffe6466 From git at git.haskell.org Sat Mar 16 14:45:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 16 Mar 2019 14:45:11 +0000 (UTC) Subject: [commit: ghc] wip/disable-atomic-rename-on-windows: compiler: Disable atomic renaming on Windows (6d7bfba) Message-ID: <20190316144511.3EAED3A5FF@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/disable-atomic-rename-on-windows Link : http://ghc.haskell.org/trac/ghc/changeset/6d7bfba77b8400e9ea56eb016dccae04c43cb08f/ghc >--------------------------------------------------------------- commit 6d7bfba77b8400e9ea56eb016dccae04c43cb08f Author: Ben Gamari Date: Sat Mar 16 08:57:43 2019 -0400 compiler: Disable atomic renaming on Windows As discussed in #16450, this feature regresses CI on Windows, causing non-deterministic failures due to missing files. >--------------------------------------------------------------- 6d7bfba77b8400e9ea56eb016dccae04c43cb08f compiler/utils/Util.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 41f63f2..6730881 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -1314,7 +1314,8 @@ modificationTimeIfExists f = do -- also results in a skip. withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a -withAtomicRename targetFile f = do +withAtomicRename targetFile f + | enableAtomicRename = do -- The temp file must be on the same file system (mount) as the target file -- to result in an atomic move on most platforms. -- The standard way to ensure that is to place it into the same directory. @@ -1325,6 +1326,17 @@ withAtomicRename targetFile f = do liftIO $ renameFile temp targetFile return res + | otherwise = f targetFile + where + -- As described in #16450, enabling this causes spurious build failures due + -- to apparently missing files. + enableAtomicRename :: Bool +#if defined(mingw32_BUILD_OS) + enableAtomicRename = False +#else + enableAtomicRename = True +#endif + -- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string From git at git.haskell.org Sun Mar 17 19:07:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:07:47 +0000 (UTC) Subject: [commit: ghc] branch 'wip/pat-builder' created Message-ID: <20190317190747.2E9003A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/pat-builder Referencing: fd4009d80533803a4dee959015b96c1626e5ed88 From git at git.haskell.org Sun Mar 17 19:07:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:07:49 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-ghci-ci' created Message-ID: <20190317190749.2D1B93A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-ghci-ci Referencing: abb12a81b1b5dc9ea88d42564e9a189c4caec151 From git at git.haskell.org Sun Mar 17 19:07:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:07:52 +0000 (UTC) Subject: [commit: ghc] master, wip/fix-ghci-ci, wip/pat-builder: compiler: Disable atomic renaming on Windows (1c1b63d) Message-ID: <20190317190752.3ABEA3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/fix-ghci-ci,wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/1c1b63d63efe8b0f789aa7d5b87cfac3edd213eb/ghc >--------------------------------------------------------------- commit 1c1b63d63efe8b0f789aa7d5b87cfac3edd213eb Author: Ben Gamari Date: Sat Mar 16 08:57:43 2019 -0400 compiler: Disable atomic renaming on Windows As discussed in #16450, this feature regresses CI on Windows, causing non-deterministic failures due to missing files. >--------------------------------------------------------------- 1c1b63d63efe8b0f789aa7d5b87cfac3edd213eb compiler/utils/Util.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 41f63f2..6730881 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -1314,7 +1314,8 @@ modificationTimeIfExists f = do -- also results in a skip. withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a -withAtomicRename targetFile f = do +withAtomicRename targetFile f + | enableAtomicRename = do -- The temp file must be on the same file system (mount) as the target file -- to result in an atomic move on most platforms. -- The standard way to ensure that is to place it into the same directory. @@ -1325,6 +1326,17 @@ withAtomicRename targetFile f = do liftIO $ renameFile temp targetFile return res + | otherwise = f targetFile + where + -- As described in #16450, enabling this causes spurious build failures due + -- to apparently missing files. + enableAtomicRename :: Bool +#if defined(mingw32_BUILD_OS) + enableAtomicRename = False +#else + enableAtomicRename = True +#endif + -- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string From git at git.haskell.org Sun Mar 17 19:07:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:07:55 +0000 (UTC) Subject: [commit: ghc] master, wip/fix-ghci-ci, wip/pat-builder: gitlab-ci: Explicitly set bindist tarball name (6764da4) Message-ID: <20190317190755.40E383A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/fix-ghci-ci,wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/6764da436ae039645df2af1c1d53f7cd45a9638b/ghc >--------------------------------------------------------------- commit 6764da436ae039645df2af1c1d53f7cd45a9638b Author: Ben Gamari Date: Wed Mar 6 06:46:57 2019 -0500 gitlab-ci: Explicitly set bindist tarball name >--------------------------------------------------------------- 6764da436ae039645df2af1c1d53f7cd45a9638b .gitlab-ci.yml | 17 +++++++++++------ mk/config.mk.in | 12 ++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 483fd89..a64e805 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,7 +132,6 @@ hadrian-ghc-in-ghci: make V=0 -j$THREADS WERROR=-Werror - | make binary-dist TAR_COMP_OPTS="-1" - mv ghc-*.tar.xz ghc.tar.xz - | # Prepare to push git notes. METRICS_FILE=$(mktemp) @@ -150,7 +149,7 @@ hadrian-ghc-in-ghci: junit: junit.xml expire_in: 2 week paths: - - ghc.tar.xz + - ghc-*.tar.xz - junit.xml ################################# @@ -164,6 +163,7 @@ validate-x86_64-darwin: - x86_64-darwin variables: GHC_VERSION: 8.6.3 + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-apple-darwin.tar.xz" MACOSX_DEPLOYMENT_TARGET: "10.7" # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" @@ -225,6 +225,7 @@ validate-x86_64-darwin: allow_failure: true variables: TEST_ENV: "aarch64-linux-deb9" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-aarch64-linux-deb9.tar.xz" cache: key: linux-aarch64-deb9 tags: @@ -256,6 +257,7 @@ nightly-aarch64-linux-deb9: image: "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "i386-linux-deb9" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-i386-deb9-linux.tar.xz" cache: key: linux-i386-deb9 @@ -286,6 +288,7 @@ nightly-i386-linux-deb9: image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb9" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb9-linux.tar.xz" cache: key: linux-x86_64-deb9 @@ -325,6 +328,7 @@ validate-x86_64-linux-deb9-integer-simple: variables: INTEGER_LIBRARY: integer-simple TEST_ENV: "x86_64-linux-deb9-integer-simple" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb9-linux-integer-simple.tar.xz" nightly-x86_64-linux-deb9-integer-simple: extends: .build-x86_64-linux-deb9 @@ -357,6 +361,7 @@ release-x86_64-linux-deb8: image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb8" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-deb8-linux.tar.xz" only: - tags cache: @@ -376,6 +381,7 @@ release-x86_64-linux-fedora27: image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-fedora27" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-fedora27-linux.tar.xz" only: - tags cache: @@ -452,6 +458,7 @@ validate-x86_64-windows: variables: GHC_VERSION: "8.6.2" LANG: "en_US.UTF-8" + BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz" script: - | set MSYSTEM=MINGW64 @@ -459,9 +466,7 @@ validate-x86_64-windows: bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`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 binary-dist TAR_COMP_OPTS=-1" - mv ghc-*.tar.xz ghc.tar.xz + - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: key: x86_64-windows @@ -472,7 +477,7 @@ validate-x86_64-windows: reports: junit: junit.xml paths: - - ghc.tar.xz + - ghc-*.tar.xz - junit.xml ############################################################ diff --git a/mk/config.mk.in b/mk/config.mk.in index 22a3d39..0fc6d4d 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -384,12 +384,12 @@ GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64), at UseLibdw@, # ################################################################################ -BINDIST = NO -BIN_DIST_NAME = ghc-$(ProjectVersion) -BIN_DIST_PREP_DIR = bindistprep/$(BIN_DIST_NAME) -BIN_DIST_PREP_TAR = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar -BIN_DIST_PREP_TAR_COMP = $(BIN_DIST_PREP_TAR).$(TAR_COMP_EXT) -BIN_DIST_TAR_COMP = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.$(TAR_COMP_EXT) +BINDIST = NO +BIN_DIST_NAME = ghc-$(ProjectVersion) +BIN_DIST_PREP_DIR = bindistprep/$(BIN_DIST_NAME) +BIN_DIST_PREP_TAR = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar +BIN_DIST_PREP_TAR_COMP ?= $(BIN_DIST_PREP_TAR).$(TAR_COMP_EXT) +BIN_DIST_TAR_COMP = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.$(TAR_COMP_EXT) # ----------------------------------------------------------------------------- # Utilities programs: flags From git at git.haskell.org Sun Mar 17 19:07:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:07:58 +0000 (UTC) Subject: [commit: ghc] master, wip/fix-ghci-ci, wip/pat-builder: gitlab-ci: Generate source tarballs (3f2291e) Message-ID: <20190317190758.460B23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/fix-ghci-ci,wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/3f2291e47b8e00f1312c9be31484ceddd1289212/ghc >--------------------------------------------------------------- commit 3f2291e47b8e00f1312c9be31484ceddd1289212 Author: Ben Gamari Date: Tue Feb 19 10:00:02 2019 -0500 gitlab-ci: Generate source tarballs >--------------------------------------------------------------- 3f2291e47b8e00f1312c9be31484ceddd1289212 .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 878a2ff..9d9ebe2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -561,3 +561,21 @@ doc-tarball: - ls -lh - mv docs/*.tar.xz . +source-tarball: + stage: packaging + tags: + - x86_64-linux + image: ghcci/x86_64-linux-deb9:0.2 + only: + - tags + artifacts: + paths: + - ghc-*.tar.xz + - version + script: + - mk/get-win32-tarballs.sh download all + - ./boot + - ./configure + - make sdist + - mv sdistprep/*.xz . + - make show VALUE=version > version From git at git.haskell.org Sun Mar 17 19:08:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:08:01 +0000 (UTC) Subject: [commit: ghc] master, wip/fix-ghci-ci, wip/pat-builder: gitlab-ci: Generate documentation tarball (ad79ccd) Message-ID: <20190317190801.4C6C13A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/fix-ghci-ci,wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/ad79ccd9c86ae2eccb625ab7000cf899f23ff840/ghc >--------------------------------------------------------------- commit ad79ccd9c86ae2eccb625ab7000cf899f23ff840 Author: Ben Gamari Date: Wed Mar 6 06:47:28 2019 -0500 gitlab-ci: Generate documentation tarball >--------------------------------------------------------------- ad79ccd9c86ae2eccb625ab7000cf899f23ff840 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a64e805..878a2ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,7 @@ stages: - build - full-build - cleanup # See Note [Cleanup on Windows] + - packaging ############################################################ # Runner Tags @@ -535,3 +536,28 @@ cleanup-darwin: - rm -Rf $BUILD_DIR/* - exit 0 +############################################################ +# Packaging +############################################################ + +doc-tarball: + stage: packaging + tags: + - x86_64-linux + image: ghcci/x86_64-linux-deb9:0.2 + dependencies: + - validate-x86_64-linux-deb9 + - validate-x86_64-windows + artifacts: + paths: + - haddock.html.tar.xz + - libraries.html.tar.xz + - users_guide.html.tar.xz + - index.html + - "*.pdf" + script: + - rm -Rf docs + - distrib/mkDocs/mkDocs ghc-x86_64-deb9-linux.tar.xz ghc-x86_64-mingw32.tar.xz + - ls -lh + - mv docs/*.tar.xz . + From git at git.haskell.org Sun Mar 17 19:08:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:08:04 +0000 (UTC) Subject: [commit: ghc] master, wip/fix-ghci-ci, wip/pat-builder: ghc-heap: Introduce closureSize (cb61371) Message-ID: <20190317190804.C89353A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/fix-ghci-ci,wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/cb61371e3260e07be724a04b72a935133f66b514/ghc >--------------------------------------------------------------- commit cb61371e3260e07be724a04b72a935133f66b514 Author: Ben Gamari Date: Wed Mar 13 19:42:47 2019 -0400 ghc-heap: Introduce closureSize This function allows the user to compute the (non-transitive) size of a heap object in words. The "closure" in the name is admittedly confusing but we are stuck with this nomenclature at this point. >--------------------------------------------------------------- cb61371e3260e07be724a04b72a935133f66b514 compiler/prelude/primops.txt.pp | 7 +++++ includes/stg/MiscClosures.h | 1 + libraries/ghc-heap/GHC/Exts/Heap/Closures.hs | 14 +++++++++ libraries/ghc-heap/tests/all.T | 3 ++ libraries/ghc-heap/tests/closure_size.hs | 34 ++++++++++++++++++++++ .../tests/closure_size.stdout} | 0 libraries/ghc-prim/changelog.md | 8 +++++ rts/PrimOps.cmm | 7 +++++ rts/RtsSymbols.c | 1 + 9 files changed, 75 insertions(+) diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 94de07f..6a1be8a 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -3208,6 +3208,13 @@ primop UnpackClosureOp "unpackClosure#" GenPrimOp with out_of_line = True +primop ClosureSizeOp "closureSize#" GenPrimOp + a -> Int# + { {\tt closureSize\# closure} returns the size of the given closure in + machine words. } + with + out_of_line = True + primop GetApStackValOp "getApStackVal#" GenPrimOp a -> Int# -> (# Int#, b #) with diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h index 8c4cb9f..0fc904e 100644 --- a/includes/stg/MiscClosures.h +++ b/includes/stg/MiscClosures.h @@ -470,6 +470,7 @@ RTS_FUN_DECL(stg_readTVarIOzh); RTS_FUN_DECL(stg_writeTVarzh); RTS_FUN_DECL(stg_unpackClosurezh); +RTS_FUN_DECL(stg_closureSizzezh); RTS_FUN_DECL(stg_getApStackValzh); RTS_FUN_DECL(stg_getSparkzh); RTS_FUN_DECL(stg_numSparkszh); diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs index e624a17..2465014 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs @@ -13,6 +13,12 @@ module GHC.Exts.Heap.Closures ( , GenClosure(..) , PrimType(..) , allClosures +#if __GLASGOW_HASKELL__ >= 809 + -- The closureSize# primop is unsupported on earlier GHC releases but we + -- build ghc-heap as a boot library so it must be buildable. Drop this once + -- we are guaranteed to bootstsrap with GHC >= 8.9. + , closureSize +#endif -- * Boxes , Box(..) @@ -321,3 +327,11 @@ allClosures (FunClosure {..}) = ptrArgs allClosures (BlockingQueueClosure {..}) = [link, blackHole, owner, queue] allClosures (OtherClosure {..}) = hvalues allClosures _ = [] + +#if __GLASGOW_HASKELL__ >= 809 +-- | Get the size of a closure in words. +-- +-- @since 8.10.1 +closureSize :: Box -> Int +closureSize (Box x) = I# (closureSize# x) +#endif diff --git a/libraries/ghc-heap/tests/all.T b/libraries/ghc-heap/tests/all.T index a676b49..595bd00 100644 --- a/libraries/ghc-heap/tests/all.T +++ b/libraries/ghc-heap/tests/all.T @@ -6,3 +6,6 @@ test('heap_all', omit_ways(['ghci', 'hpc']) ], compile_and_run, ['']) +test('closure_size', + omit_ways(['ghci', 'hpc', 'prof']), + compile_and_run, ['']) diff --git a/libraries/ghc-heap/tests/closure_size.hs b/libraries/ghc-heap/tests/closure_size.hs new file mode 100644 index 0000000..d770607 --- /dev/null +++ b/libraries/ghc-heap/tests/closure_size.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE ScopedTypeVariables #-} + +import Control.Monad +import Type.Reflection +import GHC.Stack + +import GHC.Exts.Heap.Closures + +assertSize :: forall a. (HasCallStack, Typeable a) + => a -> Int -> IO () +assertSize !x expected = do + let !size = closureSize (asBox x) + when (size /= expected) $ do + putStrLn $ "closureSize ("++show (typeRep @a)++") == "++show size++", expected "++show expected + putStrLn $ prettyCallStack callStack +{-# NOINLINE assertSize #-} + +pap :: Int -> Char -> Int +pap x _ = x +{-# NOINLINE pap #-} + +main :: IO () +main = do + assertSize 'a' 2 + assertSize (Just ()) 2 + assertSize (Nothing :: Maybe ()) 2 + assertSize ((1,2) :: (Int,Int)) 3 + assertSize ((1,2,3) :: (Int,Int,Int)) 4 + assertSize (id :: Int -> Int) 1 + assertSize (fst :: (Int,Int) -> Int) 1 + assertSize (pap 1) 2 + diff --git a/libraries/ghc-compact/tests/compact_serialize.stderr b/libraries/ghc-heap/tests/closure_size.stdout similarity index 100% copy from libraries/ghc-compact/tests/compact_serialize.stderr copy to libraries/ghc-heap/tests/closure_size.stdout diff --git a/libraries/ghc-prim/changelog.md b/libraries/ghc-prim/changelog.md index ecbc93f..2298846 100644 --- a/libraries/ghc-prim/changelog.md +++ b/libraries/ghc-prim/changelog.md @@ -1,3 +1,11 @@ +## 0.6.1 + +- Shipped with GHC 8.10.1 + +- Added to `GHC.Prim`: + + closureSize# :: a -> Int# + ## 0.6.0 - Shipped with GHC 8.8.1 diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 625f5f5..bc89839 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -2041,6 +2041,13 @@ for: return (info, dat_arr, ptrArray); } +stg_closureSizzezh (P_ clos) +{ + W_ len; + (len) = foreign "C" heap_view_closureSize(UNTAG(clos) "ptr"); + return (len); +} + /* ----------------------------------------------------------------------------- Thread I/O blocking primitives -------------------------------------------------------------------------- */ diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index 6966d6d..eb0322e 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -631,6 +631,7 @@ SymI_HasProto(initLinker) \ SymI_HasProto(initLinker_) \ SymI_HasProto(stg_unpackClosurezh) \ + SymI_HasProto(stg_closureSizzezh) \ SymI_HasProto(stg_getApStackValzh) \ SymI_HasProto(stg_getSparkzh) \ SymI_HasProto(stg_numSparkszh) \ From git at git.haskell.org Sun Mar 17 19:08:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:08:07 +0000 (UTC) Subject: [commit: ghc] wip/fix-ghci-ci: Check hadrian/ghci.sh script output to determine pass/fail (abb12a8) Message-ID: <20190317190807.D6C673A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-ghci-ci Link : http://ghc.haskell.org/trac/ghc/changeset/abb12a81b1b5dc9ea88d42564e9a189c4caec151/ghc >--------------------------------------------------------------- commit abb12a81b1b5dc9ea88d42564e9a189c4caec151 Author: Matthew Pickering Date: Sun Mar 17 10:24:31 2019 +0000 Check hadrian/ghci.sh script output to determine pass/fail ghci always exits with exit code 0 so you have to check the output to see if the modules loaded succesfully. >--------------------------------------------------------------- abb12a81b1b5dc9ea88d42564e9a189c4caec151 .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d9ebe2..5e43a53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,8 +109,8 @@ hadrian-ghc-in-ghci: - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi - ./boot - ./configure $CONFIGURE_ARGS - # Load ghc-in-ghci then immediately exit - - echo ":q" | hadrian/ghci.sh + # Load ghc-in-ghci then immediately exit and check the modules loaded + - echo ":q" | hadrian/ghci.sh | tail -n2 | grep "Ok," cache: key: hadrian-ghci paths: From git at git.haskell.org Sun Mar 17 19:08:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 17 Mar 2019 19:08:11 +0000 (UTC) Subject: [commit: ghc] wip/pat-builder: PatBuilder - WIP (fd4009d) Message-ID: <20190317190811.01EB83A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/pat-builder Link : http://ghc.haskell.org/trac/ghc/changeset/fd4009d80533803a4dee959015b96c1626e5ed88/ghc >--------------------------------------------------------------- commit fd4009d80533803a4dee959015b96c1626e5ed88 Author: Vladislav Zavialov Date: Sun Mar 17 13:47:09 2019 +0300 PatBuilder - WIP >--------------------------------------------------------------- fd4009d80533803a4dee959015b96c1626e5ed88 compiler/deSugar/Check.hs | 4 +- compiler/deSugar/DsExpr.hs | 4 - compiler/deSugar/PmExpr.hs | 1 + compiler/hieFile/HieAst.hs | 12 - compiler/hsSyn/HsExpr.hs | 40 -- compiler/hsSyn/HsExtension.hs | 8 - compiler/parser/Parser.y | 315 ++++++------ compiler/parser/RdrHsSyn.hs | 542 ++++++++++++++++----- compiler/rename/RnExpr.hs | 30 +- compiler/typecheck/TcRnTypes.hs | 4 - testsuite/tests/module/mod69.stderr | 2 +- testsuite/tests/module/mod70.stderr | 2 +- .../tests/parser/should_fail/InfixAppPatErr.stderr | 4 +- testsuite/tests/parser/should_fail/T14588.stderr | 2 +- testsuite/tests/parser/should_fail/T984.stderr | 4 +- testsuite/tests/rename/should_fail/T12879.stderr | 2 +- .../tests/rename/should_fail/rnfail016.stderr | 2 +- .../tests/rename/should_fail/rnfail016a.stderr | 2 +- .../tests/rename/should_fail/rnfail051.stderr | 3 +- testsuite/tests/th/T12411.stderr | 2 +- .../tests/typecheck/should_fail/T15527.stderr | 2 +- 21 files changed, 607 insertions(+), 380 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 fd4009d80533803a4dee959015b96c1626e5ed88 From git at git.haskell.org Mon Mar 18 11:30:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 18 Mar 2019 11:30:45 +0000 (UTC) Subject: [commit: ghc] master: Extract out use of UnboxedTuples from GHCi.Leak (c01d5af) Message-ID: <20190318113045.774E23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c01d5af31c8feb634fc3dffc84e6e7ece61ba190/ghc >--------------------------------------------------------------- commit c01d5af31c8feb634fc3dffc84e6e7ece61ba190 Author: Michael Sloan Date: Thu Mar 14 16:12:09 2019 -0700 Extract out use of UnboxedTuples from GHCi.Leak See #13101 + #15454 for motivation. This change reduces the number of modules that need to be compiled to object code when loading GHC into GHCi. >--------------------------------------------------------------- c01d5af31c8feb634fc3dffc84e6e7ece61ba190 ghc/GHCi/Leak.hs | 8 +++----- ghc/GHCi/Util.hs | 16 ++++++++++++++++ ghc/ghc-bin.cabal.in | 1 + 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ghc/GHCi/Leak.hs b/ghc/GHCi/Leak.hs index 8135c37..874d9e2 100644 --- a/ghc/GHCi/Leak.hs +++ b/ghc/GHCi/Leak.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE RecordWildCards, LambdaCase, MagicHash, UnboxedTuples #-} +{-# LANGUAGE RecordWildCards, LambdaCase #-} module GHCi.Leak ( LeakIndicators , getLeakIndicators @@ -10,9 +10,8 @@ import Data.Bits import DynFlags ( sTargetPlatform ) import Foreign.Ptr (ptrToIntPtr, intPtrToPtr) import GHC -import GHC.Exts (anyToAddr#) import GHC.Ptr (Ptr (..)) -import GHC.Types (IO (..)) +import GHCi.Util import HscTypes import Outputable import Platform (target32Bit) @@ -64,8 +63,7 @@ checkLeakIndicators dflags (LeakIndicators leakmods) = do report :: String -> Maybe a -> IO () report _ Nothing = return () report msg (Just a) = do - addr <- IO (\s -> case anyToAddr# a s of - (# s', addr #) -> (# s', Ptr addr #)) :: IO (Ptr ()) + addr <- anyToPtr a putStrLn ("-fghci-leak-check: " ++ msg ++ " is still alive at " ++ show (maskTagBits addr)) diff --git a/ghc/GHCi/Util.hs b/ghc/GHCi/Util.hs new file mode 100644 index 0000000..050a056 --- /dev/null +++ b/ghc/GHCi/Util.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +-- | Utilities for GHCi. +module GHCi.Util where + +-- NOTE: Avoid importing GHC modules here, because the primary purpose +-- of this module is to not use UnboxedTuples in a module that imports +-- lots of other modules. See issue#13101 for more info. + +import GHC.Exts +import GHC.Types + +anyToPtr :: a -> IO (Ptr ()) +anyToPtr x = + IO (\s -> case anyToAddr# x s of + (# s', addr #) -> (# s', Ptr addr #)) :: IO (Ptr ()) diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in index 7819330..f00b794 100644 --- a/ghc/ghc-bin.cabal.in +++ b/ghc/ghc-bin.cabal.in @@ -72,6 +72,7 @@ Executable ghc GHCi.UI.Info GHCi.UI.Monad GHCi.UI.Tags + GHCi.Util Other-Extensions: BangPatterns FlexibleInstances From git at git.haskell.org Mon Mar 18 11:30:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 18 Mar 2019 11:30:48 +0000 (UTC) Subject: [commit: ghc] master: Update bug tracker link to point to gitlab instead of deprecated trac (6113d0d) Message-ID: <20190318113048.7FD5A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6113d0d4540af7853c71e9f42a41c3b0bab386fd/ghc >--------------------------------------------------------------- commit 6113d0d4540af7853c71e9f42a41c3b0bab386fd Author: Radosław Rowicki Date: Fri Mar 15 18:20:42 2019 -0400 Update bug tracker link to point to gitlab instead of deprecated trac >--------------------------------------------------------------- 6113d0d4540af7853c71e9f42a41c3b0bab386fd README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef6652a..d445d11 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,7 @@ Filing bugs and feature requests ================================ If you've encountered what you believe is a bug in GHC, or you'd like -to propose a feature request, please let us know! Submit a ticket in -our [bug tracker][10] and we'll be sure to look into it. Remember: +to propose a feature request, please let us know! Submit an [issue][10] and we'll be sure to look into it. Remember: **Filing a bug is the best way to make sure your issue isn't lost over time**, so please feel free. @@ -120,8 +119,8 @@ you to join! [8]: http://ghc.haskell.org/trac/ghc/wiki/Building/Preparation "http://ghc.haskell.org/trac/ghc/wiki/Building/Preparation" [9]: http://www.haskell.org/cabal/ "http://www.haskell.org/cabal/" - [10]: http://ghc.haskell.org/trac/ghc/ - "http://ghc.haskell.org/trac/ghc/" + [10]: https://gitlab.haskell.org/ghc/ghc/issues + "https://gitlab.haskell.org/ghc/ghc/issues" [11]: http://www.haskell.org/pipermail/glasgow-haskell-users/ "http://www.haskell.org/pipermail/glasgow-haskell-users/" [12]: http://ghc.haskell.org/trac/ghc/wiki/TeamGHC From git at git.haskell.org Mon Mar 18 11:30:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 18 Mar 2019 11:30:51 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Update sphinx.mk (0339c51) Message-ID: <20190318113051.859173A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/0339c512b53978b67fb21d8e3c848a505cecf0bf/ghc >--------------------------------------------------------------- commit 0339c512b53978b67fb21d8e3c848a505cecf0bf Author: Matthew Pickering Date: Mon Mar 18 03:54:02 2019 -0400 Update sphinx.mk >--------------------------------------------------------------- 0339c512b53978b67fb21d8e3c848a505cecf0bf rules/sphinx.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rules/sphinx.mk b/rules/sphinx.mk index 32ef3e4..e594108 100644 --- a/rules/sphinx.mk +++ b/rules/sphinx.mk @@ -63,11 +63,11 @@ ifneq "$$(BINDIST)" "YES" $1/$2.pdf: $1/conf.py $$($1_RST_SOURCES) $(SPHINXBUILD) -b latex -d $1/.doctrees-pdf $(SPHINXOPTS) $1 $1/build-pdf/$2 - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true + cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex || true + cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex || true + cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex || true cd $1/build-pdf/$2 ; makeindex $2.idx - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true + cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex || true cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex cp $1/build-pdf/$2/$2.pdf $1/$2.pdf endif From git at git.haskell.org Mon Mar 18 11:30:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 18 Mar 2019 11:30:54 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Update .gitlab-ci.yml (c922ee0) Message-ID: <20190318113054.8CCA03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/c922ee0cd5f1411b67f2abe071ae0c32fe66edcc/ghc >--------------------------------------------------------------- commit c922ee0cd5f1411b67f2abe071ae0c32fe66edcc Author: Matthew Pickering Date: Mon Mar 18 04:58:50 2019 -0400 Update .gitlab-ci.yml >--------------------------------------------------------------- c922ee0cd5f1411b67f2abe071ae0c32fe66edcc .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d90c943..5a9dced 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: cef670aaef61107b106fe99a4b5b1792ae10add6 + DOCKER_REV: a8c21833293553a4b0c1d1ce6127f9c11372e998 before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Mon Mar 18 17:58:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 18 Mar 2019 17:58:55 +0000 (UTC) Subject: [commit: ghc] wip/test-ci-images-commit: Update .gitlab-ci.yml (2782229) Message-ID: <20190318175855.4575F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/test-ci-images-commit Link : http://ghc.haskell.org/trac/ghc/changeset/2782229850cf5c2dfe7cbd692fa6690a28247759/ghc >--------------------------------------------------------------- commit 2782229850cf5c2dfe7cbd692fa6690a28247759 Author: Matthew Pickering Date: Mon Mar 18 09:03:59 2019 -0400 Update .gitlab-ci.yml >--------------------------------------------------------------- 2782229850cf5c2dfe7cbd692fa6690a28247759 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a9dced..272e774 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: a8c21833293553a4b0c1d1ce6127f9c11372e998 + DOCKER_REV: 1389deca5d757f8b9f0b2d18b38a81e89f5c3ef1 before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Tue Mar 19 05:04:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:16 +0000 (UTC) Subject: [commit: ghc] branch 'wip/build-fedora' created Message-ID: <20190319050416.268D13A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/build-fedora Referencing: b8326897251ebdbb896da2b28ad27a48ee8f2582 From git at git.haskell.org Tue Mar 19 05:04:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:18 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-sdist' created Message-ID: <20190319050418.271AF3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-sdist Referencing: 900e7c108b4bee99de0fb103c2ccf0432b16f04d From git at git.haskell.org Tue Mar 19 05:04:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:20 +0000 (UTC) Subject: [commit: ghc] branch 'wip/simplcore-foldl' created Message-ID: <20190319050420.284333A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/simplcore-foldl Referencing: e97c137449b782e6c06c98b409c84c1ec8666cd0 From git at git.haskell.org Tue Mar 19 05:04:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:22 +0000 (UTC) Subject: [commit: ghc] branch 'wip/krzysztof-cleanups' created Message-ID: <20190319050422.294B33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/krzysztof-cleanups Referencing: d3eae91414189e52f41f5b6a05c77ee7b56711ae From git at git.haskell.org Tue Mar 19 05:04:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:25 +0000 (UTC) Subject: [commit: ghc] wip/build-fedora: gitlab-ci: Always build fedora27 (b832689) Message-ID: <20190319050425.3865F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/build-fedora Link : http://ghc.haskell.org/trac/ghc/changeset/b8326897251ebdbb896da2b28ad27a48ee8f2582/ghc >--------------------------------------------------------------- commit b8326897251ebdbb896da2b28ad27a48ee8f2582 Author: Ben Gamari Date: Fri Mar 1 10:39:22 2019 -0500 gitlab-ci: Always build fedora27 This ends up being much easier to use than Debian 9 under NixOS. >--------------------------------------------------------------- b8326897251ebdbb896da2b28ad27a48ee8f2582 .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d9ebe2..cca7551 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -376,15 +376,13 @@ release-x86_64-linux-deb8: # x86_64-linux-fedora27 ################################# -release-x86_64-linux-fedora27: +validate-x86_64-linux-fedora27: extends: .validate-linux stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-fedora27" BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-fedora27-linux.tar.xz" - only: - - tags cache: key: linux-x86_64-fedora27 artifacts: From git at git.haskell.org Tue Mar 19 05:04:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:28 +0000 (UTC) Subject: [commit: ghc] wip/krzysztof-cleanups: Replace nOfThem by replicate (bb1bbbe) Message-ID: <20190319050428.42EA33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/krzysztof-cleanups Link : http://ghc.haskell.org/trac/ghc/changeset/bb1bbbe2e49f2a48623346410d2b2261c158d047/ghc >--------------------------------------------------------------- commit bb1bbbe2e49f2a48623346410d2b2261c158d047 Author: Krzysztof Gogolewski Date: Mon Mar 18 19:22:10 2019 +0100 Replace nOfThem by replicate >--------------------------------------------------------------- bb1bbbe2e49f2a48623346410d2b2261c158d047 compiler/hsSyn/HsUtils.hs | 2 +- compiler/prelude/TysWiredIn.hs | 6 +++--- compiler/typecheck/TcGenDeriv.hs | 4 ++-- compiler/typecheck/TcHsType.hs | 6 +++--- compiler/typecheck/TcMType.hs | 4 ++-- compiler/utils/Util.hs | 5 +---- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs index fa8ec14..ea3c6aa 100644 --- a/compiler/hsSyn/HsUtils.hs +++ b/compiler/hsSyn/HsUtils.hs @@ -456,7 +456,7 @@ nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon [])) nlWildConPat :: DataCon -> LPat GhcPs nlWildConPat con = noLoc (ConPatIn (noLoc (getRdrName con)) - (PrefixCon (nOfThem (dataConSourceArity con) + (PrefixCon (replicate (dataConSourceArity con) nlWildPat))) nlWildPat :: LPat GhcPs diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index aaeb902..5638b49 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -870,7 +870,7 @@ mk_tuple Boxed arity = (tycon, tuple_con) tycon = mkTupleTyCon tc_name tc_binders tc_res_kind tc_arity tuple_con BoxedTuple flavour - tc_binders = mkTemplateAnonTyConBinders (nOfThem arity liftedTypeKind) + tc_binders = mkTemplateAnonTyConBinders (replicate arity liftedTypeKind) tc_res_kind = liftedTypeKind tc_arity = arity flavour = VanillaAlgTyCon (mkPrelTyConRepName tc_name) @@ -895,7 +895,7 @@ mk_tuple Unboxed arity = (tycon, tuple_con) -- See Note [Unboxed tuple RuntimeRep vars] in TyCon -- Kind: forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> # - tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy) + tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) tc_res_kind = unboxedTupleKind rr_tys @@ -1015,7 +1015,7 @@ mk_sum arity = (tycon, sum_cons) -- Unboxed sums are currently not Typeable due to efficiency concerns. See #13276. rep_name = Nothing -- Just $ mkPrelTyConRepName tc_name - tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy) + tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) tyvars = binderVars tc_binders diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs index 4d731db..bb4b643 100644 --- a/compiler/typecheck/TcGenDeriv.hs +++ b/compiler/typecheck/TcGenDeriv.hs @@ -687,9 +687,9 @@ gen_Bounded_binds loc tycon arity = dataConSourceArity data_con_1 min_bound_1con = mkHsVarBind loc minBound_RDR $ - nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR) + nlHsVarApps data_con_1_RDR (replicate arity minBound_RDR) max_bound_1con = mkHsVarBind loc maxBound_RDR $ - nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR) + nlHsVarApps data_con_1_RDR (replicate arity maxBound_RDR) {- ************************************************************************ diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 489a35c..e0bf255 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -889,9 +889,9 @@ tupKindSort_maybe k tc_tuple :: HsType GhcRn -> TcTyMode -> TupleSort -> [LHsType GhcRn] -> TcKind -> TcM TcType tc_tuple rn_ty mode tup_sort tys exp_kind = do { arg_kinds <- case tup_sort of - BoxedTuple -> return (nOfThem arity liftedTypeKind) - UnboxedTuple -> mapM (\_ -> newOpenTypeKind) tys - ConstraintTuple -> return (nOfThem arity constraintKind) + BoxedTuple -> return (replicate arity liftedTypeKind) + UnboxedTuple -> replicateM arity newOpenTypeKind + ConstraintTuple -> return (replicate arity constraintKind) ; tau_tys <- zipWithM (tc_lhs_type mode) tys arg_kinds ; finish_tuple rn_ty tup_sort tau_tys arg_kinds exp_kind } where diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index d6a753f..e46cb50 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -148,7 +148,7 @@ newMetaKindVar ; return (mkTyVarTy kv) } newMetaKindVars :: Int -> TcM [TcKind] -newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ()) +newMetaKindVars n = replicateM n newMetaKindVar {- ************************************************************************ @@ -944,7 +944,7 @@ newFlexiTyVarTy kind = do return (mkTyVarTy tc_tyvar) newFlexiTyVarTys :: Int -> Kind -> TcM [TcType] -newFlexiTyVarTys n kind = mapM newFlexiTyVarTy (nOfThem n kind) +newFlexiTyVarTys n kind = replicateM n (newFlexiTyVarTy kind) newOpenTypeKind :: TcM TcKind newOpenTypeKind diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 6730881..9e67a43 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -26,7 +26,7 @@ module Util ( mapFst, mapSnd, chkAppend, mapAndUnzip, mapAndUnzip3, mapAccumL2, - nOfThem, filterOut, partitionWith, + filterOut, partitionWith, dropWhileEndLE, spanEnd, last2, lastMaybe, @@ -458,9 +458,6 @@ mapAccumL2 f s1 s2 xs = (s1', s2', ys) (s1', s2', y) -> ((s1', s2'), y)) (s1, s2) xs -nOfThem :: Int -> a -> [a] -nOfThem n thing = replicate n thing - -- | @atLength atLen atEnd ls n@ unravels list @ls@ to position @n at . Precisely: -- -- @ From git at git.haskell.org Tue Mar 19 05:04:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:31 +0000 (UTC) Subject: [commit: ghc] wip/krzysztof-cleanups: Fix typos (fd68f2d) Message-ID: <20190319050431.4F4823A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/krzysztof-cleanups Link : http://ghc.haskell.org/trac/ghc/changeset/fd68f2dc4e33bef1e5ad40a20032d65ea82f4c9d/ghc >--------------------------------------------------------------- commit fd68f2dc4e33bef1e5ad40a20032d65ea82f4c9d Author: Krzysztof Gogolewski Date: Mon Mar 18 19:31:19 2019 +0100 Fix typos >--------------------------------------------------------------- fd68f2dc4e33bef1e5ad40a20032d65ea82f4c9d compiler/coreSyn/CoreOpt.hs | 2 +- compiler/simplCore/Simplify.hs | 2 +- compiler/typecheck/TcBinds.hs | 2 +- compiler/typecheck/TcErrors.hs | 4 ++-- compiler/typecheck/TcMType.hs | 2 +- compiler/typecheck/TcType.hs | 2 +- testsuite/tests/simplCore/should_compile/T7360.hs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index 0f7f5fb..fe9e172 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -710,7 +710,7 @@ A more common case is when f = \x. error ".." -and again its arity increses (#15517) +and again its arity increases (#15517) -} {- ********************************************************************* diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index 0130e06..c6bd413 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -2384,7 +2384,7 @@ rebuildCase, reallyRebuildCase :: SimplEnv -> OutExpr -- Scrutinee -> InId -- Case binder - -> [InAlt] -- Alternatives (inceasing order) + -> [InAlt] -- Alternatives (increasing order) -> SimplCont -> SimplM (SimplFloats, OutExpr) diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs index 9cdc939..c8c1bc0 100644 --- a/compiler/typecheck/TcBinds.hs +++ b/compiler/typecheck/TcBinds.hs @@ -1589,7 +1589,7 @@ beta is untouchable.) Example for (E2), we generate q :: beta:1, with constraint (forall:3 a. Integral a => Int ~ beta) -The beta is untoucable, but floats out of the constraint and can +The beta is untouchable, but floats out of the constraint and can be solved absolutely fine. diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index b5d98d0..1d639d7 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -829,11 +829,11 @@ maybeReportHoleError :: ReportErrCtxt -> Ct -> ErrMsg -> TcM () maybeReportHoleError ctxt ct err -- When -XPartialTypeSignatures is on, warnings (instead of errors) are -- generated for holes in partial type signatures. - -- Unless -fwarn_partial_type_signatures is not on, + -- Unless -fwarn-partial-type-signatures is not on, -- in which case the messages are discarded. | isTypeHoleCt ct = -- For partial type signatures, generate warnings only, and do that - -- only if -fwarn_partial_type_signatures is on + -- only if -fwarn-partial-type-signatures is on case cec_type_holes ctxt of HoleError -> reportError err HoleWarn -> reportWarning (Reason Opt_WarnPartialTypeSignatures) err diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index e46cb50..a315611 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -1084,7 +1084,7 @@ Note [CandidatesQTvs determinism and order] accumulating-parameter style for candidateQTyVarsOfType so that we add variables one at a time, left to right. That means we tend to produce the variables in left-to-right order. This is just to make - it bit more predicatable for the programmer. + it bit more predictable for the programmer. Note [Naughty quantification candidates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 14807da..7a991a6 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -681,7 +681,7 @@ isSigMaybe _ = Nothing {- ********************************************************************* * * - Untoucable type variables + Untouchable type variables * * ********************************************************************* -} diff --git a/testsuite/tests/simplCore/should_compile/T7360.hs b/testsuite/tests/simplCore/should_compile/T7360.hs index 4e4703c..2bf31f2 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.hs +++ b/testsuite/tests/simplCore/should_compile/T7360.hs @@ -15,7 +15,7 @@ fun1 x = case x of Foo3 {} -> () fun2 x = (fun1 Foo1, -- Keep -ddump-simpl output - -- in a predicatable order + -- in a predictable order case x of [] -> L.length x (_:_) -> L.length x) From git at git.haskell.org Tue Mar 19 05:04:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:34 +0000 (UTC) Subject: [commit: ghc] wip/krzysztof-cleanups: Simplify monadic code (a6beef7) Message-ID: <20190319050434.589E03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/krzysztof-cleanups Link : http://ghc.haskell.org/trac/ghc/changeset/a6beef71a175146aada45f1d2af9dfc32b757a60/ghc >--------------------------------------------------------------- commit a6beef71a175146aada45f1d2af9dfc32b757a60 Author: Krzysztof Gogolewski Date: Mon Mar 18 19:34:00 2019 +0100 Simplify monadic code >--------------------------------------------------------------- a6beef71a175146aada45f1d2af9dfc32b757a60 compiler/main/DriverPipeline.hs | 9 ++++----- compiler/main/GHC.hs | 14 ++++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 5866568..458a118 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1283,12 +1283,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags = do -- LLVM from version 3.0 onwards doesn't support the OS X system -- assembler, so we use clang as the assembler instead. (#5636) - let whichAsProg | hscTarget dflags == HscLlvm && - platformOS (targetPlatform dflags) == OSDarwin - = return SysTools.runClang - | otherwise = return SysTools.runAs + let as_prog | hscTarget dflags == HscLlvm && + platformOS (targetPlatform dflags) == OSDarwin + = SysTools.runClang + | otherwise = SysTools.runAs - as_prog <- whichAsProg let cmdline_include_paths = includePaths dflags let pic_c_flags = picCCOpts dflags diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 4e6e0f4..9fa8911 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -683,14 +683,12 @@ checkNewInteractiveDynFlags :: MonadIO m => DynFlags -> m DynFlags checkNewInteractiveDynFlags dflags0 = do -- We currently don't support use of StaticPointers in expressions entered on -- the REPL. See #12356. - dflags1 <- - if xopt LangExt.StaticPointers dflags0 - then do liftIO $ printOrThrowWarnings dflags0 $ listToBag - [mkPlainWarnMsg dflags0 interactiveSrcSpan - $ text "StaticPointers is not supported in GHCi interactive expressions."] - return $ xopt_unset dflags0 LangExt.StaticPointers - else return dflags0 - return dflags1 + if xopt LangExt.StaticPointers dflags0 + then do liftIO $ printOrThrowWarnings dflags0 $ listToBag + [mkPlainWarnMsg dflags0 interactiveSrcSpan + $ text "StaticPointers is not supported in GHCi interactive expressions."] + return $ xopt_unset dflags0 LangExt.StaticPointers + else return dflags0 -- %************************************************************************ From git at git.haskell.org Tue Mar 19 05:04:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:37 +0000 (UTC) Subject: [commit: ghc] wip/krzysztof-cleanups: Remove deprecated reinitializeGlobals (d3eae91) Message-ID: <20190319050437.6034D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/krzysztof-cleanups Link : http://ghc.haskell.org/trac/ghc/changeset/d3eae91414189e52f41f5b6a05c77ee7b56711ae/ghc >--------------------------------------------------------------- commit d3eae91414189e52f41f5b6a05c77ee7b56711ae Author: Krzysztof Gogolewski Date: Mon Mar 18 19:36:26 2019 +0100 Remove deprecated reinitializeGlobals >--------------------------------------------------------------- d3eae91414189e52f41f5b6a05c77ee7b56711ae compiler/simplCore/CoreMonad.hs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs index 4cdb231..d99686a 100644 --- a/compiler/simplCore/CoreMonad.hs +++ b/compiler/simplCore/CoreMonad.hs @@ -37,9 +37,6 @@ module CoreMonad ( liftIO, liftIOWithCount, liftIO1, liftIO2, liftIO3, liftIO4, - -- ** Global initialization - reinitializeGlobals, - -- ** Dealing with annotations getAnnotations, getFirstAnnotations, @@ -727,10 +724,6 @@ getPackageFamInstEnv = do eps <- liftIO $ hscEPS hsc_env return $ eps_fam_inst_env eps -{-# DEPRECATED reinitializeGlobals "It is not necessary to call reinitializeGlobals. Since GHC 8.2, this function is a no-op and will be removed in GHC 8.4" #-} -reinitializeGlobals :: CoreM () -reinitializeGlobals = return () - {- ************************************************************************ * * From git at git.haskell.org Tue Mar 19 05:04:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:40 +0000 (UTC) Subject: [commit: ghc] wip/simplcore-foldl: SimplCore: Use foldl' instead of foldr (e97c137) Message-ID: <20190319050440.6608B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/simplcore-foldl Link : http://ghc.haskell.org/trac/ghc/changeset/e97c137449b782e6c06c98b409c84c1ec8666cd0/ghc >--------------------------------------------------------------- commit e97c137449b782e6c06c98b409c84c1ec8666cd0 Author: Ben Gamari Date: Mon Mar 18 22:57:51 2019 -0400 SimplCore: Use foldl' instead of foldr >--------------------------------------------------------------- e97c137449b782e6c06c98b409c84c1ec8666cd0 compiler/simplCore/SimplCore.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs index 7f2a0ea..ade9816 100644 --- a/compiler/simplCore/SimplCore.hs +++ b/compiler/simplCore/SimplCore.hs @@ -943,18 +943,18 @@ shortOutIndirections binds makeIndEnv :: [CoreBind] -> IndEnv makeIndEnv binds - = foldr add_bind emptyVarEnv binds + = foldl' add_bind emptyVarEnv binds where - add_bind :: CoreBind -> IndEnv -> IndEnv - add_bind (NonRec exported_id rhs) env = add_pair (exported_id, rhs) env - add_bind (Rec pairs) env = foldr add_pair env pairs + add_bind :: IndEnv -> CoreBind -> IndEnv + add_bind env (NonRec exported_id rhs) = add_pair env (exported_id, rhs) + add_bind env (Rec pairs) = foldl' add_pair env pairs - add_pair :: (Id,CoreExpr) -> IndEnv -> IndEnv - add_pair (exported_id, exported) env + add_pair :: IndEnv -> (Id,CoreExpr) -> IndEnv + add_pair env (exported_id, exported) | (ticks, Var local_id) <- stripTicksTop tickishFloatable exported , shortMeOut env exported_id local_id = extendVarEnv env local_id (exported_id, ticks) - add_pair _ env = env + add_pair env _ = env ----------------- shortMeOut :: IndEnv -> Id -> Id -> Bool From git at git.haskell.org Tue Mar 19 05:04:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 05:04:43 +0000 (UTC) Subject: [commit: ghc] wip/fix-sdist: gitlab-ci: Bump docker images (900e7c1) Message-ID: <20190319050443.6C1153A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-sdist Link : http://ghc.haskell.org/trac/ghc/changeset/900e7c108b4bee99de0fb103c2ccf0432b16f04d/ghc >--------------------------------------------------------------- commit 900e7c108b4bee99de0fb103c2ccf0432b16f04d Author: Ben Gamari Date: Mon Mar 18 23:51:35 2019 -0400 gitlab-ci: Bump docker images To install lndir and un-break the source distribution job. >--------------------------------------------------------------- 900e7c108b4bee99de0fb103c2ccf0432b16f04d .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d9ebe2..2194122 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f + DOCKER_REV: 7cbd823abe7eddd9c52a2e93062035b1c863605f before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Tue Mar 19 12:42:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 12:42:46 +0000 (UTC) Subject: [commit: ghc] wip/fix-sdist: Update .gitlab-ci.yml (93fce9a) Message-ID: <20190319124246.DC9B33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-sdist Link : http://ghc.haskell.org/trac/ghc/changeset/93fce9a09972374f4ceee66100274658726cf094/ghc >--------------------------------------------------------------- commit 93fce9a09972374f4ceee66100274658726cf094 Author: Matthew Pickering Date: Tue Mar 19 06:02:07 2019 -0400 Update .gitlab-ci.yml >--------------------------------------------------------------- 93fce9a09972374f4ceee66100274658726cf094 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2194122..8fa41f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 7cbd823abe7eddd9c52a2e93062035b1c863605f + DOCKER_REV: 07bd4acf4f91b56e22389d7b7f6c13486a7b63de before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Tue Mar 19 19:52:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 19:52:16 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-8.6-merges' created Message-ID: <20190319195216.4C69A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-8.6-merges Referencing: c0a64e7e63bd82481612a1f1730e72cc6a6b9e42 From git at git.haskell.org Tue Mar 19 19:52:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 19:52:19 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-merges: gitlab-ci: Don't build Windows in quick flavour (fd4637c) Message-ID: <20190319195219.57DD23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-merges Link : http://ghc.haskell.org/trac/ghc/changeset/fd4637c8d9821088abe1f12635fc9989a2f69ac4/ghc >--------------------------------------------------------------- commit fd4637c8d9821088abe1f12635fc9989a2f69ac4 Author: Ben Gamari Date: Tue Mar 19 14:23:21 2019 -0400 gitlab-ci: Don't build Windows in quick flavour This applies the fix from !516 to the 8.6 branch. >--------------------------------------------------------------- fd4637c8d9821088abe1f12635fc9989a2f69ac4 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9f3a34..f8c7f73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -382,7 +382,6 @@ 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 binary-dist TAR_COMP_OPTS=-1" From git at git.haskell.org Tue Mar 19 19:52:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 19:52:22 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-merges: Introduce i386-windows job (c0a64e7) Message-ID: <20190319195222.663543A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-merges Link : http://ghc.haskell.org/trac/ghc/changeset/c0a64e7e63bd82481612a1f1730e72cc6a6b9e42/ghc >--------------------------------------------------------------- commit c0a64e7e63bd82481612a1f1730e72cc6a6b9e42 Author: Ben Gamari Date: Tue Mar 19 14:25:16 2019 -0400 Introduce i386-windows job >--------------------------------------------------------------- c0a64e7e63bd82481612a1f1730e72cc6a6b9e42 .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8c7f73..20b0e1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -399,3 +399,33 @@ validate-x86_64-windows: - ghc.tar.xz - junit.xml +validate-i386-windows: + extends: .validate-windows + stage: build + # due to #16084 + allow_failure: true + variables: + GHC_VERSION: "8.6.2" + LANG: "en_US.UTF-8" + script: + - | + set MSYSTEM=MINGW32 + 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 binary-dist TAR_COMP_OPTS=-1" + mv ghc-*.tar.xz ghc.tar.xz + - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' + cache: + key: i386-windows + tags: + - i386-windows + artifacts: + when: always + reports: + junit: junit.xml + paths: + - ghc.tar.xz + - junit.xml + From git at git.haskell.org Tue Mar 19 21:48:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 21:48:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15247' created Message-ID: <20190319214832.998153A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15247 Referencing: 2d9e36d51f76445ea7f459b6c454750110a65df0 From git at git.haskell.org Tue Mar 19 21:48:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 19 Mar 2019 21:48:35 +0000 (UTC) Subject: [commit: ghc] wip/T15247: WIP: NoExtCon (#15247) (2d9e36d) Message-ID: <20190319214835.DAB553A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15247 Link : http://ghc.haskell.org/trac/ghc/changeset/2d9e36d51f76445ea7f459b6c454750110a65df0/ghc >--------------------------------------------------------------- commit 2d9e36d51f76445ea7f459b6c454750110a65df0 Author: Ryan Scott Date: Tue Mar 19 17:47:55 2019 -0400 WIP: NoExtCon (#15247) [ci skip] >--------------------------------------------------------------- 2d9e36d51f76445ea7f459b6c454750110a65df0 compiler/deSugar/Check.hs | 4 +- compiler/deSugar/Coverage.hs | 40 ++++++++--------- compiler/deSugar/Desugar.hs | 2 +- compiler/deSugar/DsBinds.hs | 6 +-- compiler/deSugar/DsExpr.hs | 8 ++-- compiler/deSugar/DsForeign.hs | 2 +- compiler/deSugar/DsGRHSs.hs | 8 ++-- compiler/deSugar/DsListComp.hs | 12 ++--- compiler/deSugar/DsMeta.hs | 58 ++++++++++++------------ compiler/deSugar/ExtractDocs.hs | 3 +- compiler/deSugar/Match.hs | 4 +- compiler/deSugar/MatchLit.hs | 4 +- compiler/hieFile/HieAst.hs | 2 +- compiler/hsSyn/Convert.hs | 2 +- compiler/hsSyn/HsBinds.hs | 16 +++---- compiler/hsSyn/HsDecls.hs | 89 ++++++++++++++++++++----------------- compiler/hsSyn/HsExpr.hs | 44 +++++++++--------- compiler/hsSyn/HsExtension.hs | 15 ++++++- compiler/hsSyn/HsImpExp.hs | 10 ++--- compiler/hsSyn/HsLit.hs | 6 +-- compiler/hsSyn/HsTypes.hs | 77 ++++++++++++++++++-------------- compiler/hsSyn/HsUtils.hs | 50 ++++++++++++--------- compiler/main/HscMain.hs | 5 ++- compiler/main/HscStats.hs | 6 +-- compiler/parser/RdrHsSyn.hs | 10 ++--- compiler/rename/RnBinds.hs | 26 +++++------ compiler/rename/RnExpr.hs | 46 +++++++++---------- compiler/rename/RnFixity.hs | 2 +- compiler/rename/RnNames.hs | 16 +++---- compiler/rename/RnSource.hs | 70 ++++++++++++++--------------- compiler/rename/RnSplice.hs | 14 +++--- compiler/rename/RnTypes.hs | 22 ++++----- compiler/typecheck/Inst.hs | 2 +- compiler/typecheck/TcAnnotations.hs | 2 +- compiler/typecheck/TcArrows.hs | 8 ++-- compiler/typecheck/TcBinds.hs | 6 +-- compiler/typecheck/TcDefaults.hs | 6 +-- compiler/typecheck/TcDeriv.hs | 10 ++--- compiler/typecheck/TcEnv.hs | 12 ++--- compiler/typecheck/TcExpr.hs | 10 ++--- compiler/typecheck/TcHsSyn.hs | 52 +++++++++++----------- compiler/typecheck/TcHsType.hs | 24 +++++----- compiler/typecheck/TcInstDcls.hs | 4 +- compiler/typecheck/TcMatches.hs | 18 ++++---- compiler/typecheck/TcPatSyn.hs | 8 ++-- compiler/typecheck/TcRnDriver.hs | 8 ++-- compiler/typecheck/TcRnTypes.hs | 8 ++-- compiler/typecheck/TcRules.hs | 6 +-- compiler/typecheck/TcSigs.hs | 8 ++-- compiler/typecheck/TcSplice.hs | 6 +-- compiler/typecheck/TcTyClsDecls.hs | 48 ++++++++++---------- utils/haddock | 2 +- 52 files changed, 486 insertions(+), 441 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 2d9e36d51f76445ea7f459b6c454750110a65df0 From git at git.haskell.org Wed Mar 20 05:10:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:35 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Implement head.hackage jobs (acf2129) Message-ID: <20190320051035.967613A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/acf2129d49989071e296634711e3f4d9ebed6ee0/ghc >--------------------------------------------------------------- commit acf2129d49989071e296634711e3f4d9ebed6ee0 Author: Ben Gamari Date: Wed Feb 27 23:33:12 2019 -0500 gitlab-ci: Implement head.hackage jobs >--------------------------------------------------------------- acf2129d49989071e296634711e3f4d9ebed6ee0 .gitlab-ci.yml | 39 +++++++++++++++++++++ .gitlab/start-head.hackage.sh | 79 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cca7551..c135c45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,7 @@ stages: - full-build - cleanup # See Note [Cleanup on Windows] - packaging + - hackage ############################################################ # Runner Tags @@ -577,3 +578,41 @@ source-tarball: - make sdist - mv sdistprep/*.xz . - make show VALUE=version > version + + +############################################################ +# Testing via head.hackage +############################################################ + +# Triggering jobs in the ghc/head.hackage project requires that we have a job +# token for that repository. Furthermore the head.hackage CI job must have +# access to an unprivileged access token with the ability to query the ghc/ghc +# project such that it can find the job ID of the fedora27 job for the current +# pipeline. + +.hackage: + stage: hackage + image: ghcci/x86_64-linux-deb9:0.2 + tags: + - x86_64-linux + dependencies: [] + variables: + HEAD_HACKAGE_PROJECT_ID: "78" + script: + - bash .gitlab/start-head.hackage.sh + +hackage: + extends: .hackage + when: manual + +hackage-label: + extends: .hackage + only: + variables: + - $CI_MERGE_REQUEST_LABELS =~ /.*user-facing.*/ + +nightly-hackage: + extends: .hackage + only: + variables: + - $NIGHTLY diff --git a/.gitlab/start-head.hackage.sh b/.gitlab/start-head.hackage.sh new file mode 100644 index 0000000..d27045b --- /dev/null +++ b/.gitlab/start-head.hackage.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +set -e + +# Start a head.hackage job and wait for completion. Expected to be called from +# GitLab CI. + +if [ -z "$HEAD_HACKAGE_TRIGGER_TOKEN" ]; then + echo "Error: Expected head.hackage trigger token in HEAD_HACKAGE_TRIGGER_TOKEN" + exit 1 +fi + +if [ -z "$CI_PIPELINE_ID" ]; then + echo "Error: Expected pipeline id in CI_PIPELINE_ID" + exit 1 +fi + +if [ -z "$HEAD_HACKAGE_PROJECT_ID" ]; then + HEAD_HACKAGE_PROJECT_ID="78" +fi + +# Start pipeline +curl --silent --show-error \ + --request POST \ + -F "token=$HEAD_HACKAGE_TRIGGER_TOKEN" \ + -F "ref=gitlab-ci-nix" \ + -F "variables[GHC_PIPELINE_ID]=$CI_PIPELINE_ID" \ + https://gitlab.haskell.org/api/v4/projects/$HEAD_HACKAGE_PROJECT_ID/trigger/pipeline \ + | tee resp.json + +echo +pipeline_id=$(jq .id < resp.json) +url=$(jq .web_url < resp.json) +echo +echo "Started head.hackage pipeline $pipeline_id: $url" + +# Wait for completion +running= +echo "Waiting for build to complete..." +while true; do + sleep 10 + curl --silent --show-error \ + --request GET \ + -F "job_token=$CI_JOB_TOKEN" \ + https://gitlab.haskell.org/api/v4/projects/$HEAD_HACKAGE_PROJECT_ID/pipelines/$pipeline_id \ + > resp.json + status=$(jq .status < resp.json) + + case $status in + "\"pending\"") + ;; + "\"running\"") + if [ -z "$running" ]; then + echo "Pipeline $pipeline_id is now running." + running=1 + fi + ;; + "\"success\"") + echo "Pipeline $pipeline_id finished successfully." + exit 0 + ;; + "\"failed\"") + echo "Pipeline $pipeline_id failed." + exit 1 + ;; + "\"canceled\"") + echo "Pipeline $pipeline_id was canceled." + exit 1 + ;; + "\"skipped\"") + echo "Pipeline $pipeline_id was skipped." + exit 1 + ;; + *) + cat resp.json + echo "Error: Unknown pipeline status $status" + exit 2 + ;; + esac +done From git at git.haskell.org Wed Mar 20 05:10:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:38 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Implement support for i386/Windows bindists (71648c3) Message-ID: <20190320051038.9CFAA3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/71648c35ad243396433d017da9ce18bea603d1ce/ghc >--------------------------------------------------------------- commit 71648c35ad243396433d017da9ce18bea603d1ce Author: Ben Gamari Date: Tue Mar 5 16:41:55 2019 -0500 gitlab-ci: Implement support for i386/Windows bindists >--------------------------------------------------------------- 71648c35ad243396433d017da9ce18bea603d1ce .gitlab-ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++----------- .gitlab/win32-init.sh | 14 +++++++++++- 2 files changed, 63 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c135c45..5f741e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -394,7 +394,7 @@ validate-x86_64-linux-fedora27: # Validation via Pipelines (Windows) ############################################################ -.validate-windows: +.build-windows: before_script: - git clean -xdf - git submodule foreach git clean -xdf @@ -420,29 +420,26 @@ validate-x86_64-linux-fedora27: dependencies: [] variables: FORCE_SYMLINKS: 1 + LANG: "en_US.UTF-8" cache: paths: - cabal-cache - ghc-8.6.2 - ghc-tarballs -validate-x86_64-windows-hadrian: - extends: .validate-windows +.build-windows-hadrian: + extends: .build-windows stage: full-build variables: GHC_VERSION: "8.6.2" - LANG: "en_US.UTF-8" script: - | - set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx binary-dist" - mv _build/bindist/ghc*.tar.xz ghc.tar.xz # FIXME: Testsuite disabled due to #16156. # - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cache: - key: x86_64-windows tags: - x86_64-windows artifacts: @@ -450,36 +447,76 @@ validate-x86_64-windows-hadrian: paths: - ghc.tar.xz -validate-x86_64-windows: - extends: .validate-windows +validate-x86_64-windows-hadrian: + extends: .build-windows-hadrian + variables: + MSYSTEM: MINGW64 + cache: + key: x86_64-windows-hadrian + +nightly-i386-windows-hadrian: + extends: .build-windows-hadrian + variables: + MSYSTEM: MINGW32 + only: + variables: + - $NIGHTLY + cache: + key: i386-windows-hadrian + +.build-windows-make: + extends: .build-windows stage: full-build # due to #16084 allow_failure: true variables: GHC_VERSION: "8.6.2" - LANG: "en_US.UTF-8" BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz" script: - | - set MSYSTEM=MINGW64 python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`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 "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' - cache: - key: x86_64-windows tags: - x86_64-windows artifacts: when: always + expire_in: 2 week reports: junit: junit.xml paths: - ghc-*.tar.xz - junit.xml +validate-x86_64-windows: + extends: .build-windows-make + variables: + MSYSTEM: MINGW64 + cache: + key: x86_64-windows + +release-i386-windows: + extends: .build-windows-make + only: + - tags + variables: + MSYSTEM: MINGW32 + cache: + key: i386-windows + +nightly-i386-windows: + extends: .build-windows-make + only: + variables: + - $NIGHTLY + variables: + MSYSTEM: MINGW32 + cache: + key: i386-windows + ############################################################ # Cleanup ############################################################ diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh index dce9be8..aacb6d7 100644 --- a/.gitlab/win32-init.sh +++ b/.gitlab/win32-init.sh @@ -10,7 +10,19 @@ if [ -d "`pwd`/cabal-cache" ]; then fi if [ ! -e $toolchain/bin/ghc ]; then - curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-mingw32.tar.xz | tar -xJ + case $MSYSTEM in + MINGW32) + triple="i386-unknown-mingw32" + ;; + MINGW64) + triple="x86_64-unknown-mingw32" + ;; + *) + echo "win32-init: Unknown MSYSTEM $MSYSTEM" + exit 1 + ;; + esac + curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-$triple.tar.xz | tar -xJ mv ghc-$GHC_VERSION toolchain fi From git at git.haskell.org Wed Mar 20 05:10:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:41 +0000 (UTC) Subject: [commit: ghc] master: err: clean up error handler (d94ca74) Message-ID: <20190320051041.A54803A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d94ca74f2c083c86be1799bf1534db078ab611a6/ghc >--------------------------------------------------------------- commit d94ca74f2c083c86be1799bf1534db078ab611a6 Author: Tamar Christina Date: Mon Dec 31 22:49:49 2018 +0000 err: clean up error handler >--------------------------------------------------------------- d94ca74f2c083c86be1799bf1534db078ab611a6 rts/win32/veh_excn.c | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/rts/win32/veh_excn.c b/rts/win32/veh_excn.c index 2d9de52..b86abe6 100644 --- a/rts/win32/veh_excn.c +++ b/rts/win32/veh_excn.c @@ -92,14 +92,9 @@ // Registered exception handler PVOID __hs_handle = NULL; LPTOP_LEVEL_EXCEPTION_FILTER oldTopFilter = NULL; -bool crash_dump = false; -bool filter_called = false; long WINAPI __hs_exception_handler(struct _EXCEPTION_POINTERS *exception_data) { - if (!crash_dump && filter_called) - return EXCEPTION_CONTINUE_EXECUTION; - long action = EXCEPTION_CONTINUE_SEARCH; int exit_code = EXIT_FAILURE; ULONG_PTR what; @@ -107,7 +102,9 @@ long WINAPI __hs_exception_handler(struct _EXCEPTION_POINTERS *exception_data) // When the system unwinds the VEH stack after having handled an excn, // return immediately. - if ((exception_data->ExceptionRecord->ExceptionFlags & EH_UNWINDING) == 0) + if (exception_data + && exception_data->ExceptionRecord + && (exception_data->ExceptionRecord->ExceptionFlags & EH_UNWINDING) ==0) { // Error handling cases covered by this implementation. switch (exception_data->ExceptionRecord->ExceptionCode) { @@ -122,20 +119,31 @@ long WINAPI __hs_exception_handler(struct _EXCEPTION_POINTERS *exception_data) action = EXCEPTION_CONTINUE_EXECUTION; break; case EXCEPTION_ACCESS_VIOLATION: - what = exception_data->ExceptionRecord->ExceptionInformation[0]; - fprintf(stderr, "Access violation in generated code" - " when %s 0x%" PRIxPTR "\n" - , what == 0 ? "reading" - : what == 1 ? "writing" - : what == 8 ? "executing data at" - : "?" - , (uintptr_t) exception_data - ->ExceptionRecord - ->ExceptionInformation[1] + { + if (exception_data->ExceptionRecord->NumberParameters < 2) + { + fprintf(stderr, "Access violation in generated code. " + "Empty exception record."); + } + else + { + what = exception_data->ExceptionRecord + ->ExceptionInformation[0]; + fprintf(stderr, "Access violation in generated code" + " when %s 0x%" PRIxPTR "\n" + , what == 0 ? "reading" + : what == 1 ? "writing" + : what == 8 ? "executing data at" + : "?" + , (uintptr_t) exception_data + ->ExceptionRecord + ->ExceptionInformation[1] ); + } action = EXCEPTION_CONTINUE_EXECUTION; exit_code = SIGSEGV; break; + } default:; } @@ -154,19 +162,22 @@ long WINAPI __hs_exception_handler(struct _EXCEPTION_POINTERS *exception_data) return action; } +/* Registered top level exception filter. We're not very interested in handling + the error here, that's why we have __hs_exception_handler, but we do want + to register the fact that the filter was called. This allows us to prevent + continuing to run when the exception was completely unhandled. + EXCEPTION_CONTINUE_EXECUTION is returned so that the OS gives the VEH + handlers a chance to run. */ long WINAPI __hs_exception_filter(struct _EXCEPTION_POINTERS *exception_data) { - filter_called = true; long result = EXCEPTION_CONTINUE_EXECUTION; if (oldTopFilter) { result = (*oldTopFilter)(exception_data); if (EXCEPTION_CONTINUE_SEARCH == result) result = EXCEPTION_CONTINUE_EXECUTION; - return result; } - crash_dump = true; return result; } From git at git.haskell.org Wed Mar 20 05:10:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:44 +0000 (UTC) Subject: [commit: ghc] master: Bump Cabal submodule to 3.0 (398f2cb) Message-ID: <20190320051044.ADF7D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/398f2cbc6af6fcb6135ba2d56c154869bea071a0/ghc >--------------------------------------------------------------- commit 398f2cbc6af6fcb6135ba2d56c154869bea071a0 Author: Ben Gamari Date: Wed Mar 13 16:37:29 2019 -0400 Bump Cabal submodule to 3.0 Metric Increase: haddock.Cabal >--------------------------------------------------------------- 398f2cbc6af6fcb6135ba2d56c154869bea071a0 hadrian/hadrian.cabal | 2 +- libraries/Cabal | 2 +- utils/check-api-annotations/check-api-annotations.cabal | 2 +- utils/check-ppr/check-ppr.cabal | 2 +- utils/ghc-cabal/ghc-cabal.cabal | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index a0b3648..266602f 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -118,7 +118,7 @@ executable hadrian other-extensions: MultiParamTypeClasses , TypeFamilies build-depends: base >= 4.8 && < 5 - , Cabal >= 2.5 && < 2.6 + , Cabal >= 3.0 && < 3.1 , containers >= 0.5 && < 0.7 , directory >= 1.2 && < 1.4 , extra >= 1.4.7 diff --git a/libraries/Cabal b/libraries/Cabal index fd51946..59c223f 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit fd51946bbb3850165de5f7b394fa987d1f4bd28e +Subproject commit 59c223f81288667d90e6de479e6ab5622eae610c diff --git a/utils/check-api-annotations/check-api-annotations.cabal b/utils/check-api-annotations/check-api-annotations.cabal index bc9698c..12d0884 100644 --- a/utils/check-api-annotations/check-api-annotations.cabal +++ b/utils/check-api-annotations/check-api-annotations.cabal @@ -24,6 +24,6 @@ Executable check-api-annotations Build-Depends: base >= 4 && < 5, containers, - Cabal >= 2.5 && < 2.6, + Cabal >= 3.0 && < 3.1, directory, ghc diff --git a/utils/check-ppr/check-ppr.cabal b/utils/check-ppr/check-ppr.cabal index 4257a88..2438724 100644 --- a/utils/check-ppr/check-ppr.cabal +++ b/utils/check-ppr/check-ppr.cabal @@ -25,7 +25,7 @@ Executable check-ppr Build-Depends: base >= 4 && < 5, bytestring, containers, - Cabal >= 2.5 && < 2.6, + Cabal >= 3.0 && < 3.1, directory, filepath, ghc diff --git a/utils/ghc-cabal/ghc-cabal.cabal b/utils/ghc-cabal/ghc-cabal.cabal index c2512c1..3176e5d 100644 --- a/utils/ghc-cabal/ghc-cabal.cabal +++ b/utils/ghc-cabal/ghc-cabal.cabal @@ -21,7 +21,7 @@ Executable ghc-cabal Build-Depends: base >= 3 && < 5, bytestring >= 0.10 && < 0.11, - Cabal >= 2.5 && < 2.6, + Cabal >= 3.0 && < 3.1, directory >= 1.1 && < 1.4, filepath >= 1.2 && < 1.5 From git at git.haskell.org Wed Mar 20 05:10:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:47 +0000 (UTC) Subject: [commit: ghc] master: users-guide: Update Wiki URLs to point to GitLab (89a201e) Message-ID: <20190320051047.C5E863A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/89a201e88a9313ecff4f5659c38e40136cfc0b76/ghc >--------------------------------------------------------------- commit 89a201e88a9313ecff4f5659c38e40136cfc0b76 Author: Takenobu Tani Date: Mon Mar 18 22:07:06 2019 +0900 users-guide: Update Wiki URLs to point to GitLab The user's guide uses the `ghc-wiki` macro, and substitution rules are complicated. So I manually edited `.rst` files without sed. I changed `Commentary/Latedmd` only to a different page. It is more appropriate as an example. [ci skip] >--------------------------------------------------------------- 89a201e88a9313ecff4f5659c38e40136cfc0b76 docs/users_guide/8.2.1-notes.rst | 2 +- docs/users_guide/editing-guide.rst | 8 ++++---- docs/users_guide/extending_ghc.rst | 4 ++-- docs/users_guide/ffi-chap.rst | 2 +- docs/users_guide/ghc.mk | 4 ++-- docs/users_guide/ghc_config.py.in | 2 +- docs/users_guide/glasgow_exts.rst | 14 +++++++------- docs/users_guide/intro.rst | 10 +++++----- docs/users_guide/profiling.rst | 2 +- docs/users_guide/safe_haskell.rst | 2 +- docs/users_guide/separate_compilation.rst | 4 +--- docs/users_guide/sooner.rst | 2 +- docs/users_guide/using-optimisation.rst | 2 +- 13 files changed, 28 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 89a201e88a9313ecff4f5659c38e40136cfc0b76 From git at git.haskell.org Wed Mar 20 05:10:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:50 +0000 (UTC) Subject: [commit: ghc] master: Fix typos (6a47414) Message-ID: <20190320051050.CE84C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6a47414f0cc6d538fbec7ca537ad36fbcc1a2480/ghc >--------------------------------------------------------------- commit 6a47414f0cc6d538fbec7ca537ad36fbcc1a2480 Author: Krzysztof Gogolewski Date: Mon Mar 18 19:31:19 2019 +0100 Fix typos >--------------------------------------------------------------- 6a47414f0cc6d538fbec7ca537ad36fbcc1a2480 compiler/coreSyn/CoreOpt.hs | 2 +- compiler/simplCore/Simplify.hs | 2 +- compiler/typecheck/TcBinds.hs | 2 +- compiler/typecheck/TcErrors.hs | 4 ++-- compiler/typecheck/TcMType.hs | 2 +- compiler/typecheck/TcType.hs | 2 +- testsuite/tests/simplCore/should_compile/T7360.hs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index 0f7f5fb..fe9e172 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -710,7 +710,7 @@ A more common case is when f = \x. error ".." -and again its arity increses (#15517) +and again its arity increases (#15517) -} {- ********************************************************************* diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index 0130e06..c6bd413 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -2384,7 +2384,7 @@ rebuildCase, reallyRebuildCase :: SimplEnv -> OutExpr -- Scrutinee -> InId -- Case binder - -> [InAlt] -- Alternatives (inceasing order) + -> [InAlt] -- Alternatives (increasing order) -> SimplCont -> SimplM (SimplFloats, OutExpr) diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs index 9cdc939..c8c1bc0 100644 --- a/compiler/typecheck/TcBinds.hs +++ b/compiler/typecheck/TcBinds.hs @@ -1589,7 +1589,7 @@ beta is untouchable.) Example for (E2), we generate q :: beta:1, with constraint (forall:3 a. Integral a => Int ~ beta) -The beta is untoucable, but floats out of the constraint and can +The beta is untouchable, but floats out of the constraint and can be solved absolutely fine. diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index b5d98d0..1d639d7 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -829,11 +829,11 @@ maybeReportHoleError :: ReportErrCtxt -> Ct -> ErrMsg -> TcM () maybeReportHoleError ctxt ct err -- When -XPartialTypeSignatures is on, warnings (instead of errors) are -- generated for holes in partial type signatures. - -- Unless -fwarn_partial_type_signatures is not on, + -- Unless -fwarn-partial-type-signatures is not on, -- in which case the messages are discarded. | isTypeHoleCt ct = -- For partial type signatures, generate warnings only, and do that - -- only if -fwarn_partial_type_signatures is on + -- only if -fwarn-partial-type-signatures is on case cec_type_holes ctxt of HoleError -> reportError err HoleWarn -> reportWarning (Reason Opt_WarnPartialTypeSignatures) err diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index e46cb50..a315611 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -1084,7 +1084,7 @@ Note [CandidatesQTvs determinism and order] accumulating-parameter style for candidateQTyVarsOfType so that we add variables one at a time, left to right. That means we tend to produce the variables in left-to-right order. This is just to make - it bit more predicatable for the programmer. + it bit more predictable for the programmer. Note [Naughty quantification candidates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 14807da..7a991a6 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -681,7 +681,7 @@ isSigMaybe _ = Nothing {- ********************************************************************* * * - Untoucable type variables + Untouchable type variables * * ********************************************************************* -} diff --git a/testsuite/tests/simplCore/should_compile/T7360.hs b/testsuite/tests/simplCore/should_compile/T7360.hs index 4e4703c..2bf31f2 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.hs +++ b/testsuite/tests/simplCore/should_compile/T7360.hs @@ -15,7 +15,7 @@ fun1 x = case x of Foo3 {} -> () fun2 x = (fun1 Foo1, -- Keep -ddump-simpl output - -- in a predicatable order + -- in a predictable order case x of [] -> L.length x (_:_) -> L.length x) From git at git.haskell.org Wed Mar 20 05:10:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:53 +0000 (UTC) Subject: [commit: ghc] master: Replace nOfThem by replicate (98ff1a5) Message-ID: <20190320051053.D41363A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/98ff1a5696dd10233229c790eb9642a26e13a9a3/ghc >--------------------------------------------------------------- commit 98ff1a5696dd10233229c790eb9642a26e13a9a3 Author: Krzysztof Gogolewski Date: Mon Mar 18 19:22:10 2019 +0100 Replace nOfThem by replicate >--------------------------------------------------------------- 98ff1a5696dd10233229c790eb9642a26e13a9a3 compiler/hsSyn/HsUtils.hs | 2 +- compiler/prelude/TysWiredIn.hs | 6 +++--- compiler/typecheck/TcGenDeriv.hs | 4 ++-- compiler/typecheck/TcHsType.hs | 6 +++--- compiler/typecheck/TcMType.hs | 4 ++-- compiler/utils/Util.hs | 5 +---- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs index fa8ec14..ea3c6aa 100644 --- a/compiler/hsSyn/HsUtils.hs +++ b/compiler/hsSyn/HsUtils.hs @@ -456,7 +456,7 @@ nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon [])) nlWildConPat :: DataCon -> LPat GhcPs nlWildConPat con = noLoc (ConPatIn (noLoc (getRdrName con)) - (PrefixCon (nOfThem (dataConSourceArity con) + (PrefixCon (replicate (dataConSourceArity con) nlWildPat))) nlWildPat :: LPat GhcPs diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index aaeb902..5638b49 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -870,7 +870,7 @@ mk_tuple Boxed arity = (tycon, tuple_con) tycon = mkTupleTyCon tc_name tc_binders tc_res_kind tc_arity tuple_con BoxedTuple flavour - tc_binders = mkTemplateAnonTyConBinders (nOfThem arity liftedTypeKind) + tc_binders = mkTemplateAnonTyConBinders (replicate arity liftedTypeKind) tc_res_kind = liftedTypeKind tc_arity = arity flavour = VanillaAlgTyCon (mkPrelTyConRepName tc_name) @@ -895,7 +895,7 @@ mk_tuple Unboxed arity = (tycon, tuple_con) -- See Note [Unboxed tuple RuntimeRep vars] in TyCon -- Kind: forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> # - tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy) + tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) tc_res_kind = unboxedTupleKind rr_tys @@ -1015,7 +1015,7 @@ mk_sum arity = (tycon, sum_cons) -- Unboxed sums are currently not Typeable due to efficiency concerns. See #13276. rep_name = Nothing -- Just $ mkPrelTyConRepName tc_name - tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy) + tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) tyvars = binderVars tc_binders diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs index 4d731db..bb4b643 100644 --- a/compiler/typecheck/TcGenDeriv.hs +++ b/compiler/typecheck/TcGenDeriv.hs @@ -687,9 +687,9 @@ gen_Bounded_binds loc tycon arity = dataConSourceArity data_con_1 min_bound_1con = mkHsVarBind loc minBound_RDR $ - nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR) + nlHsVarApps data_con_1_RDR (replicate arity minBound_RDR) max_bound_1con = mkHsVarBind loc maxBound_RDR $ - nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR) + nlHsVarApps data_con_1_RDR (replicate arity maxBound_RDR) {- ************************************************************************ diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 489a35c..e0bf255 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -889,9 +889,9 @@ tupKindSort_maybe k tc_tuple :: HsType GhcRn -> TcTyMode -> TupleSort -> [LHsType GhcRn] -> TcKind -> TcM TcType tc_tuple rn_ty mode tup_sort tys exp_kind = do { arg_kinds <- case tup_sort of - BoxedTuple -> return (nOfThem arity liftedTypeKind) - UnboxedTuple -> mapM (\_ -> newOpenTypeKind) tys - ConstraintTuple -> return (nOfThem arity constraintKind) + BoxedTuple -> return (replicate arity liftedTypeKind) + UnboxedTuple -> replicateM arity newOpenTypeKind + ConstraintTuple -> return (replicate arity constraintKind) ; tau_tys <- zipWithM (tc_lhs_type mode) tys arg_kinds ; finish_tuple rn_ty tup_sort tau_tys arg_kinds exp_kind } where diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index d6a753f..e46cb50 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -148,7 +148,7 @@ newMetaKindVar ; return (mkTyVarTy kv) } newMetaKindVars :: Int -> TcM [TcKind] -newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ()) +newMetaKindVars n = replicateM n newMetaKindVar {- ************************************************************************ @@ -944,7 +944,7 @@ newFlexiTyVarTy kind = do return (mkTyVarTy tc_tyvar) newFlexiTyVarTys :: Int -> Kind -> TcM [TcType] -newFlexiTyVarTys n kind = mapM newFlexiTyVarTy (nOfThem n kind) +newFlexiTyVarTys n kind = replicateM n (newFlexiTyVarTy kind) newOpenTypeKind :: TcM TcKind newOpenTypeKind diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 6730881..9e67a43 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -26,7 +26,7 @@ module Util ( mapFst, mapSnd, chkAppend, mapAndUnzip, mapAndUnzip3, mapAccumL2, - nOfThem, filterOut, partitionWith, + filterOut, partitionWith, dropWhileEndLE, spanEnd, last2, lastMaybe, @@ -458,9 +458,6 @@ mapAccumL2 f s1 s2 xs = (s1', s2', ys) (s1', s2', y) -> ((s1', s2'), y)) (s1, s2) xs -nOfThem :: Int -> a -> [a] -nOfThem n thing = replicate n thing - -- | @atLength atLen atEnd ls n@ unravels list @ls@ to position @n at . Precisely: -- -- @ From git at git.haskell.org Wed Mar 20 05:10:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:56 +0000 (UTC) Subject: [commit: ghc] master: Remove deprecated reinitializeGlobals (c045bd7) Message-ID: <20190320051056.DAF633A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c045bd7cfaef2f4b6753e5a19637a658dce9e58d/ghc >--------------------------------------------------------------- commit c045bd7cfaef2f4b6753e5a19637a658dce9e58d Author: Krzysztof Gogolewski Date: Mon Mar 18 19:36:26 2019 +0100 Remove deprecated reinitializeGlobals >--------------------------------------------------------------- c045bd7cfaef2f4b6753e5a19637a658dce9e58d compiler/simplCore/CoreMonad.hs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs index 4cdb231..d99686a 100644 --- a/compiler/simplCore/CoreMonad.hs +++ b/compiler/simplCore/CoreMonad.hs @@ -37,9 +37,6 @@ module CoreMonad ( liftIO, liftIOWithCount, liftIO1, liftIO2, liftIO3, liftIO4, - -- ** Global initialization - reinitializeGlobals, - -- ** Dealing with annotations getAnnotations, getFirstAnnotations, @@ -727,10 +724,6 @@ getPackageFamInstEnv = do eps <- liftIO $ hscEPS hsc_env return $ eps_fam_inst_env eps -{-# DEPRECATED reinitializeGlobals "It is not necessary to call reinitializeGlobals. Since GHC 8.2, this function is a no-op and will be removed in GHC 8.4" #-} -reinitializeGlobals :: CoreM () -reinitializeGlobals = return () - {- ************************************************************************ * * From git at git.haskell.org Wed Mar 20 05:10:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:10:59 +0000 (UTC) Subject: [commit: ghc] master: Simplify monadic code (1e26e60) Message-ID: <20190320051059.E12F23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/1e26e60dd21c235678447ee903afbf15228e40de/ghc >--------------------------------------------------------------- commit 1e26e60dd21c235678447ee903afbf15228e40de Author: Krzysztof Gogolewski Date: Mon Mar 18 19:34:00 2019 +0100 Simplify monadic code >--------------------------------------------------------------- 1e26e60dd21c235678447ee903afbf15228e40de compiler/main/DriverPipeline.hs | 9 ++++----- compiler/main/GHC.hs | 14 ++++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 5866568..458a118 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1283,12 +1283,11 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags = do -- LLVM from version 3.0 onwards doesn't support the OS X system -- assembler, so we use clang as the assembler instead. (#5636) - let whichAsProg | hscTarget dflags == HscLlvm && - platformOS (targetPlatform dflags) == OSDarwin - = return SysTools.runClang - | otherwise = return SysTools.runAs + let as_prog | hscTarget dflags == HscLlvm && + platformOS (targetPlatform dflags) == OSDarwin + = SysTools.runClang + | otherwise = SysTools.runAs - as_prog <- whichAsProg let cmdline_include_paths = includePaths dflags let pic_c_flags = picCCOpts dflags diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 4e6e0f4..9fa8911 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -683,14 +683,12 @@ checkNewInteractiveDynFlags :: MonadIO m => DynFlags -> m DynFlags checkNewInteractiveDynFlags dflags0 = do -- We currently don't support use of StaticPointers in expressions entered on -- the REPL. See #12356. - dflags1 <- - if xopt LangExt.StaticPointers dflags0 - then do liftIO $ printOrThrowWarnings dflags0 $ listToBag - [mkPlainWarnMsg dflags0 interactiveSrcSpan - $ text "StaticPointers is not supported in GHCi interactive expressions."] - return $ xopt_unset dflags0 LangExt.StaticPointers - else return dflags0 - return dflags1 + if xopt LangExt.StaticPointers dflags0 + then do liftIO $ printOrThrowWarnings dflags0 $ listToBag + [mkPlainWarnMsg dflags0 interactiveSrcSpan + $ text "StaticPointers is not supported in GHCi interactive expressions."] + return $ xopt_unset dflags0 LangExt.StaticPointers + else return dflags0 -- %************************************************************************ From git at git.haskell.org Wed Mar 20 05:11:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:11:02 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Bump docker images (6d19ad7) Message-ID: <20190320051102.E50DE3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6d19ad72f6a7283dfbfa6facb58063c0ff777af8/ghc >--------------------------------------------------------------- commit 6d19ad72f6a7283dfbfa6facb58063c0ff777af8 Author: Ben Gamari Date: Mon Mar 18 23:51:35 2019 -0400 gitlab-ci: Bump docker images To install lndir and un-break the source distribution job. >--------------------------------------------------------------- 6d19ad72f6a7283dfbfa6facb58063c0ff777af8 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f741e1..7ccc030 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 6d19c3adc1f5c28c82aed8c5b1ac40931ac60f3f + DOCKER_REV: 7cbd823abe7eddd9c52a2e93062035b1c863605f before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Wed Mar 20 05:11:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:11:05 +0000 (UTC) Subject: [commit: ghc] master: Update .gitlab-ci.yml (c7a84a6) Message-ID: <20190320051105.EC7643A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c7a84a6067311c204f6fa459e5f59b0958863118/ghc >--------------------------------------------------------------- commit c7a84a6067311c204f6fa459e5f59b0958863118 Author: Matthew Pickering Date: Tue Mar 19 06:02:07 2019 -0400 Update .gitlab-ci.yml >--------------------------------------------------------------- c7a84a6067311c204f6fa459e5f59b0958863118 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ccc030..a47ee7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 7cbd823abe7eddd9c52a2e93062035b1c863605f + DOCKER_REV: 07bd4acf4f91b56e22389d7b7f6c13486a7b63de before_script: - python3 .gitlab/fix-submodules.py From git at git.haskell.org Wed Mar 20 05:11:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 05:11:08 +0000 (UTC) Subject: [commit: ghc] master's head updated: Update .gitlab-ci.yml (c7a84a6) Message-ID: <20190320051108.CBC2D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: b832689 gitlab-ci: Always build fedora27 acf2129 gitlab-ci: Implement head.hackage jobs 71648c3 gitlab-ci: Implement support for i386/Windows bindists d94ca74 err: clean up error handler 398f2cb Bump Cabal submodule to 3.0 89a201e users-guide: Update Wiki URLs to point to GitLab 98ff1a5 Replace nOfThem by replicate 6a47414 Fix typos 1e26e60 Simplify monadic code c045bd7 Remove deprecated reinitializeGlobals 6d19ad7 gitlab-ci: Bump docker images c7a84a6 Update .gitlab-ci.yml From git at git.haskell.org Wed Mar 20 15:27:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:29 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-in-ghci-qol' created Message-ID: <20190320152729.0C61F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-in-ghci-qol Referencing: 8f37f3732e5d538449cbca748d6672f517b3c5a7 From git at git.haskell.org Wed Mar 20 15:27:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:31 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16466' created Message-ID: <20190320152731.0C25C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16466 Referencing: b817d41381f7bdc1631dffbc7e00a0dfbc7edb64 From git at git.haskell.org Wed Mar 20 15:27:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:33 +0000 (UTC) Subject: [commit: ghc] branch 'wip/smp-h-comment' created Message-ID: <20190320152733.0CE133A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/smp-h-comment Referencing: bd97234fbf154496c050d2016926b3346b06bb11 From git at git.haskell.org Wed Mar 20 15:27:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:36 +0000 (UTC) Subject: [commit: ghc] wip/T16466: base: Depend upon shlwapi on Windows (b817d41) Message-ID: <20190320152736.9F89E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16466 Link : http://ghc.haskell.org/trac/ghc/changeset/b817d41381f7bdc1631dffbc7e00a0dfbc7edb64/ghc >--------------------------------------------------------------- commit b817d41381f7bdc1631dffbc7e00a0dfbc7edb64 Author: Ben Gamari Date: Wed Mar 20 09:16:15 2019 -0400 base: Depend upon shlwapi on Windows As noted in #16466, `System.Environment.getExecutablePath` depends upon `PathFileExistsW` which is defined by `shlwapi`. Fixes #16466. >--------------------------------------------------------------- b817d41381f7bdc1631dffbc7e00a0dfbc7edb64 libraries/base/base.cabal | 3 ++- libraries/base/tests/System/T16466.hs | 6 ++++++ libraries/base/tests/System/all.T | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 4e809e7..630ff91 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -365,7 +365,8 @@ Library -- mingw32: Unfortunately required because of a resource leak between -- mingwex and mingw32. the __math_err symbol is defined in -- mingw32 which is required by mingwex. - extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex + -- shlwapi: provides PathFileExistsW + extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex, shlwapi exposed-modules: GHC.IO.Encoding.CodePage.API GHC.IO.Encoding.CodePage.Table diff --git a/libraries/base/tests/System/T16466.hs b/libraries/base/tests/System/T16466.hs new file mode 100644 index 0000000..28cb259 --- /dev/null +++ b/libraries/base/tests/System/T16466.hs @@ -0,0 +1,6 @@ +import System.Environment + +-- Make sure that getExecutablePath works on Windows. See #16466. +main :: IO () +main = () <$ getExecutablePath + diff --git a/libraries/base/tests/System/all.T b/libraries/base/tests/System/all.T index 3cadf35..50ebb59 100644 --- a/libraries/base/tests/System/all.T +++ b/libraries/base/tests/System/all.T @@ -7,3 +7,4 @@ test('T5930', normal, compile_and_run, ['']) test('system001', when(opsys("mingw32"), skip), \ compile_and_run, ['']) test('Timeout001', normal, compile_and_run, ['']) +test('T16466', normal, compile_and_run, ['']) From git at git.haskell.org Wed Mar 20 15:27:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:39 +0000 (UTC) Subject: [commit: ghc] wip/ghc-in-ghci-qol: Refactor ./hadrian/ghci.sh for better error messages (8f37f37) Message-ID: <20190320152739.A7B8B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-in-ghci-qol Link : http://ghc.haskell.org/trac/ghc/changeset/8f37f3732e5d538449cbca748d6672f517b3c5a7/ghc >--------------------------------------------------------------- commit 8f37f3732e5d538449cbca748d6672f517b3c5a7 Author: Matthew Pickering Date: Wed Mar 20 14:12:53 2019 +0000 Refactor ./hadrian/ghci.sh for better error messages By separating these two lines, if the first command fails then `ghci` is not loaded. Before it would still load ghci but display lots of errors about not being able to find modules. >--------------------------------------------------------------- 8f37f3732e5d538449cbca748d6672f517b3c5a7 hadrian/ghci.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadrian/ghci.sh b/hadrian/ghci.sh index 4a70946..4c9b9c6 100755 --- a/hadrian/ghci.sh +++ b/hadrian/ghci.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash -ghci $(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@") -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +set -e + +GHC_FLAGS=$(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@") +ghci $GHC_FLAGS -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs From git at git.haskell.org Wed Mar 20 15:27:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 20 Mar 2019 15:27:42 +0000 (UTC) Subject: [commit: ghc] wip/smp-h-comment: Fix specification of load_load_barrier [skip-ci] (bd97234) Message-ID: <20190320152742.ABF203A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/smp-h-comment Link : http://ghc.haskell.org/trac/ghc/changeset/bd97234fbf154496c050d2016926b3346b06bb11/ghc >--------------------------------------------------------------- commit bd97234fbf154496c050d2016926b3346b06bb11 Author: Peter Trommler Date: Wed Mar 20 16:02:44 2019 +0100 Fix specification of load_load_barrier [skip-ci] >--------------------------------------------------------------- bd97234fbf154496c050d2016926b3346b06bb11 includes/stg/SMP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h index 4020aef..229115e72 100644 --- a/includes/stg/SMP.h +++ b/includes/stg/SMP.h @@ -82,7 +82,7 @@ EXTERN_INLINE void busy_wait_nop(void); * Various kinds of memory barrier. * write_barrier: prevents future stores occurring before prededing stores. * store_load_barrier: prevents future loads occurring before preceding stores. - * load_load_barrier: prevents future loads occurring before earlier stores. + * load_load_barrier: prevents future loads occurring before earlier loads. * * Reference for these: "The JSR-133 Cookbook for Compiler Writers" * http://gee.cs.oswego.edu/dl/jmm/cookbook.html From git at git.haskell.org Thu Mar 21 17:00:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:01 +0000 (UTC) Subject: [commit: ghc] branch 'wip/windows-32bit' created Message-ID: <20190321170001.5A7DD3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/windows-32bit Referencing: 8fadd9b99ceface290d4bbe3b0f85d49a44eef0a From git at git.haskell.org Thu Mar 21 17:00:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:03 +0000 (UTC) Subject: [commit: ghc] branch 'wip/deploy-docs' created Message-ID: <20190321170003.5AF823A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/deploy-docs Referencing: 2158569dd25cfe7b0a93aaa83152361c7efe674a From git at git.haskell.org Thu Mar 21 17:00:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:05 +0000 (UTC) Subject: [commit: ghc] branch 'wip/packaging-fail' created Message-ID: <20190321170005.5C5583A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/packaging-fail Referencing: 022bfbcbbd9c130b3a40d664ed19c649a5a2b457 From git at git.haskell.org Thu Mar 21 17:00:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:07 +0000 (UTC) Subject: [commit: ghc] branch 'wip/run-nofib' created Message-ID: <20190321170007.5D3863A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/run-nofib Referencing: ab2210b2b63fa6ccaefae20c31094b6e48a352d9 From git at git.haskell.org Thu Mar 21 17:00:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:10 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Mark T16190 as broken on Windows (b7f5d55) Message-ID: <20190321170010.680923A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/b7f5d5526ac0989fcbe0cb1aff00aaee3e2690bb/ghc >--------------------------------------------------------------- commit b7f5d5526ac0989fcbe0cb1aff00aaee3e2690bb Author: Ben Gamari Date: Mon Mar 4 18:58:55 2019 -0500 testsuite: Mark T16190 as broken on Windows There seems to be some filepath funniness due to TH embedding going on here. See #16389. >--------------------------------------------------------------- b7f5d5526ac0989fcbe0cb1aff00aaee3e2690bb testsuite/tests/perf/compiler/all.T | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index ff80c74..fed65a4 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -394,7 +394,8 @@ test ('T15164', ['-v0 -O']) test('T16190', - [ collect_stats() + [ collect_stats(), + when(opsys('mingw32'), expect_broken(16389)) ], multimod_compile, ['T16190.hs', '-v0']) From git at git.haskell.org Thu Mar 21 17:00:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:13 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Mark T5836 as broken on Windows (23b639f) Message-ID: <20190321170013.753693A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/23b639fd1b7c558383792c48bd35f457b01b2515/ghc >--------------------------------------------------------------- commit 23b639fd1b7c558383792c48bd35f457b01b2515 Author: Ben Gamari Date: Mon Mar 4 18:49:01 2019 -0500 testsuite: Mark T5836 as broken on Windows See #16387. >--------------------------------------------------------------- 23b639fd1b7c558383792c48bd35f457b01b2515 testsuite/tests/ghci/scripts/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 115dfc5..e8360eb 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -136,7 +136,9 @@ test('GhciKinds', normal, ghci_script, ['GhciKinds.script']) test('T5564', normal, ghci_script, ['T5564.script']) test('Defer02', extra_files(['../../typecheck/should_run/Defer01.hs']), ghci_script, ['Defer02.script']) test('T5820', normal, ghci_script, ['T5820.script']) -test('T5836', normal, ghci_script, ['T5836.script']) +test('T5836', + when(opsys('mingw32'), expect_broken(16387)), + ghci_script, ['T5836.script']) test('T5979', [reqlib('transformers'), normalise_slashes, From git at git.haskell.org Thu Mar 21 17:00:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:16 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite/plugins: Add multi_cpu_race modifier on Windows (a0c31f7) Message-ID: <20190321170016.9A2443A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/a0c31f78647efc1f9aba6c7ac52f64237143b539/ghc >--------------------------------------------------------------- commit a0c31f78647efc1f9aba6c7ac52f64237143b539 Author: Ben Gamari Date: Mon Mar 4 19:01:43 2019 -0500 testsuite/plugins: Add multi_cpu_race modifier on Windows A few tests previously failed with various failure modes. For instance, `plugin-recomp-change` fails with: ``` Wrong exit code for plugin-recomp-change()(expected 0 , actual 2 ) Stderr ( plugin-recomp-change ): Simple Plugin Passes Queried Got options: Simple Plugin Pass Run C://GitLabRunner//builds//8fc0e283//0//ghc//ghc//inplace//mingw//bin/ld.exe: cannot find -lHSplugin-recompilation-0.1-CPeObcGoBuvHdwBnpK9jQq collect2.exe: error: ld returned 1 exit status `gcc.exe' failed in phase `Linker'. (Exit code: 1) make[2]: *** [Makefile:112: plugin-recomp-change] Error 1 *** unexpected failure for plugin-recomp-change(normal) ``` It's unclear whether the ghc-pkg concurrency issue mentioned in all.T is the culprit but the set of tests that fail overlaps strongly with the set of tests that lack the `multi_cpu_race` modifier. Let's see if adding it fixes them. >--------------------------------------------------------------- a0c31f78647efc1f9aba6c7ac52f64237143b539 testsuite/tests/plugins/all.T | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index f53d9aa..1834e3b 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -1,4 +1,4 @@ -setTestOpts(req_interp) +setTestOpts([req_interp, when(opsys('mingw32'), multi_cpu_race)]) # The implementation of ghc-pkg doesn't seem to be multi-concurrent process safe # on windows. These tests which mutate the package db need to be run @@ -7,130 +7,111 @@ setTestOpts(req_interp) test('plugins01', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], makefile_test, []) test('plugins02', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.plugin_way_flags]) test('plugins03', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistentPlugin -package simple-plugin']) test('plugins04', [extra_files(['HomePackagePlugin.hs']), - only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race)], + only_ways([config.ghc_plugin_way])], multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin']) test('plugins05', [extra_files(['HomePackagePlugin.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way])], multimod_compile_and_run, ['plugins05', '-package ghc']) test('plugins06', [extra_files(['LinkerTicklingPlugin.hs']), - when(opsys('mingw32'), multi_cpu_race), unless(have_dynamic(), skip), only_ways([config.ghc_plugin_way])], multimod_compile_and_run, ['plugins06', '-package ghc']) test('plugins07', [extra_files(['rule-defining-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.plugins07 TOP={top}')], makefile_test, []) test('plugins08', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins08 TOP={top}')], makefile_test, []) test('plugins09', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins09 TOP={top}')], makefile_test, []) test('plugins10', [extra_files(['simple-plugin/', 'QuasiQuotation.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins10 TOP={top}')], makefile_test, []) test('plugins11', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins11 TOP={top}')], makefile_test, []) test('plugins12', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins12 TOP={top}')], makefile_test, []) test('plugins13', [extra_files(['simple-plugin/', 'PluginFilteredExport.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins13 TOP={top}')], makefile_test, []) test('plugins14', [extra_files(['simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins14 TOP={top}')], makefile_test, []) test('plugins15', [extra_files(['simple-plugin/', 'MetaRemoveHelper.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins15 TOP={top}')], makefile_test, []) test('T10420', [extra_files(['rule-defining-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.T10420 TOP={top}')], makefile_test, []) test('T10294', [extra_files(['annotation-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294 TOP={top}')], makefile_test, []) test('T10294a', [extra_files(['annotation-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294a TOP={top}')], makefile_test, []) test('frontend01', [extra_files(['FrontendPlugin.hs']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), unless(have_dynamic(), expect_broken(10301))], makefile_test, []) @@ -142,14 +123,12 @@ test('T11244', test('T12567a', [extra_files(['T12567b.hs', 'simple-plugin/']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.T12567a TOP={top}')], makefile_test, []) test('T14335', [extra_files(['simple-plugin/', 'plugins01.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], compile_fail, @@ -158,7 +137,6 @@ test('T14335', test('plugin-recomp-pure', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -166,7 +144,6 @@ test('plugin-recomp-pure', test('plugin-recomp-impure', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -174,7 +151,6 @@ test('plugin-recomp-impure', test('plugin-recomp-flags', [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']), - when(opsys('mingw32'), multi_cpu_race), only_ways([config.ghc_plugin_way]), pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}') ], @@ -213,7 +189,7 @@ test('T15858', test('T16104', [extra_files(['T16104-plugin/']), pre_cmd('$MAKE -s --no-print-directory -C T16104-plugin package.T16104-plugin TOP={top}') - ], + ], makefile_test, []) test('T16260', From git at git.haskell.org Thu Mar 21 17:00:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:19 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Mark T10672 as broken (88a6e9a) Message-ID: <20190321170019.A4E0E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/88a6e9a4e596d22d1dd8b983a15781183050f51a/ghc >--------------------------------------------------------------- commit 88a6e9a4e596d22d1dd8b983a15781183050f51a Author: Ben Gamari Date: Mon Mar 4 19:16:09 2019 -0500 testsuite: Mark T10672 as broken This test, which is only run on Windows, seems to be reliably timing out. See #16390. >--------------------------------------------------------------- 88a6e9a4e596d22d1dd8b983a15781183050f51a testsuite/tests/rts/T10672/all.T | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/rts/T10672/all.T b/testsuite/tests/rts/T10672/all.T index 1e04f1b..5e0c43c 100644 --- a/testsuite/tests/rts/T10672/all.T +++ b/testsuite/tests/rts/T10672/all.T @@ -1,9 +1,11 @@ test('T10672_x64', [extra_files(['Main.hs', 'Printf.hs', 'cxxy.cpp']), - [unless(opsys('mingw32'), skip), unless(arch('x86_64'), skip)]], + unless(opsys('mingw32'), skip), unless(arch('x86_64'), skip), + when(opsys('mingw32'), expect_broken(16390))], makefile_test, ['T10672_x64']) test('T10672_x86', [extra_files(['Main.hs', 'Printf.hs', 'cxxy.cpp']), - [unless(opsys('mingw32'), skip), unless(arch('i386'), skip)]], + unless(opsys('mingw32'), skip), unless(arch('i386'), skip), + when(opsys('mingw32'), expect_broken(16390))], makefile_test, ['T10672_x86']) From git at git.haskell.org Thu Mar 21 17:00:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:22 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Don't mark T5836 as broken (d98cb76) Message-ID: <20190321170022.BBCC33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/d98cb7637a305e31de5e05a1feb9f6f2339f8cc4/ghc >--------------------------------------------------------------- commit d98cb7637a305e31de5e05a1feb9f6f2339f8cc4 Author: Ben Gamari Date: Tue Mar 5 22:47:59 2019 -0500 testsuite: Don't mark T5836 as broken I believe removing __mingw_vsnwprintf from RtsSymbols fixed #16387. >--------------------------------------------------------------- d98cb7637a305e31de5e05a1feb9f6f2339f8cc4 testsuite/tests/ghci/scripts/all.T | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index e8360eb..115dfc5 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -136,9 +136,7 @@ test('GhciKinds', normal, ghci_script, ['GhciKinds.script']) test('T5564', normal, ghci_script, ['T5564.script']) test('Defer02', extra_files(['../../typecheck/should_run/Defer01.hs']), ghci_script, ['Defer02.script']) test('T5820', normal, ghci_script, ['T5820.script']) -test('T5836', - when(opsys('mingw32'), expect_broken(16387)), - ghci_script, ['T5836.script']) +test('T5836', normal, ghci_script, ['T5836.script']) test('T5979', [reqlib('transformers'), normalise_slashes, From git at git.haskell.org Thu Mar 21 17:00:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:26 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Mark T15904 as broken on Windows (a1bda08) Message-ID: <20190321170026.01C0A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/a1bda08d6cd1fe1cb8d77c552e33f5d48936aa8c/ghc >--------------------------------------------------------------- commit a1bda08d6cd1fe1cb8d77c552e33f5d48936aa8c Author: Ben Gamari Date: Mon Mar 4 18:52:59 2019 -0500 testsuite: Mark T15904 as broken on Windows It seems to look for some sort of manifest file. See #16388. >--------------------------------------------------------------- a1bda08d6cd1fe1cb8d77c552e33f5d48936aa8c testsuite/tests/hp2ps/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/hp2ps/all.T b/testsuite/tests/hp2ps/all.T index b884ecf..4c65241 100644 --- a/testsuite/tests/hp2ps/all.T +++ b/testsuite/tests/hp2ps/all.T @@ -1 +1 @@ -test('T15904', [], makefile_test, []) +test('T15904', when(opsys('mingw32'), expect_broken(16388)), makefile_test, []) From git at git.haskell.org Thu Mar 21 17:00:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:29 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Fix expected output on Windows for various ghci tests (7cd8e33) Message-ID: <20190321170029.072733A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/7cd8e330a2c82fe048e501671b32cd2ec5b5c0d9/ghc >--------------------------------------------------------------- commit 7cd8e330a2c82fe048e501671b32cd2ec5b5c0d9 Author: Ben Gamari Date: Mon Mar 4 18:43:35 2019 -0500 testsuite: Fix expected output on Windows for various ghci tests Broke as -Wimplicit-kind-vars no longer exists. Specifically ghci024, ghci057 and T9293. >--------------------------------------------------------------- 7cd8e330a2c82fe048e501671b32cd2ec5b5c0d9 testsuite/tests/ghci/scripts/T9293.stdout-mingw32 | 4 ---- testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 | 1 - testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 | 4 ---- 3 files changed, 9 deletions(-) diff --git a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 index be028c5..eb3e225 100644 --- a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 @@ -12,7 +12,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -35,7 +34,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -57,7 +55,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -81,7 +78,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 index b0f4c73..8083bc9 100644 --- a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 @@ -13,7 +13,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 index be028c5..eb3e225 100644 --- a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 +++ b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 @@ -12,7 +12,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -35,7 +34,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -57,7 +55,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances @@ -81,7 +78,6 @@ other dynamic, non-language, flag settings: -fimplicit-import-qualified -fshow-warning-groups warning settings: - -Wimplicit-kind-vars -Wmissing-monadfail-instances -Wsemigroup -Wnoncanonical-monoid-instances From git at git.haskell.org Thu Mar 21 17:00:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:32 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Try again (8c1a274) Message-ID: <20190321170032.478D73A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/8c1a27435e990287fa928a71f632007eea23b48a/ghc >--------------------------------------------------------------- commit 8c1a27435e990287fa928a71f632007eea23b48a Author: Ben Gamari Date: Wed Mar 6 23:34:52 2019 -0500 Try again >--------------------------------------------------------------- 8c1a27435e990287fa928a71f632007eea23b48a testsuite/tests/plugins/all.T | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index f345e21..aea3748 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -5,9 +5,11 @@ setTestOpts([ # sequentially until this is fixed. This likely means that #13194 isn't fully # solved. See also #15313. when(opsys('mingw32'), multi_cpu_race), - # The Windows toolchain, particularly linking, is remarkably slow, give it - # time to do its thing - when(opsys('mingw32'), compile_timeout_multiplier(2)) + # Unfortunately even with the above these tests are incredibly flaky on Windows. + # In any given testsuite run at least half a dozen fail for one reason of another + # (typically a cmmbination of timeouts, some missing static archive errors from ld, + # and a few plain crashes). + when(opsys('mingw32'), fragile(16405)) ]) From git at git.haskell.org Thu Mar 21 17:00:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:35 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite/plugins: Increase compile timeout on Windows (f4d3aaa) Message-ID: <20190321170035.7784F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/f4d3aaaf318efa5a476bc35b16d0327e9d0a0b66/ghc >--------------------------------------------------------------- commit f4d3aaaf318efa5a476bc35b16d0327e9d0a0b66 Author: Ben Gamari Date: Tue Mar 5 11:30:57 2019 -0500 testsuite/plugins: Increase compile timeout on Windows I think the linker is routinely eating through the timeout, leading to many spurious failures. >--------------------------------------------------------------- f4d3aaaf318efa5a476bc35b16d0327e9d0a0b66 testsuite/tests/plugins/all.T | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 1834e3b..f345e21 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -1,9 +1,15 @@ -setTestOpts([req_interp, when(opsys('mingw32'), multi_cpu_race)]) +setTestOpts([ + req_interp, + # The implementation of ghc-pkg doesn't seem to be multi-concurrent process + # safe on windows. These tests which mutate the package db need to be run + # sequentially until this is fixed. This likely means that #13194 isn't fully + # solved. See also #15313. + when(opsys('mingw32'), multi_cpu_race), + # The Windows toolchain, particularly linking, is remarkably slow, give it + # time to do its thing + when(opsys('mingw32'), compile_timeout_multiplier(2)) +]) -# The implementation of ghc-pkg doesn't seem to be multi-concurrent process safe -# on windows. These tests which mutate the package db need to be run -# sequentially until this is fixed. This likely means that #13194 isn't fully -# solved. See also #15313. test('plugins01', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), From git at git.haskell.org Thu Mar 21 17:00:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:38 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Don't mark cabal09 as broken (f79f93e4) Message-ID: <20190321170038.915DC3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/f79f93e47e28f662478493f2b651153a09df404e/ghc >--------------------------------------------------------------- commit f79f93e47e28f662478493f2b651153a09df404e Author: Ben Gamari Date: Tue Mar 5 22:47:28 2019 -0500 Don't mark cabal09 as broken It doesn't fail reliably. >--------------------------------------------------------------- f79f93e47e28f662478493f2b651153a09df404e testsuite/tests/cabal/cabal09/all.T | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testsuite/tests/cabal/cabal09/all.T b/testsuite/tests/cabal/cabal09/all.T index e9c936b..438161b 100644 --- a/testsuite/tests/cabal/cabal09/all.T +++ b/testsuite/tests/cabal/cabal09/all.T @@ -4,7 +4,6 @@ else: cleanup = 'CLEANUP=0' test('cabal09', - [extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), - when(opsys('mingw32'), expect_broken(16386))], + extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), run_command, ['$MAKE -s --no-print-directory cabal09 ' + cleanup]) From git at git.haskell.org Thu Mar 21 17:00:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:41 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Mark T16219 and cabal09 as broken on Windows (db13623) Message-ID: <20190321170041.B4E413A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/db1362375cb960529cd068dd6cacd9ba0cf3977b/ghc >--------------------------------------------------------------- commit db1362375cb960529cd068dd6cacd9ba0cf3977b Author: Ben Gamari Date: Mon Mar 4 18:40:48 2019 -0500 testsuite: Mark T16219 and cabal09 as broken on Windows See #16386. >--------------------------------------------------------------- db1362375cb960529cd068dd6cacd9ba0cf3977b testsuite/tests/backpack/cabal/T16219/all.T | 3 ++- testsuite/tests/cabal/cabal09/all.T | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/backpack/cabal/T16219/all.T b/testsuite/tests/backpack/cabal/T16219/all.T index 29dd8a4..04f41bf 100644 --- a/testsuite/tests/backpack/cabal/T16219/all.T +++ b/testsuite/tests/backpack/cabal/T16219/all.T @@ -4,6 +4,7 @@ else: cleanup = 'CLEANUP=0' test('T16219', - extra_files(['Setup.hs', 'backpack-issue.cabal', 'library-a', 'library-a-impl', 'library-b']), + [extra_files(['Setup.hs', 'backpack-issue.cabal', 'library-a', 'library-a-impl', 'library-b']), + when(opsys('mingw32'), expect_broken(16386))], run_command, ['$MAKE -s --no-print-directory T16219 ' + cleanup]) diff --git a/testsuite/tests/cabal/cabal09/all.T b/testsuite/tests/cabal/cabal09/all.T index 438161b..e9c936b 100644 --- a/testsuite/tests/cabal/cabal09/all.T +++ b/testsuite/tests/cabal/cabal09/all.T @@ -4,6 +4,7 @@ else: cleanup = 'CLEANUP=0' test('cabal09', - extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), + [extra_files(['Main.hs', 'Setup.hs', 'reexport.cabal']), + when(opsys('mingw32'), expect_broken(16386))], run_command, ['$MAKE -s --no-print-directory cabal09 ' + cleanup]) From git at git.haskell.org Thu Mar 21 17:00:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:44 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: testsuite: Display observed exit code on failure due to bad exit code (3394a7c) Message-ID: <20190321170044.D568E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/3394a7cd27cec64a577ee0a9df887a431ccb3696/ghc >--------------------------------------------------------------- commit 3394a7cd27cec64a577ee0a9df887a431ccb3696 Author: Ben Gamari Date: Thu Mar 7 10:13:13 2019 -0500 testsuite: Display observed exit code on failure due to bad exit code >--------------------------------------------------------------- 3394a7cd27cec64a577ee0a9df887a431ccb3696 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 ed336c9..a2e7dde 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1402,7 +1402,7 @@ def simple_run(name, way, prog, extra_run_opts): print('Wrong exit code for ' + name + '(' + way + ')' + '(expected', opts.exit_code, ', actual', exit_code, ')') dump_stdout(name) dump_stderr(name) - return failBecause('bad exit code') + return failBecause('bad exit code (%d)' % exit_code) if not (opts.ignore_stderr or stderr_ok(name, way) or opts.combined_output): return failBecause('bad stderr') From git at git.haskell.org Thu Mar 21 17:00:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:48 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: rts/RtsSymbols: Drop __mingw_vsnwprintf (ae38224) Message-ID: <20190321170048.1010F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/ae382245ea65bf8824db7f4dbab5ade78e6ed9dd/ghc >--------------------------------------------------------------- commit ae382245ea65bf8824db7f4dbab5ade78e6ed9dd Author: Ben Gamari Date: Tue Mar 5 11:58:18 2019 -0500 rts/RtsSymbols: Drop __mingw_vsnwprintf As described in #16387, this is already defined by mingw and consequently defining it in the RTS as well leads to multiple definition errors from the RTS linker at runtime. >--------------------------------------------------------------- ae382245ea65bf8824db7f4dbab5ade78e6ed9dd rts/RtsSymbols.c | 1 - 1 file changed, 1 deletion(-) diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index eb0322e..5f99dde 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -110,7 +110,6 @@ RTS_WIN64_ONLY(SymI_HasProto(__imp__environ)) \ RTS_WIN32_ONLY(SymI_HasProto(_imp___iob)) \ RTS_WIN64_ONLY(SymI_HasProto(__iob_func)) \ - RTS_WIN64_ONLY(SymI_HasProto(__mingw_vsnwprintf)) \ /* see Note [Symbols for MinGW's printf] */ \ SymI_HasProto(_lock_file) \ SymI_HasProto(_unlock_file) From git at git.haskell.org Thu Mar 21 17:00:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:52 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Directly test section alignment, fix internal reloc probing length (d950f11) Message-ID: <20190321170052.1148C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/d950f11eff0a5dc0ad950fbd47e3ee32649d1d62/ghc >--------------------------------------------------------------- commit d950f11eff0a5dc0ad950fbd47e3ee32649d1d62 Author: Artem Pyanykh Date: Sat Mar 16 18:12:00 2019 +0300 Directly test section alignment, fix internal reloc probing length >--------------------------------------------------------------- d950f11eff0a5dc0ad950fbd47e3ee32649d1d62 rts/linker/MachO.c | 8 ++++++-- testsuite/tests/rts/linker/Makefile | 6 +++--- testsuite/tests/rts/linker/aligned_mem_access.c | 14 -------------- testsuite/tests/rts/linker/aligned_mem_access.stdout | 2 -- testsuite/tests/rts/linker/all.T | 6 +++--- testsuite/tests/rts/linker/section_alignment.c | 14 ++++++++++++++ testsuite/tests/rts/linker/section_alignment.stdout | 2 ++ 7 files changed, 28 insertions(+), 24 deletions(-) diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c index b720077..6e109e5 100644 --- a/rts/linker/MachO.c +++ b/rts/linker/MachO.c @@ -977,11 +977,15 @@ relocateSection(ObjectCode* oc, int curSection) } IF_DEBUG(linker, debugBelch("relocateSection: thing = %p\n", (void *) thing)); + + /* Thing points to memory within one of the relocated sections. We can + * probe the first byte to sanity check internal relocations. + */ if (0 == reloc->r_extern) { if (reloc->r_pcrel) { - checkProddableBlock(oc, (void *)((char *)thing + baseValue), relocLenBytes); + checkProddableBlock(oc, (void *)((char *)thing + baseValue), 1); } else { - checkProddableBlock(oc, (void *)thing, relocLenBytes); + checkProddableBlock(oc, (void *)thing, 1); } } diff --git a/testsuite/tests/rts/linker/Makefile b/testsuite/tests/rts/linker/Makefile index 2320d34..edbd291 100644 --- a/testsuite/tests/rts/linker/Makefile +++ b/testsuite/tests/rts/linker/Makefile @@ -7,7 +7,7 @@ unsigned_reloc_macho_x64: '$(TEST_HC)' $(TEST_HC_OPTS_NO_RTSOPTS) -v0 --make -no-rtsopts-suggestions -no-hs-main -o runner runner.c ./runner unsigned_reloc_macho_x64.o getAnswer -aligned_mem_access: - cc -c -o aligned_mem_access.o aligned_mem_access.c +section_alignment: + cc -c -o section_alignment.o section_alignment.c '$(TEST_HC)' $(TEST_HC_OPTS_NO_RTSOPTS) -v0 --make -no-rtsopts-suggestions -no-hs-main -o runner runner.c - ./runner aligned_mem_access.o foo + ./runner section_alignment.o isAligned diff --git a/testsuite/tests/rts/linker/aligned_mem_access.c b/testsuite/tests/rts/linker/aligned_mem_access.c deleted file mode 100644 index cef90c3..0000000 --- a/testsuite/tests/rts/linker/aligned_mem_access.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -__m128 mvec = {1.0, 2.0, 3.0, 42.0}; -float fvec[] = {.0, .0, .0, .0}; - -/* Uses movaps instruction to move data between XMMn <-> mem. Fails - * with segfault when data section is not properly aligned (16 byte). - */ -long foo(void) -{ - _mm_store_ps(fvec, mvec); - return (long) fvec[3]; -} diff --git a/testsuite/tests/rts/linker/aligned_mem_access.stdout b/testsuite/tests/rts/linker/aligned_mem_access.stdout deleted file mode 100644 index 4b728c2..0000000 --- a/testsuite/tests/rts/linker/aligned_mem_access.stdout +++ /dev/null @@ -1,2 +0,0 @@ -Linking: path = aligned_mem_access.o, symname = _foo -42 \ No newline at end of file diff --git a/testsuite/tests/rts/linker/all.T b/testsuite/tests/rts/linker/all.T index 23d79d3..be2e972 100644 --- a/testsuite/tests/rts/linker/all.T +++ b/testsuite/tests/rts/linker/all.T @@ -8,9 +8,9 @@ test('unsigned_reloc_macho_x64', ], run_command, ['$MAKE -s --no-print-directory unsigned_reloc_macho_x64']) -test('aligned_mem_access', +test('section_alignment', [ - extra_files(['runner.c', 'aligned_mem_access.c']), + extra_files(['runner.c', 'section_alignment.c']), unless(opsys('darwin') and arch('x86_64'), expect_broken(13624)) ], - run_command, ['$MAKE -s --no-print-directory aligned_mem_access']) + run_command, ['$MAKE -s --no-print-directory section_alignment']) diff --git a/testsuite/tests/rts/linker/section_alignment.c b/testsuite/tests/rts/linker/section_alignment.c new file mode 100644 index 0000000..a5c9b02 --- /dev/null +++ b/testsuite/tests/rts/linker/section_alignment.c @@ -0,0 +1,14 @@ +#include +#include + +int foo = 42; /* goes to __data, but __data gets page aligned as + * the first section within a segment, so we need + * another section to check the alignment */ + +alignas(32) int bar = 0; /* goes to __common that follows __data + * within the same segment */ + +long isAligned() +{ + return ((uintptr_t)&bar & ~(-32)) == 0; +} diff --git a/testsuite/tests/rts/linker/section_alignment.stdout b/testsuite/tests/rts/linker/section_alignment.stdout new file mode 100644 index 0000000..a20cf23 --- /dev/null +++ b/testsuite/tests/rts/linker/section_alignment.stdout @@ -0,0 +1,2 @@ +Linking: path = section_alignment.o, symname = _isAligned +1 \ No newline at end of file From git at git.haskell.org Thu Mar 21 17:00:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:56 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Add a linker test re: section alignment (3cdcc0b) Message-ID: <20190321170056.1995E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/3cdcc0b55de5f7a35dc12430f021a665b0477e95/ghc >--------------------------------------------------------------- commit 3cdcc0b55de5f7a35dc12430f021a665b0477e95 Author: Artem Pyanykh Date: Mon Feb 11 14:05:34 2019 +0300 Add a linker test re: section alignment >--------------------------------------------------------------- 3cdcc0b55de5f7a35dc12430f021a665b0477e95 testsuite/tests/rts/linker/Makefile | 5 +++++ testsuite/tests/rts/linker/aligned_mem_access.c | 14 ++++++++++++++ testsuite/tests/rts/linker/aligned_mem_access.stdout | 2 ++ testsuite/tests/rts/linker/all.T | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/testsuite/tests/rts/linker/Makefile b/testsuite/tests/rts/linker/Makefile index 838a83a..2320d34 100644 --- a/testsuite/tests/rts/linker/Makefile +++ b/testsuite/tests/rts/linker/Makefile @@ -6,3 +6,8 @@ unsigned_reloc_macho_x64: as -o unsigned_reloc_macho_x64.o unsigned_reloc_macho_x64.s '$(TEST_HC)' $(TEST_HC_OPTS_NO_RTSOPTS) -v0 --make -no-rtsopts-suggestions -no-hs-main -o runner runner.c ./runner unsigned_reloc_macho_x64.o getAnswer + +aligned_mem_access: + cc -c -o aligned_mem_access.o aligned_mem_access.c + '$(TEST_HC)' $(TEST_HC_OPTS_NO_RTSOPTS) -v0 --make -no-rtsopts-suggestions -no-hs-main -o runner runner.c + ./runner aligned_mem_access.o foo diff --git a/testsuite/tests/rts/linker/aligned_mem_access.c b/testsuite/tests/rts/linker/aligned_mem_access.c new file mode 100644 index 0000000..cef90c3 --- /dev/null +++ b/testsuite/tests/rts/linker/aligned_mem_access.c @@ -0,0 +1,14 @@ +#include +#include + +__m128 mvec = {1.0, 2.0, 3.0, 42.0}; +float fvec[] = {.0, .0, .0, .0}; + +/* Uses movaps instruction to move data between XMMn <-> mem. Fails + * with segfault when data section is not properly aligned (16 byte). + */ +long foo(void) +{ + _mm_store_ps(fvec, mvec); + return (long) fvec[3]; +} diff --git a/testsuite/tests/rts/linker/aligned_mem_access.stdout b/testsuite/tests/rts/linker/aligned_mem_access.stdout new file mode 100644 index 0000000..4b728c2 --- /dev/null +++ b/testsuite/tests/rts/linker/aligned_mem_access.stdout @@ -0,0 +1,2 @@ +Linking: path = aligned_mem_access.o, symname = _foo +42 \ No newline at end of file diff --git a/testsuite/tests/rts/linker/all.T b/testsuite/tests/rts/linker/all.T index 66c2156..23d79d3 100644 --- a/testsuite/tests/rts/linker/all.T +++ b/testsuite/tests/rts/linker/all.T @@ -7,3 +7,10 @@ test('unsigned_reloc_macho_x64', unless(arch('x86_64'), skip) ], run_command, ['$MAKE -s --no-print-directory unsigned_reloc_macho_x64']) + +test('aligned_mem_access', + [ + extra_files(['runner.c', 'aligned_mem_access.c']), + unless(opsys('darwin') and arch('x86_64'), expect_broken(13624)) + ], + run_command, ['$MAKE -s --no-print-directory aligned_mem_access']) From git at git.haskell.org Thu Mar 21 17:00:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:00:59 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Gracefully handle error condition in Mach-O relocateSection (3fb10fc) Message-ID: <20190321170059.445943A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/3fb10fcfc03d5590579743494450fc8b06b179ad/ghc >--------------------------------------------------------------- commit 3fb10fcfc03d5590579743494450fc8b06b179ad Author: Artem Pyanykh Date: Sat Mar 16 18:32:00 2019 +0300 Gracefully handle error condition in Mach-O relocateSection >--------------------------------------------------------------- 3fb10fcfc03d5590579743494450fc8b06b179ad rts/linker/MachO.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c index 6e109e5..21e46a3 100644 --- a/rts/linker/MachO.c +++ b/rts/linker/MachO.c @@ -814,7 +814,11 @@ relocateSection(ObjectCode* oc, int curSection) // symbol address (symbol->n_value) if ((symbol->nlist->n_type & N_TYPE) == N_SECT) { - ASSERT(symbol->addr != NULL); + if (symbol->addr == NULL) { + errorBelch("relocateSection: address of internal symbol %s was not resolved\n", nm); + return 0; + } + addr = symbol->addr; IF_DEBUG(linker, debugBelch("relocateSection: calculated relocation of " @@ -823,6 +827,7 @@ relocateSection(ObjectCode* oc, int curSection) } else { errorBelch("\nrelocateSection: %s is not exported," " and should be defined in a section, but isn't!\n", nm); + return 0; } } From git at git.haskell.org Thu Mar 21 17:01:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:02 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Add missing levels to SegmentProt enum (cb745c8) Message-ID: <20190321170102.765133A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/cb745c84a192c4a1f992649fbda584941f8ec3eb/ghc >--------------------------------------------------------------- commit cb745c84a192c4a1f992649fbda584941f8ec3eb Author: Artem Pyanykh Date: Mon Feb 25 18:46:42 2019 +0300 Add missing levels to SegmentProt enum >--------------------------------------------------------------- cb745c84a192c4a1f992649fbda584941f8ec3eb rts/LinkerInternals.h | 17 ++++++++++++++++- rts/linker/MachO.c | 6 +++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index a773b3e..75871a5 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -62,9 +62,24 @@ typedef } SectionAlloc; +/* Indicates a desired memory protection for pages within a segment. Defined as + * enum since it's more explicit and look nicer in a debugger. + * + * Can be used directly as a substitution for a combination of PROT_X flags on + * POSIX systems. + */ typedef enum { +#if RTS_LINKER_USE_MMAP + SEGMENT_PROT_RO = PROT_READ, + SEGMENT_PROT_RX = PROT_READ | PROT_EXEC, + SEGMENT_PROT_RWO = PROT_READ | PROT_WRITE, + SEGMENT_PROT_RWX = PROT_READ | PROT_WRITE | PROT_EXEC +#else + SEGMENT_PROT_RO, SEGMENT_PROT_RX, - SEGMENT_PROT_RW + SEGMENT_PROT_RWO, + SEGMENT_PROT_RWX +#endif } SegmentProt; /* diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c index 7e1af76..b720077 100644 --- a/rts/linker/MachO.c +++ b/rts/linker/MachO.c @@ -1141,9 +1141,9 @@ ocBuildSegments_MachO(ObjectCode *oc) initSegment(rwSegment, curMem, roundUpToPage(size_rwSegment), - SEGMENT_PROT_RW, + SEGMENT_PROT_RWO, n_rwSections); - IF_DEBUG(linker, debugBelch("ocBuildSegments_MachO: init segment %d (RW) at %p size %zu\n", + IF_DEBUG(linker, debugBelch("ocBuildSegments_MachO: init segment %d (RWO) at %p size %zu\n", curSegment, rwSegment->start, rwSegment->size)); curMem = (char *)curMem + rwSegment->size; curSegment++; @@ -1155,7 +1155,7 @@ ocBuildSegments_MachO(ObjectCode *oc) initSegment(gbZerofillSegment, curMem, roundUpToPage(size_gbZerofillSegment), - SEGMENT_PROT_RW, + SEGMENT_PROT_RWO, n_gbZerofills); IF_DEBUG(linker, debugBelch("ocBuildSegments_MachO: init segment %d (GB_ZEROFILL) at %p size %zu\n", curSegment, gbZerofillSegment->start, gbZerofillSegment->size)); From git at git.haskell.org Thu Mar 21 17:01:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:05 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Use segments for section layout (78c61ac) Message-ID: <20190321170105.91F353A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/78c61acf15c66a17df63da60226acff3a2dda585/ghc >--------------------------------------------------------------- commit 78c61acf15c66a17df63da60226acff3a2dda585 Author: Artem Pyanykh Date: Mon Feb 11 14:05:26 2019 +0300 Use segments for section layout >--------------------------------------------------------------- 78c61acf15c66a17df63da60226acff3a2dda585 rts/Linker.c | 50 +++++++++ rts/LinkerInternals.h | 25 +++++ rts/RtsUtils.c | 6 +- rts/RtsUtils.h | 2 +- rts/linker/MachO.c | 303 +++++++++++++++++++++++++++++++++++--------------- rts/linker/MachO.h | 4 +- 6 files changed, 296 insertions(+), 94 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 78c61acf15c66a17df63da60226acff3a2dda585 From git at git.haskell.org Thu Mar 21 17:01:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:10 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Address some todos and fixmes (7bbfb78) Message-ID: <20190321170110.181133A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/7bbfb789913b84660bc743aeffee06e18cbde2f0/ghc >--------------------------------------------------------------- commit 7bbfb789913b84660bc743aeffee06e18cbde2f0 Author: Artem Pyanykh Date: Mon Feb 11 14:05:30 2019 +0300 Address some todos and fixmes >--------------------------------------------------------------- 7bbfb789913b84660bc743aeffee06e18cbde2f0 rts/Linker.c | 1 + rts/LinkerInternals.h | 7 +---- rts/linker/MachO.c | 35 ++++++++++++--------- testsuite/tests/rts/linker/Makefile | 8 ++--- testsuite/tests/rts/linker/all.T | 6 ++-- testsuite/tests/rts/linker/runner | Bin 1528176 -> 0 bytes .../rts/linker/unsigned_reloc_macho_64.stdout | 2 -- ...reloc_macho_64.s => unsigned_reloc_macho_x64.s} | 2 +- .../linker/unsigned_reloc_macho_x64.stdout} | 3 +- 9 files changed, 32 insertions(+), 32 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 7bbfb789913b84660bc743aeffee06e18cbde2f0 From git at git.haskell.org Thu Mar 21 17:01:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:15 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Adjust section placement and relocation logic for Mach-O (3681875) Message-ID: <20190321170115.014B53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/368187591a5454e47c4e08dae90d39d2af1fad40/ghc >--------------------------------------------------------------- commit 368187591a5454e47c4e08dae90d39d2af1fad40 Author: Artem Pyanykh Date: Thu Feb 21 12:10:38 2019 +0300 Adjust section placement and relocation logic for Mach-O 1. Place each section on a separate page to ensure required alignment (wastes lots ot space, needs to be improved). 2. Unwire relocation logic from macho sections (the most fiddly part is adjusting internal relocations). Other todos: 0. Add a test for section alignment. 1. Investigate 32bit relocations! 2. Fix memory leak in ZEROPAGE section allocation. 3. Fix creating redundant jump islands for GOT. 4. Investigate more compact section placement. >--------------------------------------------------------------- 368187591a5454e47c4e08dae90d39d2af1fad40 rts/Linker.c | 10 +- rts/linker/MachO.c | 329 ++++++++++++++------- rts/linker/MachO.h | 17 +- rts/linker/SymbolExtras.c | 1 + testsuite/tests/rts/linker/Makefile | 8 + testsuite/tests/rts/linker/all.T | 9 + testsuite/tests/rts/linker/runner | Bin 0 -> 1528176 bytes testsuite/tests/rts/linker/runner.c | 65 ++++ .../tests/rts/linker/unsigned_reloc_macho_64.s | 11 + .../rts/linker/unsigned_reloc_macho_64.stdout | 2 + 10 files changed, 329 insertions(+), 123 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 368187591a5454e47c4e08dae90d39d2af1fad40 From git at git.haskell.org Thu Mar 21 17:01:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:18 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: ci: Add some descriptions of the stages (505c5ab) Message-ID: <20190321170118.291293A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/505c5ab2b9d9d4ac721d1a6fea020e0886c02eff/ghc >--------------------------------------------------------------- commit 505c5ab2b9d9d4ac721d1a6fea020e0886c02eff Author: Ben Gamari Date: Fri Mar 15 10:48:51 2019 -0400 ci: Add some descriptions of the stages >--------------------------------------------------------------- 505c5ab2b9d9d4ac721d1a6fea020e0886c02eff .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42eaa83..0740047 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,12 +12,12 @@ before_script: - "git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true" stages: - - lint - - build - - full-build - - cleanup # See Note [Cleanup on Windows] - - packaging - - hackage + - lint # Source linting + - build # A quick smoke-test to weed out broken commits + - full-build # Build all the things + - cleanup # See Note [Cleanup on Windows] + - packaging # Source distribution, etc. + - hackage # head.hackage testing ############################################################ # Runner Tags From git at git.haskell.org Thu Mar 21 17:01:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:21 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: ci: Move validate-x86_64-linux-deb9 to full-build stage (dc713c7) Message-ID: <20190321170121.584563A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/dc713c71540556ee9dcc90cfd8046c98af5d3d78/ghc >--------------------------------------------------------------- commit dc713c71540556ee9dcc90cfd8046c98af5d3d78 Author: Ben Gamari Date: Fri Mar 15 10:45:44 2019 -0400 ci: Move validate-x86_64-linux-deb9 to full-build stage The `build` stage is meant to be a minimal smoke test to weed out broken commits. The `validate-x86_64-linux-deb9` build will generally catch a subset of issues caught by `validate-x86_64-linux-deb9-debug` so only the latter should be in `build`. >--------------------------------------------------------------- dc713c71540556ee9dcc90cfd8046c98af5d3d78 .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a47ee7a..42eaa83 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -286,7 +286,7 @@ nightly-i386-linux-deb9: .build-x86_64-linux-deb9: extends: .validate-linux - stage: build + stage: full-build image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV" variables: TEST_ENV: "x86_64-linux-deb9" @@ -313,6 +313,7 @@ nightly-x86_64-linux-deb9: # N.B. Has DEBUG assertions enabled in stage2 validate-x86_64-linux-deb9-debug: extends: .build-x86_64-linux-deb9 + stage: build variables: BUILD_FLAVOUR: validate TEST_ENV: "x86_64-linux-deb9-debug" From git at git.haskell.org Thu Mar 21 17:01:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:24 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Add a bench flavour to Hadrian (646e3dc) Message-ID: <20190321170124.D47763A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/646e3dc20ebe25baae898a6b22895ddd015fc975/ghc >--------------------------------------------------------------- commit 646e3dc20ebe25baae898a6b22895ddd015fc975 Author: Sebastian Graf Date: Fri Mar 15 17:06:21 2019 +0100 Add a bench flavour to Hadrian >--------------------------------------------------------------- 646e3dc20ebe25baae898a6b22895ddd015fc975 hadrian/doc/flavours.md | 54 +++++++++++------------------- hadrian/hadrian.cabal | 1 + hadrian/src/Settings.hs | 7 ++-- hadrian/src/Settings/Flavours/Benchmark.hs | 24 +++++++++++++ hadrian/src/Settings/Flavours/Llvm.hs | 5 ++- 5 files changed, 53 insertions(+), 38 deletions(-) diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md index 7b89637..45479f8 100644 --- a/hadrian/doc/flavours.md +++ b/hadrian/doc/flavours.md @@ -88,6 +88,17 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH -O + bench + -O
-H64m + -O
-H64m + + -O2 + -O2 + -O0 + -O2 + -O2 + + devel1 -O
-H64m -O
-H64m @@ -109,41 +120,16 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH -O0
-DDEBUG - - quick-llvm - -O0
-H64m
-fllvm - -O0
-H64m
-fllvm - - -O - -O - - -O - - - - perf-llvm - -O
-H64m
-fllvm - -O
-H64m
-fllvm - - -O2 - -O - -O2 - -O - -O2 - - - prof-llvm - -O0
-H64m
-fllvm - -O0
-H64m
-fllvm - - -O - -O - -O - -O - -O - +### LLVM variants + +In addition to the above, there are LLVM variants for the flavours `quick`, +`prof`, `perf` and `bench`, available by appending a `-llvm` suffix (i.e., +`quick-llvm` for the LLVM variant of `quick`). These differ only in that there +is an additional `-fllvm` flag in `hsDefault` when the stage0 compiler is GHC. +See `src/Settings/Flavours/Llvm.hs` for details. + ## Ways Libraries and GHC can be built in different _ways_, e.g. with or without profiling @@ -197,7 +183,7 @@ information. The following table lists ways that are built in different flavours No - quickest + quickest
bench vanilla vanilla vanilla
threaded diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index 266602f..af1dccb 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -89,6 +89,7 @@ executable hadrian , Settings.Builders.RunTest , Settings.Builders.Xelatex , Settings.Default + , Settings.Flavours.Benchmark , Settings.Flavours.Common , Settings.Flavours.Development , Settings.Flavours.Llvm diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs index 3089c0a..721152c 100755 --- a/hadrian/src/Settings.hs +++ b/hadrian/src/Settings.hs @@ -11,6 +11,7 @@ import Packages import UserSettings (userFlavours, userPackages, userDefaultFlavour) import {-# SOURCE #-} Settings.Default +import Settings.Flavours.Benchmark import Settings.Flavours.Development import Settings.Flavours.Llvm import Settings.Flavours.Performance @@ -36,9 +37,9 @@ stagePackages stage = do hadrianFlavours :: [Flavour] hadrianFlavours = - [ defaultFlavour, developmentFlavour Stage1, developmentFlavour Stage2 - , performanceFlavour, profiledFlavour, quickFlavour, quickestFlavour - , quickCrossFlavour + [ benchmarkFlavour, defaultFlavour, developmentFlavour Stage1 + , developmentFlavour Stage2, performanceFlavour, profiledFlavour + , quickFlavour, quickestFlavour, quickCrossFlavour, benchmarkLlvmFlavour , performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour , ghcInGhciFlavour ] diff --git a/hadrian/src/Settings/Flavours/Benchmark.hs b/hadrian/src/Settings/Flavours/Benchmark.hs new file mode 100644 index 0000000..fc7a87c --- /dev/null +++ b/hadrian/src/Settings/Flavours/Benchmark.hs @@ -0,0 +1,24 @@ +module Settings.Flavours.Benchmark (benchmarkFlavour) where + +import Expression +import Flavour +import {-# SOURCE #-} Settings.Default + +-- Please update doc/flavours.md when changing this file. +benchmarkFlavour :: Flavour +benchmarkFlavour = defaultFlavour + { name = "bench" + , args = defaultBuilderArgs <> benchmarkArgs <> defaultPackageArgs + , libraryWays = pure [vanilla] + , rtsWays = pure [vanilla, threaded] } + +benchmarkArgs :: Args +benchmarkArgs = sourceArgs SourceArgs + { hsDefault = pure ["-O", "-H64m"] + , hsLibrary = pure ["-O2"] + -- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't + -- really measuring the overhead of a potential new optimisation we want + -- to benchmark. This has to happen in sync with the Makefile build, though. + , hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O0"] + , hsGhc = pure ["-O2"] } + diff --git a/hadrian/src/Settings/Flavours/Llvm.hs b/hadrian/src/Settings/Flavours/Llvm.hs index 2752c9e..ddf07a2 100644 --- a/hadrian/src/Settings/Flavours/Llvm.hs +++ b/hadrian/src/Settings/Flavours/Llvm.hs @@ -1,4 +1,5 @@ module Settings.Flavours.Llvm ( + benchmarkLlvmFlavour, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour, @@ -7,12 +8,14 @@ module Settings.Flavours.Llvm ( import Expression import Flavour +import Settings.Flavours.Benchmark import Settings.Flavours.Performance import Settings.Flavours.Profiled import Settings.Flavours.Quick -- Please update doc/flavours.md when changing this file. -performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour +benchmarkLlvmFlavour, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour +benchmarkLlvmFlavour = mkLlvmFlavour benchmarkFlavour performanceLlvmFlavour = mkLlvmFlavour performanceFlavour profiledLlvmFlavour = mkLlvmFlavour profiledFlavour quickLlvmFlavour = mkLlvmFlavour quickFlavour From git at git.haskell.org Thu Mar 21 17:01:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:29 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Reject nested predicates in impredicativity checking (8d18a87) Message-ID: <20190321170129.640F23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/8d18a873c5d7688c6e7d91efab6bb0d6f99393c6/ghc >--------------------------------------------------------------- commit 8d18a873c5d7688c6e7d91efab6bb0d6f99393c6 Author: Ryan Scott Date: Sun Mar 17 09:37:27 2019 -0400 Reject nested predicates in impredicativity checking When GHC attempts to unify a metavariable with a type containing foralls, it will be rejected as an occurrence of impredicativity. GHC was /not/ extending the same treatment to predicate types, such as in the following (erroneous) example from #11514: ```haskell foo :: forall a. (Show a => a -> a) -> () foo = undefined ``` This will attempt to instantiate `undefined` at `(Show a => a -> a) -> ()`, which is impredicative. This patch catches impredicativity arising from predicates in this fashion. Since GHC is pickier about impredicative instantiations, some test cases needed to be updated to be updated so as not to fall afoul of the new validity check. (There were a surprising number of impredicative uses of `undefined`!) Moreover, the `T14828` test case now has slightly less informative types shown with `:print`. This is due to a a much deeper issue with the GHCi debugger (see #14828). Fixes #11514. >--------------------------------------------------------------- 8d18a873c5d7688c6e7d91efab6bb0d6f99393c6 compiler/typecheck/TcErrors.hs | 8 +-- compiler/typecheck/TcUnify.hs | 78 ++++++++++++---------- .../dependent/should_compile/dynamic-paper.hs | 2 +- .../dependent/should_compile/dynamic-paper.stderr | 2 +- .../tests/ghci.debugger/scripts/print027.stdout | 12 ++-- testsuite/tests/ghci/scripts/T12447.script | 2 +- testsuite/tests/ghci/scripts/T14828.stdout | 4 +- .../tests/indexed-types/should_compile/T4358.hs | 2 +- .../tests/indexed-types/should_fail/T5934.stderr | 2 +- testsuite/tests/polykinds/T11142.stderr | 2 +- testsuite/tests/polykinds/T14270.hs | 2 +- testsuite/tests/polykinds/T9569.hs | 2 +- testsuite/tests/th/T11452.stderr | 2 +- .../tests/typecheck/should_compile/T12427a.stderr | 5 +- .../tests/typecheck/should_fail/T10194.stderr | 10 +-- testsuite/tests/typecheck/should_fail/T11514.hs | 6 ++ .../tests/typecheck/should_fail/T11514.stderr | 9 +++ .../tests/typecheck/should_fail/T12563.stderr | 2 +- .../tests/typecheck/should_fail/T12589.stderr | 2 +- testsuite/tests/typecheck/should_fail/all.T | 1 + 20 files changed, 88 insertions(+), 67 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 8d18a873c5d7688c6e7d91efab6bb0d6f99393c6 From git at git.haskell.org Thu Mar 21 17:01:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:32 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Print test suite results ("unexpected failures" etc.) in sorted order (7b213b8) Message-ID: <20190321170132.6658F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/7b213b8dc668be216cb2efd7140a2f0263a454e5/ghc >--------------------------------------------------------------- commit 7b213b8dc668be216cb2efd7140a2f0263a454e5 Author: Ömer Sinan Ağacan Date: Tue Mar 19 12:53:51 2019 +0300 Print test suite results ("unexpected failures" etc.) in sorted order Fixes #16425 >--------------------------------------------------------------- 7b213b8dc668be216cb2efd7140a2f0263a454e5 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 a2e7dde..69c1a99 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -2214,7 +2214,7 @@ def printUnexpectedTests(file, testInfoss): def printTestInfosSummary(file, testInfos): maxDirLen = max(len(tr.directory) for tr in testInfos) - for result in testInfos: + for result in sorted(testInfos, key=lambda r: (r.testname.lower(), r.way, r.directory)): directory = result.directory.ljust(maxDirLen) file.write(' {directory} {r.testname} [{r.reason}] ({r.way})\n'.format( r = result, From git at git.haskell.org Thu Mar 21 17:01:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:35 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Check.hs: Fix a few typos (f199a84) Message-ID: <20190321170135.973653A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/f199a8437ba70e65910220625e690157af679573/ghc >--------------------------------------------------------------- commit f199a8437ba70e65910220625e690157af679573 Author: Simon Jakobi Date: Tue Mar 19 19:54:58 2019 +0100 Check.hs: Fix a few typos >--------------------------------------------------------------- f199a8437ba70e65910220625e690157af679573 compiler/deSugar/Check.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs index db3a501..0142c34 100644 --- a/compiler/deSugar/Check.hs +++ b/compiler/deSugar/Check.hs @@ -335,8 +335,8 @@ checkSingle' locn var p = do fam_insts <- liftD dsGetFamInstEnvs clause <- liftD $ translatePat fam_insts p missing <- mkInitialUncovered [var] - tracePm "checkSingle: missing" (vcat (map pprValVecDebug missing)) - -- no guards + tracePm "checkSingle': missing" (vcat (map pprValVecDebug missing)) + -- no guards PartialResult prov cs us ds <- runMany (pmcheckI clause []) missing let us' = UncoveredPatterns us return $ case (cs,ds) of @@ -403,12 +403,12 @@ checkMatches' vars matches , [LMatch GhcTc (LHsExpr GhcTc)]) go [] missing = return (mempty, [], missing, []) go (m:ms) missing = do - tracePm "checMatches': go" (ppr m $$ ppr missing) + tracePm "checkMatches': go" (ppr m $$ ppr missing) fam_insts <- liftD dsGetFamInstEnvs (clause, guards) <- liftD $ translateMatch fam_insts m r@(PartialResult prov cs missing' ds) <- runMany (pmcheckI clause guards) missing - tracePm "checMatches': go: res" (ppr r) + tracePm "checkMatches': go: res" (ppr r) (ms_prov, rs, final_u, is) <- go ms missing' let final_prov = prov `mappend` ms_prov return $ case (cs, ds) of @@ -421,7 +421,7 @@ checkMatches' vars matches hsLMatchToLPats :: LMatch id body -> Located [LPat id] hsLMatchToLPats (dL->L l (Match { m_pats = pats })) = cL l pats - hsLMatchToLPats _ = panic "checMatches'" + hsLMatchToLPats _ = panic "checkMatches'" -- | Check an empty case expression. Since there are no clauses to process, we -- only compute the uncovered set. See Note [Checking EmptyCase Expressions] From git at git.haskell.org Thu Mar 21 17:01:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:39 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: base: Depend upon shlwapi on Windows (07d44ed) Message-ID: <20190321170139.43BD03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/07d44ed144ef06de4b125389f318c1f514eee004/ghc >--------------------------------------------------------------- commit 07d44ed144ef06de4b125389f318c1f514eee004 Author: Ben Gamari Date: Wed Mar 20 09:16:15 2019 -0400 base: Depend upon shlwapi on Windows As noted in #16466, `System.Environment.getExecutablePath` depends upon `PathFileExistsW` which is defined by `shlwapi`. Fixes #16466. >--------------------------------------------------------------- 07d44ed144ef06de4b125389f318c1f514eee004 libraries/base/base.cabal | 3 ++- libraries/base/tests/System/T16466.hs | 6 ++++++ libraries/base/tests/System/all.T | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 4e809e7..630ff91 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -365,7 +365,8 @@ Library -- mingw32: Unfortunately required because of a resource leak between -- mingwex and mingw32. the __math_err symbol is defined in -- mingw32 which is required by mingwex. - extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex + -- shlwapi: provides PathFileExistsW + extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex, shlwapi exposed-modules: GHC.IO.Encoding.CodePage.API GHC.IO.Encoding.CodePage.Table diff --git a/libraries/base/tests/System/T16466.hs b/libraries/base/tests/System/T16466.hs new file mode 100644 index 0000000..28cb259 --- /dev/null +++ b/libraries/base/tests/System/T16466.hs @@ -0,0 +1,6 @@ +import System.Environment + +-- Make sure that getExecutablePath works on Windows. See #16466. +main :: IO () +main = () <$ getExecutablePath + diff --git a/libraries/base/tests/System/all.T b/libraries/base/tests/System/all.T index 3cadf35..50ebb59 100644 --- a/libraries/base/tests/System/all.T +++ b/libraries/base/tests/System/all.T @@ -7,3 +7,4 @@ test('T5930', normal, compile_and_run, ['']) test('system001', when(opsys("mingw32"), skip), \ compile_and_run, ['']) test('Timeout001', normal, compile_and_run, ['']) +test('T16466', normal, compile_and_run, ['']) From git at git.haskell.org Thu Mar 21 17:01:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:42 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Remove unused XArrApp and XArrForm extension points (1382d09) Message-ID: <20190321170142.8FC2D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/1382d09efadc900f7242c2e23482a9970eaf4f9b/ghc >--------------------------------------------------------------- commit 1382d09efadc900f7242c2e23482a9970eaf4f9b Author: Ryan Scott Date: Wed Mar 20 09:41:00 2019 -0400 Remove unused XArrApp and XArrForm extension points !301 removed the `HsArrApp` and `HsArrForm` constructors, which renders the corresponding extension points `XArrApp` and `XArrForm` useless. This patch finally rips them out. >--------------------------------------------------------------- 1382d09efadc900f7242c2e23482a9970eaf4f9b compiler/hsSyn/HsExpr.hs | 5 ----- compiler/hsSyn/HsExtension.hs | 4 ---- 2 files changed, 9 deletions(-) diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs index bd63150..b86f4a1 100644 --- a/compiler/hsSyn/HsExpr.hs +++ b/compiler/hsSyn/HsExpr.hs @@ -758,11 +758,6 @@ type instance XStatic GhcPs = NoExt type instance XStatic GhcRn = NameSet type instance XStatic GhcTc = NameSet -type instance XArrApp GhcPs = NoExt -type instance XArrApp GhcRn = NoExt -type instance XArrApp GhcTc = Type - -type instance XArrForm (GhcPass _) = NoExt type instance XTick (GhcPass _) = NoExt type instance XBinTick (GhcPass _) = NoExt type instance XTickPragma (GhcPass _) = NoExt diff --git a/compiler/hsSyn/HsExtension.hs b/compiler/hsSyn/HsExtension.hs index 9a017c2..f5e3133 100644 --- a/compiler/hsSyn/HsExtension.hs +++ b/compiler/hsSyn/HsExtension.hs @@ -536,8 +536,6 @@ type family XTcBracketOut x type family XSpliceE x type family XProc x type family XStatic x -type family XArrApp x -type family XArrForm x type family XTick x type family XBinTick x type family XTickPragma x @@ -586,8 +584,6 @@ type ForallXExpr (c :: * -> Constraint) (x :: *) = , c (XSpliceE x) , c (XProc x) , c (XStatic x) - , c (XArrApp x) - , c (XArrForm x) , c (XTick x) , c (XBinTick x) , c (XTickPragma x) From git at git.haskell.org Thu Mar 21 17:01:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:45 +0000 (UTC) Subject: [commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: Fix specification of load_load_barrier [skip-ci] (3423664) Message-ID: <20190321170145.9F9733A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/3423664b80ce3c8f5fa3104f3b0a1bcd0e539a02/ghc >--------------------------------------------------------------- commit 3423664b80ce3c8f5fa3104f3b0a1bcd0e539a02 Author: Peter Trommler Date: Wed Mar 20 16:02:44 2019 +0100 Fix specification of load_load_barrier [skip-ci] >--------------------------------------------------------------- 3423664b80ce3c8f5fa3104f3b0a1bcd0e539a02 includes/stg/SMP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h index 4020aef..229115e72 100644 --- a/includes/stg/SMP.h +++ b/includes/stg/SMP.h @@ -82,7 +82,7 @@ EXTERN_INLINE void busy_wait_nop(void); * Various kinds of memory barrier. * write_barrier: prevents future stores occurring before prededing stores. * store_load_barrier: prevents future loads occurring before preceding stores. - * load_load_barrier: prevents future loads occurring before earlier stores. + * load_load_barrier: prevents future loads occurring before earlier loads. * * Reference for these: "The JSR-133 Cookbook for Compiler Writers" * http://gee.cs.oswego.edu/dl/jmm/cookbook.html From git at git.haskell.org Thu Mar 21 17:01:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:48 +0000 (UTC) Subject: [commit: ghc] wip/windows-32bit: gitlab-ci: Do full `perf` build when building Windows releases (f7b390d) Message-ID: <20190321170148.EA7723A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/f7b390da51550e0e5020143b9dd2d3701d84b427/ghc >--------------------------------------------------------------- commit f7b390da51550e0e5020143b9dd2d3701d84b427 Author: Ben Gamari Date: Fri Mar 8 10:05:45 2019 -0500 gitlab-ci: Do full `perf` build when building Windows releases >--------------------------------------------------------------- f7b390da51550e0e5020143b9dd2d3701d84b427 .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0740047..f6a5998 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -471,13 +471,14 @@ nightly-i386-windows-hadrian: # due to #16084 allow_failure: true variables: + BUILD_FLAVOUR: "quick" GHC_VERSION: "8.6.2" BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz" script: - | python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" + - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' @@ -499,12 +500,22 @@ validate-x86_64-windows: cache: key: x86_64-windows +# Normal Windows validate builds are profiled; that won't do for releases. +release-x86_64-windows: + extends: validate-x86_64-windows + variables: + MSYSTEM: MINGW64 + BUILD_FLAVOUR: "perf" + only: + - tags + release-i386-windows: extends: .build-windows-make only: - tags variables: MSYSTEM: MINGW32 + BUILD_FLAVOUR: "perf" cache: key: i386-windows From git at git.haskell.org Thu Mar 21 17:01:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:52 +0000 (UTC) Subject: [commit: ghc] wip/windows-32bit: gitlab-ci: Pass --target explicitly to configure on Windows (8fadd9b) Message-ID: <20190321170152.2F4173A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/windows-32bit Link : http://ghc.haskell.org/trac/ghc/changeset/8fadd9b99ceface290d4bbe3b0f85d49a44eef0a/ghc >--------------------------------------------------------------- commit 8fadd9b99ceface290d4bbe3b0f85d49a44eef0a Author: Ben Gamari Date: Wed Mar 20 23:45:26 2019 -0400 gitlab-ci: Pass --target explicitly to configure on Windows Otherwise configure fails in the 32-bit case with ``` This GHC (c:/GitLabRunner/builds/8fc0e283/0/ghc/ghc/toolchain/bin/ghc) does not generate code for the build platform GHC target platform : x86_64-unknown-mingw32 Desired build platform : i386-unknown-mingw32 ``` >--------------------------------------------------------------- 8fadd9b99ceface290d4bbe3b0f85d49a44eef0a .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6a5998..e240cee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -477,7 +477,7 @@ nightly-i386-windows-hadrian: script: - | python boot - bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' + bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex $CONFIGURE_ARGS' - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" @@ -497,6 +497,7 @@ validate-x86_64-windows: extends: .build-windows-make variables: MSYSTEM: MINGW64 + CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32" cache: key: x86_64-windows @@ -506,6 +507,7 @@ release-x86_64-windows: variables: MSYSTEM: MINGW64 BUILD_FLAVOUR: "perf" + CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32" only: - tags @@ -516,6 +518,7 @@ release-i386-windows: variables: MSYSTEM: MINGW32 BUILD_FLAVOUR: "perf" + CONFIGURE_ARGS: "--target=i386-unknown-mingw32" cache: key: i386-windows @@ -526,6 +529,7 @@ nightly-i386-windows: - $NIGHTLY variables: MSYSTEM: MINGW32 + CONFIGURE_ARGS: "--target=i386-unknown-mingw32" cache: key: i386-windows From git at git.haskell.org Thu Mar 21 17:01:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:55 +0000 (UTC) Subject: [commit: ghc] wip/deploy-docs, wip/run-nofib: gitlab-ci: Run nofib on binary distributions (ab2210b) Message-ID: <20190321170155.3A1E53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/deploy-docs,wip/run-nofib Link : http://ghc.haskell.org/trac/ghc/changeset/ab2210b2b63fa6ccaefae20c31094b6e48a352d9/ghc >--------------------------------------------------------------- commit ab2210b2b63fa6ccaefae20c31094b6e48a352d9 Author: Ben Gamari Date: Thu Mar 21 01:42:27 2019 -0400 gitlab-ci: Run nofib on binary distributions >--------------------------------------------------------------- ab2210b2b63fa6ccaefae20c31094b6e48a352d9 .gitlab-ci.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0740047..6781411 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ stages: - full-build # Build all the things - cleanup # See Note [Cleanup on Windows] - packaging # Source distribution, etc. - - hackage # head.hackage testing + - testing # head.hackage, nofib testing ############################################################ # Runner Tags @@ -629,7 +629,7 @@ source-tarball: # pipeline. .hackage: - stage: hackage + stage: testing image: ghcci/x86_64-linux-deb9:0.2 tags: - x86_64-linux @@ -654,3 +654,27 @@ nightly-hackage: only: variables: - $NIGHTLY + +nofib: + stage: testing + dependencies: + - validate-x86_64-linux-deb9 + image: ghcci/x86_64-linux-deb9:0.2 + tags: + - x86_64-linux + script: + - root=$(pwd)/ghc + - | + tar -xf ghc-x86_64-deb9-linux.tar.xz + pushd ghc-* + ./configure --prefix=$root + make install + popd + - export BOOT_HC=$(which ghc) + - cabal update; cabal install -w $BOOT_HC regex-compat + - export PATH=$root/bin:$PATH + - make -C nofib boot mode=fast -j$CPUS + - "make -C nofib EXTRA_RUNTEST_OPTS='-cachegrind +RTS -V0 -RTS' NoFibRuns=1 mode=fast -j$CPUS > nofib.log" + artifacts: + paths: + - nofib.log From git at git.haskell.org Thu Mar 21 17:01:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:01:58 +0000 (UTC) Subject: [commit: ghc] wip/packaging-fail: CI: Allow failure in packaging step (022bfbc) Message-ID: <20190321170158.7B3873A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/packaging-fail Link : http://ghc.haskell.org/trac/ghc/changeset/022bfbcbbd9c130b3a40d664ed19c649a5a2b457/ghc >--------------------------------------------------------------- commit 022bfbcbbd9c130b3a40d664ed19c649a5a2b457 Author: Matthew Pickering Date: Thu Mar 21 08:27:55 2019 +0000 CI: Allow failure in packaging step This depends on the windows build which is still allowed to fail. If that job fails then the packaging job will also fail. >--------------------------------------------------------------- 022bfbcbbd9c130b3a40d664ed19c649a5a2b457 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0740047..7fad152 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -579,6 +579,7 @@ cleanup-darwin: doc-tarball: stage: packaging + allow_failure: true tags: - x86_64-linux image: ghcci/x86_64-linux-deb9:0.2 From git at git.haskell.org Thu Mar 21 17:02:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 17:02:01 +0000 (UTC) Subject: [commit: ghc] wip/deploy-docs: gitlab: Deploy documentation snapshot via GitLab Pages (2158569) Message-ID: <20190321170201.9C5A73A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/deploy-docs Link : http://ghc.haskell.org/trac/ghc/changeset/2158569dd25cfe7b0a93aaa83152361c7efe674a/ghc >--------------------------------------------------------------- commit 2158569dd25cfe7b0a93aaa83152361c7efe674a Author: Ben Gamari Date: Thu Mar 21 12:59:11 2019 -0400 gitlab: Deploy documentation snapshot via GitLab Pages >--------------------------------------------------------------- 2158569dd25cfe7b0a93aaa83152361c7efe674a .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6781411..432fb2e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ stages: - cleanup # See Note [Cleanup on Windows] - packaging # Source distribution, etc. - testing # head.hackage, nofib testing + - deploy # push documentation ############################################################ # Runner Tags @@ -678,3 +679,23 @@ nofib: artifacts: paths: - nofib.log + +pages: + stage: deploy + dependencies: + - doc-tarball + image: ghcci/x86_64-linux-deb9:0.2 + tags: + - x86_64-linux + script: + - mkdir -p public/doc + - tar -xf haddock.html.tar.xz -C public/doc + - tar -xf libraries.html.tar.xz -C public/doc + - tar -xf users_guide.html.tar.xz -C public/doc + - cp -f index.html public/doc + only: + - master + artifacts: + paths: + - public + From git at git.haskell.org Thu Mar 21 20:00:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 20:00:53 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T12561' created Message-ID: <20190321200053.8D1BE3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T12561 Referencing: 6d89d7d41e25c3aa7e81ec65e9262914912bbb02 From git at git.haskell.org Thu Mar 21 20:00:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 20:00:55 +0000 (UTC) Subject: [commit: ghc] branch 'wip/zap-coercions' created Message-ID: <20190321200055.8DBA73A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/zap-coercions Referencing: 293431c4b02c12ccfbd8d7c80788ea0d8b306ba4 From git at git.haskell.org Thu Mar 21 20:00:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 20:00:58 +0000 (UTC) Subject: [commit: ghc] wip/zap-coercions: Hello (38d3c67) Message-ID: <20190321200058.BB6E03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/zap-coercions Link : http://ghc.haskell.org/trac/ghc/changeset/38d3c67873187174f78ebec24f80f5af5dbd8f7f/ghc >--------------------------------------------------------------- commit 38d3c67873187174f78ebec24f80f5af5dbd8f7f Author: Ben Gamari Date: Fri Nov 23 15:50:45 2018 -0500 Hello >--------------------------------------------------------------- 38d3c67873187174f78ebec24f80f5af5dbd8f7f compiler/basicTypes/VarSet.hs | 5 +- compiler/coreSyn/CoreFVs.hs | 3 + compiler/coreSyn/CoreLint.hs | 2 +- compiler/coreSyn/CoreOpt.hs | 6 +- compiler/iface/IfaceEnv.hs | 2 +- compiler/iface/IfaceSyn.hs | 3 + compiler/iface/IfaceType.hs | 24 ++++ compiler/iface/TcIface.hs | 8 +- compiler/iface/ToIface.hs | 7 ++ compiler/main/DynFlags.hs | 25 ++++ compiler/typecheck/TcFlatten.hs | 42 +++++-- compiler/typecheck/TcHsType.hs | 1 + compiler/typecheck/TcTyDecls.hs | 3 + compiler/typecheck/TcType.hs | 1 + compiler/types/Coercion.hs | 14 +++ compiler/types/Coercion.hs-boot | 1 + compiler/types/FamInstEnv.hs | 3 + compiler/types/OptCoercion.hs | 15 ++- compiler/types/TyCoRep.hs | 263 ++++++++++++++++++++++++++++++++++++++-- compiler/types/Type.hs | 21 +++- 20 files changed, 419 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 38d3c67873187174f78ebec24f80f5af5dbd8f7f From git at git.haskell.org Thu Mar 21 20:01:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 20:01:02 +0000 (UTC) Subject: [commit: ghc] wip/T12561: WIP: Add test for #12561 (6d89d7d) Message-ID: <20190321200102.D4F023A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T12561 Link : http://ghc.haskell.org/trac/ghc/changeset/6d89d7d41e25c3aa7e81ec65e9262914912bbb02/ghc >--------------------------------------------------------------- commit 6d89d7d41e25c3aa7e81ec65e9262914912bbb02 Author: Matthew Pickering Date: Thu Mar 21 19:10:04 2019 +0000 WIP: Add test for #12561 The test still fails because it needs to filter out a line which mentions a unique. >--------------------------------------------------------------- 6d89d7d41e25c3aa7e81ec65e9262914912bbb02 testsuite/tests/th/T12561.hs | 7 +++++++ testsuite/tests/th/T12561.stderr | 20 ++++++++++++++++++++ testsuite/tests/th/T12561A.hs | 23 +++++++++++++++++++++++ testsuite/tests/th/all.T | 1 + 4 files changed, 51 insertions(+) diff --git a/testsuite/tests/th/T12561.hs b/testsuite/tests/th/T12561.hs new file mode 100644 index 0000000..6dfef1a --- /dev/null +++ b/testsuite/tests/th/T12561.hs @@ -0,0 +1,7 @@ +{-# Language TemplateHaskell #-} + +module T12561 where + +import T12561A + +main = $$(t1) + $$(t2) diff --git a/testsuite/tests/th/T12561.stderr b/testsuite/tests/th/T12561.stderr new file mode 100644 index 0000000..dc4f68b --- /dev/null +++ b/testsuite/tests/th/T12561.stderr @@ -0,0 +1,20 @@ + +T12561.hs:7:20: error: + • The exact Name ‘x’ is not in scope + Probable cause: you used a unique Template Haskell name (NameU), + perhaps via newName, but did not bind it + If that's it, then -ddump-splices might be useful + • In the result of the splice: + $t2 + To see what the splice expanded to, use -ddump-splices + In the Template Haskell splice $$(t2) + In the second argument of ‘(+)’, namely ‘$$(t2)’ + +T12561.hs:7:20: error: + • GHC internal error: ‘x’ is not in scope during type checking, but it passed the renamer + tcl_env of environment: [r3ej :-> Identifier[main::t1, TopLevelLet {} False]] + • In the expression: x + In the result of the splice: + $t2 + To see what the splice expanded to, use -ddump-splices + In the Template Haskell splice $$(t2) diff --git a/testsuite/tests/th/T12561A.hs b/testsuite/tests/th/T12561A.hs new file mode 100644 index 0000000..c3a4e93 --- /dev/null +++ b/testsuite/tests/th/T12561A.hs @@ -0,0 +1,23 @@ +{-# Language TemplateHaskell #-} + +module T12561A where + +import Language.Haskell.TH +import Language.Haskell.TH.Syntax + +import Data.IORef + +t1 = do + c1 <- [|| (1::Int) + 2 ||] + c2 <- [|| 3 + $$(return c1) ||] + return c2 + +t2 :: Q (TExp Int) +t2 = do + r <- runIO $ newIORef undefined + c1 <- [|| \x -> (1::Int) + + $$(do + xv <- [||x||] + runIO $ writeIORef r xv + return xv) ||] + runIO $ readIORef r diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index c9f2065..c4f3775 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -473,3 +473,4 @@ test('T16195', normal, multimod_compile, ['T16195.hs', '-v0']) test('T16293b', normal, compile, ['']) test('T16326_TH', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) test('T14741', normal, compile_and_run, ['']) +test('T12561', normal, multimod_compile_fail, ['T12561.hs', '-v0 -dsuppress-uniques']) From git at git.haskell.org Thu Mar 21 20:01:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 20:01:05 +0000 (UTC) Subject: [commit: ghc] wip/zap-coercions: Fixes (293431c) Message-ID: <20190321200105.DF2243A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/zap-coercions Link : http://ghc.haskell.org/trac/ghc/changeset/293431c4b02c12ccfbd8d7c80788ea0d8b306ba4/ghc >--------------------------------------------------------------- commit 293431c4b02c12ccfbd8d7c80788ea0d8b306ba4 Author: Ben Gamari Date: Thu Mar 21 15:42:53 2019 -0400 Fixes >--------------------------------------------------------------- 293431c4b02c12ccfbd8d7c80788ea0d8b306ba4 compiler/iface/TcIface.hs | 2 +- compiler/typecheck/TcFlatten.hs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 412af35..dbfad9c 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -1214,7 +1214,7 @@ tcIfaceCo = \co0 -> do co <- go co0 if shouldBuildCoercions dflags then return co - else do return $ zapCoercion dflags co + else return $ zapCoercion dflags co where go_mco IfaceMRefl = pure MRefl go_mco (IfaceMCo co) = MCo <$> (go co) diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs index b83ac65..47fde1d 100644 --- a/compiler/typecheck/TcFlatten.hs +++ b/compiler/typecheck/TcFlatten.hs @@ -27,6 +27,7 @@ import TcSMonad as TcS import BasicTypes( SwapFlag(..) ) import Util +import Pair import Bag import Control.Monad import MonadUtils ( zipWith3M ) @@ -1334,7 +1335,7 @@ flatten_exact_fam_app_fully tc tys -- See Note [Reduce type family applications eagerly] -- the following tcTypeKind should never be evaluated, as it's just used in -- casting, and casts by refl are dropped - = do { mOut <- try_to_reduce_nocache tc emptyDVarSet tys + = do { mOut <- try_to_reduce_nocache tc tys emptyDVarSet ; case mOut of Just out -> pure out Nothing -> do @@ -1467,7 +1468,7 @@ flatten_exact_fam_app_fully tc tys -> [Type] -- args, not necessarily flattened -> DTyCoVarSet -- free variables of ret_co -> FlatM (Maybe (Xi, Coercion)) - try_to_reduce_nocache tc tys fvs_ret_co update_co + try_to_reduce_nocache tc tys fvs_ret_co = do { let fvs = filterDVarSet isCoVar $ tyCoVarsOfTypesDSet tys `unionDVarSet` fvs_ret_co -- See Note [Zapping coercions] in TyCoRep @@ -1481,10 +1482,10 @@ flatten_exact_fam_app_fully tc tys Just (norm_co, norm_ty) -> do { (xi, final_co) <- bumpDepth $ flatten_one norm_ty ; eq_rel <- getEqRel - ; let co = mkZappedCo dflags - $ mkSymCo (maybeSubCo eq_rel norm_co + ; let co = mkSymCo (maybeSubCo eq_rel norm_co `mkTransCo` mkSymCo final_co) - ; return $ Just (xi, co) } + co' = mkZappedCoercion dflags co (Pair xi fam_ty) Nominal fvs + ; return $ Just (xi, co') } Nothing -> pure Nothing } {- Note [Reduce type family applications eagerly] From git at git.haskell.org Thu Mar 21 21:49:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 21 Mar 2019 21:49:35 +0000 (UTC) Subject: [commit: ghc] master: Fix typo [skip ci] (84c77a6) Message-ID: <20190321214935.8C0F03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/84c77a675ccc4b6bbd0f271d7859266872eab777/ghc >--------------------------------------------------------------- commit 84c77a675ccc4b6bbd0f271d7859266872eab777 Author: Alexandre Esteves Date: Fri Mar 15 18:42:50 2019 -0400 Fix typo [skip ci] >--------------------------------------------------------------- 84c77a675ccc4b6bbd0f271d7859266872eab777 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 82cc9fa..73d81df 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -1085,7 +1085,7 @@ permutations xs0 = xs0 : perms xs0 [] -- It is a special case of 'sortBy', which allows the programmer to supply -- their own comparison function. -- --- Elements are arranged from from lowest to highest, keeping duplicates in +-- Elements are arranged from lowest to highest, keeping duplicates in -- the order they appeared in the input. -- -- >>> sort [1,6,4,3,2,5] From git at git.haskell.org Fri Mar 22 04:01:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 04:01:10 +0000 (UTC) Subject: [commit: ghc] master: Run linters on merge requests (322239d) Message-ID: <20190322040110.284523A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/322239de9555ff753db08d1508ee52a484c89093/ghc >--------------------------------------------------------------- commit 322239de9555ff753db08d1508ee52a484c89093 Author: Matthew Pickering Date: Mon Feb 18 17:28:39 2019 +0000 Run linters on merge requests It seems that it has failed to execute at all since it was implemented. We now run the linters on merge requests. >--------------------------------------------------------------- 322239de9555ff753db08d1508ee52a484c89093 .gitlab-ci.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0740047..84f0816 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 07bd4acf4f91b56e22389d7b7f6c13486a7b63de + DOCKER_REV: cefaee3c742af193e0f7783f87edb0d35374515c before_script: - python3 .gitlab/fix-submodules.py @@ -19,6 +19,13 @@ stages: - packaging # Source distribution, etc. - hackage # head.hackage testing +.only-default: &only-default + only: + - master + - /ghc-[0-9]+\.[0-9]+/ + - merge_requests + - tags + ############################################################ # Runner Tags ############################################################ @@ -39,24 +46,58 @@ ghc-linters: stage: lint image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - - | - if [ -n "$CI_MERGE_REQUEST_ID" ]; then - base="$(git merge-base $CI_MERGE_REQUEST_BRANCH_NAME HEAD)" - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA - fi + - git fetch origin + - git checkout "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" + - git reset --hard "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" + - echo "$CI_MERGE_REQUEST_ID" + - echo "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" + - echo "$CI_COMMIT_SHA" + - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" + - echo $base + # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) + - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) + - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA + - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA dependencies: [] tags: - lint + only: + refs: + - merge_requests + +# We allow the submodule checker to fail when run on merge requests (to +# accomodate, e.g., haddock changes not yet upstream) but not on `master` or +# Marge jobs. +.lint-submods: + stage: lint + image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" + script: + - submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA) + dependencies: [] + tags: + - lint + +lint-submods: + extends: .lint-submods + only: + refs: + - master + - /ghc-[0-9]+\.[0-9]+/ + - wip/marge_bot_batch_merge_job + +lint-submods-mr: + extends: .lint-submods + allow_failure: true + only: + refs: + - merge_requests ############################################################ # Validation via Pipelines (hadrian) ############################################################ .validate-hadrian: + <<: *only-default allow_failure: true script: - cabal update @@ -92,6 +133,7 @@ validate-x86_64-linux-deb8-hadrian: - x86_64-linux hadrian-ghc-in-ghci: + <<: *only-default stage: build image: ghcci/x86_64-linux-deb8:0.1 before_script: @@ -122,6 +164,7 @@ hadrian-ghc-in-ghci: ############################################################ .validate: + <<: *only-default variables: TEST_TYPE: test before_script: @@ -396,6 +439,7 @@ validate-x86_64-linux-fedora27: ############################################################ .build-windows: + <<: *only-default before_script: - git clean -xdf - git submodule foreach git clean -xdf @@ -535,6 +579,7 @@ nightly-i386-windows: # See Note [Cleanup after shell executor] cleanup-windows: + <<: *only-default stage: cleanup tags: - x86_64-windows @@ -557,6 +602,7 @@ cleanup-windows: # See Note [Cleanup after shell executor] cleanup-darwin: + <<: *only-default stage: cleanup tags: - x86_64-darwin @@ -578,6 +624,7 @@ cleanup-darwin: ############################################################ doc-tarball: + <<: *only-default stage: packaging tags: - x86_64-linux @@ -629,6 +676,7 @@ source-tarball: # pipeline. .hackage: + <<: *only-default stage: hackage image: ghcci/x86_64-linux-deb9:0.2 tags: From git at git.haskell.org Fri Mar 22 04:01:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 04:01:13 +0000 (UTC) Subject: [commit: ghc] master: Only run check-makefiles.py linter in testsuite dir (7092b2d) Message-ID: <20190322040113.33AC93A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7092b2de6fb8f23e03c0be7bd23bf394e087fc00/ghc >--------------------------------------------------------------- commit 7092b2de6fb8f23e03c0be7bd23bf394e087fc00 Author: Matthew Pickering Date: Wed Mar 20 14:17:54 2019 +0000 Only run check-makefiles.py linter in testsuite dir >--------------------------------------------------------------- 7092b2de6fb8f23e03c0be7bd23bf394e087fc00 .gitlab/linters/check-makefiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/linters/check-makefiles.py b/.gitlab/linters/check-makefiles.py index c97838b..4e4924c 100755 --- a/.gitlab/linters/check-makefiles.py +++ b/.gitlab/linters/check-makefiles.py @@ -16,4 +16,4 @@ linters = [ ] if __name__ == '__main__': - run_linters(linters) #$, subdir='testsuite') + run_linters(linters, subdir='testsuite') From git at git.haskell.org Fri Mar 22 04:01:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 04:01:16 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Do full `perf` build when building Windows releases (8f8d532) Message-ID: <20190322040116.39E133A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8f8d532c6c9ade79c5ba1a6e08b3e082db1a5fcd/ghc >--------------------------------------------------------------- commit 8f8d532c6c9ade79c5ba1a6e08b3e082db1a5fcd Author: Ben Gamari Date: Fri Mar 8 10:05:45 2019 -0500 gitlab-ci: Do full `perf` build when building Windows releases >--------------------------------------------------------------- 8f8d532c6c9ade79c5ba1a6e08b3e082db1a5fcd .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84f0816..2f20430 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -515,13 +515,14 @@ nightly-i386-windows-hadrian: # due to #16084 allow_failure: true variables: + BUILD_FLAVOUR: "quick" GHC_VERSION: "8.6.2" BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-mingw32.tar.xz" script: - | python boot bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - - bash -c "echo include mk/flavours/quick.mk > mk/build.mk" + - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' @@ -543,12 +544,22 @@ validate-x86_64-windows: cache: key: x86_64-windows +# Normal Windows validate builds are profiled; that won't do for releases. +release-x86_64-windows: + extends: validate-x86_64-windows + variables: + MSYSTEM: MINGW64 + BUILD_FLAVOUR: "perf" + only: + - tags + release-i386-windows: extends: .build-windows-make only: - tags variables: MSYSTEM: MINGW32 + BUILD_FLAVOUR: "perf" cache: key: i386-windows From git at git.haskell.org Fri Mar 22 04:01:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 04:01:19 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Pass --target explicitly to configure on Windows (2ef72d3) Message-ID: <20190322040119.3FD1D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2ef72d3f2b40f4a180501507797378952fc38bae/ghc >--------------------------------------------------------------- commit 2ef72d3f2b40f4a180501507797378952fc38bae Author: Ben Gamari Date: Wed Mar 20 23:45:26 2019 -0400 gitlab-ci: Pass --target explicitly to configure on Windows Otherwise configure fails in the 32-bit case with ``` This GHC (c:/GitLabRunner/builds/8fc0e283/0/ghc/ghc/toolchain/bin/ghc) does not generate code for the build platform GHC target platform : x86_64-unknown-mingw32 Desired build platform : i386-unknown-mingw32 ``` >--------------------------------------------------------------- 2ef72d3f2b40f4a180501507797378952fc38bae .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f20430..0364cec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -521,7 +521,7 @@ nightly-i386-windows-hadrian: script: - | python boot - bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' + bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex $CONFIGURE_ARGS' - bash -c "echo include mk/flavours/${BUILD_FLAVOUR}.mk > mk/build.mk" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make -j`mk/detect-cpu-count.sh`" - bash -c "PATH=`pwd`/toolchain/bin:$PATH make binary-dist TAR_COMP_OPTS=-1" @@ -541,6 +541,7 @@ validate-x86_64-windows: extends: .build-windows-make variables: MSYSTEM: MINGW64 + CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32" cache: key: x86_64-windows @@ -550,6 +551,7 @@ release-x86_64-windows: variables: MSYSTEM: MINGW64 BUILD_FLAVOUR: "perf" + CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32" only: - tags @@ -560,6 +562,7 @@ release-i386-windows: variables: MSYSTEM: MINGW32 BUILD_FLAVOUR: "perf" + CONFIGURE_ARGS: "--target=i386-unknown-mingw32" cache: key: i386-windows @@ -570,6 +573,7 @@ nightly-i386-windows: - $NIGHTLY variables: MSYSTEM: MINGW32 + CONFIGURE_ARGS: "--target=i386-unknown-mingw32" cache: key: i386-windows From git at git.haskell.org Fri Mar 22 04:01:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 04:01:22 +0000 (UTC) Subject: [commit: ghc] master: Bump cabal submodule (8b14f53) Message-ID: <20190322040122.4ADC53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8b14f536b8ddbb83341464c5d07066ad8c3960d3/ghc >--------------------------------------------------------------- commit 8b14f536b8ddbb83341464c5d07066ad8c3960d3 Author: Ben Gamari Date: Wed Mar 20 09:39:31 2019 -0400 Bump cabal submodule Due to https://github.com/haskell/cabal/issues/5953. >--------------------------------------------------------------- 8b14f536b8ddbb83341464c5d07066ad8c3960d3 libraries/Cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Cabal b/libraries/Cabal index 59c223f..5d25853 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit 59c223f81288667d90e6de479e6ab5622eae610c +Subproject commit 5d258537b754005d2a1d170b44d764b63ff4fc75 From git at git.haskell.org Fri Mar 22 15:00:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 15:00:47 +0000 (UTC) Subject: [commit: ghc] master: CI: Allow failure in packaging step (dbe4557) Message-ID: <20190322150047.0EC0C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/dbe4557f0cfb863b1e6267a0f6a6e6d2cf10430a/ghc >--------------------------------------------------------------- commit dbe4557f0cfb863b1e6267a0f6a6e6d2cf10430a Author: Matthew Pickering Date: Thu Mar 21 08:27:55 2019 +0000 CI: Allow failure in packaging step This depends on the windows build which is still allowed to fail. If that job fails then the packaging job will also fail. >--------------------------------------------------------------- dbe4557f0cfb863b1e6267a0f6a6e6d2cf10430a .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0364cec..8e5e7f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -641,6 +641,7 @@ cleanup-darwin: doc-tarball: <<: *only-default stage: packaging + allow_failure: true tags: - x86_64-linux image: ghcci/x86_64-linux-deb9:0.2 From git at git.haskell.org Fri Mar 22 15:00:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 15:00:50 +0000 (UTC) Subject: [commit: ghc] master: gitlab: Deploy documentation snapshot via GitLab Pages (366f1c6) Message-ID: <20190322150050.1613E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/366f1c68c1b688baab61934eee62c5a7992db525/ghc >--------------------------------------------------------------- commit 366f1c68c1b688baab61934eee62c5a7992db525 Author: Ben Gamari Date: Thu Mar 21 12:59:11 2019 -0400 gitlab: Deploy documentation snapshot via GitLab Pages >--------------------------------------------------------------- 366f1c68c1b688baab61934eee62c5a7992db525 .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e5e7f7..ee0543a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ stages: - cleanup # See Note [Cleanup on Windows] - packaging # Source distribution, etc. - hackage # head.hackage testing + - deploy # push documentation .only-default: &only-default only: @@ -718,3 +719,23 @@ nightly-hackage: only: variables: - $NIGHTLY + +pages: + stage: deploy + dependencies: + - doc-tarball + image: ghcci/x86_64-linux-deb9:0.2 + tags: + - x86_64-linux + script: + - mkdir -p public/doc + - tar -xf haddock.html.tar.xz -C public/doc + - tar -xf libraries.html.tar.xz -C public/doc + - tar -xf users_guide.html.tar.xz -C public/doc + - cp -f index.html public/doc + only: + - master + artifacts: + paths: + - public + From git at git.haskell.org Fri Mar 22 15:00:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 15:00:53 +0000 (UTC) Subject: [commit: ghc] master: Force LF line ending for md5sum [skip-ci] (d608d54) Message-ID: <20190322150053.538803A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d608d5434772c121759535d13c286a676abb565f/ghc >--------------------------------------------------------------- commit d608d5434772c121759535d13c286a676abb565f Author: Tamar Christina Date: Thu Mar 21 19:47:06 2019 +0000 Force LF line ending for md5sum [skip-ci] >--------------------------------------------------------------- d608d5434772c121759535d13c286a676abb565f .gitattributes | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7dc0871 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +mk/win32-tarballs.md5sum text=auto eol=LF diff --git a/.gitignore b/.gitignore index aab7b86..b74fc13 100644 --- a/.gitignore +++ b/.gitignore @@ -191,6 +191,7 @@ utils/unlit/fs.* rts/fs.* libraries/base/include/fs.h libraries/base/cbits/fs.c +missing-win32-tarballs /extra-gcc-opts /sdistprep From git at git.haskell.org Fri Mar 22 22:34:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 22:34:17 +0000 (UTC) Subject: [commit: ghc] master: base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead (ab51bee) Message-ID: <20190322223417.8F9893A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/ab51bee40c82cd552bcf13e24b67d43f3b8d25f3/ghc >--------------------------------------------------------------- commit ab51bee40c82cd552bcf13e24b67d43f3b8d25f3 Author: Herbert Valerio Riedel Date: Sat Nov 10 01:12:52 2018 +0100 base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail Coauthored-by: Ben Gamari >--------------------------------------------------------------- ab51bee40c82cd552bcf13e24b67d43f3b8d25f3 compiler/ghc.cabal.in | 1 - compiler/main/DynFlags.hs | 12 +-- compiler/prelude/PrelNames.hs | 14 +-- compiler/rename/RnExpr.hs | 17 ++-- compiler/rename/RnSource.hs | 43 --------- compiler/simplCore/SimplCore.hs | 14 +-- compiler/typecheck/TcMatches.hs | 42 +------- ghc/ghc-bin.cabal.in | 1 - libraries/base/Control/Monad.hs | 4 +- libraries/base/Control/Monad/ST/Lazy/Imp.hs | 3 - libraries/base/GHC/Base.hs | 16 --- libraries/base/GHC/Conc/Sync.hs | 2 +- libraries/base/GHC/TopHandler.hs | 2 +- libraries/base/Prelude.hs | 3 +- libraries/base/System/IO.hs | 4 +- libraries/base/Text/ParserCombinators/ReadP.hs | 3 - libraries/base/Text/ParserCombinators/ReadPrec.hs | 1 - libraries/base/base.cabal | 4 +- libraries/hpc | 2 +- testsuite/tests/ado/ado004.stderr | 2 +- .../backpack/cabal/T16219/backpack-issue.cabal | 8 +- .../tests/backpack/should_compile/bkp16.stderr | 4 +- .../tests/backpack/should_fail/bkpfail16.stderr | 4 +- .../tests/backpack/should_fail/bkpfail17.stderr | 4 +- .../tests/backpack/should_fail/bkpfail19.stderr | 4 +- testsuite/tests/deSugar/should_run/dsrun010.hs | 6 +- .../tests/dependent/should_compile/T14729.stderr | 2 +- .../tests/dependent/should_compile/T15743.stderr | 2 +- .../tests/dependent/should_compile/T15743e.stderr | 2 +- testsuite/tests/determinism/determ017/A.hs | 8 +- .../tests/determinism/determ021/determ021.stdout | 4 +- testsuite/tests/driver/json2.stderr | 2 +- testsuite/tests/ghci/scripts/T4175.stdout | 1 + testsuite/tests/ghci/scripts/ghci008.stdout | 4 +- testsuite/tests/ghci/scripts/ghci011.stdout | 1 + testsuite/tests/ghci/scripts/ghci025.stdout | 1 - .../indexed-types/should_compile/T15711.stderr | 2 +- .../indexed-types/should_compile/T15852.stderr | 2 +- .../indexed-types/should_compile/T3017.stderr | 2 +- testsuite/tests/monadfail/MonadFailErrors.hs | 2 - testsuite/tests/monadfail/MonadFailErrors.stderr | 8 +- testsuite/tests/monadfail/MonadFailWarnings.hs | 107 --------------------- testsuite/tests/monadfail/MonadFailWarnings.stderr | 47 --------- .../tests/monadfail/MonadFailWarningsDisabled.hs | 100 ------------------- .../MonadFailWarningsWithRebindableSyntax.hs | 14 --- .../MonadFailWarningsWithRebindableSyntax.stderr | 5 - testsuite/tests/monadfail/all.T | 3 - .../tests/partial-sigs/should_compile/ADT.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr1.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr2.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr3.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr4.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr5.stderr | 2 +- .../partial-sigs/should_compile/AddAndOr6.stderr | 2 +- .../partial-sigs/should_compile/BoolToBool.stderr | 2 +- .../should_compile/DataFamilyInstanceLHS.stderr | 2 +- .../should_compile/Defaulting1MROn.stderr | 2 +- .../should_compile/Defaulting2MROff.stderr | 2 +- .../should_compile/Defaulting2MROn.stderr | 2 +- .../partial-sigs/should_compile/Either.stderr | 2 +- .../should_compile/EqualityConstraint.stderr | 2 +- .../tests/partial-sigs/should_compile/Every.stderr | 2 +- .../partial-sigs/should_compile/EveryNamed.stderr | 2 +- .../should_compile/ExpressionSig.stderr | 2 +- .../should_compile/ExpressionSigNamed.stderr | 2 +- .../should_compile/ExtraConstraints1.stderr | 2 +- .../should_compile/ExtraConstraints2.stderr | 2 +- .../should_compile/ExtraConstraints3.stderr | 4 +- .../should_compile/ExtraNumAMROff.stderr | 2 +- .../should_compile/ExtraNumAMROn.stderr | 2 +- .../partial-sigs/should_compile/Forall1.stderr | 2 +- .../partial-sigs/should_compile/GenNamed.stderr | 2 +- .../partial-sigs/should_compile/HigherRank1.stderr | 2 +- .../partial-sigs/should_compile/HigherRank2.stderr | 2 +- .../should_compile/LocalDefinitionBug.stderr | 2 +- .../partial-sigs/should_compile/Meltdown.stderr | 2 +- .../should_compile/MonoLocalBinds.stderr | 2 +- .../partial-sigs/should_compile/NamedTyVar.stderr | 2 +- .../NamedWildcardInDataFamilyInstanceLHS.stderr | 2 +- .../NamedWildcardInTypeFamilyInstanceLHS.stderr | 2 +- .../should_compile/ParensAroundContext.stderr | 2 +- .../partial-sigs/should_compile/PatBind.stderr | 2 +- .../partial-sigs/should_compile/PatBind2.stderr | 2 +- .../partial-sigs/should_compile/PatternSig.stderr | 2 +- .../partial-sigs/should_compile/Recursive.stderr | 2 +- .../should_compile/ScopedNamedWildcards.stderr | 2 +- .../should_compile/ScopedNamedWildcardsGood.stderr | 2 +- .../partial-sigs/should_compile/ShowNamed.stderr | 2 +- .../partial-sigs/should_compile/SimpleGen.stderr | 2 +- .../partial-sigs/should_compile/SkipMany.stderr | 2 +- .../should_compile/SomethingShowable.stderr | 2 +- .../should_compile/TypeFamilyInstanceLHS.stderr | 2 +- .../partial-sigs/should_compile/Uncurry.stderr | 2 +- .../should_compile/UncurryNamed.stderr | 2 +- .../WarningWildcardInstantiations.stderr | 2 +- testsuite/tests/perf/compiler/T3064.hs | 2 + testsuite/tests/polykinds/T15592.stderr | 2 +- testsuite/tests/polykinds/T15592b.stderr | 2 +- testsuite/tests/profiling/should_run/T3001-2.hs | 1 + testsuite/tests/programs/galois_raytrace/Eval.hs | 3 +- testsuite/tests/quasiquotation/qq005/Expr.hs | 2 +- testsuite/tests/quasiquotation/qq006/Expr.hs | 2 +- testsuite/tests/rebindable/DoRestrictedM.hs | 6 +- testsuite/tests/rebindable/RebindableFailA.hs | 19 ++++ testsuite/tests/rebindable/RebindableFailA.stderr | 3 + testsuite/tests/rebindable/RebindableFailB.hs | 20 ++++ testsuite/tests/rebindable/RebindableFailB.stdout | 1 + testsuite/tests/rebindable/T5908.hs | 5 - testsuite/tests/rebindable/all.T | 6 +- testsuite/tests/rebindable/rebindable1.hs | 3 +- testsuite/tests/rebindable/rebindable11.hs | 15 --- testsuite/tests/rebindable/rebindable11.stderr | 0 testsuite/tests/rebindable/rebindable12.hs | 14 --- testsuite/tests/rebindable/rebindable12.stderr | 4 - testsuite/tests/rebindable/rebindable2.hs | 6 +- .../tests/rename/should_fail/rnfail040.stderr | 2 +- testsuite/tests/roles/should_compile/Roles1.stderr | 2 +- .../tests/roles/should_compile/Roles14.stderr | 2 +- testsuite/tests/roles/should_compile/Roles2.stderr | 2 +- testsuite/tests/roles/should_compile/Roles3.stderr | 2 +- testsuite/tests/roles/should_compile/Roles4.stderr | 2 +- testsuite/tests/roles/should_compile/T8958.stderr | 2 +- testsuite/tests/safeHaskell/check/Check01.stderr | 2 +- testsuite/tests/safeHaskell/check/Check06.stderr | 2 +- testsuite/tests/safeHaskell/check/Check08.stderr | 2 +- testsuite/tests/safeHaskell/check/Check09.stderr | 4 +- .../tests/safeHaskell/check/pkg01/ImpSafe01.stderr | 2 +- .../tests/safeHaskell/check/pkg01/ImpSafe04.stderr | 2 +- .../tests/safeHaskell/flags/SafeFlags17.stderr | 2 +- testsuite/tests/simplCore/prog002/Simpl009Help.hs | 3 - testsuite/tests/simplCore/should_compile/T8331.hs | 2 + testsuite/tests/th/T15321.stderr | 4 +- .../tests/typecheck/should_compile/T12763.stderr | 2 +- .../tests/typecheck/should_compile/T15645.stderr | 4 - testsuite/tests/typecheck/should_compile/T4524.hs | 2 + testsuite/tests/typecheck/should_compile/T4969.hs | 1 - .../tests/typecheck/should_compile/Tc239_Help.hs | 1 - .../abstract_refinement_hole_fits.stderr | 8 -- .../should_compile/constraint_hole_fits.stderr | 2 - .../should_compile/refinement_hole_fits.stderr | 10 -- .../subsumption_sort_hole_fits.stderr | 12 +-- .../tests/typecheck/should_compile/tc231.stderr | 2 +- .../should_compile/valid_hole_fits.stderr | 4 +- .../should_fail/TcStaticPointersFail02.stderr | 4 +- .../tests/typecheck/should_fail/tcfail182.stderr | 2 +- .../tests/typecheck/should_run/T1735_Help/State.hs | 4 +- testsuite/tests/warnings/should_compile/T11128.hs | 50 ---------- .../tests/warnings/should_compile/T11128.stderr | 20 ---- testsuite/tests/warnings/should_compile/T11128b.hs | 64 ------------ .../tests/warnings/should_compile/T11128b.stderr | 10 -- testsuite/tests/warnings/should_compile/all.T | 2 - testsuite/tests/wcompat-warnings/Template.hs | 7 +- .../wcompat-warnings/WCompatWarningsOn.stderr | 29 +----- 153 files changed, 230 insertions(+), 802 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 ab51bee40c82cd552bcf13e24b67d43f3b8d25f3 From git at git.haskell.org Fri Mar 22 22:34:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 22:34:20 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Fix linters (cd07086) Message-ID: <20190322223420.9411F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cd07086ada34888c08585f4dc98a961618748ed0/ghc >--------------------------------------------------------------- commit cd07086ada34888c08585f4dc98a961618748ed0 Author: Ben Gamari Date: Fri Mar 22 00:46:37 2019 -0400 gitlab-ci: Fix linters >--------------------------------------------------------------- cd07086ada34888c08585f4dc98a961618748ed0 .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee0543a..86d0fde 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,7 @@ ghc-linters: # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA + - git checkout "$CI_COMMIT_SHA" - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA dependencies: [] tags: From git at git.haskell.org Fri Mar 22 22:34:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 22:34:23 +0000 (UTC) Subject: [commit: ghc] master: gitlab-ci: Clean up linter (266b49c) Message-ID: <20190322223423.9BCF63A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/266b49ca3f3f8846eae29d984eb04339dbc0c2c5/ghc >--------------------------------------------------------------- commit 266b49ca3f3f8846eae29d984eb04339dbc0c2c5 Author: Ben Gamari Date: Fri Mar 22 18:33:08 2019 -0400 gitlab-ci: Clean up linter I'm not sure why these steps were done but they seem counterproductive and unnecessary. >--------------------------------------------------------------- 266b49ca3f3f8846eae29d984eb04339dbc0c2c5 .gitlab-ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86d0fde..3c22c60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,17 +48,11 @@ ghc-linters: image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - git fetch origin - - git checkout "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" - - git reset --hard "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" - - echo "$CI_MERGE_REQUEST_ID" - - echo "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" - - echo "$CI_COMMIT_SHA" - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" - - echo $base + - echo "Merge base: $base" # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA - - git checkout "$CI_COMMIT_SHA" - .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA dependencies: [] tags: From git at git.haskell.org Fri Mar 22 23:00:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 23:00:45 +0000 (UTC) Subject: [commit: ghc] branch 'wip/cleanup-lint' created Message-ID: <20190322230045.6BEC93A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/cleanup-lint Referencing: 971f4530004868b9a043252d6f25081388d99e0d From git at git.haskell.org Fri Mar 22 23:00:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 23:00:48 +0000 (UTC) Subject: [commit: ghc] master, wip/cleanup-lint: gitlab-ci: Fix YAML syntax (44b08ed) Message-ID: <20190322230048.7A6B33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: master,wip/cleanup-lint Link : http://ghc.haskell.org/trac/ghc/changeset/44b08ede3f4afb05a55c1acd5b644a38e0fb14f5/ghc >--------------------------------------------------------------- commit 44b08ede3f4afb05a55c1acd5b644a38e0fb14f5 Author: Ben Gamari Date: Fri Mar 22 18:38:11 2019 -0400 gitlab-ci: Fix YAML syntax >--------------------------------------------------------------- 44b08ede3f4afb05a55c1acd5b644a38e0fb14f5 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c22c60..01fcc6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,7 +49,7 @@ ghc-linters: script: - git fetch origin - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" - - echo "Merge base: $base" + - "echo Merge base $base" # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA From git at git.haskell.org Fri Mar 22 23:00:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 22 Mar 2019 23:00:51 +0000 (UTC) Subject: [commit: ghc] wip/cleanup-lint: gitlab-ci: Compute merge base against remote tracking branch (971f453) Message-ID: <20190322230051.809A13A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/cleanup-lint Link : http://ghc.haskell.org/trac/ghc/changeset/971f4530004868b9a043252d6f25081388d99e0d/ghc >--------------------------------------------------------------- commit 971f4530004868b9a043252d6f25081388d99e0d Author: Ben Gamari Date: Fri Mar 22 18:49:34 2019 -0400 gitlab-ci: Compute merge base against remote tracking branch Previously we would use the local branch with the name `$CI_MERGE_REQUEST_TARGET_BRANCH_NAME` to compute the merge base when linting. However, this branch isn't necessarily up-to-date. We should rather use `origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME`. >--------------------------------------------------------------- 971f4530004868b9a043252d6f25081388d99e0d .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01fcc6a..f22354a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ ghc-linters: image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - git fetch origin - - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" + - base="$(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" - "echo Merge base $base" # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) From git at git.haskell.org Sat Mar 23 00:00:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 23 Mar 2019 00:00:57 +0000 (UTC) Subject: [commit: ghc] wip/cleanup-lint: gitlab-ci: Avoid relying on target branch name (30f09be) Message-ID: <20190323000057.DFFD63A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/cleanup-lint Link : http://ghc.haskell.org/trac/ghc/changeset/30f09be6f081e373277c35425fc0fca4d73fc699/ghc >--------------------------------------------------------------- commit 30f09be6f081e373277c35425fc0fca4d73fc699 Author: Ben Gamari Date: Fri Mar 22 19:34:05 2019 -0400 gitlab-ci: Avoid relying on target branch name When computing the merge base for the linters don't rely on the target branch name as this is rather fragile. Instead we can just use `$CI_MERGE_REQUEST_TARGET_BRANCH_SHA`. >--------------------------------------------------------------- 30f09be6f081e373277c35425fc0fca4d73fc699 .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f22354a..4a480ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,9 +47,10 @@ ghc-linters: stage: lint image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV" script: - - git fetch origin - - base="$(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA)" - - "echo Merge base $base" + - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_SHA + - "echo Target branch SHA: $CI_MERGE_REQUEST_TARGET_BRANCH_SHA" + - base="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_SHA $CI_COMMIT_SHA)" + - "echo Merge base: $base" # - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA) - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA) - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA From git at git.haskell.org Sat Mar 23 00:01:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 23 Mar 2019 00:01:00 +0000 (UTC) Subject: [commit: ghc] master's head updated: gitlab-ci: Compute merge base against remote tracking branch (971f453) Message-ID: <20190323000100.E080A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 971f453 gitlab-ci: Compute merge base against remote tracking branch From git at git.haskell.org Sun Mar 31 15:05:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:46 +0000 (UTC) Subject: [commit: ghc] branch 'wip/test' created Message-ID: <20190331150546.258593A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/test Referencing: 3c6be20ef4d58e475863ae79bd09de43ff7e0e01 From git at git.haskell.org Sun Mar 31 15:05:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:48 +0000 (UTC) Subject: [commit: ghc] branch 'ghc-8.6-merges' created Message-ID: <20190331150548.253213A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : ghc-8.6-merges Referencing: bdc9680cc5fe36f09b263d886e8b4e99d5c84635 From git at git.haskell.org Sun Mar 31 15:05:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:50 +0000 (UTC) Subject: [commit: ghc] branch 'ghc-8.6-ci' created Message-ID: <20190331150550.265803A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : ghc-8.6-ci Referencing: 0b12e01d868255b4eeecb0f71dad624fcb24665b From git at git.haskell.org Sun Mar 31 15:05:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:52 +0000 (UTC) Subject: [commit: ghc] branch 'wip/mp/15646' created Message-ID: <20190331150552.278333A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/mp/15646 Referencing: dfc8d93cade548ea9fd3e46d897c2bb2ae2b9179 From git at git.haskell.org Sun Mar 31 15:05:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:54 +0000 (UTC) Subject: [commit: ghc] branch 'wip/gitlab-merge-request-templates' created Message-ID: <20190331150554.28C043A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/gitlab-merge-request-templates Referencing: 4a320675be7646a4cff455abbe8d8f584963ca49 From git at git.haskell.org Sun Mar 31 15:05:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:56 +0000 (UTC) Subject: [commit: ghc] branch 'wip/parser-validator' created Message-ID: <20190331150556.29D0E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/parser-validator Referencing: ec8a17ca00a16d6d94f24da4e8a88038ac2e44e3 From git at git.haskell.org Sun Mar 31 15:05:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:05:58 +0000 (UTC) Subject: [commit: ghc] branch 'wip/changelog-linting' created Message-ID: <20190331150558.2B1CB3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/changelog-linting Referencing: 1fd7cfb51e5305e11510146c8ab9359d2d4e8a1e From git at git.haskell.org Sun Mar 31 15:06:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:00 +0000 (UTC) Subject: [commit: ghc] branch 'wip/lint' created Message-ID: <20190331150600.2C4253A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/lint Referencing: 8d01b57273e72a9a9d4a76a8f3f15f59441ed30a From git at git.haskell.org Sun Mar 31 15:06:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:02 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16111' created Message-ID: <20190331150602.2D1663A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16111 Referencing: 3acdc9a8844a5f9bddf27379b3e74c2bb94bff5f From git at git.haskell.org Sun Mar 31 15:06:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:05 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Make tcTypeKind monadic (f444923) Message-ID: <20190331150605.639983A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/f4449232e43784abff325bd3bf90f3cb5857b28b/ghc >--------------------------------------------------------------- commit f4449232e43784abff325bd3bf90f3cb5857b28b Author: Simon Peyton Jones Date: Mon Dec 24 14:55:41 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.) >--------------------------------------------------------------- f4449232e43784abff325bd3bf90f3cb5857b28b compiler/typecheck/FamInst.hs | 12 +- compiler/typecheck/Inst.hs | 29 +++-- compiler/typecheck/TcCanonical.hs | 94 +++++++------- compiler/typecheck/TcDeriv.hs | 49 ++++---- compiler/typecheck/TcDerivInfer.hs | 25 ++-- compiler/typecheck/TcErrors.hs | 21 ++-- compiler/typecheck/TcExpr.hs | 8 +- compiler/typecheck/TcFlatten.hs | 35 ++---- compiler/typecheck/TcHsSyn.hs | 10 +- compiler/typecheck/TcHsType.hs | 31 ++--- compiler/typecheck/TcInstDcls.hs | 2 +- compiler/typecheck/TcInteract.hs | 6 +- compiler/typecheck/TcMType.hs | 249 +++++++++++++++++++++++++++++++++++-- compiler/typecheck/TcPat.hs | 3 +- compiler/typecheck/TcPatSyn.hs | 42 +++---- compiler/typecheck/TcRnDriver.hs | 9 +- compiler/typecheck/TcSMonad.hs | 13 +- compiler/typecheck/TcSplice.hs | 6 +- compiler/typecheck/TcTyClsDecls.hs | 17 +-- compiler/typecheck/TcType.hs | 166 +++++++++++-------------- compiler/typecheck/TcUnify.hs | 32 ++--- compiler/types/Type.hs | 37 +++--- 22 files changed, 551 insertions(+), 345 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 f4449232e43784abff325bd3bf90f3cb5857b28b From git at git.haskell.org Sun Mar 31 15:06:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:08 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Wibble (1295111) Message-ID: <20190331150608.695523A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/1295111c7eb2a6fe17d440c184065922b42e6af0/ghc >--------------------------------------------------------------- commit 1295111c7eb2a6fe17d440c184065922b42e6af0 Author: Simon Peyton Jones Date: Mon Dec 24 17:50:12 2018 +0000 Wibble >--------------------------------------------------------------- 1295111c7eb2a6fe17d440c184065922b42e6af0 compiler/typecheck/TcMType.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index 1486d65..b9b0d86 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -6,7 +6,7 @@ Monadic type operations This module contains monadic operations over types that contain -mutable type variables +mutable type variables. -} {-# LANGUAGE CPP, TupleSections, MultiWayIf #-} From git at git.haskell.org Sun Mar 31 15:06:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:11 +0000 (UTC) Subject: [commit: ghc] ghc-8.6-ci: Grab CI configuration from master (0b12e01) Message-ID: <20190331150611.8E5113A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.6-ci Link : http://ghc.haskell.org/trac/ghc/changeset/0b12e01d868255b4eeecb0f71dad624fcb24665b/ghc >--------------------------------------------------------------- commit 0b12e01d868255b4eeecb0f71dad624fcb24665b 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. >--------------------------------------------------------------- 0b12e01d868255b4eeecb0f71dad624fcb24665b .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 ++ 22 files changed, 1431 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 0b12e01d868255b4eeecb0f71dad624fcb24665b From git at git.haskell.org Sun Mar 31 15:06:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:14 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Complete making tcTypeKindM monadic (0ac3f45) Message-ID: <20190331150614.AB1EC3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/0ac3f45e686eb7e3b1b75c13b9a56ac4614af31f/ghc >--------------------------------------------------------------- commit 0ac3f45e686eb7e3b1b75c13b9a56ac4614af31f Author: Simon Peyton Jones Date: Sat Dec 29 22:09:06 2018 +0000 Complete making tcTypeKindM monadic This completes the task of making tcTypeKindM monadic. A number of other functions had to become monadic too tcEqTypeM piResultTysM splitPiTyInvisibleM invisibleTyBndrCountM tcTupKindSortM I think this validates except for one minor regression in the error message of typecheck/should_fail/T15629, where we are now printing out an error message with synonym expanded. Not quite sure why, but it seems like a good checkpoint. The goal is to get rid of mkNakecCastTy etc, which I have not yet done. That's the next step. >--------------------------------------------------------------- 0ac3f45e686eb7e3b1b75c13b9a56ac4614af31f compiler/typecheck/Inst.hs | 61 +++++++---------- compiler/typecheck/TcErrors.hs | 4 +- compiler/typecheck/TcHsType.hs | 100 +++++++++++++-------------- compiler/typecheck/TcInstDcls.hs | 2 +- compiler/typecheck/TcMType.hs | 134 ++++++++++++++++++++++++++++++++----- compiler/typecheck/TcTyClsDecls.hs | 9 ++- compiler/typecheck/TcType.hs | 9 +-- compiler/typecheck/TcUnify.hs | 5 +- compiler/typecheck/TcValidity.hs | 2 +- compiler/types/TyCoRep.hs | 6 +- compiler/types/Type.hs | 50 ++------------ compiler/types/Type.hs-boot | 2 +- nofib | 2 +- testsuite/tests/polykinds/T9144.hs | 12 ++++ 14 files changed, 234 insertions(+), 164 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 0ac3f45e686eb7e3b1b75c13b9a56ac4614af31f From git at git.haskell.org Sun Mar 31 15:06:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:17 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Continue with #15952 (836568c) Message-ID: <20190331150617.BA79A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/836568c532c9ac8ba3f2aaae9470c2064bfd1ad2/ghc >--------------------------------------------------------------- commit 836568c532c9ac8ba3f2aaae9470c2064bfd1ad2 Author: Simon Peyton Jones Date: Sun Dec 30 23:48:39 2018 +0000 Continue with #15952 * Re-add the TcKind result to tc_infer_hs_type, and the TcKind argument to checkExpectedKind. (This is just taste; the relevant kind is readily available so it seems a pity to recompute it.) * Expunge the tricky invariants Note [The well-kinded type invariant] in TcType Note [The tcType invariant] in TcHsType Hooray. >--------------------------------------------------------------- 836568c532c9ac8ba3f2aaae9470c2064bfd1ad2 compiler/typecheck/TcHsType.hs | 262 ++++++++++++++------------------ compiler/typecheck/TcInstDcls.hs | 4 +- compiler/typecheck/TcTyClsDecls.hs | 17 +-- compiler/typecheck/TcType.hs | 20 ++- testsuite/tests/polykinds/T13659.stderr | 2 +- 5 files changed, 142 insertions(+), 163 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 836568c532c9ac8ba3f2aaae9470c2064bfd1ad2 From git at git.haskell.org Sun Mar 31 15:06:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:20 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin PPC support for PIC (14cd41c) Message-ID: <20190331150620.BBD803A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/14cd41c423d5a608518d2a152fcdf5e0d493da21/ghc >--------------------------------------------------------------- commit 14cd41c423d5a608518d2a152fcdf5e0d493da21 Author: Peter Trommler Date: Sun Dec 30 22:23:53 2018 +0100 PPC NCG: Remove Darwin PPC support for PIC >--------------------------------------------------------------- 14cd41c423d5a608518d2a152fcdf5e0d493da21 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 Sun Mar 31 15:06:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:23 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin specific code (7220d63) Message-ID: <20190331150623.BE3483A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/7220d639754ed9c408b27fbad1e9a4b05729cd10/ghc >--------------------------------------------------------------- commit 7220d639754ed9c408b27fbad1e9a4b05729cd10 Author: Peter Trommler Date: Sun Dec 30 22:25:49 2018 +0100 PPC NCG: Remove Darwin specific code >--------------------------------------------------------------- 7220d639754ed9c408b27fbad1e9a4b05729cd10 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 Sun Mar 31 15:06:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:26 +0000 (UTC) Subject: [commit: ghc] wip/T16106: build system: Remove PowerPC Darwin support (3b52cc8) Message-ID: <20190331150626.C3C5D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/3b52cc88df06ee7ddd20ed31750ddd4335cbd6d7/ghc >--------------------------------------------------------------- commit 3b52cc88df06ee7ddd20ed31750ddd4335cbd6d7 Author: Peter Trommler Date: Mon Dec 31 13:06:00 2018 +0100 build system: Remove PowerPC Darwin support >--------------------------------------------------------------- 3b52cc88df06ee7ddd20ed31750ddd4335cbd6d7 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 Sun Mar 31 15:06:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:29 +0000 (UTC) Subject: [commit: ghc] wip/T16106: Rewrite comment on C calling convention (0bf5d91) Message-ID: <20190331150629.C49E23A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/0bf5d91e322293ed3e509ba96bf49140d418c4a8/ghc >--------------------------------------------------------------- commit 0bf5d91e322293ed3e509ba96bf49140d418c4a8 Author: Peter Trommler Date: Mon Dec 31 16:46:22 2018 +0100 Rewrite comment on C calling convention >--------------------------------------------------------------- 0bf5d91e322293ed3e509ba96bf49140d418c4a8 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 Sun Mar 31 15:06:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:32 +0000 (UTC) Subject: [commit: ghc] wip/T16106: CodeGen: Remove PowerPC Darwin support (3aba01a) Message-ID: <20190331150632.C5FA03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/3aba01a5eaf4019ff14aaed0e6dc9764724b69cd/ghc >--------------------------------------------------------------- commit 3aba01a5eaf4019ff14aaed0e6dc9764724b69cd Author: Peter Trommler Date: Mon Dec 31 13:05:17 2018 +0100 CodeGen: Remove PowerPC Darwin support >--------------------------------------------------------------- 3aba01a5eaf4019ff14aaed0e6dc9764724b69cd 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 Sun Mar 31 15:06:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:35 +0000 (UTC) Subject: [commit: ghc] wip/T16106: PPC NCG: Remove Darwin support (dd28257) Message-ID: <20190331150635.CFD0E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/dd2825732e6cc32926601513f24b27b9eadca119/ghc >--------------------------------------------------------------- commit dd2825732e6cc32926601513f24b27b9eadca119 Author: Peter Trommler Date: Mon Dec 31 13:01:40 2018 +0100 PPC NCG: Remove Darwin support >--------------------------------------------------------------- dd2825732e6cc32926601513f24b27b9eadca119 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 dd2825732e6cc32926601513f24b27b9eadca119 From git at git.haskell.org Sun Mar 31 15:06:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:38 +0000 (UTC) Subject: [commit: ghc] wip/T16106: RTS: Remove PowerPC Darwin support (1954594) Message-ID: <20190331150638.DE9F33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/1954594e36e47e026e8a764ce66204fc405cba69/ghc >--------------------------------------------------------------- commit 1954594e36e47e026e8a764ce66204fc405cba69 Author: Peter Trommler Date: Mon Dec 31 13:08:29 2018 +0100 RTS: Remove PowerPC Darwin support >--------------------------------------------------------------- 1954594e36e47e026e8a764ce66204fc405cba69 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 1954594e36e47e026e8a764ce66204fc405cba69 From git at git.haskell.org Sun Mar 31 15:06:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:41 +0000 (UTC) Subject: [commit: ghc] wip/T16106: Cmm: Remove PowerPC Darwin support (dfdb9b8) Message-ID: <20190331150641.E29F63A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16106 Link : http://ghc.haskell.org/trac/ghc/changeset/dfdb9b861c56584d0ad6cdd58448a25eadaa625c/ghc >--------------------------------------------------------------- commit dfdb9b861c56584d0ad6cdd58448a25eadaa625c Author: Peter Trommler Date: Mon Dec 31 13:02:56 2018 +0100 Cmm: Remove PowerPC Darwin support >--------------------------------------------------------------- dfdb9b861c56584d0ad6cdd58448a25eadaa625c 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 Sun Mar 31 15:06:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:45 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: asm-emit-time IND_STATIC elimination (03f38c2) Message-ID: <20190331150645.A8DE93A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/03f38c2da8f40f688a323cc4e91dae6a230e5626/ghc >--------------------------------------------------------------- commit 03f38c2da8f40f688a323cc4e91dae6a230e5626 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 an assembly-language alias. Inter-module IND_STATIC objects still remain, and need to be addressed by other measures. Binary-size savings on nofib are around 0.1%. >--------------------------------------------------------------- 03f38c2da8f40f688a323cc4e91dae6a230e5626 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 03f38c2da8f40f688a323cc4e91dae6a230e5626 From git at git.haskell.org Sun Mar 31 15:06:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:48 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: take this out for now (af5d590) Message-ID: <20190331150648.AD1603A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/af5d590e124b3990e8136710521f77f17c648e6e/ghc >--------------------------------------------------------------- commit af5d590e124b3990e8136710521f77f17c648e6e Author: Gabor Greif Date: Fri Dec 21 11:36:21 2018 +0100 take this out for now >--------------------------------------------------------------- af5d590e124b3990e8136710521f77f17c648e6e 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 Sun Mar 31 15:06:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:51 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: review feedback (7d6d281) Message-ID: <20190331150651.B65B33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/7d6d28170779f2ec710e466eedc7052e4137c504/ghc >--------------------------------------------------------------- commit 7d6d28170779f2ec710e466eedc7052e4137c504 Author: Gabor Greif Date: Thu Dec 20 18:33:12 2018 +0100 review feedback >--------------------------------------------------------------- 7d6d28170779f2ec710e466eedc7052e4137c504 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 Sun Mar 31 15:06:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:54 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: better criterion by checking for ncg (5ce06aa) Message-ID: <20190331150654.BEC663A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/5ce06aa80466ea0eb23a0bce24879ca5ed2e4210/ghc >--------------------------------------------------------------- commit 5ce06aa80466ea0eb23a0bce24879ca5ed2e4210 Author: Gabor Greif Date: Mon Dec 24 09:39:44 2018 +0100 better criterion by checking for ncg >--------------------------------------------------------------- 5ce06aa80466ea0eb23a0bce24879ca5ed2e4210 testsuite/tests/codeGen/should_compile/all.T | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index 33d9ade..44f8e7c 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -44,7 +44,7 @@ test('T14999', # Verify that we optimize away redundant jumps for unordered comparisons. test('T15196', - [ unless(arch('x86_64'),skip), + [ unless(arch('x86_64'), skip), only_ways('normal'), ], run_command, ['$MAKE -s --no-print-directory T15196']) @@ -54,9 +54,8 @@ test('T15723', ], run_command, ['$MAKE -s --no-print-directory T15723']) test('T15155', - [ [ when(unregisterised(), skip) ], + [ unless(have_ncg(), skip) ], 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 Sun Mar 31 15:06:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:06:57 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: more review feedback (53b3ef8) Message-ID: <20190331150657.BEB473A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/53b3ef8823f5f5358aeae0f9768ebcd654525a47/ghc >--------------------------------------------------------------- commit 53b3ef8823f5f5358aeae0f9768ebcd654525a47 Author: Gabor Greif Date: Mon Dec 31 13:35:55 2018 +0100 more review feedback >--------------------------------------------------------------- 53b3ef8823f5f5358aeae0f9768ebcd654525a47 compiler/cmm/CLabel.hs | 55 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 1de6c6d..45996b4 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -1436,25 +1436,36 @@ pprDynamicLinkerAsmLabel platform dllInfo lbl = GotSymbolOffset -> ppr lbl <> text "@gotoff" -- Figure out whether a label is a permissible alias --- into the module. +-- into the module (as embodied by 'lab'). There are two +-- possibilities that we check for the indirectee: +-- * either it is a static closure name to an external haskell +-- name (i.e. export) into the same module as the alias label +-- * or it is a static closure name for a module-internal +-- haskell name. +-- These are sufficient conditions for establishing e.g. a +-- GNU assembly alias ('.equiv' directive). Sadly, there is +-- no such thing as an alias to an imported symbol (conf. +-- http://blog.omega-prime.co.uk/2011/07/06/the-sad-state-of-symbol-aliases/) +-- See note [emit-time elimination of static indirections] -- isAliasToLocalOrIntoThisModule :: CLabel -> CLabel -> Bool isAliasToLocalOrIntoThisModule alias lab - | Just nam <- hasHaskellName lab + | Just nam <- haskellName , staticClosureLabel , isExternalName nam , Just mod <- nameModule_maybe nam , Just anam <- hasHaskellName alias - , Just thismod <- nameModule_maybe anam - = thismod == mod + , Just amod <- nameModule_maybe anam + = amod == mod - | Just nam <- hasHaskellName lab + | Just nam <- haskellName , staticClosureLabel , isInternalName nam = True | otherwise = False where staticClosureLabel = isStaticClosureLabel lab + haskellName = hasHaskellName lab {- @@ -1478,5 +1489,37 @@ symbols can be referenced by a tagged pointer. Currently the 'isAliasToLocalOrIntoThisModule' predicate will give a clue whether a label can be equated with another, already -emitted label (which can in turn be an alias). +emitted, label (which can in turn be an alias). The general mechanics +is that we identify data (IND_STATIC closures) that are amenable +to aliasing while pretty-printing of assembly output, and emit the +'.equiv' directive instead of static data in such a case. + +Here is a sketch how the output is massaged: + + Consider +newtype A = A Int +{-# NOINLINE a #-} +a = A 42 -- I# 42# is the indirectee + -- 'a' is exported + +#### INDIRECTEE +a1_rXq_closure: -- module local haskell value + .quad GHC.Types.I#_con_info -- an Int + .quad 42 + +#### BEFORE +.globl T15155.a_closure -- exported newtype wrapped value +T15155.a_closure: + .quad stg_IND_STATIC_info -- the closure info + .quad a1_rXq_closure+1 -- indirectee + .quad 0 + .quad 0 + +#### AFTER +.globl T15155.a_closure -- exported newtype wrapped value +.equiv a1_rXq_closure,T15155.a_closure -- both are shared + +The transformation is performed because + T15155.a_closure `isAliasToLocalOrIntoThisModule` a1_rXq_closure+1 +returns True. -} From git at git.haskell.org Sun Mar 31 15:07:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:00 +0000 (UTC) Subject: [commit: ghc] wip/T15155a: revert asserts, they are useless (e2403e6) Message-ID: <20190331150700.BF88F3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15155a Link : http://ghc.haskell.org/trac/ghc/changeset/e2403e6e163ecf86f63f7ee2e20868c7709bded9/ghc >--------------------------------------------------------------- commit e2403e6e163ecf86f63f7ee2e20868c7709bded9 Author: Gabor Greif Date: Tue Jan 1 14:45:03 2019 +0100 revert asserts, they are useless >--------------------------------------------------------------- e2403e6e163ecf86f63f7ee2e20868c7709bded9 compiler/llvmGen/LlvmCodeGen/Data.hs | 5 ++--- compiler/nativeGen/PPC/Ppr.hs | 5 ++--- compiler/nativeGen/SPARC/Ppr.hs | 5 ++--- compiler/nativeGen/X86/Ppr.hs | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index a8b977d..c90b338 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -22,7 +22,6 @@ import Platform import FastString import Outputable -import Util ( debugIsOn ) -- ---------------------------------------------------------------------------- -- * Constants @@ -44,8 +43,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, a, b]) - | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel +genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) + | 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 77c7ee3..333874d 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -34,7 +34,6 @@ import Platform import FastString import Outputable import DynFlags -import Util ( debugIsOn ) import Data.Word import Data.Int @@ -125,8 +124,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, a, b]) - | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) + | 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 a5348e5..3861468 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -50,7 +50,6 @@ import Outputable import Platform import FastString import Data.Word -import Util ( debugIsOn ) -- ----------------------------------------------------------------------------- -- Printing this stuff out @@ -108,8 +107,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, a, b]) - | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) + | 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 b763a32..71675ad 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -45,7 +45,6 @@ import Unique ( pprUniqueAlways ) import Platform import FastString import Outputable -import Util ( debugIsOn ) import Data.Word @@ -155,8 +154,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, a, b]) - | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel +pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) + | lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing From git at git.haskell.org Sun Mar 31 15:07:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:04 +0000 (UTC) Subject: [commit: ghc] wip/D5451: Add -Wmissing-deriving-strategies (a72ec85) Message-ID: <20190331150704.E15193A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5451 Link : http://ghc.haskell.org/trac/ghc/changeset/a72ec85e8c6edb842d64dd41f3dd799a4ee462c1/ghc >--------------------------------------------------------------- commit a72ec85e8c6edb842d64dd41f3dd799a4ee462c1 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 >--------------------------------------------------------------- a72ec85e8c6edb842d64dd41f3dd799a4ee462c1 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 a72ec85e8c6edb842d64dd41f3dd799a4ee462c1 From git at git.haskell.org Sun Mar 31 15:07:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:07 +0000 (UTC) Subject: [commit: ghc] wip/T16039: prepare for floating fix (e4a0d3b1) Message-ID: <20190331150707.E52C13A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/e4a0d3b1687e222ab26e505c8485a94378afb1f2/ghc >--------------------------------------------------------------- commit e4a0d3b1687e222ab26e505c8485a94378afb1f2 Author: Gabor Greif Date: Sun Dec 9 22:47:30 2018 +0100 prepare for floating fix >--------------------------------------------------------------- e4a0d3b1687e222ab26e505c8485a94378afb1f2 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 Sun Mar 31 15:07:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:10 +0000 (UTC) Subject: [commit: ghc] wip/T16039: noinline is not worth floating out (19a0b12) Message-ID: <20190331150710.E5D7A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/19a0b1244740b71bae24a28415364344b4246b7a/ghc >--------------------------------------------------------------- commit 19a0b1244740b71bae24a28415364344b4246b7a Author: Gabor Greif Date: Wed Dec 12 11:21:25 2018 +0100 noinline is not worth floating out this can be written more nicely >--------------------------------------------------------------- 19a0b1244740b71bae24a28415364344b4246b7a 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 Sun Mar 31 15:07:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:13 +0000 (UTC) Subject: [commit: ghc] wip/T16039: eta (f6800fa) Message-ID: <20190331150713.E7F783A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/f6800fa8c6d9714818c6a6cf5b498f61e0cb4d43/ghc >--------------------------------------------------------------- commit f6800fa8c6d9714818c6a6cf5b498f61e0cb4d43 Author: Gabor Greif Date: Fri Dec 14 20:23:25 2018 +0100 eta >--------------------------------------------------------------- f6800fa8c6d9714818c6a6cf5b498f61e0cb4d43 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 Sun Mar 31 15:07:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:16 +0000 (UTC) Subject: [commit: ghc] wip/T16039: tinker with exprIsCheapX (e990b91) Message-ID: <20190331150716.EA4C33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/e990b91b03a0b510d2c207c8b9f3a663045b4e15/ghc >--------------------------------------------------------------- commit e990b91b03a0b510d2c207c8b9f3a663045b4e15 Author: Gabor Greif Date: Tue Dec 18 21:52:05 2018 +0100 tinker with exprIsCheapX >--------------------------------------------------------------- e990b91b03a0b510d2c207c8b9f3a663045b4e15 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 Sun Mar 31 15:07:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:19 +0000 (UTC) Subject: [commit: ghc] wip/T16039: eta reduce (8f9af63) Message-ID: <20190331150719.ED7DB3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/8f9af636c2e571c52fb2e12decf3e993704fa470/ghc >--------------------------------------------------------------- commit 8f9af636c2e571c52fb2e12decf3e993704fa470 Author: Gabor Greif Date: Fri Dec 14 20:01:11 2018 +0100 eta reduce >--------------------------------------------------------------- 8f9af636c2e571c52fb2e12decf3e993704fa470 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 Sun Mar 31 15:07:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:22 +0000 (UTC) Subject: [commit: ghc] wip/T16039: Minor refactoring (f02ab06) Message-ID: <20190331150722.F1CD53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/f02ab06af6d978957c9fb4da48829cf4fe17e6bd/ghc >--------------------------------------------------------------- commit f02ab06af6d978957c9fb4da48829cf4fe17e6bd Author: Gabor Greif Date: Mon Dec 17 14:52:53 2018 +0100 Minor refactoring >--------------------------------------------------------------- f02ab06af6d978957c9fb4da48829cf4fe17e6bd 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 Sun Mar 31 15:07:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:26 +0000 (UTC) Subject: [commit: ghc] wip/T16039: WIP: refactor and generalise (#16039) (797e434) Message-ID: <20190331150726.00CEF3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/797e43444ec0f41b3db2dc23e07777a74dff1ecb/ghc >--------------------------------------------------------------- commit 797e43444ec0f41b3db2dc23e07777a74dff1ecb Author: Gabor Greif Date: Wed Dec 12 13:43:09 2018 +0100 WIP: refactor and generalise (#16039) >--------------------------------------------------------------- 797e43444ec0f41b3db2dc23e07777a74dff1ecb 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 Sun Mar 31 15:07:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:29 +0000 (UTC) Subject: [commit: ghc] wip/T16039: more eta (5242502) Message-ID: <20190331150729.046003A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/52425020651523e9a775f0d519bed3877ade2db2/ghc >--------------------------------------------------------------- commit 52425020651523e9a775f0d519bed3877ade2db2 Author: Gabor Greif Date: Wed Dec 19 14:24:08 2018 +0100 more eta >--------------------------------------------------------------- 52425020651523e9a775f0d519bed3877ade2db2 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 Sun Mar 31 15:07:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:32 +0000 (UTC) Subject: [commit: ghc] wip/T16039: check the number of remaining stg_IND_STATIC_info occurrences (784cfbf) Message-ID: <20190331150732.298913A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/784cfbfcea9cb04424e2ba116508b5948fdf0f13/ghc >--------------------------------------------------------------- commit 784cfbfcea9cb04424e2ba116508b5948fdf0f13 Author: Gabor Greif Date: Wed Jan 2 18:02:10 2019 +0100 check the number of remaining stg_IND_STATIC_info occurrences >--------------------------------------------------------------- 784cfbfcea9cb04424e2ba116508b5948fdf0f13 testsuite/tests/simplCore/should_compile/Makefile | 8 +++++++- .../opt/T15188.stdout => simplCore/should_compile/T16039.stdout} | 1 + testsuite/tests/simplCore/should_compile/all.T | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile index 277a5a6..f735ffe 100644 --- a/testsuite/tests/simplCore/should_compile/Makefile +++ b/testsuite/tests/simplCore/should_compile/Makefile @@ -250,4 +250,10 @@ T14140: T15631: $(RM) -f T15631.o T15631.hi '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-uniques T15631.hs | grep 'case' -# Expecting one fewwer case expressions after fixing Trac #15631 +# Expecting one fewer case expressions after fixing Trac #15631 + +# Expecting 2 IND_STATIC closures originally; one less with #16039 fixed +T16039: + '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -ddump-llvm T16039.hs 2>/dev/null \ + | grep -F 'closure$$def' | grep -E "stg_IND_STATIC_info" \ + | wc -l | sed -e 's/ *//g' | grep "1"; echo $$? diff --git a/testsuite/tests/cmm/opt/T15188.stdout b/testsuite/tests/simplCore/should_compile/T16039.stdout similarity index 50% copy from testsuite/tests/cmm/opt/T15188.stdout copy to testsuite/tests/simplCore/should_compile/T16039.stdout index d00491f..b261da1 100644 --- a/testsuite/tests/cmm/opt/T15188.stdout +++ b/testsuite/tests/simplCore/should_compile/T16039.stdout @@ -1 +1,2 @@ 1 +0 diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 6f68ec2..9e02252 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -328,4 +328,4 @@ test('T15631', ['$MAKE -s --no-print-directory T15631']) test('T15673', normal, compile, ['-O']) -test('T16039', normal, compile, ['-O']) +test('T16039', normal, run_command, ['$MAKE -s --no-print-directory T16039']) From git at git.haskell.org Sun Mar 31 15:07:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:35 +0000 (UTC) Subject: [commit: ghc] wip/T16039: implement exprIsTrivial too (78b52d3) Message-ID: <20190331150735.2F1D33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/78b52d3e09eba68257e3e3711ef6c0fa8c96e16b/ghc >--------------------------------------------------------------- commit 78b52d3e09eba68257e3e3711ef6c0fa8c96e16b Author: Gabor Greif Date: Wed Dec 19 16:49:20 2018 +0100 implement exprIsTrivial too >--------------------------------------------------------------- 78b52d3e09eba68257e3e3711ef6c0fa8c96e16b 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 Sun Mar 31 15:07:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:38 +0000 (UTC) Subject: [commit: ghc] wip/T16039: begin testing (818c918) Message-ID: <20190331150738.C56D03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/818c918af3f41864f4a421c1d8a6865edd4f0a33/ghc >--------------------------------------------------------------- commit 818c918af3f41864f4a421c1d8a6865edd4f0a33 Author: Gabor Greif Date: Thu Dec 27 15:53:06 2018 +0100 begin testing >--------------------------------------------------------------- 818c918af3f41864f4a421c1d8a6865edd4f0a33 testsuite/tests/simplCore/should_compile/T16039.hs | 13 +++++++++++++ testsuite/tests/simplCore/should_compile/all.T | 2 ++ 2 files changed, 15 insertions(+) diff --git a/testsuite/tests/simplCore/should_compile/T16039.hs b/testsuite/tests/simplCore/should_compile/T16039.hs new file mode 100644 index 0000000..3f37a31 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T16039.hs @@ -0,0 +1,13 @@ +{-# language MultiParamTypeClasses #-} + +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 Sun Mar 31 15:07:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:41 +0000 (UTC) Subject: [commit: ghc] wip/T16039: better tracing (8db91a7) Message-ID: <20190331150741.CBD5A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/8db91a7da4e749427b005346dec6f0554de6ee33/ghc >--------------------------------------------------------------- commit 8db91a7da4e749427b005346dec6f0554de6ee33 Author: Gabor Greif Date: Sun Jan 6 00:13:22 2019 +0100 better tracing >--------------------------------------------------------------- 8db91a7da4e749427b005346dec6f0554de6ee33 compiler/coreSyn/CoreUtils.hs | 6 +++--- compiler/simplCore/FloatOut.hs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index ea3fe01..87e36b9 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -955,14 +955,14 @@ it off at source. exprIsTrivial :: CoreExpr -> Bool -- If you modify this function, you may also --- need to modify getIdFromTrivialExpr +-- need to modify getIdFromTrivialExpr -- TODO exprIsTrivial (Var _) = True -- See Note [Variables are trivial] exprIsTrivial (Type _) = True exprIsTrivial (Coercion _) = True exprIsTrivial (Lit lit) = litIsTrivial lit exprIsTrivial (App e arg) | App (Var f) Type {} <- e - , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial" (ppr arg) exprIsTrivial arg + , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial #%#" (ppr f <+> ppr arg) exprIsTrivial arg | not (isRuntimeArg arg) = exprIsTrivial e | otherwise = False exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e @@ -1244,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 = pprTrace "exprIsCheapX" (ppr e) go n e + , isRuntimeArg e = pprTrace "exprIsCheapX $#%#" (ppr v <+> 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 diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs index 4a1ab68..660619f 100644 --- a/compiler/simplCore/FloatOut.hs +++ b/compiler/simplCore/FloatOut.hs @@ -397,12 +397,12 @@ floatExpr (Var v) = (zeroStats, emptyFloats, Var v) 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 Sun Mar 31 15:07:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:44 +0000 (UTC) Subject: [commit: ghc] wip/T16039: minor touchups [ci skip] (23c950f) Message-ID: <20190331150744.D3E013A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/23c950f6a113a536d0e2080fa65eb8a0ea8eddbc/ghc >--------------------------------------------------------------- commit 23c950f6a113a536d0e2080fa65eb8a0ea8eddbc Author: Gabor Greif Date: Sun Jan 6 00:08:40 2019 +0100 minor touchups [ci skip] >--------------------------------------------------------------- 23c950f6a113a536d0e2080fa65eb8a0ea8eddbc compiler/basicTypes/IdInfo.hs | 3 +-- compiler/coreSyn/CoreArity.hs | 2 +- compiler/coreSyn/CorePrep.hs | 4 ++-- compiler/coreSyn/CoreUnfold.hs | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs index 12ea490..cbedfd2 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/basicTypes/IdInfo.hs @@ -464,8 +464,7 @@ vanillaCafInfo :: CafInfo vanillaCafInfo = MayHaveCafRefs mayHaveCafRefs :: CafInfo -> Bool -mayHaveCafRefs MayHaveCafRefs = True -mayHaveCafRefs _ = False +mayHaveCafRefs = (==MayHaveCafRefs) instance Outputable CafInfo where ppr = ppCafInfo diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs index d15da87..354937c 100644 --- a/compiler/coreSyn/CoreArity.hs +++ b/compiler/coreSyn/CoreArity.hs @@ -99,7 +99,7 @@ exprArity e = go e go (Tick t e) | not (tickishIsCode t) = go e go (Cast e co) = trim_arity (go e) (pSnd (coercionKind co)) -- Note [exprArity invariant] - go (App e (Type _)) = go e + go (App e Type {}) = go e go (App f a) | exprIsTrivial a = (go f - 1) `max` 0 -- See Note [exprArity for applications] -- NB: coercions count as a value argument diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs index cf37a8d..ddaf9b2 100644 --- a/compiler/coreSyn/CorePrep.hs +++ b/compiler/coreSyn/CorePrep.hs @@ -273,9 +273,9 @@ point all the CafInfo is supposed to be correct, and we must make certain that is true of the new top-level bindings. There are two cases to consider -a) The top-level binding is marked asCafRefs. In that case we are +a) The top-level binding is marked MayHaveCafRefs. In that case we are basically fine. The floated bindings had better all be lazy lets, - so they can float to top level, but they'll all have HasCafRefs + so they can float to top level, but they'll all have MayHaveCafRefs (the default) which is safe. b) The top-level binding is marked NoCafRefs. This really happens diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs index 020aa85..53d1973 100644 --- a/compiler/coreSyn/CoreUnfold.hs +++ b/compiler/coreSyn/CoreUnfold.hs @@ -409,10 +409,10 @@ inlineBoringOk e go :: Int -> CoreExpr -> Bool go credit (Lam x e) | isId x = go (credit+1) e | otherwise = go credit e - go credit (App f (Type {})) = go credit f + go credit (App f Type {}) = go credit f go credit (App f a) | credit > 0 , exprIsTrivial a = go (credit-1) f - go credit (Tick _ e) = go credit e -- dubious + go credit (Tick _ e) = go credit e -- dubious go credit (Cast e _) = go credit e go _ (Var {}) = boringCxtOk go _ _ = boringCxtNotOk From git at git.haskell.org Sun Mar 31 15:07:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:47 +0000 (UTC) Subject: [commit: ghc] wip/T16039: avoid unregisterised (094c761) Message-ID: <20190331150747.D67F83A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16039 Link : http://ghc.haskell.org/trac/ghc/changeset/094c761da88ce02de9a6d232540cc3bf046f1327/ghc >--------------------------------------------------------------- commit 094c761da88ce02de9a6d232540cc3bf046f1327 Author: Gabor Greif Date: Thu Jan 3 06:44:59 2019 +0100 avoid unregisterised >--------------------------------------------------------------- 094c761da88ce02de9a6d232540cc3bf046f1327 testsuite/tests/simplCore/should_compile/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 9e02252..5fa203a 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -328,4 +328,4 @@ test('T15631', ['$MAKE -s --no-print-directory T15631']) test('T15673', normal, compile, ['-O']) -test('T16039', normal, run_command, ['$MAKE -s --no-print-directory T16039']) +test('T16039', when(unregisterised(), skip), run_command, ['$MAKE -s --no-print-directory T16039']) From git at git.haskell.org Sun Mar 31 15:07:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:50 +0000 (UTC) Subject: [commit: ghc] wip/T14677: WIP: triggering CI for Simon's patch (1fb37f5) Message-ID: <20190331150750.DF2A53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/1fb37f5249833b6f5a101f754e4e02f101f76e02/ghc >--------------------------------------------------------------- commit 1fb37f5249833b6f5a101f754e4e02f101f76e02 Author: Gabor Greif Date: Wed Jan 17 14:47:00 2018 +0100 WIP: triggering CI for Simon's patch >--------------------------------------------------------------- 1fb37f5249833b6f5a101f754e4e02f101f76e02 compiler/codeGen/StgCmmClosure.hs | 8 ++++++++ compiler/coreSyn/CoreOpt.hs | 20 +++++++++++++++++++- compiler/prelude/PrelRules.hs | 9 ++------- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index 65e7cf7..b220b12 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -68,6 +68,8 @@ module StgCmmClosure ( import GhcPrelude +import CoreSyn( isValueUnfolding, maybeUnfoldingTemplate ) +import CoreOpt( exprIsSatConApp_maybe ) import StgSyn import SMRep import Cmm @@ -327,6 +329,11 @@ mkLFImported id -- We assume that the constructor is evaluated so that -- the id really does point directly to the constructor + | isValueUnfolding unf + , Just expr <- maybeUnfoldingTemplate unf + , Just con <- exprIsSatConApp_maybe expr + = LFCon con + | arity > 0 = LFReEntrant TopLevel noOneShotInfo arity True (panic "arg_descr") @@ -334,6 +341,7 @@ mkLFImported id = mkLFArgument id -- Not sure of exact arity where arity = idFunRepArity id + unf = realIdUnfolding id ------------- mkLFStringLit :: LambdaFormInfo diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index f4fc94d..9066217 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -12,7 +12,8 @@ module CoreOpt ( joinPointBinding_maybe, joinPointBindings_maybe, -- ** Predicates on expressions - exprIsConApp_maybe, exprIsLiteral_maybe, exprIsLambda_maybe, + exprIsConApp_maybe, exprIsLiteral_maybe, + exprIsLambda_maybe, exprIsSatConApp_maybe, -- ** Coercions and casts pushCoArg, pushCoValArg, pushCoTyArg, collectBindersPushingCo @@ -837,6 +838,23 @@ exprIsConApp_maybe (in_scope, id_unf) expr extend (Right s) v e = Right (extendSubst s v e) +exprIsSatConApp_maybe :: CoreExpr -> Maybe DataCon +-- Returns (Just dc) for a saturated application of dc +-- Simpler than exprIsConApp_maybe +exprIsSatConApp_maybe e = go 0 e + where + go :: Arity -> CoreExpr -> Maybe DataCon + go n_val_args (Var v) + | Just dc <- isDataConWorkId_maybe v + , dataConRepArity dc == n_val_args + = Just dc + go n_val_args (App f a) + | isTypeArg a = go n_val_args f + | otherwise = go (n_val_args + 1) f + go n_val_args (Cast e _) = go n_val_args e + go n_val_args (Tick _ e) = go n_val_args e + go _ _ = Nothing + -- See Note [exprIsConApp_maybe on literal strings] dealWithStringLiteral :: Var -> BS.ByteString -> Coercion -> Maybe (DataCon, [Type], [CoreExpr]) diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index cd04074..d8d047a 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -33,7 +33,7 @@ import CoreSyn import MkCore import Id import Literal -import CoreOpt ( exprIsLiteral_maybe ) +import CoreOpt ( exprIsLiteral_maybe, exprIsSatConApp_maybe ) import PrimOp ( PrimOp(..), tagToEnumKey ) import TysWiredIn import TysPrim @@ -42,7 +42,6 @@ import TyCon ( tyConDataCons_maybe, isAlgTyCon, isEnumerationTyCon , tyConFamilySize ) import DataCon ( dataConTagZ, dataConTyCon, dataConWorkId ) import CoreUtils ( cheapEqExpr, exprIsHNF, exprType ) -import CoreUnfold ( exprIsConApp_maybe ) import Type import OccName ( occNameFS ) import PrelNames @@ -789,9 +788,6 @@ removeOp32 = do getArgs :: RuleM [CoreExpr] getArgs = RuleM $ \_ _ args -> Just args -getInScopeEnv :: RuleM InScopeEnv -getInScopeEnv = RuleM $ \_ iu _ -> Just iu - -- return the n-th argument of this rule, if it is a literal -- argument indices start from 0 getLiteral :: Int -> RuleM Literal @@ -1037,8 +1033,7 @@ dataToTagRule = a `mplus` b b = do dflags <- getDynFlags [_, val_arg] <- getArgs - in_scope <- getInScopeEnv - (dc,_,_) <- liftMaybe $ exprIsConApp_maybe in_scope val_arg + dc <- liftMaybe $ exprIsSatConApp_maybe val_arg ASSERT( not (isNewTyCon (dataConTyCon dc)) ) return () return $ mkIntVal dflags (toInteger (dataConTagZ dc)) From git at git.haskell.org Sun Mar 31 15:07:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:53 +0000 (UTC) Subject: [commit: ghc] wip/T14677: trace original id (c71c538) Message-ID: <20190331150753.DE16D3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/c71c538537de476bd9533e2448a35aaab8f45395/ghc >--------------------------------------------------------------- commit c71c538537de476bd9533e2448a35aaab8f45395 Author: Gabor Greif Date: Sun Jan 6 15:05:49 2019 +0100 trace original id >--------------------------------------------------------------- c71c538537de476bd9533e2448a35aaab8f45395 compiler/codeGen/StgCmmClosure.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index b220b12..b5c257c 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -332,6 +332,7 @@ mkLFImported id | isValueUnfolding unf , Just expr <- maybeUnfoldingTemplate unf , Just con <- exprIsSatConApp_maybe expr + , if mayHaveCafRefs (idCafInfo id) then pprTrace "caffy #+##" (ppr id <+> ppr expr) True else True = LFCon con | arity > 0 From git at git.haskell.org Sun Mar 31 15:07:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:07:57 +0000 (UTC) Subject: [commit: ghc] wip/T14677: add test (246ed44) Message-ID: <20190331150757.3420A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/246ed44a7ec0cf0f3fae12fdaf4077fec3350475/ghc >--------------------------------------------------------------- commit 246ed44a7ec0cf0f3fae12fdaf4077fec3350475 Author: Gabor Greif Date: Sun Jan 6 20:43:16 2019 +0100 add test >--------------------------------------------------------------- 246ed44a7ec0cf0f3fae12fdaf4077fec3350475 testsuite/tests/codeGen/should_run/T14677.hs | 5 +++++ testsuite/tests/codeGen/should_run/{T9533c.stdout => T14677.stdout} | 0 testsuite/tests/codeGen/should_run/all.T | 2 ++ 3 files changed, 7 insertions(+) diff --git a/testsuite/tests/codeGen/should_run/T14677.hs b/testsuite/tests/codeGen/should_run/T14677.hs new file mode 100644 index 0000000..268f22f --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T14677.hs @@ -0,0 +1,5 @@ +module T14677 where + +import GHC.Event + +main = print evtWrite diff --git a/testsuite/tests/codeGen/should_run/T9533c.stdout b/testsuite/tests/codeGen/should_run/T14677.stdout similarity index 100% copy from testsuite/tests/codeGen/should_run/T9533c.stdout copy to testsuite/tests/codeGen/should_run/T14677.stdout diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 7f976b8..f3bf1e0 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -192,3 +192,5 @@ test('T15892', # happen, so -G1 -A32k: extra_run_opts('+RTS -G1 -A32k -RTS') ], compile_and_run, ['-O']) + +test('T14677', normal, compile_and_run, ['-O']) From git at git.haskell.org Sun Mar 31 15:08:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:00 +0000 (UTC) Subject: [commit: ghc] wip/T14677: needs a main module (f1ba01b) Message-ID: <20190331150800.371633A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/f1ba01b89f97a76aa5ee339bedc33a45e7cee8b3/ghc >--------------------------------------------------------------- commit f1ba01b89f97a76aa5ee339bedc33a45e7cee8b3 Author: Gabor Greif Date: Sun Jan 6 22:10:35 2019 +0100 needs a main module >--------------------------------------------------------------- f1ba01b89f97a76aa5ee339bedc33a45e7cee8b3 testsuite/tests/codeGen/should_run/T14677.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/tests/codeGen/should_run/T14677.hs b/testsuite/tests/codeGen/should_run/T14677.hs index 268f22f..8835366 100644 --- a/testsuite/tests/codeGen/should_run/T14677.hs +++ b/testsuite/tests/codeGen/should_run/T14677.hs @@ -1,5 +1,3 @@ -module T14677 where - import GHC.Event main = print evtWrite From git at git.haskell.org Sun Mar 31 15:08:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:03 +0000 (UTC) Subject: [commit: ghc] wip/T14677: more dump (5214d59) Message-ID: <20190331150803.39FA13A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/5214d5970b416e0be4c954c51e1f74f751675d3e/ghc >--------------------------------------------------------------- commit 5214d5970b416e0be4c954c51e1f74f751675d3e Author: Gabor Greif Date: Sun Jan 6 22:55:53 2019 +0100 more dump >--------------------------------------------------------------- 5214d5970b416e0be4c954c51e1f74f751675d3e testsuite/tests/codeGen/should_run/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index f3bf1e0..88cf628 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -193,4 +193,4 @@ test('T15892', extra_run_opts('+RTS -G1 -A32k -RTS') ], compile_and_run, ['-O']) -test('T14677', normal, compile_and_run, ['-O']) +test('T14677', normal, compile_and_run, ['-O2 -ddump-stg -ddump-cmm']) From git at git.haskell.org Sun Mar 31 15:08:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:06 +0000 (UTC) Subject: [commit: ghc] wip/T14677: fix output (f46b7fe) Message-ID: <20190331150806.3D81E3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/f46b7fe573115d5b2cac092786a25b79db72ec47/ghc >--------------------------------------------------------------- commit f46b7fe573115d5b2cac092786a25b79db72ec47 Author: Gabor Greif Date: Mon Jan 7 16:45:25 2019 +0100 fix output >--------------------------------------------------------------- f46b7fe573115d5b2cac092786a25b79db72ec47 testsuite/tests/codeGen/should_run/T14677.stdout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/codeGen/should_run/T14677.stdout b/testsuite/tests/codeGen/should_run/T14677.stdout index 0cfbf08..b9fde9b 100644 --- a/testsuite/tests/codeGen/should_run/T14677.stdout +++ b/testsuite/tests/codeGen/should_run/T14677.stdout @@ -1 +1 @@ -2 +[evtWrite] From git at git.haskell.org Sun Mar 31 15:08:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:09 +0000 (UTC) Subject: [commit: ghc] wip/ppc-update-sp: PPC NCG: Refactor stack allocation code (3c097c6) Message-ID: <20190331150809.412613A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ppc-update-sp Link : http://ghc.haskell.org/trac/ghc/changeset/3c097c682c3e26a778ae267eab3f13494bfb5442/ghc >--------------------------------------------------------------- commit 3c097c682c3e26a778ae267eab3f13494bfb5442 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. >--------------------------------------------------------------- 3c097c682c3e26a778ae267eab3f13494bfb5442 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 8f3153c..f8dba25 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 d7175b8..6bb8048 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -904,24 +904,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 Sun Mar 31 15:08:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:12 +0000 (UTC) Subject: [commit: ghc] wip/ppc-update-sp: Fix reference to stack code in comment (ef9e6aa) Message-ID: <20190331150812.429F33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ppc-update-sp Link : http://ghc.haskell.org/trac/ghc/changeset/ef9e6aa8aeb3262be0e2d98fb7b3e7ed9005446b/ghc >--------------------------------------------------------------- commit ef9e6aa8aeb3262be0e2d98fb7b3e7ed9005446b Author: Peter Trommler Date: Sun Dec 30 22:28:45 2018 +0100 Fix reference to stack code in comment >--------------------------------------------------------------- ef9e6aa8aeb3262be0e2d98fb7b3e7ed9005446b includes/CodeGen.Platform.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index dbd4cc9..8dcec49 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -895,7 +895,7 @@ freeReg 13 = False -- reserved for system thread ID on 64 bit freeReg 30 = False {- TODO: reserve r13 on 64 bit systems only and r30 on 32 bit respectively. For now we use r30 on 64 bit and r13 on 32 bit as a temporary register - in stack handling code. See compiler/nativeGen/PPC/Ppr.hs. + in stack handling code. See compiler/nativeGen/PPC/CodeGen.hs. Later we might want to reserve r13 and r30 only where it is required. Then use r12 as temporary register, which is also what the C ABI does. From git at git.haskell.org Sun Mar 31 15:08:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:15 +0000 (UTC) Subject: [commit: ghc] wip/ppc-update-sp: Fix filename in comment again (c5a7ce0) Message-ID: <20190331150815.465473A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ppc-update-sp Link : http://ghc.haskell.org/trac/ghc/changeset/c5a7ce02bc3cb360217af0748f298ffbfceaf2e8/ghc >--------------------------------------------------------------- commit c5a7ce02bc3cb360217af0748f298ffbfceaf2e8 Author: Peter Trommler Date: Sun Dec 30 22:31:38 2018 +0100 Fix filename in comment again >--------------------------------------------------------------- c5a7ce02bc3cb360217af0748f298ffbfceaf2e8 includes/CodeGen.Platform.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index 8dcec49..6c00597 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -895,7 +895,7 @@ freeReg 13 = False -- reserved for system thread ID on 64 bit freeReg 30 = False {- TODO: reserve r13 on 64 bit systems only and r30 on 32 bit respectively. For now we use r30 on 64 bit and r13 on 32 bit as a temporary register - in stack handling code. See compiler/nativeGen/PPC/CodeGen.hs. + in stack handling code. See compiler/nativeGen/PPC/Instr.hs. Later we might want to reserve r13 and r30 only where it is required. Then use r12 as temporary register, which is also what the C ABI does. From git at git.haskell.org Sun Mar 31 15:08:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:18 +0000 (UTC) Subject: [commit: ghc] wip/T14677: No need to inline nullary functions [ci skip] (e6eb60f) Message-ID: <20190331150818.494E53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/e6eb60f1fd3f011e6dc46fd552cf213998ad38cb/ghc >--------------------------------------------------------------- commit e6eb60f1fd3f011e6dc46fd552cf213998ad38cb Author: Gabor Greif Date: Tue Jan 8 17:06:18 2019 +0100 No need to inline nullary functions [ci skip] >--------------------------------------------------------------- e6eb60f1fd3f011e6dc46fd552cf213998ad38cb libraries/base/GHC/Event/Internal.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libraries/base/GHC/Event/Internal.hs b/libraries/base/GHC/Event/Internal.hs index 5778c6f..57cb293 100644 --- a/libraries/base/GHC/Event/Internal.hs +++ b/libraries/base/GHC/Event/Internal.hs @@ -44,22 +44,18 @@ newtype Event = Event Int evtNothing :: Event evtNothing = Event 0 -{-# INLINE evtNothing #-} -- | Data is available to be read. evtRead :: Event evtRead = Event 1 -{-# INLINE evtRead #-} -- | The file descriptor is ready to accept a write. evtWrite :: Event evtWrite = Event 2 -{-# INLINE evtWrite #-} -- | Another thread closed the file descriptor. evtClose :: Event evtClose = Event 4 -{-# INLINE evtClose #-} eventIs :: Event -> Event -> Bool eventIs (Event a) (Event b) = a .&. b /= 0 From git at git.haskell.org Sun Mar 31 15:08:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:21 +0000 (UTC) Subject: [commit: ghc] wip/T14677: simplify (e615cc8) Message-ID: <20190331150821.4B36B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/e615cc83841e6a6c4461352428ecf6597ebd1d23/ghc >--------------------------------------------------------------- commit e615cc83841e6a6c4461352428ecf6597ebd1d23 Author: Gabor Greif Date: Tue Jan 8 17:42:46 2019 +0100 simplify >--------------------------------------------------------------- e615cc83841e6a6c4461352428ecf6597ebd1d23 compiler/simplCore/Simplify.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index fca9904..f000fc9 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -1602,13 +1602,13 @@ trimJoinCont _ Nothing cont trimJoinCont var (Just arity) cont = trim arity cont where - trim 0 cont@(Stop {}) + trim 0 cont at Stop {} = cont trim 0 cont = mkBoringStop (contResultType cont) - trim n cont@(ApplyToVal { sc_cont = k }) + trim n cont at ApplyToVal { sc_cont = k } = cont { sc_cont = trim (n-1) k } - trim n cont@(ApplyToTy { sc_cont = k }) + trim n cont at ApplyToTy { sc_cont = k } = cont { sc_cont = trim (n-1) k } -- join arity counts types! trim _ cont = pprPanic "completeCall" $ ppr var $$ ppr cont @@ -1733,7 +1733,7 @@ completeCall env var cont lone_variable arg_infos interesting_cont -- Inline the variable's RHS = do { checkedTick (UnfoldingDone var) - ; dump_inline expr cont + ; dump_inline expr ; simplExprF (zapSubstEnv env) expr cont } | otherwise @@ -1750,7 +1750,7 @@ completeCall env var cont interesting_cont = interestingCallContext env call_cont active_unf = activeUnfolding (getMode env) var - dump_inline unfolding cont + dump_inline unfolding | not (dopt Opt_D_dump_inlinings dflags) = return () | not (dopt Opt_D_verbose_core2core dflags) = when (isExternalName (idName var)) $ @@ -3560,4 +3560,3 @@ simplRules env mb_new_id rules mb_cont , ru_fn = fn_name' , ru_args = args' , ru_rhs = rhs' }) } - From git at git.haskell.org Sun Mar 31 15:08:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:24 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-cabal: Hadrian: Use the Cabal build script on Windows by default (f804497) Message-ID: <20190331150824.4D71B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-cabal Link : http://ghc.haskell.org/trac/ghc/changeset/f80449799015c010501884fc7b3fdeae002ff375/ghc >--------------------------------------------------------------- commit f80449799015c010501884fc7b3fdeae002ff375 Author: Andrey Mokhov Date: Thu Jan 10 00:18:24 2019 +0000 Hadrian: Use the Cabal build script on Windows by default The Stack build script `build.stack.bat` currently fails on Windows when invoked with the `--configure` flag, see: https://ghc.haskell.org/trac/ghc/ticket/15982 The Cabal build script `build.cabal.bat` works reliably on my Windows machine, so I am proposing to switch to it by default, that is, to run it from the default `build.bat` script. The Stack build script can still be run directly if need be. >--------------------------------------------------------------- f80449799015c010501884fc7b3fdeae002ff375 hadrian/build.bat | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hadrian/build.bat b/hadrian/build.bat index 01a869f..e71f886 100644 --- a/hadrian/build.bat +++ b/hadrian/build.bat @@ -1,6 +1,4 @@ @echo off -setlocal -cd %~dp0 -rem By default on Windows we build Hadrian using Stack -./build.stack.bat %* +rem By default on Windows we build Hadrian using Cabal +hadrian/build.cabal.bat %* From git at git.haskell.org Sun Mar 31 15:08:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:27 +0000 (UTC) Subject: [commit: ghc] wip/T15971: Disable Shake Lint by default. (8687a24) Message-ID: <20190331150827.51B253A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15971 Link : http://ghc.haskell.org/trac/ghc/changeset/8687a243515483b0b4e864bf4881e77021c06358/ghc >--------------------------------------------------------------- commit 8687a243515483b0b4e864bf4881e77021c06358 Author: Andrey Mokhov Date: Thu Jan 10 22:35:22 2019 +0000 Disable Shake Lint by default. >--------------------------------------------------------------- 8687a243515483b0b4e864bf4881e77021c06358 build.nix.sh | 1 - hadrian/build.cabal.bat | 1 - hadrian/build.cabal.sh | 1 - hadrian/build.stack.bat | 2 +- hadrian/build.stack.sh | 1 - hadrian/src/Rules/Gmp.hs | 7 +++---- 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build.nix.sh b/build.nix.sh index 4b03ea8..0882026 100755 --- a/build.nix.sh +++ b/build.nix.sh @@ -30,6 +30,5 @@ echo $absoluteRoot cd "$absoluteRoot" hadrian \ - --lint \ --directory="$absoluteRoot/.." \ "$@" diff --git a/hadrian/build.cabal.bat b/hadrian/build.cabal.bat index b47c0bf..96f2725 100644 --- a/hadrian/build.cabal.bat +++ b/hadrian/build.cabal.bat @@ -32,7 +32,6 @@ if %CABMAJOR% equ 2 ( if %_cabal_ok% equ 1 ( "%CABAL%" --project-file=%PROJ% new-build %CABFLAGS% -j exe:hadrian "%CABAL%" --project-file=%PROJ% new-run %CABFLAGS% exe:hadrian -- ^ - --lint ^ --directory "%CD%" ^ %* ) else ( diff --git a/hadrian/build.cabal.sh b/hadrian/build.cabal.sh index 9fddd61..8c7b594 100755 --- a/hadrian/build.cabal.sh +++ b/hadrian/build.cabal.sh @@ -25,7 +25,6 @@ if [ "${CABVER[0]}" -gt 2 -o "${CABVER[0]}" -eq 2 -a "${CABVER[1]}" -ge 2 ]; then "$CABAL" --project-file="$PROJ" new-build $CABFLAGS -j exe:hadrian "$CABAL" --project-file="$PROJ" new-run $CABFLAGS exe:hadrian -- \ - --lint \ --directory "$PWD" \ "$@" else diff --git a/hadrian/build.stack.bat b/hadrian/build.stack.bat index 674375a..642ab06 100644 --- a/hadrian/build.stack.bat +++ b/hadrian/build.stack.bat @@ -8,4 +8,4 @@ stack build if %errorlevel% neq 0 exit /B %errorlevel% rem Run Hadrian in GHC top directory forwarding additional user arguments -stack exec hadrian -- --lint --directory ".." %* +stack exec hadrian -- --directory ".." %* diff --git a/hadrian/build.stack.sh b/hadrian/build.stack.sh index 2b1ff1d..2e6c444 100755 --- a/hadrian/build.stack.sh +++ b/hadrian/build.stack.sh @@ -34,6 +34,5 @@ cd "$absoluteRoot" stack build --no-library-profiling ${HADRIAN_NIX:+--nix} stack exec hadrian -- \ - --lint \ --directory "$absoluteRoot/.." \ "$@" diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs index 0194518..8e0d338 100644 --- a/hadrian/src/Rules/Gmp.hs +++ b/hadrian/src/Rules/Gmp.hs @@ -14,10 +14,9 @@ gmpObjects :: Action [FilePath] gmpObjects = do gmpPath <- gmpBuildPath need [gmpPath -/- gmpLibraryH] - -- We need to use the untracked version of 'getDirectoryFiles', because the - -- contents of 'gmpObjectsDir' is built by Hadrian (in 'gmpRules'). Using - -- the tracked version can lead to Shake Lint failure. - -- See: https://ghc.haskell.org/trac/ghc/ticket/15971. + -- The line below causes a Shake Lint failure on Windows, which forced us to + -- disable Lint by default. See more details here: + -- https://ghc.haskell.org/trac/ghc/ticket/15971. map unifyPath <$> liftIO (getDirectoryFilesIO "" [gmpPath -/- gmpObjectsDir -/- "*.o"]) From git at git.haskell.org Sun Mar 31 15:08:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:30 +0000 (UTC) Subject: [commit: ghc] wip/T15971: Switch to the untracked version of getDirectoryFiles when scanning for GMP objects (e93901c) Message-ID: <20190331150830.59AA33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15971 Link : http://ghc.haskell.org/trac/ghc/changeset/e93901c42ebaa033e14cf69cfcc8b6a25e5234a5/ghc >--------------------------------------------------------------- commit e93901c42ebaa033e14cf69cfcc8b6a25e5234a5 Author: Andrey Mokhov Date: Wed Jan 9 21:34:03 2019 +0000 Switch to the untracked version of getDirectoryFiles when scanning for GMP objects See https://ghc.haskell.org/trac/ghc/ticket/15971. This is work in progress: this commit does the right thing, but does not yet fix the ticket. >--------------------------------------------------------------- e93901c42ebaa033e14cf69cfcc8b6a25e5234a5 hadrian/src/Rules/Gmp.hs | 14 +++++++++++++- hadrian/src/Rules/Library.hs | 7 ++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs index 32265fe..0194518 100644 --- a/hadrian/src/Rules/Gmp.hs +++ b/hadrian/src/Rules/Gmp.hs @@ -1,5 +1,5 @@ module Rules.Gmp ( - gmpRules, gmpBuildPath, gmpObjectsDir, gmpLibraryH + gmpRules, gmpBuildPath, gmpObjects, gmpLibraryH ) where import Base @@ -9,6 +9,18 @@ import Packages import Target import Utilities +-- | Build GMP library objects and return their paths. +gmpObjects :: Action [FilePath] +gmpObjects = do + gmpPath <- gmpBuildPath + need [gmpPath -/- gmpLibraryH] + -- We need to use the untracked version of 'getDirectoryFiles', because the + -- contents of 'gmpObjectsDir' is built by Hadrian (in 'gmpRules'). Using + -- the tracked version can lead to Shake Lint failure. + -- See: https://ghc.haskell.org/trac/ghc/ticket/15971. + map unifyPath <$> + liftIO (getDirectoryFilesIO "" [gmpPath -/- gmpObjectsDir -/- "*.o"]) + gmpBase :: FilePath gmpBase = pkgPath integerGmp -/- "gmp" diff --git a/hadrian/src/Rules/Library.hs b/hadrian/src/Rules/Library.hs index 1220040..8bd7067 100644 --- a/hadrian/src/Rules/Library.hs +++ b/hadrian/src/Rules/Library.hs @@ -103,11 +103,8 @@ cObjects context = do -- 'Context' is @integer-gmp at . extraObjects :: Context -> Action [FilePath] extraObjects context - | package context == integerGmp = do - gmpPath <- gmpBuildPath - need [gmpPath -/- gmpLibraryH] - map unifyPath <$> getDirectoryFiles "" [gmpPath -/- gmpObjectsDir -/- "*.o"] - | otherwise = return [] + | package context == integerGmp = gmpObjects + | otherwise = return [] -- | Return all the object files to be put into the library we're building for -- the given 'Context'. From git at git.haskell.org Sun Mar 31 15:08:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:33 +0000 (UTC) Subject: [commit: ghc] wip/alp/hadrian-docs-crosslinking: crosslink hadrian/README.md and hadrian/doc/make.md (de26181) Message-ID: <20190331150833.5F0943A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/alp/hadrian-docs-crosslinking Link : http://ghc.haskell.org/trac/ghc/changeset/de261812ee800c234493d3890687a45e0a512d1c/ghc >--------------------------------------------------------------- commit de261812ee800c234493d3890687a45e0a512d1c Author: Alp Mestanogullari Date: Wed Jan 9 12:51:50 2019 +0100 crosslink hadrian/README.md and hadrian/doc/make.md >--------------------------------------------------------------- de261812ee800c234493d3890687a45e0a512d1c hadrian/README.md | 9 +++++++-- hadrian/doc/make.md | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hadrian/README.md b/hadrian/README.md index a94a51b..a3b8a1b 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -11,8 +11,6 @@ this [Haskell Symposium 2016 paper](https://dl.acm.org/authorize?N41275) and thi The new build system can work side-by-side with the existing build system, since it places all build artefacts in a dedicated directory (called `_build` by default). -See [this guide](https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart) -if you'd like to start using Hadrian for building GHC. Your first build ---------------- @@ -55,6 +53,13 @@ or already have it, you can use the Cabal-based build script. * If you have never built GHC before, start with the [preparation guide][ghc-preparation]. +Cheatsheet for Make users +------------------------- + +You can find a cheatsheet-style document that shows the Hadrian equivalents of +commands that GHC users are used to run with the Make build system +[here](doc/make.md). + Using the build system ---------------------- Once your first build is successful, simply run `build` to rebuild after some diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md index ca4828a..2a3b432 100644 --- a/hadrian/doc/make.md +++ b/hadrian/doc/make.md @@ -1,5 +1,11 @@ # Hadrian for Make users +This is a cheatsheet-style document meant to succintly show how to use +Hadrian for any GHC developer familiar with the Make build system, by showing +the Make command(s) to achieve some goal and then the Hadrian equivalent. If you +are looking for a more verbose and comprehensive document, you should head to +[Hadrian's README](../README.md). + ## tl;dr For GHC hackers already used to the Make build system, here is what you need to From git at git.haskell.org Sun Mar 31 15:08:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:36 +0000 (UTC) Subject: [commit: ghc] wip/alp/hadrian-docs-crosslinking: typo (5a8a94b) Message-ID: <20190331150836.630383A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/alp/hadrian-docs-crosslinking Link : http://ghc.haskell.org/trac/ghc/changeset/5a8a94b69e91e6eb6fe65af30cffa5609f3ce3f9/ghc >--------------------------------------------------------------- commit 5a8a94b69e91e6eb6fe65af30cffa5609f3ce3f9 Author: Alp Mestanogullari Date: Wed Jan 9 22:40:25 2019 +0100 typo >--------------------------------------------------------------- 5a8a94b69e91e6eb6fe65af30cffa5609f3ce3f9 hadrian/doc/make.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md index 2a3b432..0d9bb91 100644 --- a/hadrian/doc/make.md +++ b/hadrian/doc/make.md @@ -1,6 +1,6 @@ # Hadrian for Make users -This is a cheatsheet-style document meant to succintly show how to use +This is a cheatsheet-style document meant to succinctly show how to use Hadrian for any GHC developer familiar with the Make build system, by showing the Make command(s) to achieve some goal and then the Hadrian equivalent. If you are looking for a more verbose and comprehensive document, you should head to From git at git.haskell.org Sun Mar 31 15:08:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:39 +0000 (UTC) Subject: [commit: ghc] wip/T15952: Furher work on monadic tcTypeKind (2f8f5ad) Message-ID: <20190331150839.793403A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952 Link : http://ghc.haskell.org/trac/ghc/changeset/2f8f5ad3feb77ce7040d7c0f3e44bf58648a7554/ghc >--------------------------------------------------------------- commit 2f8f5ad3feb77ce7040d7c0f3e44bf58648a7554 Author: Simon Peyton Jones Date: Tue Jan 15 10:35:28 2019 +0000 Furher work on monadic tcTypeKind This version is nearly validate-clean, modulo a failure in rename/should_compile/T4239 But Richard and I now plan a different path, so I'm going to park this. >--------------------------------------------------------------- 2f8f5ad3feb77ce7040d7c0f3e44bf58648a7554 compiler/typecheck/Inst.hs | 1 - compiler/typecheck/TcCanonical.hs | 31 +++++++++++++------------------ compiler/typecheck/TcDeriv.hs | 20 +++++++++++--------- compiler/typecheck/TcDerivInfer.hs | 8 ++++---- compiler/typecheck/TcDerivUtils.hs | 21 ++++++++++++++------- compiler/typecheck/TcErrors.hs | 12 ++++++------ compiler/typecheck/TcHsType.hs | 0 compiler/typecheck/TcMType.hs | 2 +- compiler/typecheck/TcRnDriver.hs | 3 +-- compiler/typecheck/TcSplice.hs | 2 +- compiler/typecheck/TcTyClsDecls.hs | 8 ++++---- 11 files changed, 55 insertions(+), 53 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 2f8f5ad3feb77ce7040d7c0f3e44bf58648a7554 From git at git.haskell.org Sun Mar 31 15:08:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:42 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Make calling convention more general (8d12a69) Message-ID: <20190331150842.7C2233A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/8d12a6929fa08eb136506abeaa4e3dd47ccb1716/ghc >--------------------------------------------------------------- commit 8d12a6929fa08eb136506abeaa4e3dd47ccb1716 Author: Peter Trommler Date: Fri Dec 28 23:52:31 2018 +0100 PPC NCG: Make calling convention more general All operating systems except AIX and Darwin follow the ELF specification. >--------------------------------------------------------------- 8d12a6929fa08eb136506abeaa4e3dd47ccb1716 compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index bbc3411..5586e0e 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -1570,13 +1570,12 @@ data GenCCallPlatform = GCPLinux | GCPLinux64ELF !Int | GCPAIX platformToGCP :: Platform -> GenCCallPlatform platformToGCP platform = case platformOS platform of - OSLinux -> case platformArch platform of - ArchPPC -> GCPLinux - ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 - ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 - _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux" OSAIX -> GCPAIX - _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS" + _ -> case platformArch platform of + ArchPPC -> GCPLinux + ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 + ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 + _ -> panic "platformToGCP: Not PowerPC" genCCall' From git at git.haskell.org Sun Mar 31 15:08:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:45 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Rename constructors (9c7729d) Message-ID: <20190331150845.8784B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/9c7729d32b35e7a7b551fcaa72780d55ee63b935/ghc >--------------------------------------------------------------- commit 9c7729d32b35e7a7b551fcaa72780d55ee63b935 Author: Peter Trommler Date: Thu Jan 3 14:04:37 2019 +0100 PPC NCG: Rename constructors Rename constructors in calling convention data type to reflect the fact that they represent an ELF ABI not only a Linux ABI. >--------------------------------------------------------------- 9c7729d32b35e7a7b551fcaa72780d55ee63b935 compiler/nativeGen/PPC/CodeGen.hs | 57 ++++++++++++++++++++------------------- 1 file changed, 29 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 9c7729d32b35e7a7b551fcaa72780d55ee63b935 From git at git.haskell.org Sun Mar 31 15:08:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:48 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Register definitions for all 64-bit systems (415b192) Message-ID: <20190331150848.8AA2A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/415b192c8cc22fe3db713d4f121832a3ae32d1bf/ghc >--------------------------------------------------------------- commit 415b192c8cc22fe3db713d4f121832a3ae32d1bf Author: Peter Trommler Date: Sat Dec 29 10:14:12 2018 +0100 PPC NCG: Register definitions for all 64-bit systems >--------------------------------------------------------------- 415b192c8cc22fe3db713d4f121832a3ae32d1bf compiler/nativeGen/PPC/Regs.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs index a2c03b9..f0b9914 100644 --- a/compiler/nativeGen/PPC/Regs.hs +++ b/compiler/nativeGen/PPC/Regs.hs @@ -229,11 +229,8 @@ allArgRegs = map regSingle [3..10] -- these are the regs which we cannot assume stay alive over a C call. callClobberedRegs :: Platform -> [Reg] -callClobberedRegs platform - = case platformOS platform of - OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13]) - OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13]) - _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture" +callClobberedRegs _platform + = map regSingle (0:[2..12] ++ map fReg [0..13]) allMachRegNos :: [RegNo] @@ -263,11 +260,10 @@ allFPArgRegs :: Platform -> [Reg] allFPArgRegs platform = case platformOS platform of OSAIX -> map (regSingle . fReg) [1..13] - OSLinux -> case platformArch platform of + _ -> case platformArch platform of ArchPPC -> map (regSingle . fReg) [1..8] ArchPPC_64 _ -> map (regSingle . fReg) [1..13] _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" - _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture" fits16Bits :: Integral a => a -> Bool fits16Bits x = x >= -32768 && x < 32768 From git at git.haskell.org Sun Mar 31 15:08:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:51 +0000 (UTC) Subject: [commit: ghc] wip/T15916: RTS: Use ELF v1 convention on all powerpc64 systems (cfaa700) Message-ID: <20190331150851.919483A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/cfaa700a7544d9b4c4c900fb58714eedaa53f92c/ghc >--------------------------------------------------------------- commit cfaa700a7544d9b4c4c900fb58714eedaa53f92c Author: Peter Trommler Date: Fri Dec 28 22:30:34 2018 +0100 RTS: Use ELF v1 convention on all powerpc64 systems >--------------------------------------------------------------- cfaa700a7544d9b4c4c900fb58714eedaa53f92c rts/StgCRun.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 3ce41a6..1b0a8f2 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -719,7 +719,6 @@ StgRunIsImplementedInAssembler(void) #if defined(powerpc64_HOST_ARCH) -#if defined(linux_HOST_OS) static void GNUC3_ATTRIBUTE(used) StgRunIsImplementedInAssembler(void) { @@ -841,10 +840,6 @@ StgRunIsImplementedInAssembler(void) : : "i"(RESERVED_C_STACK_BYTES+304 /*stack frame size*/)); } -#else // linux_HOST_OS -#error Only Linux support for power64 right now. -#endif - #endif #if defined(powerpc64le_HOST_ARCH) From git at git.haskell.org Sun Mar 31 15:08:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:54 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Make `stackHeaderSize` more general (753d27a) Message-ID: <20190331150854.95B153A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/753d27aad73725b46b81fb4f69956e50f9d1870c/ghc >--------------------------------------------------------------- commit 753d27aad73725b46b81fb4f69956e50f9d1870c Author: Peter Trommler Date: Fri Dec 28 23:55:35 2018 +0100 PPC NCG: Make `stackHeaderSize` more general >--------------------------------------------------------------- 753d27aad73725b46b81fb4f69956e50f9d1870c compiler/nativeGen/PPC/Instr.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs index 8f3153c..fb62738 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -575,14 +575,13 @@ ppc_mkLoadInstr dflags reg delta slot stackFrameHeaderSize :: DynFlags -> Int stackFrameHeaderSize dflags = case platformOS platform of - OSLinux -> case platformArch platform of - -- header + parameter save area - ArchPPC -> 64 -- TODO: check ABI spec - ArchPPC_64 ELF_V1 -> 48 + 8 * 8 - ArchPPC_64 ELF_V2 -> 32 + 8 * 8 - _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux" OSAIX -> 24 + 8 * 4 - _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" + _ -> case platformArch platform of + -- header + parameter save area + ArchPPC -> 64 -- TODO: check ABI spec + ArchPPC_64 ELF_V1 -> 48 + 8 * 8 + ArchPPC_64 ELF_V2 -> 32 + 8 * 8 + _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" where platform = targetPlatform dflags -- | The maximum number of bytes required to spill a register. PPC32 From git at git.haskell.org Sun Mar 31 15:08:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:08:57 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: GOT declaration for all 64-bit ELF systems (8b5e50e) Message-ID: <20190331150857.A21353A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/8b5e50eb3c2920c3126ea0d9512518f6557bd20a/ghc >--------------------------------------------------------------- commit 8b5e50eb3c2920c3126ea0d9512518f6557bd20a Author: Peter Trommler Date: Sat Dec 29 10:12:48 2018 +0100 PPC NCG: GOT declaration for all 64-bit ELF systems >--------------------------------------------------------------- 8b5e50eb3c2920c3126ea0d9512518f6557bd20a compiler/nativeGen/PIC.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs index 7778729..280a87e 100644 --- a/compiler/nativeGen/PIC.hs +++ b/compiler/nativeGen/PIC.hs @@ -527,19 +527,17 @@ pprGotDeclaration _ _ OSAIX ] --- PPC 64 ELF v1 needs a Table Of Contents (TOC) on Linux -pprGotDeclaration _ (ArchPPC_64 ELF_V1) OSLinux +-- PPC 64 ELF v1 needs a Table Of Contents (TOC) +pprGotDeclaration _ (ArchPPC_64 ELF_V1) _ = text ".section \".toc\",\"aw\"" -- In ELF v2 we also need to tell the assembler that we want ABI -- version 2. This would normally be done at the top of the file -- right after a file directive, but I could not figure out how -- to do that. -pprGotDeclaration _ (ArchPPC_64 ELF_V2) OSLinux +pprGotDeclaration _ (ArchPPC_64 ELF_V2) _ = vcat [ text ".abiversion 2", text ".section \".toc\",\"aw\"" ] -pprGotDeclaration _ (ArchPPC_64 _) _ - = panic "pprGotDeclaration: ArchPPC_64 only Linux supported" -- Emit GOT declaration -- Output whatever needs to be output once per .s file. From git at git.haskell.org Sun Mar 31 15:09:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:00 +0000 (UTC) Subject: [commit: ghc] wip/T15916: Fix tab and improve whitespace (26bd5a2) Message-ID: <20190331150900.A65B93A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/26bd5a2734183632d904727db7988a3c5990c53a/ghc >--------------------------------------------------------------- commit 26bd5a2734183632d904727db7988a3c5990c53a Author: Peter Trommler Date: Sat Dec 29 11:29:02 2018 +0100 Fix tab and improve whitespace >--------------------------------------------------------------- 26bd5a2734183632d904727db7988a3c5990c53a compiler/nativeGen/PPC/CodeGen.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index 5586e0e..e4bf5fe 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -1569,13 +1569,14 @@ genCCall target dest_regs argsAndHints data GenCCallPlatform = GCPLinux | GCPLinux64ELF !Int | GCPAIX platformToGCP :: Platform -> GenCCallPlatform -platformToGCP platform = case platformOS platform of - OSAIX -> GCPAIX - _ -> case platformArch platform of - ArchPPC -> GCPLinux - ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 - ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 - _ -> panic "platformToGCP: Not PowerPC" +platformToGCP platform + = case platformOS platform of + OSAIX -> GCPAIX + _ -> case platformArch platform of + ArchPPC -> GCPLinux + ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 + ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 + _ -> panic "platformToGCP: Not PowerPC" genCCall' From git at git.haskell.org Sun Mar 31 15:09:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:03 +0000 (UTC) Subject: [commit: ghc] wip/T14677: reduce line noise (f189227) Message-ID: <20190331150903.AD15B3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14677 Link : http://ghc.haskell.org/trac/ghc/changeset/f1892272ab54c256ae86f647d130b59cbdae6288/ghc >--------------------------------------------------------------- commit f1892272ab54c256ae86f647d130b59cbdae6288 Author: Gabor Greif Date: Wed Jan 16 10:33:05 2019 +0100 reduce line noise >--------------------------------------------------------------- f1892272ab54c256ae86f647d130b59cbdae6288 libraries/base/GHC/Event/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/GHC/Event/Internal.hs b/libraries/base/GHC/Event/Internal.hs index 57cb293..afe880b 100644 --- a/libraries/base/GHC/Event/Internal.hs +++ b/libraries/base/GHC/Event/Internal.hs @@ -58,7 +58,7 @@ evtClose :: Event evtClose = Event 4 eventIs :: Event -> Event -> Bool -eventIs (Event a) (Event b) = a .&. b /= 0 +Event a `eventIs` Event b = a .&. b /= 0 -- | @since 4.4.0.0 instance Show Event where From git at git.haskell.org Sun Mar 31 15:09:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:07 +0000 (UTC) Subject: [commit: ghc] wip/D5285: Warn about unused packages (076584c) Message-ID: <20190331150907.842B33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5285 Link : http://ghc.haskell.org/trac/ghc/changeset/076584c11bf536dcc15f56b01dafe2957bcb02d4/ghc >--------------------------------------------------------------- commit 076584c11bf536dcc15f56b01dafe2957bcb02d4 Author: Yuras Shumovich Date: Sun Jan 20 19:49:56 2019 -0500 Warn about unused packages Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: hvr, simonpj, mpickering, rwbarton, carter GHC Trac Issues: #15838 Differential Revision: https://phabricator.haskell.org/D5285 >--------------------------------------------------------------- 076584c11bf536dcc15f56b01dafe2957bcb02d4 compiler/main/DynFlags.hs | 4 +- compiler/main/GhcMake.hs | 70 +++++++++++++++++++++- docs/users_guide/8.8.1-notes.rst | 2 + docs/users_guide/using-warnings.rst | 15 +++++ .../should_compile/UnusedPackages.hs} | 3 +- .../warnings/should_compile/UnusedPackages.stderr | 6 ++ testsuite/tests/warnings/should_compile/all.T | 2 + 7 files changed, 99 insertions(+), 3 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 78be688..74c7dbd 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -836,6 +836,7 @@ data WarningFlag = | Opt_WarnImplicitKindVars -- Since 8.6 | Opt_WarnSpaceAfterBang | Opt_WarnMissingDerivingStrategies -- Since 8.8 + | Opt_WarnUnusedPackages -- Since 8.10 deriving (Eq, Show, Enum) data Language = Haskell98 | Haskell2010 @@ -4047,7 +4048,8 @@ wWarningFlagsDeps = [ flagSpec "star-binder" Opt_WarnStarBinder, flagSpec "star-is-type" Opt_WarnStarIsType, flagSpec "missing-space-after-bang" Opt_WarnSpaceAfterBang, - flagSpec "partial-fields" Opt_WarnPartialFields ] + flagSpec "partial-fields" Opt_WarnPartialFields, + flagSpec "unused-packages" Opt_WarnUnusedPackages ] -- | These @-\@ flags can all be reversed with @-no-\@ negatableFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)] diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index ae27d4e..3574993 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -238,7 +238,75 @@ data LoadHowMuch load :: GhcMonad m => LoadHowMuch -> m SuccessFlag load how_much = do mod_graph <- depanal [] False - load' how_much (Just batchMsg) mod_graph + success <- load' how_much (Just batchMsg) mod_graph + warnUnusedPackages + pure success + +-- Note [Unused packages] +-- +-- Cabal passes `--package-id` flag for each direct dependency. But GHC +-- loads them lazily, so when compilation is done, we have a list of all +-- actually loaded packages. All the packages, specified on command line, +-- but never loaded, are probably unused dependencies. + +warnUnusedPackages :: GhcMonad m => m () +warnUnusedPackages = do + hsc_env <- getSession + eps <- liftIO $ hscEPS hsc_env + + let dflags = hsc_dflags hsc_env + pit = eps_PIT eps + + let loadedPackages + = map (getPackageDetails dflags) + . nub . sort + . map moduleUnitId + . moduleEnvKeys + $ pit + + requestedArgs = mapMaybe packageArg (packageFlags dflags) + + unusedArgs + = filter (\arg -> not $ any (matching dflags arg) loadedPackages) + requestedArgs + + let warn = makeIntoWarning + (Reason Opt_WarnUnusedPackages) + (mkPlainErrMsg dflags noSrcSpan msg) + msg = hang + ( text "The following packages were specified " + <> text "via -package or -package-id flags, " + <> text "but were not needed for compilation: ") + 4 + (sep (map pprUnusedArg unusedArgs)) + + when (wopt Opt_WarnUnusedPackages dflags && not (null unusedArgs)) $ + logWarnings (listToBag [warn]) + + where + packageArg (ExposePackage _ arg _) = Just arg + packageArg _ = Nothing + + pprUnusedArg (PackageArg str) = text str + pprUnusedArg (UnitIdArg uid) = ppr uid + + matchingStr :: String -> PackageConfig -> Bool + matchingStr str p + = str == sourcePackageIdString p + || str == packageNameString p + + matching :: DynFlags -> PackageArg -> PackageConfig -> Bool + matching _ (PackageArg str) p = matchingStr str p + matching dflags (UnitIdArg uid) p = uid == realUnitId dflags p + + -- For wired-in packages, we have to unwire their id, + -- otherwise they won't match package flags + realUnitId :: DynFlags -> PackageConfig -> UnitId + realUnitId dflags + = unwireUnitId dflags + . DefiniteUnitId + . DefUnitId + . installedPackageConfigId -- | Generalized version of 'load' which also supports a custom -- 'Messager' (for reporting progress) and 'ModuleGraph' (generally diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst index cd4c00d..b022b6c 100644 --- a/docs/users_guide/8.8.1-notes.rst +++ b/docs/users_guide/8.8.1-notes.rst @@ -76,6 +76,8 @@ Compiler - The :ghc-flag:`-Wcompat` warning group now includes :ghc-flag:`-Wstar-is-type`. +- New :ghc-flag:`-Wunused-packages` warning reports unused packages. + - The :ghc-flag:`-fllvm-pass-vectors-in-regs` flag is now deprecated as vector arguments are now passed in registers by default. diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index 03ca184..8bf2348 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -1690,6 +1690,21 @@ of ``-W(no-)*``. data Foo = Foo { f :: Int } | Bar +.. ghc-flag:: -Wunused-packages + :shortdesc: warn when package is requested on command line, but was never loaded. + :type: dynamic + :reverse: -Wno-unused-packages + :category: + + :since: 8.8 + + The option :ghc-flag:`-Wunused-packages` warns about packages, specified on + command line via :ghc-flag:`-package` or :ghc-flag:`-package-id`, but were not + loaded during compication. Usually it means that you have an unused dependency. + + You may want to enable this warning on a clean build or enable :ghc-flag:`-fforce-recomp` + in order to get reliable results. + If you're feeling really paranoid, the :ghc-flag:`-dcore-lint` option is a good choice. It turns on heavyweight intra-pass sanity-checking within GHC. (It checks GHC's sanity, not yours.) diff --git a/testsuite/tests/dynlibs/T5373B.hs b/testsuite/tests/warnings/should_compile/UnusedPackages.hs similarity index 64% copy from testsuite/tests/dynlibs/T5373B.hs copy to testsuite/tests/warnings/should_compile/UnusedPackages.hs index 0570fb1..ef70dbb 100644 --- a/testsuite/tests/dynlibs/T5373B.hs +++ b/testsuite/tests/warnings/should_compile/UnusedPackages.hs @@ -1,4 +1,5 @@ +module Main +where main :: IO () main = return () - diff --git a/testsuite/tests/warnings/should_compile/UnusedPackages.stderr b/testsuite/tests/warnings/should_compile/UnusedPackages.stderr new file mode 100644 index 0000000..7660287 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/UnusedPackages.stderr @@ -0,0 +1,6 @@ +[1 of 1] Compiling Main ( UnusedPackages.hs, UnusedPackages.o ) +Linking UnusedPackages ... + +: warning: [-Wunused-packages] + The following packages were specified via -package or -package-id flags, but were not needed for compilation: + bytestring diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T index 10a3ecf..686eee9 100644 --- a/testsuite/tests/warnings/should_compile/all.T +++ b/testsuite/tests/warnings/should_compile/all.T @@ -28,3 +28,5 @@ test('MissingMod', normal, multimod_compile, ['MissingMod', '-Wmissing-home-modu test('StarBinder', normal, compile, ['']) test('Overflow', normal, compile, ['']) + +test('UnusedPackages', normal, multimod_compile, ['UnusedPackages.hs', '-package=bytestring -package=base -Wunused-packages']) From git at git.haskell.org Sun Mar 31 15:09:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:10 +0000 (UTC) Subject: [commit: ghc] wip/D5056: testsuite: Ensure that config.{msys, cygwin} are initialized (f048b78) Message-ID: <20190331150910.881CC3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5056 Link : http://ghc.haskell.org/trac/ghc/changeset/f048b7892cd8eaf3277726337a23997e4a3762a5/ghc >--------------------------------------------------------------- commit f048b7892cd8eaf3277726337a23997e4a3762a5 Author: Ben Gamari Date: Sun Jan 20 20:45:34 2019 -0500 testsuite: Ensure that config.{msys,cygwin} are initialized Reviewers: monoidal Reviewed By: monoidal Subscribers: monoidal, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5056 >--------------------------------------------------------------- f048b7892cd8eaf3277726337a23997e4a3762a5 testsuite/driver/testglobals.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index 03a6250..0e0240d 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -50,6 +50,8 @@ class TestConfig: self.platform = '' self.os = '' self.arch = '' + self.msys = False + self.cygwin = False # What is the wordsize (in bits) of this platform? self.wordsize = '' From git at git.haskell.org Sun Mar 31 15:09:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:13 +0000 (UTC) Subject: [commit: ghc] wip/D4759: rts: Make LOOKS_LIKE_INFO_PTR a bit more strict (ed6aaaf) Message-ID: <20190331150913.8D9C83A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4759 Link : http://ghc.haskell.org/trac/ghc/changeset/ed6aaafcf644f804b108dbfd7924bf605f8c0f48/ghc >--------------------------------------------------------------- commit ed6aaafcf644f804b108dbfd7924bf605f8c0f48 Author: Ben Gamari Date: Sun Jan 20 20:34:52 2019 -0500 rts: Make LOOKS_LIKE_INFO_PTR a bit more strict In particular, we now verify that the info table doesn't reside in the dynamic heap. Test Plan: Validate Previously Differential Revision https://phabricator.haskell.org/D4759 >--------------------------------------------------------------- ed6aaafcf644f804b108dbfd7924bf605f8c0f48 includes/Cmm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Cmm.h b/includes/Cmm.h index 7334eab..9ae2be8 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -577,7 +577,7 @@ /* Debugging macros */ #define LOOKS_LIKE_INFO_PTR(p) \ - ((p) != NULL && \ + (!HEAP_ALLOCED(p) && \ LOOKS_LIKE_INFO_PTR_NOT_NULL(p)) #define LOOKS_LIKE_INFO_PTR_NOT_NULL(p) \ From git at git.haskell.org Sun Mar 31 15:09:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:16 +0000 (UTC) Subject: [commit: ghc] wip/T16104: testsuite: Remove directories that already exist when seeding extra_files (595eed8) Message-ID: <20190331150916.8D1043A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/595eed8f63e5d2b23b63a376d22d40bcb3ace5fe/ghc >--------------------------------------------------------------- commit 595eed8f63e5d2b23b63a376d22d40bcb3ace5fe Author: Ben Gamari Date: Sun Jan 20 22:36:22 2019 -0500 testsuite: Remove directories that already exist when seeding extra_files Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO on a test containing such extra_files. >--------------------------------------------------------------- 595eed8f63e5d2b23b63a376d22d40bcb3ace5fe testsuite/driver/testlib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c09d02a..d1ab41d 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -881,6 +881,8 @@ def do_test(name, way, func, args, files): if os.path.isfile(src): link_or_copy_file(src, dst) elif os.path.isdir(src): + if os.path.exists(dst): + shutil.rmtree(dst) os.mkdir(dst) lndir(src, dst) else: From git at git.haskell.org Sun Mar 31 15:09:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:19 +0000 (UTC) Subject: [commit: ghc] wip/T16104: testsuite: Normalise style (83ff4e2) Message-ID: <20190331150919.8FA6C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/83ff4e25f4ea003347dd231262e19bf6a725051b/ghc >--------------------------------------------------------------- commit 83ff4e25f4ea003347dd231262e19bf6a725051b Author: Ben Gamari Date: Sun Jan 20 22:32:09 2019 -0500 testsuite: Normalise style >--------------------------------------------------------------- 83ff4e25f4ea003347dd231262e19bf6a725051b testsuite/tests/plugins/all.T | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 82e9fcb..30b8fd6 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -7,27 +7,28 @@ setTestOpts(req_interp) test('plugins01', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), + when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], run_command, ['$MAKE -s --no-print-directory plugins01']) test('plugins02', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), + when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.plugin_way_flags]) test('plugins03', [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race), + when(opsys('mingw32'), multi_cpu_race), pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03 TOP={top}')], compile_fail, ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistentPlugin -package simple-plugin']) -test('plugins04', [extra_files(['HomePackagePlugin.hs']), - only_ways([config.ghc_plugin_way]), - when(opsys('mingw32'), multi_cpu_race)], +test('plugins04', + [extra_files(['HomePackagePlugin.hs']), + only_ways([config.ghc_plugin_way]), + when(opsys('mingw32'), multi_cpu_race)], multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin']) From git at git.haskell.org Sun Mar 31 15:09:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:22 +0000 (UTC) Subject: [commit: ghc] wip/T16104: GhcPlugins: Fix lookup of TH names (692304d) Message-ID: <20190331150922.94E493A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/692304d38f71ed96a2f93617b26e60370f801671/ghc >--------------------------------------------------------------- commit 692304d38f71ed96a2f93617b26e60370f801671 Author: Ben Gamari Date: Sat Jan 19 13:59:18 2019 -0500 GhcPlugins: Fix lookup of TH names Previously `thNameToGhcName` was calling `lookupOrigNameCache` directly, which failed to handle the case that the name wasn't already in the name cache. This happens, for instance, when the name was in scope in a plugin being used during compilation but not in scope in the module being compiled. In this case we the interface file containing the name won't be loaded and `lookupOrigNameCache` fails. This was the cause of #16104. The solution is simple: use the nicely packaged `lookupOrigIO` instead. >--------------------------------------------------------------- 692304d38f71ed96a2f93617b26e60370f801671 compiler/main/GhcPlugins.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/main/GhcPlugins.hs b/compiler/main/GhcPlugins.hs index 3e0facf..5649237 100644 --- a/compiler/main/GhcPlugins.hs +++ b/compiler/main/GhcPlugins.hs @@ -87,7 +87,7 @@ import Unique ( Unique, Uniquable(..) ) import FastString import Data.Maybe -import NameCache (lookupOrigNameCache) +import IfaceEnv ( lookupOrigIO ) import GhcPrelude import MonadUtils ( mapMaybeM ) import Convert ( thRdrNameGuesses ) @@ -127,6 +127,6 @@ thNameToGhcName th_name | Just n <- isExact_maybe rdr_name -- This happens in derived code = return $ if isExternalName n then Just n else Nothing | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name - = do { cache <- getOrigNameCache - ; return $ lookupOrigNameCache cache rdr_mod rdr_occ } + = do { hsc_env <- getHscEnv + ; Just <$> liftIO (lookupOrigIO hsc_env rdr_mod rdr_occ) } | otherwise = return Nothing From git at git.haskell.org Sun Mar 31 15:09:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:26 +0000 (UTC) Subject: [commit: ghc] wip/T16104: testsuite: Add test for #16104 (d79810b) Message-ID: <20190331150926.B3FE03A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/d79810b6f1e4bf684a0b3c2a2be6f3b4b4753f82/ghc >--------------------------------------------------------------- commit d79810b6f1e4bf684a0b3c2a2be6f3b4b4753f82 Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- d79810b6f1e4bf684a0b3c2a2be6f3b4b4753f82 testsuite/tests/plugins/Makefile | 4 ++++ .../tc-plugin-ghci => plugins/T16104-plugin}/LICENSE | 0 .../{rule-defining-plugin => T16104-plugin}/Makefile | 0 .../T16104-plugin}/Setup.hs | 0 .../T16104-plugin.cabal} | 8 ++------ .../tests/plugins/T16104-plugin/T16104_Plugin.hs | 20 ++++++++++++++++++++ testsuite/tests/plugins/T16104.hs | 4 ++++ testsuite/tests/plugins/T16104.stdout | 1 + testsuite/tests/plugins/all.T | 6 ++++++ 9 files changed, 37 insertions(+), 6 deletions(-) diff --git a/testsuite/tests/plugins/Makefile b/testsuite/tests/plugins/Makefile index 8a6af5b..d913ca5 100644 --- a/testsuite/tests/plugins/Makefile +++ b/testsuite/tests/plugins/Makefile @@ -121,3 +121,7 @@ plugin-recomp-change-prof: "$(MAKE)" -s --no-print-directory -C plugin-recomp package.plugins01 TOP=$(TOP) RUN=-DRUN2 "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 plugin-recomp-test.hs -package-db plugin-recomp/pkg.plugins01/local.package.conf -fplugin PurePlugin "$(TEST_HC)" $(TEST_HC_OPTS) -prof -osuf p_o -hisuf p_hi -v0 plugin-recomp-test.hs -package-db plugin-recomp/pkg.plugins01/local.package.conf -fplugin PurePlugin + +.PHONY: T16104 +T16104: + "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 T16104.hs -package-db T16104-plugin/pkg.T16104-plugin/local.package.conf diff --git a/testsuite/tests/ghci/should_run/tc-plugin-ghci/LICENSE b/testsuite/tests/plugins/T16104-plugin/LICENSE similarity index 100% copy from testsuite/tests/ghci/should_run/tc-plugin-ghci/LICENSE copy to testsuite/tests/plugins/T16104-plugin/LICENSE diff --git a/testsuite/tests/plugins/rule-defining-plugin/Makefile b/testsuite/tests/plugins/T16104-plugin/Makefile similarity index 100% copy from testsuite/tests/plugins/rule-defining-plugin/Makefile copy to testsuite/tests/plugins/T16104-plugin/Makefile diff --git a/testsuite/tests/ghci/should_run/tc-plugin-ghci/Setup.hs b/testsuite/tests/plugins/T16104-plugin/Setup.hs similarity index 100% copy from testsuite/tests/ghci/should_run/tc-plugin-ghci/Setup.hs copy to testsuite/tests/plugins/T16104-plugin/Setup.hs diff --git a/testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal b/testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal similarity index 51% copy from testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal copy to testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal index b354f6b..5288e8f 100644 --- a/testsuite/tests/plugins/rule-defining-plugin/rule-defining-plugin.cabal +++ b/testsuite/tests/plugins/T16104-plugin/T16104-plugin.cabal @@ -1,15 +1,11 @@ -Name: rule-defining-plugin +Name: T16104-plugin Version: 0.1 Synopsis: For testing Cabal-Version: >= 1.2 Build-Type: Simple License: BSD3 License-File: LICENSE -Author: Edward Z. Yang -Homepage: http://ezyang.com Library Build-Depends: base, ghc - ghc-options: -O - Exposed-Modules: - RuleDefiningPlugin + Exposed-Modules: T16104_Plugin diff --git a/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs b/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs new file mode 100644 index 0000000..79cd0fe --- /dev/null +++ b/testsuite/tests/plugins/T16104-plugin/T16104_Plugin.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T16104_Plugin (plugin) where + +import GhcPlugins +import Data.Bits + +plugin :: Plugin +plugin = defaultPlugin {installCoreToDos = install} + where install _ todos = return (test : todos) + + test = CoreDoPluginPass "Test" check + + check :: ModGuts -> CoreM ModGuts + check m = do mbN <- thNameToGhcName 'complement + case mbN of + Just _ -> liftIO $ putStrLn "Found complement!" + Nothing -> error "Failed to locate complement" + + return m diff --git a/testsuite/tests/plugins/T16104.hs b/testsuite/tests/plugins/T16104.hs new file mode 100644 index 0000000..bfef697 --- /dev/null +++ b/testsuite/tests/plugins/T16104.hs @@ -0,0 +1,4 @@ +{-# OPTIONS_GHC -fplugin T16104_Plugin #-} + +main :: IO () +main = return () diff --git a/testsuite/tests/plugins/T16104.stdout b/testsuite/tests/plugins/T16104.stdout new file mode 100644 index 0000000..a1eb7b6 --- /dev/null +++ b/testsuite/tests/plugins/T16104.stdout @@ -0,0 +1 @@ +Found complement! diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index da6294e..82e9fcb 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -208,3 +208,9 @@ test('T15858', extra_hc_opts("-package-db plugin-recomp/pkg.plugins01/local.package.conf ") ], ghci_script, ['T15858.script']) + +test('T16104', + [extra_files(['T16104-plugin/']), + pre_cmd('$MAKE -s --no-print-directory -C T16104-plugin package.T16104-plugin TOP={top}') + ], + run_command, ['$MAKE -s --no-print-directory T16104']) From git at git.haskell.org Sun Mar 31 15:09:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:29 +0000 (UTC) Subject: [commit: ghc] wip/joachim/proxy-typo: Minor typo in docs for KProxy (3860347) Message-ID: <20190331150929.B6C583A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/joachim/proxy-typo Link : http://ghc.haskell.org/trac/ghc/changeset/3860347cd2c3c34d1b868725e6489f16435e9656/ghc >--------------------------------------------------------------- commit 3860347cd2c3c34d1b868725e6489f16435e9656 Author: Joachim Breitner Date: Tue Jan 22 11:17:57 2019 +0100 Minor typo in docs for KProxy really minor, but it annoyed me when reading it :-) >--------------------------------------------------------------- 3860347cd2c3c34d1b868725e6489f16435e9656 libraries/base/Data/Proxy.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/Proxy.hs b/libraries/base/Data/Proxy.hs index e8f9151..92fef0e 100644 --- a/libraries/base/Data/Proxy.hs +++ b/libraries/base/Data/Proxy.hs @@ -57,7 +57,7 @@ data Proxy t = Proxy deriving ( Bounded -- ^ @since 4.7.0.0 , Read -- ^ @since 4.7.0.0 ) --- | A concrete, promotable proxy type, for use at the kind level +-- | A concrete, promotable proxy type, for use at the kind level. -- There are no instances for this because it is intended at the kind level only data KProxy (t :: Type) = KProxy From git at git.haskell.org Sun Mar 31 15:09:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:32 +0000 (UTC) Subject: [commit: ghc] wip/joachim/codeowners: Add myself to CODEOWNERS for a few files (7cecfa6) Message-ID: <20190331150932.B73BB3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/joachim/codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/7cecfa6aecff73ac5deaf4938d8601abcbea88ba/ghc >--------------------------------------------------------------- commit 7cecfa6aecff73ac5deaf4938d8601abcbea88ba Author: Joachim Breitner Date: Tue Jan 22 10:57:52 2019 +0100 Add myself to CODEOWNERS for a few files >--------------------------------------------------------------- 7cecfa6aecff73ac5deaf4938d8601abcbea88ba CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 6ad914b..2a6f508 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,6 +16,11 @@ /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK +/compiler/simplCore/CallArity.hs @nomeata +/compiler/utils/UnVarGraph.hs @nomeata +/compiler/simplCore/Exitify.hs @nomeata +/compiler/simplStg/StgCse.hs @nomeata +/compiler/cmm/CmmSwitch.hs @nomeata # Core libraries /libraries/base @hvr From git at git.haskell.org Sun Mar 31 15:09:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:35 +0000 (UTC) Subject: [commit: ghc] wip/typos: A few typofixes (5ef25c0) Message-ID: <20190331150935.CCBE53A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/typos Link : http://ghc.haskell.org/trac/ghc/changeset/5ef25c0712f6824170c485998f91ad2b0101632c/ghc >--------------------------------------------------------------- commit 5ef25c0712f6824170c485998f91ad2b0101632c Author: Gabor Greif Date: Tue Jan 22 12:07:47 2019 +0100 A few typofixes >--------------------------------------------------------------- 5ef25c0712f6824170c485998f91ad2b0101632c compiler/basicTypes/BasicTypes.hs | 2 +- compiler/coreSyn/CoreArity.hs | 2 +- compiler/coreSyn/CoreSyn.hs | 2 +- compiler/coreSyn/CoreUnfold.hs | 2 +- compiler/hieFile/HieAst.hs | 2 +- compiler/hsSyn/HsDecls.hs | 2 +- compiler/main/InteractiveEval.hs | 2 +- compiler/nativeGen/CFG.hs | 2 +- compiler/prelude/primops.txt.pp | 2 +- compiler/simplCore/Simplify.hs | 5 ++--- compiler/stgSyn/CoreToStg.hs | 2 +- compiler/typecheck/FamInst.hs | 2 +- docs/users_guide/extending_ghc.rst | 2 +- hadrian/src/Rules/Documentation.hs | 2 +- libraries/base/Data/Either.hs | 4 ++-- libraries/base/Data/Foldable.hs | 2 +- rts/posix/Signals.c | 2 +- 17 files changed, 19 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 5ef25c0712f6824170c485998f91ad2b0101632c From git at git.haskell.org Sun Mar 31 15:09:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:38 +0000 (UTC) Subject: [commit: ghc] wip/typos: Minor refactor [ci skip] (83736af) Message-ID: <20190331150938.CE9AF3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/typos Link : http://ghc.haskell.org/trac/ghc/changeset/83736afede37174e9eaaff74b5afb2bcaf0e102a/ghc >--------------------------------------------------------------- commit 83736afede37174e9eaaff74b5afb2bcaf0e102a Author: Gabor Greif Date: Tue Jan 22 12:13:28 2019 +0100 Minor refactor [ci skip] >--------------------------------------------------------------- 83736afede37174e9eaaff74b5afb2bcaf0e102a compiler/basicTypes/MkId.hs | 2 +- compiler/prelude/TysPrim.hs | 8 ++++---- compiler/prelude/TysWiredIn.hs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index 17916cf..b12da07 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -1264,7 +1264,7 @@ proxyHashId `setNeverLevPoly` ty ) where -- proxy# :: forall k (a:k). Proxy# k a - bndrs = mkTemplateKiTyVars [liftedTypeKind] (\ks -> ks) + bndrs = mkTemplateKiTyVars [liftedTypeKind] id [k,t] = mkTyVarTys bndrs ty = mkSpecForAllTys bndrs (mkProxyPrimTy k t) diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs index 77ea80e..2a604cc 100644 --- a/compiler/prelude/TysPrim.hs +++ b/compiler/prelude/TysPrim.hs @@ -858,7 +858,7 @@ proxyPrimTyCon :: TyCon proxyPrimTyCon = mkPrimTyCon proxyPrimTyConName binders res_kind [Nominal,Nominal] where -- Kind: forall k. k -> Void# - binders = mkTemplateTyConBinders [liftedTypeKind] (\ks-> ks) + binders = mkTemplateTyConBinders [liftedTypeKind] id res_kind = unboxedTupleKind [] @@ -874,7 +874,7 @@ eqPrimTyCon :: TyCon -- The representation type for equality predicates eqPrimTyCon = mkPrimTyCon eqPrimTyConName binders res_kind roles where -- Kind :: forall k1 k2. k1 -> k2 -> Void# - binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] (\ks -> ks) + binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Nominal, Nominal] @@ -885,7 +885,7 @@ eqReprPrimTyCon :: TyCon -- See Note [The equality types story] eqReprPrimTyCon = mkPrimTyCon eqReprPrimTyConName binders res_kind roles where -- Kind :: forall k1 k2. k1 -> k2 -> Void# - binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] (\ks -> ks) + binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Representational, Representational] @@ -896,7 +896,7 @@ eqPhantPrimTyCon :: TyCon eqPhantPrimTyCon = mkPrimTyCon eqPhantPrimTyConName binders res_kind roles where -- Kind :: forall k1 k2. k1 -> k2 -> Void# - binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] (\ks -> ks) + binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Phantom, Phantom] diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index a0a043d..6fea0e4 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -1074,7 +1074,7 @@ eqSCSelId, heqSCSelId, coercibleSCSelId :: Id datacon = pcDataCon heqDataConName tvs [sc_pred] tycon -- Kind: forall k1 k2. k1 -> k2 -> Constraint - binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] (\ks -> ks) + binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id roles = [Nominal, Nominal, Nominal, Nominal] rhs = mkDataTyConRhs [datacon] From git at git.haskell.org Sun Mar 31 15:09:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:42 +0000 (UTC) Subject: [commit: ghc] wip/T11982-test: testsuite: Add tests from #11982 (c16ed98) Message-ID: <20190331150942.B67A33A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T11982-test Link : http://ghc.haskell.org/trac/ghc/changeset/c16ed9828f296b8f9e0545b00ddc80204c14f699/ghc >--------------------------------------------------------------- commit c16ed9828f296b8f9e0545b00ddc80204c14f699 Author: Ben Gamari Date: Tue Jan 22 11:27:30 2019 -0500 testsuite: Add tests from #11982 >--------------------------------------------------------------- c16ed9828f296b8f9e0545b00ddc80204c14f699 testsuite/tests/typecheck/should_compile/T11982a.hs | 7 +++++++ testsuite/tests/typecheck/should_compile/T11982b.hs | 17 +++++++++++++++++ testsuite/tests/typecheck/should_compile/T11982c.hs | 18 ++++++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 3 +++ 4 files changed, 45 insertions(+) diff --git a/testsuite/tests/typecheck/should_compile/T11982a.hs b/testsuite/tests/typecheck/should_compile/T11982a.hs new file mode 100644 index 0000000..1928bf2 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T11982a.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE MonadComprehensions, ParallelListComp #-} + +module Foo where + +foo xs ys = [ (f y True, f x 'c') + | let f _ z = z, x <- xs + | y <- ys ] diff --git a/testsuite/tests/typecheck/should_compile/T11982b.hs b/testsuite/tests/typecheck/should_compile/T11982b.hs new file mode 100644 index 0000000..5c695d2 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T11982b.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ApplicativeDo #-} +module Main where +import Control.Concurrent.MVar + +type Locker = forall a. IO a -> IO a + +main :: IO () +main = do + line <- getLine + lock <- newMVar () + let locker :: Locker + locker = withMVar lock . const + f line locker + +f :: String -> Locker -> IO () +f line locker = locker $ putStrLn line diff --git a/testsuite/tests/typecheck/should_compile/T11982c.hs b/testsuite/tests/typecheck/should_compile/T11982c.hs new file mode 100644 index 0000000..cdc4a98 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T11982c.hs @@ -0,0 +1,18 @@ +-- This is similar to T11982b but 'locker' inlined which allows the module to +-- compile. + +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ApplicativeDo #-} +module Main where +import Control.Concurrent.MVar + +type Locker = forall a. IO a -> IO a + +main :: IO () +main = do + line <- getLine + lock <- newMVar () + f line $ withMVar lock . const + +f :: String -> Locker -> IO () +f line locker = locker $ putStrLn line diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 3ad727d..b032121 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -511,6 +511,9 @@ test('T11811', normal, compile, ['']) test('T11793', normal, compile, ['']) test('T11348', normal, compile, ['']) test('T11947', normal, compile, ['']) +test('T11982a', expect_broken(11982), compile, ['']) +test('T11982b', expect_broken(11982), compile, ['']) +test('T11982c', normal, compile, ['']) test('T12045a', normal, compile, ['']) test('T12064', [], multimod_compile, ['T12064', '-v0']) test('ExPat', normal, compile, ['']) From git at git.haskell.org Sun Mar 31 15:09:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:45 +0000 (UTC) Subject: [commit: ghc] wip/ghc-pkg-shut-up: make ghc-pkg shut up (ee2bb6e) Message-ID: <20190331150945.BB49A3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-pkg-shut-up Link : http://ghc.haskell.org/trac/ghc/changeset/ee2bb6e84ca92706e07bf34b9847288f4dd3e866/ghc >--------------------------------------------------------------- commit ee2bb6e84ca92706e07bf34b9847288f4dd3e866 Author: Moritz Angermann Date: Wed Jan 23 10:59:38 2019 +0800 make ghc-pkg shut up >--------------------------------------------------------------- ee2bb6e84ca92706e07bf34b9847288f4dd3e866 utils/ghc-pkg/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 8b7655b..534bbac 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -1822,7 +1822,7 @@ liftIO k = V (k >>= \a -> return (a,[],[])) reportValidateErrors :: Verbosity -> [ValidateError] -> [ValidateWarning] -> String -> Maybe Force -> IO Bool reportValidateErrors verbosity es ws prefix mb_force = do - mapM_ (warn . (prefix++)) ws + when (verbosity >= Normal) $ mapM_ (warn . (prefix++)) ws oks <- mapM report es return (and oks) where From git at git.haskell.org Sun Mar 31 15:09:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:48 +0000 (UTC) Subject: [commit: ghc] wip/enable-windows-hadrian-ci: gitlab-ci: Reenable Hadrian build on Windows (5d492be) Message-ID: <20190331150948.BAF2C3A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/enable-windows-hadrian-ci Link : http://ghc.haskell.org/trac/ghc/changeset/5d492beb3a510aeff6a332a9a08782de90947f86/ghc >--------------------------------------------------------------- commit 5d492beb3a510aeff6a332a9a08782de90947f86 Author: Ben Gamari Date: Mon Jan 21 15:55:05 2019 -0500 gitlab-ci: Reenable Hadrian build on Windows >--------------------------------------------------------------- 5d492beb3a510aeff6a332a9a08782de90947f86 .gitlab-ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..6354d72 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -327,8 +327,6 @@ 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" @@ -339,10 +337,11 @@ validate-x86_64-windows-hadrian: bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' mkdir -p _build cp -R inplace/mingw _build/mingw - # 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=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' + - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick" + # FIXME: Bindist disabled due to #16073 + #- bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" + # FIXME: Testsuite disabled due to #16156. + #- bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: key: x86_64-windows tags: From git at git.haskell.org Sun Mar 31 15:09:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 31 Mar 2019 15:09:51 +0000 (UTC) Subject: [commit: ghc] wip/D4533: Don't overwrite the set log_action when using --interactive (cd57b22) Message-ID: <20190331150951.BD4533A602@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4533 Link : http://ghc.haskell.org/trac/ghc/changeset/cd57b22138a24f40ba190ea5ec9d231795eba17d/ghc >--------------------------------------------------------------- commit cd57b22138a24f40ba190ea5ec9d231795eba17d Author: Matthew Pickering Date: Sun Jan 20 20:58:01 2019 -0500 Don't overwrite the set log_action when using --interactive -ddump-json didn't work with --interactive as --interactive overwrote the log_action in terms of defaultLogAction. Reviewers: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14078 Differential Revision: https://phabricator.haskell.org/D4533 >--------------------------------------------------------------- cd57b22138a24f40ba190ea5ec9d231795eba17d ghc/GHCi/UI.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 10ca511..abb3d78 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -445,7 +445,10 @@ interactiveUI config srcs maybe_exprs = do lastErrLocationsRef <- liftIO $ newIORef [] progDynFlags <- GHC.getProgramDynFlags _ <- GHC.setProgramDynFlags $ - progDynFlags { log_action = ghciLogAction lastErrLocationsRef } + -- Ensure we don't override the user's log action lest we break + -- -ddump-json (#14078) + progDynFlags { log_action = ghciLogAction (log_action progDynFlags) + lastErrLocationsRef } when (isNothing maybe_exprs) $ do -- Only for GHCi (not runghc and ghc -e): @@ -536,9 +539,10 @@ resetLastErrorLocations = do st <- getGHCiState liftIO $ writeIORef (lastErrorLocations st) [] -ghciLogAction :: IORef [(FastString, Int)] -> LogAction -ghciLogAction lastErrLocations dflags flag severity srcSpan style msg = do - defaultLogAction dflags flag severity srcSpan style msg +ghciLogAction :: LogAction -> IORef [(FastString, Int)] -> LogAction +ghciLogAction old_log_action lastErrLocations + dflags flag severity srcSpan style msg = do + old_log_action dflags flag severity srcSpan style msg case severity of SevError -> case srcSpan of RealSrcSpan rsp -> modifyIORef lastErrLocations