From git at git.haskell.org Tue Jan 1 17:27:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 1 Jan 2019 17:27:23 +0000 (UTC) Subject: [commit: nofib] master: Compare output of compress2 by hashing (c3acdcc) Message-ID: <20190101172723.616B83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c3acdcc648b5041c2d2d7de232680ddc9af0b20d/nofib >--------------------------------------------------------------- commit c3acdcc648b5041c2d2d7de232680ddc9af0b20d Author: Sebastian Graf Date: Mon Dec 31 11:00:41 2018 +0100 Compare output of compress2 by hashing This should fix the build in the same way as !2. >--------------------------------------------------------------- c3acdcc648b5041c2d2d7de232680ddc9af0b20d .gitignore | 1 - real/compress2/Main.hs | 8 ++++++-- real/compress2/Makefile | 12 +++--------- real/compress2/compress2.faststdout | Bin 44152 -> 20 bytes real/compress2/compress2.stdout | 1 + 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index f1fae44..6730d53 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ real/compress/compress real/compress/compress.stdin real/compress2/compress2 real/compress2/compress2.stdin -real/compress2/compress2.stdout real/eff/CS/CS real/eff/CSD/CSD real/eff/FS/FS diff --git a/real/compress2/Main.hs b/real/compress2/Main.hs index 3562644..592c00a 100644 --- a/real/compress2/Main.hs +++ b/real/compress2/Main.hs @@ -8,12 +8,16 @@ where import Encode import WriteRoutines import System.IO +import Data.Char +import Data.List (foldl') + +hash :: String -> Int +hash = foldl' (\acc c -> ord c + acc*31) 0 main = do hSetBinaryMode stdin True - hSetBinaryMode stdout True i <- getContents - putStr (compress i) + print (hash (compress i)) -- The output is given by a magic header consisting of two fixed numbers, -- and a third representing the maximum number of bits used per code and diff --git a/real/compress2/Makefile b/real/compress2/Makefile index 7a605f6..3a81e95 100644 --- a/real/compress2/Makefile +++ b/real/compress2/Makefile @@ -1,23 +1,17 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk -SRC_RUNTEST_OPTS += -stdout-binary - SRC_HC_OPTS += -fglasgow-exts SRC_RUNTEST_OPTS += +RTS -H100m -RTS +CLEAN_FILES += compress2.stdin + include $(TOP)/mk/target.mk -boot :: compress2.stdin compress2.faststdin compress2.stdout +boot :: compress2.stdin CAT_FILES = compress2.faststdin *.hs compress2.faststdin *.hs compress2.stdin : compress2.faststdin cat $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) $(CAT_FILES) > compress2.stdin - -compress2.stdout : compress2.stdin compress2 - ./compress2 < compress2.stdin > compress2.stdout - -clean :: - rm -f compress2.stdin compress2.stdout diff --git a/real/compress2/compress2.faststdout b/real/compress2/compress2.faststdout index d5c2f00..1d09915 100644 Binary files a/real/compress2/compress2.faststdout and b/real/compress2/compress2.faststdout differ diff --git a/real/compress2/compress2.stdout b/real/compress2/compress2.stdout new file mode 100644 index 0000000..5c949b3 --- /dev/null +++ b/real/compress2/compress2.stdout @@ -0,0 +1 @@ +8522868473445645791 From git at git.haskell.org Tue Jan 1 17:27:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 1 Jan 2019 17:27:25 +0000 (UTC) Subject: [commit: nofib] master: Replace mentions of {-# STRICT -#} with bangs in compress2 (95c1dcc) Message-ID: <20190101172725.68DD33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/95c1dccbcaba94920ea4deb940ec6c4558bba7cd/nofib >--------------------------------------------------------------- commit 95c1dccbcaba94920ea4deb940ec6c4558bba7cd Author: Sebastian Graf Date: Mon Dec 31 11:10:41 2018 +0100 Replace mentions of {-# STRICT -#} with bangs in compress2 The pragma hasn't been recognised for a long time. Replacing it with bangs will change program semantics to how it was intended. The perf CI build is currently broken anyway, so this shouldn't skew numbers too much. >--------------------------------------------------------------- 95c1dccbcaba94920ea4deb940ec6c4558bba7cd real/compress2/Encode.hs | 12 ++++++------ real/compress2/compress2.stdout | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/real/compress2/Encode.hs b/real/compress2/Encode.hs index 290e2fa..c3c2931 100644 --- a/real/compress2/Encode.hs +++ b/real/compress2/Encode.hs @@ -14,12 +14,12 @@ data CodeEvent = Clear deriving Show{-was:Text-} data CodeState = CS - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} - Int {-# STRICT #-} + !Int + !Int + !Int + !Int + !Int + !Int firstEnt = 257 :: Int maxBits = 16 :: Int diff --git a/real/compress2/compress2.stdout b/real/compress2/compress2.stdout index 5c949b3..d62aa2e 100644 --- a/real/compress2/compress2.stdout +++ b/real/compress2/compress2.stdout @@ -1 +1 @@ -8522868473445645791 +-787007679832202299 From git at git.haskell.org Tue Jan 1 17:27:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 1 Jan 2019 17:27:27 +0000 (UTC) Subject: [commit: nofib] master: Add continuous integration support (e1869fd) Message-ID: <20190101172727.77B093ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e1869fd389662c042d25c001c47b89de0c71a806/nofib >--------------------------------------------------------------- commit e1869fd389662c042d25c001c47b89de0c71a806 Author: Ben Gamari Date: Sun Dec 30 12:55:46 2018 -0500 Add continuous integration support >--------------------------------------------------------------- e1869fd389662c042d25c001c47b89de0c71a806 .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1acca61 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +validate: + image: ghcci/x86_64-linux-deb9:0.2 + before_script: + - git clean -xdf + - sudo apt install -y time + script: + - make clean + - | + cabal update + cabal install regex-compat html + - make boot mode=fast + - "make mode=fast NoFibRuns=1 2>&1 | tee log" + - "nofib-analyse/nofib-analyse log" From git at git.haskell.org Tue Jan 1 17:38:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 1 Jan 2019 17:38:19 +0000 (UTC) Subject: [commit: nofib] master: Move required language extensions into pragmas for shootout. (c985746) Message-ID: <20190101173819.9D7143ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c985746f0bfe32cb08b9dcd057ada2e90fe77f4d/nofib >--------------------------------------------------------------- commit c985746f0bfe32cb08b9dcd057ada2e90fe77f4d Author: klebinger.andreas at gmx.at Date: Sun Dec 30 12:52:51 2018 -0500 Move required language extensions into pragmas for shootout. Summary: That way they are easier to compile with plain calls to ghc. Test Plan: make clean && make boot && make Reviewers: O26 nofib, bgamari Reviewed By: bgamari Subscribers: bgamari Differential Revision: https://phabricator.haskell.org/D5437 >--------------------------------------------------------------- c985746f0bfe32cb08b9dcd057ada2e90fe77f4d shootout/binary-trees/Main.hs | 1 + shootout/binary-trees/Makefile | 2 +- shootout/fannkuch-redux/Main.hs | 1 + shootout/fannkuch-redux/Makefile | 4 +--- shootout/fasta/Main.hs | 1 + shootout/fasta/Makefile | 2 +- shootout/k-nucleotide/Main.hs | 1 + shootout/k-nucleotide/Makefile | 2 +- shootout/n-body/Main.hs | 1 + shootout/n-body/Makefile | 2 +- shootout/pidigits/Main.hs | 1 + shootout/reverse-complement/Main.hs | 1 + shootout/reverse-complement/Makefile | 3 +-- shootout/spectral-norm/Main.hs | 1 + shootout/spectral-norm/Makefile | 2 +- 15 files changed, 15 insertions(+), 10 deletions(-) diff --git a/shootout/binary-trees/Main.hs b/shootout/binary-trees/Main.hs index 8258c71..9c596d9 100644 --- a/shootout/binary-trees/Main.hs +++ b/shootout/binary-trees/Main.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} -- -- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ diff --git a/shootout/binary-trees/Makefile b/shootout/binary-trees/Makefile index 2d2d321..7731758 100644 --- a/shootout/binary-trees/Makefile +++ b/shootout/binary-trees/Makefile @@ -8,5 +8,5 @@ SLOW_OPTS = 20 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -funbox-strict-fields +HC_OPTS += -funbox-strict-fields SRC_RUNTEST_OPTS += +RTS -K128M -H200m -RTS diff --git a/shootout/fannkuch-redux/Main.hs b/shootout/fannkuch-redux/Main.hs index 157c05d..9b9e817 100644 --- a/shootout/fannkuch-redux/Main.hs +++ b/shootout/fannkuch-redux/Main.hs @@ -7,6 +7,7 @@ and run with: +RTS -N -RTS -} +{-# LANGUAGE BangPatterns #-} import Control.Concurrent import Control.Monad diff --git a/shootout/fannkuch-redux/Makefile b/shootout/fannkuch-redux/Makefile index 729955f..b87fdd2 100644 --- a/shootout/fannkuch-redux/Makefile +++ b/shootout/fannkuch-redux/Makefile @@ -6,7 +6,5 @@ FAST_OPTS = 10 NORM_OPTS = 11 SLOW_OPTS = 12 # official shootout setting -# The benchmark game also uses -fllvm, which we can't since it might +# The benchmark game uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns - diff --git a/shootout/fasta/Main.hs b/shootout/fasta/Main.hs index 070a3f0..3b10ccc 100644 --- a/shootout/fasta/Main.hs +++ b/shootout/fasta/Main.hs @@ -4,6 +4,7 @@ contributed by Bryan O'Sullivan -} +{-# LANGUAGE BangPatterns, OverloadedStrings #-} import Control.Monad import Data.ByteString.Unsafe diff --git a/shootout/fasta/Makefile b/shootout/fasta/Makefile index 14ecb61..19fa17b 100644 --- a/shootout/fasta/Makefile +++ b/shootout/fasta/Makefile @@ -13,7 +13,7 @@ SLOW_OPTS = 25000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -XOverloadedStrings -package bytestring +HC_OPTS += -package bytestring #------------------------------------------------------------------ # Create output to validate against diff --git a/shootout/k-nucleotide/Main.hs b/shootout/k-nucleotide/Main.hs index 6963a4d..6783f0b 100644 --- a/shootout/k-nucleotide/Main.hs +++ b/shootout/k-nucleotide/Main.hs @@ -4,6 +4,7 @@ -- -- contributed by Stephen Blackheath (with some bits taken from Don Stewart's -- version), v1.2 +{-# LANGUAGE BangPatterns #-} import Text.Printf import Data.ByteString.Internal diff --git a/shootout/k-nucleotide/Makefile b/shootout/k-nucleotide/Makefile index 56870ff..6cff15d 100644 --- a/shootout/k-nucleotide/Makefile +++ b/shootout/k-nucleotide/Makefile @@ -11,7 +11,7 @@ CLEAN_FILES += fasta-c k-nucleotide.*stdin # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -package bytestring +HC_OPTS += -package bytestring #------------------------------------------------------------------ # Create input diff --git a/shootout/n-body/Main.hs b/shootout/n-body/Main.hs index d22ddb0..5391020 100644 --- a/shootout/n-body/Main.hs +++ b/shootout/n-body/Main.hs @@ -10,6 +10,7 @@ -- -- Don't enable -optc-mfpmath=sse -optc-msse2, this triggers a gcc bug on x86 -- +{-# LANGUAGE BangPatterns #-} import Foreign (Ptr, Storable(..), plusPtr, mallocBytes) import Foreign.Storable diff --git a/shootout/n-body/Makefile b/shootout/n-body/Makefile index 2290826..0de067a 100644 --- a/shootout/n-body/Makefile +++ b/shootout/n-body/Makefile @@ -8,4 +8,4 @@ SLOW_OPTS = 50000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -fexcess-precision +HC_OPTS += -fexcess-precision diff --git a/shootout/pidigits/Main.hs b/shootout/pidigits/Main.hs index 665641f..137e23a 100644 --- a/shootout/pidigits/Main.hs +++ b/shootout/pidigits/Main.hs @@ -4,6 +4,7 @@ -- modified by Eugene Kirpichov: pidgits only generates -- the result string instead of printing it. For some -- reason, this gives a speedup. +{-# LANGUAGE BangPatterns #-} import System.Environment diff --git a/shootout/reverse-complement/Main.hs b/shootout/reverse-complement/Main.hs index 7f3bdf9..e329dc8 100644 --- a/shootout/reverse-complement/Main.hs +++ b/shootout/reverse-complement/Main.hs @@ -4,6 +4,7 @@ http://benchmarksgame.alioth.debian.org/ contributed by Louis Wasserman -} +{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} import Control.Monad import Foreign diff --git a/shootout/reverse-complement/Makefile b/shootout/reverse-complement/Makefile index e3b72b7..306bab4 100644 --- a/shootout/reverse-complement/Makefile +++ b/shootout/reverse-complement/Makefile @@ -15,8 +15,7 @@ SLOW_OPTS = 25000000 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -funfolding-use-threshold=32 -XMagicHash \ - -XUnboxedTuples +HC_OPTS += -funfolding-use-threshold=32 #------------------------------------------------------------------ # Create input diff --git a/shootout/spectral-norm/Main.hs b/shootout/spectral-norm/Main.hs index 3a52736..4e83277 100644 --- a/shootout/spectral-norm/Main.hs +++ b/shootout/spectral-norm/Main.hs @@ -13,6 +13,7 @@ -- -fexcess-precision -optc-ffast-math -- Should be run with: -- +RTS -N +{-# LANGUAGE BangPatterns, MagicHash #-} import System.Environment import Foreign.Marshal.Array diff --git a/shootout/spectral-norm/Makefile b/shootout/spectral-norm/Makefile index a0728d9..15cae66 100644 --- a/shootout/spectral-norm/Makefile +++ b/shootout/spectral-norm/Makefile @@ -8,4 +8,4 @@ SLOW_OPTS = 5500 # official shootout setting # The benchmark game also uses -fllvm, which we can't since it might # not be available on the developer's machine. -HC_OPTS += -XBangPatterns -XMagicHash -fexcess-precision +HC_OPTS += -fexcess-precision From git at git.haskell.org Tue Jan 1 18:02:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 1 Jan 2019 18:02:13 +0000 (UTC) Subject: [commit: nofib] master: Disable timer-based context switches (e2d614e) Message-ID: <20190101180213.ACE793ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e2d614e40e8b049ac0bcf3c6ccc6f0009864511e/nofib >--------------------------------------------------------------- commit e2d614e40e8b049ac0bcf3c6ccc6f0009864511e Author: Sebastian Graf Date: Sun Dec 30 19:17:59 2018 +0100 Disable timer-based context switches Summary: In the past, we repeatedly had problems with non-deterministic allocations due to stack squeezing during context switches (#4450, #8611). This patch adds `+RTS -V0 -RTS` as extra `RUNTEST_OPTS` for every single-threaded benchmark. Is this the right place to add the flags? Should we also do this for all the other benchmarks? Reviewers: simonmar, osa1, nomeata, O26 nofib GHC Trac Issues: #8611 Differential Revision: https://phabricator.haskell.org/D5470 >--------------------------------------------------------------- e2d614e40e8b049ac0bcf3c6ccc6f0009864511e mk/opts.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mk/opts.mk b/mk/opts.mk index 80fb957..be20125 100644 --- a/mk/opts.mk +++ b/mk/opts.mk @@ -18,6 +18,15 @@ RUNTEST_OPTS = $(SRC_RUNTEST_OPTS) $(WAY$(_way)_RUNTEST_OPTS) \ ifneq "$(way)" "mp" # if testing GUM don't generate a -S style log file; it may well differ SRC_RUNTEST_OPTS += -ghc-timing + +# Deactivate context switches to guarantee deterministic allocation +# measurements. See Trac #8611. +# We might want this to also happen in the "mp" way. I left it here, +# assuming that "mp" (probably for multi-processor system) entails +# nondeterministic measurements anyway, but I don't really know enough +# about this to make substantiated claims. +SRC_RUNTEST_OPTS += +RTS -V0 -RTS + endif # SRC_RUNTEST_OPTS += +RTS -H10m -K10m -RTS From git at git.haskell.org Sat Jan 5 08:46:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:44 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15916' created Message-ID: <20190105084644.308443ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15916 Referencing: 42289e4105128ebc2e951f1f937043bf0d2597f2 From git at git.haskell.org Sat Jan 5 08:46:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:47 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Remove Darwin support (374e447) Message-ID: <20190105084647.3ED253ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/374e44704b64afafc1179127e6c9c5bf1715ef39/ghc >--------------------------------------------------------------- commit 374e44704b64afafc1179127e6c9c5bf1715ef39 Author: Peter Trommler Date: Sun Dec 30 22:23:53 2018 +0100 PPC NCG: Remove Darwin support Support for Mac OS X on PowerPC has been dropped by Apple years ago. We follow suit and remove PowerPC support for Darwin. Fixes #16106. >--------------------------------------------------------------- 374e44704b64afafc1179127e6c9c5bf1715ef39 compiler/cmm/CmmPipeline.hs | 7 - compiler/codeGen/CodeGen/Platform.hs | 21 +- compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs | 11 - compiler/ghc.cabal.in | 1 - compiler/nativeGen/PIC.hs | 62 ------ compiler/nativeGen/PPC/CodeGen.hs | 92 +++----- compiler/nativeGen/PPC/Instr.hs | 5 +- compiler/nativeGen/PPC/Ppr.hs | 85 +------- compiler/nativeGen/PPC/Regs.hs | 2 - configure.ac | 11 +- includes/CodeGen.Platform.hs | 9 +- includes/stg/MachRegs.h | 16 -- 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 - 20 files changed, 97 insertions(+), 690 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 374e44704b64afafc1179127e6c9c5bf1715ef39 From git at git.haskell.org Sat Jan 5 08:46:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:50 +0000 (UTC) Subject: [commit: ghc] wip/T15916: configure: introduce HAPPY and ALEX vars and deprecate --with-ghc in favour of the GHC var (7fcc07c) Message-ID: <20190105084650.3AD8C3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3/ghc >--------------------------------------------------------------- commit 7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3 Author: Adam Sandberg Eriksson Date: Mon Dec 31 00:42:35 2018 +0100 configure: introduce HAPPY and ALEX vars and deprecate --with-ghc in favour of the GHC var Also updates the windows gitlab ci to use the new configure variables. >--------------------------------------------------------------- 7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3 .gitlab-ci.yml | 4 ++-- aclocal.m4 | 26 +++++++++++++++++--------- configure.ac | 16 +++++++++------- docs/users_guide/8.8.1-notes.rst | 3 +++ 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..05d32ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -337,7 +337,7 @@ validate-x86_64-windows-hadrian: - | 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 './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 @@ -361,7 +361,7 @@ validate-x86_64-windows: - | set MSYSTEM=MINGW64 python boot - bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' + bash -c './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 V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' diff --git a/aclocal.m4 b/aclocal.m4 index 03f43d1..a7026e2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -902,18 +902,22 @@ AS_IF([test "$fp_num1" $2 "$fp_num2"], [$4], [$5])[]dnl dnl -dnl Check for Happy and version. -dnl If there's no installed Happy, we look -dnl for a happy source tree and point the build system at that instead. +dnl Check for Happy and version: +dnl +dnl 1. Use happy specified in env var HAPPY +dnl 2. Find happy in path +dnl 3. Check happy version +dnl dnl If you increase the minimum version requirement, please also update: dnl https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Tools dnl AC_DEFUN([FPTOOLS_HAPPY], -[AC_PATH_PROG(HappyCmd,happy,) - +[AC_PATH_PROG(HAPPY,[happy],) +AC_SUBST(HappyCmd,$HAPPY) AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version, changequote(, )dnl -[if test x"$HappyCmd" != x; then +[ +if test x"$HappyCmd" != x; then fptools_cv_happy_version=`"$HappyCmd" -v | grep 'Happy Version' | sed -e 's/Happy Version \([^ ]*\).*/\1/g'` ; else @@ -932,13 +936,17 @@ AC_SUBST(HappyVersion) dnl dnl Check for Alex and version. +dnl +dnl 1. Use alex specified in env var ALEX +dnl 2. Find alex in path +dnl 3. Check alex version +dnl dnl If you increase the minimum version requirement, please also update: dnl https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Tools dnl AC_DEFUN([FPTOOLS_ALEX], -[ -AC_PATH_PROG(AlexCmd,alex,) - +[AC_PATH_PROG(ALEX,[alex],) +AC_SUBST(AlexCmd,$ALEX) AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version, changequote(, )dnl [if test x"$AlexCmd" != x; then diff --git a/configure.ac b/configure.ac index 874a128..b75220d 100644 --- a/configure.ac +++ b/configure.ac @@ -87,14 +87,12 @@ dnl use either is considered a Feature. dnl ** What command to use to compile compiler sources ? dnl -------------------------------------------------------------- +AC_ARG_VAR(GHC,[Use as the path to GHC [default=autodetect]]) +AC_PATH_PROG([GHC], [ghc]) AC_ARG_WITH([ghc], -[AC_HELP_STRING([--with-ghc=ARG], - [Use ARG as the path to GHC [default=autodetect]])], - [WithGhc="$withval"], - [if test "$GHC" = ""; then - AC_PATH_PROG([GHC], [ghc]) - fi - WithGhc="$GHC"]) + AS_HELP_STRING([--with-ghc=ARG], [Use ARG as the path to ghc (obsolete, use GHC=ARG instead) [default=autodetect]]), + AC_MSG_ERROR([--with-ghc=$withval is obsolete (use './configure GHC=$withval' or 'GHC=$withval ./configure' instead)])) +AC_SUBST(WithGhc,$GHC) dnl ** Tell the make system which OS we are using dnl $OSTYPE is set by the operating system to "msys" or "cygwin" or something @@ -867,9 +865,13 @@ dnl ** check for ghc-pkg command FP_PROG_GHC_PKG dnl ** check for installed happy binary + version + +AC_ARG_VAR(HAPPY,[Use as the path to happy [default=autodetect]]) FPTOOLS_HAPPY dnl ** check for installed alex binary + version + +AC_ARG_VAR(ALEX,[Use as the path to alex [default=autodetect]]) FPTOOLS_ALEX dnl -------------------------------------------------- diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst index 6e52a63..69d5397 100644 --- a/docs/users_guide/8.8.1-notes.rst +++ b/docs/users_guide/8.8.1-notes.rst @@ -160,6 +160,9 @@ Template Haskell Build system ~~~~~~~~~~~~ +- Configure: Add ALEX and HAPPY variables to explicitly set the alex and happy + programs to use. +- Configure: Deprecate --with-ghc=ARG in favour of the GHC variable. Included libraries ------------------ From git at git.haskell.org Sat Jan 5 08:46:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:53 +0000 (UTC) Subject: [commit: ghc] wip/T15916: core-spec: Modify `.lhs` to `.hs` (source files) (9c0e3e4) Message-ID: <20190105084653.3D5B73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/9c0e3e44489e601e6cfa3753460a98036668d5bf/ghc >--------------------------------------------------------------- commit 9c0e3e44489e601e6cfa3753460a98036668d5bf Author: Takenobu Tani Date: Wed Jan 2 12:01:47 2019 +0900 core-spec: Modify `.lhs` to `.hs` (source files) Modify old filename `.lhs` to `.hs` in following files: * docs/core-spec/README * docs/core-spec/CoreLint.ott * docs/core-spec/CoreSyn.ott * docs/core-spec/core-spec.mng [ci skip] >--------------------------------------------------------------- 9c0e3e44489e601e6cfa3753460a98036668d5bf docs/core-spec/CoreLint.ott | 44 +++++++++++++++++----------------- docs/core-spec/CoreSyn.ott | 56 ++++++++++++++++++++++---------------------- docs/core-spec/README | 4 ++-- docs/core-spec/core-spec.mng | 54 +++++++++++++++++++++--------------------- 4 files changed, 79 insertions(+), 79 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 9c0e3e44489e601e6cfa3753460a98036668d5bf From git at git.haskell.org Sat Jan 5 08:46:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:56 +0000 (UTC) Subject: [commit: ghc] wip/T15916: core-spec: Modify `.lhs` to `.hs` (generated PDF) (58da9c7) Message-ID: <20190105084656.393243ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/58da9c71f7dec62140023d6167e4ddd97f84f5ee/ghc >--------------------------------------------------------------- commit 58da9c71f7dec62140023d6167e4ddd97f84f5ee Author: Takenobu Tani Date: Wed Jan 2 12:03:03 2019 +0900 core-spec: Modify `.lhs` to `.hs` (generated PDF) Modify old filename `.lhs` to `.hs` in following file: * docs/core-spec/core-spec.pdf (generated PDF) [ci skip] >--------------------------------------------------------------- 58da9c71f7dec62140023d6167e4ddd97f84f5ee docs/core-spec/core-spec.pdf | Bin 366926 -> 366905 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/core-spec/core-spec.pdf b/docs/core-spec/core-spec.pdf index 0c238c5..ad2d571 100644 Binary files a/docs/core-spec/core-spec.pdf and b/docs/core-spec/core-spec.pdf differ From git at git.haskell.org Sat Jan 5 08:46:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:46:59 +0000 (UTC) Subject: [commit: ghc] wip/T15916: stg-spec: Modify `.lhs` to `.hs` (05cd231) Message-ID: <20190105084659.3C3943ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/05cd2319152183b3f44bca3561374217d6af5546/ghc >--------------------------------------------------------------- commit 05cd2319152183b3f44bca3561374217d6af5546 Author: Takenobu Tani Date: Thu Jan 3 10:09:29 2019 +0900 stg-spec: Modify `.lhs` to `.hs` Modify old filename `.lhs` to `.hs` in the following file: * docs/stg-spec/StgSyn.ott Since PDF has not been registered in the past, I have not committed generated PDF(`stg-spec.pdf`). [ci skip] >--------------------------------------------------------------- 05cd2319152183b3f44bca3561374217d6af5546 docs/stg-spec/StgSyn.ott | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/stg-spec/StgSyn.ott b/docs/stg-spec/StgSyn.ott index b53c91d..5d80485 100644 --- a/docs/stg-spec/StgSyn.ott +++ b/docs/stg-spec/StgSyn.ott @@ -28,13 +28,13 @@ indexvar i, j, k, n ::= {{ com Indices to be used in lists }} grammar lit {{ tex \textsf{lit} }} :: 'Literal_' ::= - {{ com Literals, \coderef{basicTypes/Literal.lhs}{Literal} }} + {{ com Literals, \coderef{basicTypes/Literal.hs}{Literal} }} op {{ tex \textsf{op} }} :: 'StgOp_' ::= - {{ com Primitive operation or foreign call, \coderef{stgSyn/StgSyn.lhs}{StgOp} }} + {{ com Primitive operation or foreign call, \coderef{stgSyn/StgSyn.hs}{StgOp} }} cc {{ tex \textsf{cc} }} :: 'CostCentre_' ::= - {{ com Cost-centre, \coderef{profiling/CostCentre.lhs}{CostCentre} }} + {{ com Cost-centre, \coderef{profiling/CostCentre.hs}{CostCentre} }} ccs {{ tex \textsf{ccs} }} :: 'CostCentreStack_' ::= | CCCS :: :: CurrentCCS {{ com Current cost-centre stack }} @@ -42,9 +42,9 @@ ccs {{ tex \textsf{ccs} }} :: 'CostCentreStack_' ::= | _ :: :: DontCareCCS {{ com Don't care cost-centre stack }} | ccs ^ ccs' :: :: EnterFunCCS {{ com Function entry, \coderef{rts/Profiling.c}{enterFunCCS} }} | ccs # cc :: :: PushCC {{ com Push a cost-centre, \coderef{rts/Profiling.c}{pushCostCentre} }} - {{ com Cost-centre stack, \coderef{profiling/CostCentre.lhs}{CostCentreStack} }} + {{ com Cost-centre stack, \coderef{profiling/CostCentre.hs}{CostCentreStack} }} -a, b, c :: 'StgArg_' ::= {{ com Arguments, \coderef{stgSyn/StgSyn.lhs}{StgArg} }} +a, b, c :: 'StgArg_' ::= {{ com Arguments, \coderef{stgSyn/StgSyn.hs}{StgArg} }} | x :: :: StgVarArg {{ com Variable }} | lit :: :: StgLitArg {{ com Literal }} @@ -59,7 +59,7 @@ xs :: 'Ids_' ::= {{ com List of variables }} | nil :: :: EmptyList | xs xs' :: :: Append -e :: 'StgExpr_' ::= {{ com Expressions, \coderef{stgSyn/StgSyn.lhs}{StgExpr} }} +e :: 'StgExpr_' ::= {{ com Expressions, \coderef{stgSyn/StgSyn.hs}{StgExpr} }} | lit :: :: StgLit {{ com Literal }} | x args :: :: StgApp {{ com Function application (or variable) }} | K args :: :: StgConApp {{ com Saturated constructor application }} @@ -75,23 +75,23 @@ subst :: 'Subst_' ::= {{ com List of substitutions }} | [ a / x ] :: :: Mapping | :: :: List -binding :: 'StgBind_' ::= {{ com Let-bindings, \coderef{stgSyn/StgSyn.lhs}{StgBind} }} +binding :: 'StgBind_' ::= {{ com Let-bindings, \coderef{stgSyn/StgSyn.hs}{StgBind} }} | x = rhs :: :: StgNonRec {{ com Non-recursive binding }} | rec :: :: StgRec {{ com Recursive binding }} -upd :: 'UpdateFlag_' ::= {{ com Update flag, \coderef{stgSyn/StgSyn.lhs}{UpdateFlag} }} +upd :: 'UpdateFlag_' ::= {{ com Update flag, \coderef{stgSyn/StgSyn.hs}{UpdateFlag} }} | r :: :: ReEntrant {{ com Function (re-entrant closure) }} | u :: :: Updatable {{ com Thunk (updatable closure) }} cl :: 'StgRhsClosure_' ::= {{ com StgRhsClosure }} | \ upd ccs xs . e :: :: StgRhsClosure -rhs :: 'StgRhs_' ::= {{ com Right-hand sides, \coderef{stgSyn/StgSyn.lhs}{StgRhs} }} +rhs :: 'StgRhs_' ::= {{ com Right-hand sides, \coderef{stgSyn/StgSyn.hs}{StgRhs} }} | cl :: :: StgRhsClosure {{ com Closure }} | K ccs args :: :: StgRhsCon {{ com Constructor }} | x :: :: StgRhsIndirection {{ com Indirection (runtime only) }} -alt :: 'StgAlt_' ::= {{ com Case alternative, \coderef{stgSyn/StgSyn.lhs}{StgAlt} }} +alt :: 'StgAlt_' ::= {{ com Case alternative, \coderef{stgSyn/StgSyn.hs}{StgAlt} }} | K -> e :: :: StgAlt {{ com Constructor applied to fresh names }} terminals :: 'terminals_' ::= From git at git.haskell.org Sat Jan 5 08:47:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:02 +0000 (UTC) Subject: [commit: ghc] wip/T15916: RTS: Use ELF v1 convention on all powerpc64 systems (fc88c33) Message-ID: <20190105084702.3AC7E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/fc88c33e1dc29bf101e05fbcf812495d7343c94c/ghc >--------------------------------------------------------------- commit fc88c33e1dc29bf101e05fbcf812495d7343c94c Author: Peter Trommler Date: Fri Dec 28 22:30:34 2018 +0100 RTS: Use ELF v1 convention on all powerpc64 systems >--------------------------------------------------------------- fc88c33e1dc29bf101e05fbcf812495d7343c94c 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 Sat Jan 5 08:47:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:05 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Make calling convention more general (fa05a86) Message-ID: <20190105084705.350983ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/fa05a865c98d26dd8943023e111a3681176eb2d5/ghc >--------------------------------------------------------------- commit fa05a865c98d26dd8943023e111a3681176eb2d5 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. >--------------------------------------------------------------- fa05a865c98d26dd8943023e111a3681176eb2d5 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 Sat Jan 5 08:47:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:08 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Make `stackHeaderSize` more general (bda21fc) Message-ID: <20190105084708.34C2E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/bda21fc62ff72258539bbb2fff64439d4b21f07e/ghc >--------------------------------------------------------------- commit bda21fc62ff72258539bbb2fff64439d4b21f07e Author: Peter Trommler Date: Fri Dec 28 23:55:35 2018 +0100 PPC NCG: Make `stackHeaderSize` more general >--------------------------------------------------------------- bda21fc62ff72258539bbb2fff64439d4b21f07e 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 Sat Jan 5 08:47:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:11 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: GOT declaration for all 64-bit ELF systems (25fffed) Message-ID: <20190105084711.2BA463ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/25fffed48ea782e7691dc832c694caa7d200e14b/ghc >--------------------------------------------------------------- commit 25fffed48ea782e7691dc832c694caa7d200e14b Author: Peter Trommler Date: Sat Dec 29 10:12:48 2018 +0100 PPC NCG: GOT declaration for all 64-bit ELF systems >--------------------------------------------------------------- 25fffed48ea782e7691dc832c694caa7d200e14b 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 Sat Jan 5 08:47:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:14 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Register definitions for all 64-bit systems (9680424) Message-ID: <20190105084714.312C73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/96804248f0b77a3fba108be61860c085ad617a29/ghc >--------------------------------------------------------------- commit 96804248f0b77a3fba108be61860c085ad617a29 Author: Peter Trommler Date: Sat Dec 29 10:14:12 2018 +0100 PPC NCG: Register definitions for all 64-bit systems >--------------------------------------------------------------- 96804248f0b77a3fba108be61860c085ad617a29 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 Sat Jan 5 08:47:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:17 +0000 (UTC) Subject: [commit: ghc] wip/T15916: Fix tab and improve whitespace (9f658bf) Message-ID: <20190105084717.2B0643ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/9f658bf2b55d7a2c3cbeaf5b852288b2425b7744/ghc >--------------------------------------------------------------- commit 9f658bf2b55d7a2c3cbeaf5b852288b2425b7744 Author: Peter Trommler Date: Sat Dec 29 11:29:02 2018 +0100 Fix tab and improve whitespace >--------------------------------------------------------------- 9f658bf2b55d7a2c3cbeaf5b852288b2425b7744 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 Sat Jan 5 08:47:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 08:47:20 +0000 (UTC) Subject: [commit: ghc] wip/T15916: PPC NCG: Rename constructors (42289e4) Message-ID: <20190105084720.2E73B3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15916 Link : http://ghc.haskell.org/trac/ghc/changeset/42289e4105128ebc2e951f1f937043bf0d2597f2/ghc >--------------------------------------------------------------- commit 42289e4105128ebc2e951f1f937043bf0d2597f2 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. >--------------------------------------------------------------- 42289e4105128ebc2e951f1f937043bf0d2597f2 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 42289e4105128ebc2e951f1f937043bf0d2597f2 From git at git.haskell.org Sat Jan 5 21:17:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 21:17:45 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-submodules' created Message-ID: <20190105211745.667293ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-submodules Referencing: 9ebd808f607529bfc77575b22bc171559d4a4a0c From git at git.haskell.org Sat Jan 5 21:17:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 21:17:48 +0000 (UTC) Subject: [commit: ghc] wip/fix-submodules: gitlab-ci: Clone haddock from its upstream repository (9ebd808) Message-ID: <20190105211748.6C3A73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/9ebd808f607529bfc77575b22bc171559d4a4a0c/ghc >--------------------------------------------------------------- commit 9ebd808f607529bfc77575b22bc171559d4a4a0c Author: Ben Gamari Date: Sat Jan 5 14:16:56 2019 -0500 gitlab-ci: Clone haddock from its upstream repository This ensures that changes requiring haddock changes can be built under CI. >--------------------------------------------------------------- 9ebd808f607529bfc77575b22bc171559d4a4a0c .gitlab/fix-submodules.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py old mode 100644 new mode 100755 index 2ff8e41..621d692 --- a/.gitlab/fix-submodules.py +++ b/.gitlab/fix-submodules.py @@ -1,8 +1,54 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +""" +Fix submodule upstream URLs. This ensures that CI builds of GHC forks +clone their submodules from its usual location. Otherwise users would need to +fork all submodules before their CI builds would succeed. +""" + +from typing import List, Dict +from pathlib import Path import re x = open('.gitmodules').read() x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x) open('.gitmodules', 'w').write(x) +import subprocess + +def get_configs(config_file: Path) -> Dict[str, str]: + args = ['git', 'config', '-f', config_file.as_posix(), '--list'] + out = subprocess.check_output(args) + configs = {} + for line in out.decode('UTF-8').split('\n'): + if '=' in line: + k,v = line.split('=') + configs[k] = v + + return configs + +def set_config(config_file: Path, key: str, value: str) -> None: + args = ['git', 'config', '-f', config_file.as_posix(), '--replace', key, value] + subprocess.check_call(args) + +upstreams = { + 'utils/haddock': 'https://github.com/haskell/haddock' +} + +modules_config = Path('.gitmodules') + +def main(): + for k,v in get_configs(modules_config).items(): + match = re.match('submodule\.(.+)\.url', k) + if match is not None: + submod = match.group(1) + if submod in upstreams: + url = upstreams[submod] + else: + url = re.sub('\.\.', 'https://gitlab.haskell.org/ghc', v) + + print('Using {submod} from {url}'.format(submod=submod, url=url)) + set_config(modules_config, k, url) + +if __name__ == '__main__': + main() From git at git.haskell.org Sat Jan 5 22:31:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 22:31:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/doc-tarball' created Message-ID: <20190105223132.4BC973ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/doc-tarball Referencing: 9fa90e660d83e21708a0dc97cda14c96565a6f12 From git at git.haskell.org Sat Jan 5 22:31:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 5 Jan 2019 22:31:35 +0000 (UTC) Subject: [commit: ghc] wip/doc-tarball: gitlab-ci: Generate documentation tarball (9fa90e6) Message-ID: <20190105223135.4F9763ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/doc-tarball Link : http://ghc.haskell.org/trac/ghc/changeset/9fa90e660d83e21708a0dc97cda14c96565a6f12/ghc >--------------------------------------------------------------- commit 9fa90e660d83e21708a0dc97cda14c96565a6f12 Author: Ben Gamari Date: Sat Jan 5 17:25:23 2019 -0500 gitlab-ci: Generate documentation tarball >--------------------------------------------------------------- 9fa90e660d83e21708a0dc97cda14c96565a6f12 .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++---- mk/config.mk.in | 10 +++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..6b205bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: - lint - build - full-build + - packaging ############################################################ # Runner Tags @@ -92,8 +93,7 @@ validate-x86_64-linux-deb8-hadrian: THREADS=`mk/detect-cpu-count.sh` make V=0 -j$THREADS - | - make binary-dist TAR_COMP_OPTS="-1" - mv ghc-*.tar.xz ghc.tar.xz + make binary-dist TAR_COMP_OPTS="-1" BIN_DIST_NAME=ghc-bindist - | THREADS=`mk/detect-cpu-count.sh` make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml @@ -102,7 +102,7 @@ validate-x86_64-linux-deb8-hadrian: junit: junit.xml expire_in: 2 week paths: - - ghc.tar.xz + - ghc-bindist-*.tar.xz - junit.xml validate-x86_64-darwin: @@ -319,6 +319,9 @@ validate-x86_64-linux-deb9-unreg: - rd /s /q tmp - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache - bash -c 'make clean || true' + artifacts: + paths: + - ghc-bindist-*.tar.xz cache: paths: - cabal-cache @@ -345,7 +348,7 @@ validate-x86_64-windows-hadrian: - 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' cache: - key: x86_64-windows + key: x86_64-windows-hadrian tags: - x86_64-windows @@ -364,6 +367,7 @@ validate-x86_64-windows: bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' - bash -c "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 BIN_DIST_NAME=ghc-bindist" - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' cache: key: x86_64-windows @@ -371,6 +375,28 @@ validate-x86_64-windows: - x86_64-windows ############################################################ +# 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: + - distrib/mkDocs/mkDocs ghc-bindist-x86_64-unknown-linux.tar.xz ghc-bindist-x86_64-unknown-mingw32.tar.xz + +############################################################ # Validation via CircleCI ############################################################ diff --git a/mk/config.mk.in b/mk/config.mk.in index fb823ae..20ff8dd 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -414,12 +414,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 +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) +BIN_DIST_TAR_COMP = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.$(TAR_COMP_EXT) # ----------------------------------------------------------------------------- # Utilities programs: flags From git at git.haskell.org Sun Jan 6 04:30:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 04:30:15 +0000 (UTC) Subject: [commit: ghc] branch 'wip/windows-cleanup' created Message-ID: <20190106043015.6EBF03ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/windows-cleanup Referencing: 3f61f6794af899cf49deb524c2755c1d04b8c01f From git at git.haskell.org Sun Jan 6 04:30:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 04:30:18 +0000 (UTC) Subject: [commit: ghc] wip/windows-cleanup: gitlab-ci: Clone haddock from its upstream repository (b974386) Message-ID: <20190106043018.6116F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/windows-cleanup Link : http://ghc.haskell.org/trac/ghc/changeset/b974386fece4b4fc0fcbb1342be2b129f32ce784/ghc >--------------------------------------------------------------- commit b974386fece4b4fc0fcbb1342be2b129f32ce784 Author: Ben Gamari Date: Sat Jan 5 14:16:56 2019 -0500 gitlab-ci: Clone haddock from its upstream repository This ensures that changes requiring haddock changes can be built under CI. >--------------------------------------------------------------- b974386fece4b4fc0fcbb1342be2b129f32ce784 .gitlab-ci.yml | 2 +- .gitlab/fix-submodules.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..ab79622 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,7 @@ validate-x86_64-darwin: LANG: "en_US.UTF-8" before_script: - git clean -xdf && git submodule foreach git clean -xdf - - python .gitlab/fix-submodules.py + - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py old mode 100644 new mode 100755 index 2ff8e41..621d692 --- a/.gitlab/fix-submodules.py +++ b/.gitlab/fix-submodules.py @@ -1,8 +1,54 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +""" +Fix submodule upstream URLs. This ensures that CI builds of GHC forks +clone their submodules from its usual location. Otherwise users would need to +fork all submodules before their CI builds would succeed. +""" + +from typing import List, Dict +from pathlib import Path import re x = open('.gitmodules').read() x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x) open('.gitmodules', 'w').write(x) +import subprocess + +def get_configs(config_file: Path) -> Dict[str, str]: + args = ['git', 'config', '-f', config_file.as_posix(), '--list'] + out = subprocess.check_output(args) + configs = {} + for line in out.decode('UTF-8').split('\n'): + if '=' in line: + k,v = line.split('=') + configs[k] = v + + return configs + +def set_config(config_file: Path, key: str, value: str) -> None: + args = ['git', 'config', '-f', config_file.as_posix(), '--replace', key, value] + subprocess.check_call(args) + +upstreams = { + 'utils/haddock': 'https://github.com/haskell/haddock' +} + +modules_config = Path('.gitmodules') + +def main(): + for k,v in get_configs(modules_config).items(): + match = re.match('submodule\.(.+)\.url', k) + if match is not None: + submod = match.group(1) + if submod in upstreams: + url = upstreams[submod] + else: + url = re.sub('\.\.', 'https://gitlab.haskell.org/ghc', v) + + print('Using {submod} from {url}'.format(submod=submod, url=url)) + set_config(modules_config, k, url) + +if __name__ == '__main__': + main() From git at git.haskell.org Sun Jan 6 04:30:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 04:30:21 +0000 (UTC) Subject: [commit: ghc] wip/windows-cleanup: gitlab-ci: Cleanup Windows builds (3f61f67) Message-ID: <20190106043021.629D23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/windows-cleanup Link : http://ghc.haskell.org/trac/ghc/changeset/3f61f6794af899cf49deb524c2755c1d04b8c01f/ghc >--------------------------------------------------------------- commit 3f61f6794af899cf49deb524c2755c1d04b8c01f Author: Ben Gamari Date: Sat Jan 5 23:28:49 2019 -0500 gitlab-ci: Cleanup Windows builds See Note [Cleanup on Windows]. >--------------------------------------------------------------- 3f61f6794af899cf49deb524c2755c1d04b8c01f .gitlab-ci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab79622..1fc00b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: - lint - build - full-build + - cleanup # See Note [Cleanup on Windows] ############################################################ # Runner Tags @@ -23,7 +24,6 @@ stages: # x86_64-linux to ensure low-latency availability. # - ############################################################ # Linting ############################################################ @@ -370,6 +370,31 @@ validate-x86_64-windows: tags: - x86_64-windows +# Note [Cleanup on Windows] +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# As noted in [1], gitlab-runner's shell executor doesn't clean up its working +# directory after builds. Unfortunately, we are forced to use the shell executor +# on Windows. To avoid running out of disk space we add a stage at the end of +# the build to remove the \GitLabRunner\builds directory. Since we only run a +# single build at a time on Windows this should be safe. +# +# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856 + +# See Note [Cleanup on Windows] +cleanup-windows: + stage: cleanup + tags: + - x86_64-windows + script: + - echo "Time to clean up" + after_script: + - set "BUILD_DIR=%CI_PROJECT_DIR%" + - set "BUILD_DIR=%BUILD_DIR:/=\%" + - echo "Cleaning %BUILD_DIR%" + - rmdir /S /Q %BUILD_DIR% + - exit /b 0 + ############################################################ # Validation via CircleCI ############################################################ From git at git.haskell.org Sun Jan 6 09:26:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:23 +0000 (UTC) Subject: [commit: ghc] branch 'wip/improve-pext-pdep' created Message-ID: <20190106092623.CE6283ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/improve-pext-pdep Referencing: 7070bceed6ae9448c290987ded6d8e6132c0797e From git at git.haskell.org Sun Jan 6 09:26:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:26 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Minor refactoring and documentation in profiling RTS code (6e4e637) Message-ID: <20190106092626.CF06F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/6e4e63764aaf558cf177c2a9c2da345b2a360ea6/ghc >--------------------------------------------------------------- commit 6e4e63764aaf558cf177c2a9c2da345b2a360ea6 Author: Ömer Sinan Ağacan Date: Wed Jan 2 13:13:59 2019 +0300 Minor refactoring and documentation in profiling RTS code >--------------------------------------------------------------- 6e4e63764aaf558cf177c2a9c2da345b2a360ea6 includes/rts/prof/CCS.h | 14 ++++++++---- rts/Profiling.c | 61 ++++++++++++++++--------------------------------- 2 files changed, 29 insertions(+), 46 deletions(-) diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h index 4805063..89c9fd2 100644 --- a/includes/rts/prof/CCS.h +++ b/includes/rts/prof/CCS.h @@ -36,7 +36,7 @@ typedef struct CostCentre_ { StgWord64 mem_alloc; // align 8 (Note [struct alignment]) StgWord time_ticks; - StgInt is_caf; // non-zero for a CAF cost centre + StgBool is_caf; // true <=> CAF cost centre struct CostCentre_ *link; } CostCentre; @@ -96,9 +96,8 @@ void startProfTimer ( void ); #define EMPTY_TABLE NULL /* Constants used to set is_caf flag on CostCentres */ -#define CC_IS_CAF 'c' /* 'c' => *is* a CAF cc */ -#define CC_NOT_CAF 0 - +#define CC_IS_CAF true +#define CC_NOT_CAF false /* ----------------------------------------------------------------------------- * Data Structures * ---------------------------------------------------------------------------*/ @@ -109,10 +108,15 @@ void startProfTimer ( void ); // result). typedef struct IndexTable_ { + // Just a linked list of (cc, ccs) pairs, where the `ccs` is the result of + // pushing `cc` to the owner of the index table (another CostCentreStack). CostCentre *cc; CostCentreStack *ccs; struct IndexTable_ *next; - uint32_t back_edge; + // back_edge is true when `cc` is already in the stack, so pushing it + // truncates or drops (see RECURSION_DROPS and RECURSION_TRUNCATES in + // Profiling.c). + bool back_edge; } IndexTable; diff --git a/rts/Profiling.c b/rts/Profiling.c index 9f1a442..7abad59 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -118,7 +118,7 @@ static CostCentreStack * pruneCCSTree ( CostCentreStack *ccs ); static CostCentreStack * actualPush ( CostCentreStack *, CostCentre * ); static CostCentreStack * isInIndexTable ( IndexTable *, CostCentre * ); static IndexTable * addToIndexTable ( IndexTable *, CostCentreStack *, - CostCentre *, unsigned int ); + CostCentre *, bool ); static void ccsSetSelected ( CostCentreStack *ccs ); static void aggregateCCCosts( CostCentreStack *ccs ); @@ -476,48 +476,23 @@ ccsSetSelected (CostCentreStack *ccs) Cost-centre stack manipulation -------------------------------------------------------------------------- */ -#if defined(DEBUG) -CostCentreStack * _pushCostCentre ( CostCentreStack *ccs, CostCentre *cc ); -CostCentreStack * -pushCostCentre ( CostCentreStack *ccs, CostCentre *cc ) -#define pushCostCentre _pushCostCentre -{ - IF_DEBUG(prof, - traceBegin("pushing %s on ", cc->label); - debugCCS(ccs); - traceEnd();); - - return pushCostCentre(ccs,cc); -} -#endif - /* Append ccs1 to ccs2 (ignoring any CAF cost centre at the root of ccs1 */ - -#if defined(DEBUG) -CostCentreStack *_appendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ); CostCentreStack * appendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ) -#define appendCCS _appendCCS { - IF_DEBUG(prof, - if (ccs1 != ccs2) { - debugBelch("Appending "); - debugCCS(ccs1); - debugBelch(" to "); - debugCCS(ccs2); - debugBelch("\n");}); - return appendCCS(ccs1,ccs2); -} -#endif + IF_DEBUG(prof, + if (ccs1 != ccs2) { + debugBelch("Appending "); + debugCCS(ccs1); + debugBelch(" to "); + debugCCS(ccs2); + debugBelch("\n");}); -CostCentreStack * -appendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ) -{ if (ccs1 == ccs2) { return ccs1; } - if (ccs2 == CCS_MAIN || ccs2->cc->is_caf == CC_IS_CAF) { + if (ccs2 == CCS_MAIN || ccs2->cc->is_caf) { // stop at a CAF element return ccs1; } @@ -532,8 +507,12 @@ appendCCS ( CostCentreStack *ccs1, CostCentreStack *ccs2 ) CostCentreStack * pushCostCentre (CostCentreStack *ccs, CostCentre *cc) { - CostCentreStack *temp_ccs, *ret; - IndexTable *ixtable; + IF_DEBUG(prof, + traceBegin("pushing %s on ", cc->label); + debugCCS(ccs); + traceEnd();); + + CostCentreStack *ret; if (ccs == EMPTY_STACK) { ACQUIRE_LOCK(&ccs_mutex); @@ -545,8 +524,8 @@ pushCostCentre (CostCentreStack *ccs, CostCentre *cc) return ccs; } else { // check if we've already memoized this stack - ixtable = ccs->indexTable; - temp_ccs = isInIndexTable(ixtable,cc); + IndexTable *ixtable = ccs->indexTable; + CostCentreStack *temp_ccs = isInIndexTable(ixtable,cc); if (temp_ccs != EMPTY_STACK) { return temp_ccs; @@ -585,7 +564,7 @@ pushCostCentre (CostCentreStack *ccs, CostCentre *cc) new_ccs = ccs; #endif ccs->indexTable = addToIndexTable (ccs->indexTable, - new_ccs, cc, 1); + new_ccs, cc, true); ret = new_ccs; } else { ret = actualPush (ccs,cc); @@ -649,7 +628,7 @@ actualPush_ (CostCentreStack *ccs, CostCentre *cc, CostCentreStack *new_ccs) /* update the memoization table for the parent stack */ ccs->indexTable = addToIndexTable(ccs->indexTable, new_ccs, cc, - 0/*not a back edge*/); + false/*not a back edge*/); /* return a pointer to the new stack */ return new_ccs; @@ -674,7 +653,7 @@ isInIndexTable(IndexTable *it, CostCentre *cc) static IndexTable * addToIndexTable (IndexTable *it, CostCentreStack *new_ccs, - CostCentre *cc, unsigned int back_edge) + CostCentre *cc, bool back_edge) { IndexTable *new_it; From git at git.haskell.org Sun Jan 6 09:26:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:30 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Visible kind application (17bd163) Message-ID: <20190106092630.33BC03ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/17bd163566153babbf51adaff8397f948ae363ca/ghc >--------------------------------------------------------------- commit 17bd163566153babbf51adaff8397f948ae363ca Author: mynguyen Date: Tue Dec 18 11:52:26 2018 -0500 Visible kind application Summary: This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362. It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind application, just like in term-level. There are a few remaining issues with this patch, as documented in ticket #16082. Includes a submodule update for Haddock. Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816` Differential Revision: https://phabricator.haskell.org/D5229 >--------------------------------------------------------------- 17bd163566153babbf51adaff8397f948ae363ca compiler/deSugar/DsMeta.hs | 108 +++-- compiler/hieFile/HieAst.hs | 18 +- compiler/hsSyn/Convert.hs | 243 ++++++---- compiler/hsSyn/HsBinds.hs | 12 +- compiler/hsSyn/HsDecls.hs | 2 +- compiler/hsSyn/HsExtension.hs | 2 + compiler/hsSyn/HsInstances.hs | 4 + compiler/hsSyn/HsTypes.hs | 134 ++++-- compiler/hsSyn/HsUtils.hs | 2 +- compiler/parser/Parser.y | 30 +- compiler/parser/RdrHsSyn.hs | 112 +++-- compiler/prelude/THNames.hs | 38 +- compiler/rename/RnSource.hs | 31 +- compiler/rename/RnTypes.hs | 113 ++--- compiler/typecheck/TcDeriv.hs | 2 +- compiler/typecheck/TcExpr.hs | 26 +- compiler/typecheck/TcHsType.hs | 437 +++++++++++------- compiler/typecheck/TcInstDcls.hs | 2 +- compiler/typecheck/TcSigs.hs | 46 +- compiler/typecheck/TcSimplify.hs | 17 +- compiler/typecheck/TcSplice.hs | 15 +- compiler/typecheck/TcTyClsDecls.hs | 14 +- compiler/types/TyCoRep.hs | 7 + docs/users_guide/glasgow_exts.rst | 18 +- .../template-haskell/Language/Haskell/TH/Lib.hs | 23 +- .../Language/Haskell/TH/Lib/Internal.hs | 56 ++- .../template-haskell/Language/Haskell/TH/Ppr.hs | 76 +-- .../template-haskell/Language/Haskell/TH/Syntax.hs | 31 +- libraries/template-haskell/changelog.md | 10 +- .../tests/dependent/should_compile/T11241.stderr | 3 +- testsuite/tests/deriving/should_compile/T14579a.hs | 22 + testsuite/tests/deriving/should_compile/all.T | 1 + testsuite/tests/ghci/scripts/T12447.stdout | 4 +- .../should_fail/ExplicitForAllFams4b.stderr | 24 - .../tests/parser/should_compile/DumpParsedAst.hs | 10 +- .../parser/should_compile/DumpParsedAst.stderr | 364 ++++++++++++--- .../tests/parser/should_compile/DumpRenamedAst.hs | 8 +- .../parser/should_compile/DumpRenamedAst.stderr | 513 +++++++++++++++------ .../parser/should_compile/DumpTypecheckedAst.hs | 9 +- .../should_compile/DumpTypecheckedAst.stderr | 420 ++++++++++++++++- .../tests/parser/should_compile/KindSigs.stderr | 15 +- testsuite/tests/parser/should_compile/T12045e.hs | 13 + testsuite/tests/parser/should_compile/all.T | 1 + testsuite/tests/parser/should_fail/T12045d.hs | 11 + testsuite/tests/parser/should_fail/T12045d.stderr | 4 + testsuite/tests/parser/should_fail/all.T | 1 + .../should_compile/Defaulting2MROff.stderr | 2 +- .../should_compile/Defaulting2MROn.stderr | 2 +- .../partial-sigs/should_compile/Either.stderr | 2 +- .../partial-sigs/should_compile/EveryNamed.stderr | 2 +- .../should_compile/ExprSigLocal.stderr | 10 +- .../should_compile/ExtraConstraints3.stderr | 8 +- .../partial-sigs/should_compile/SimpleGen.stderr | 2 +- .../partial-sigs/should_compile/SplicesUsed.stderr | 34 +- .../partial-sigs/should_compile/SuperCls.stderr | 2 +- .../partial-sigs/should_compile/T10403.stderr | 14 +- .../partial-sigs/should_compile/T10438.stderr | 3 +- .../partial-sigs/should_compile/T10519.stderr | 2 +- .../partial-sigs/should_compile/T11016.stderr | 2 +- .../partial-sigs/should_compile/T11339a.stderr | 3 +- .../partial-sigs/should_compile/T11670.stderr | 26 +- .../partial-sigs/should_compile/T12844.stderr | 2 +- .../partial-sigs/should_compile/T12845.stderr | 2 +- .../partial-sigs/should_compile/T13482.stderr | 8 +- .../partial-sigs/should_compile/T14217.stderr | 2 +- .../partial-sigs/should_compile/T14643.stderr | 4 +- .../partial-sigs/should_compile/T14643a.stderr | 4 +- .../partial-sigs/should_compile/T14715.stderr | 21 +- .../partial-sigs/should_compile/TypedSplice.stderr | 4 +- .../partial-sigs/should_compile/Uncurry.stderr | 2 +- .../should_compile/UncurryNamed.stderr | 2 +- .../WarningWildcardInstantiations.stderr | 36 +- .../ExtraConstraintsWildcardInPatternSplice.stderr | 8 +- .../InstantiatedNamedWildcardsInConstraints.stderr | 8 +- .../NamedExtraConstraintsWildcard.stderr | 8 +- .../should_fail/NamedWildcardsNotInMonotype.stderr | 10 +- .../PartialTypeSignaturesDisabled.stderr | 6 +- .../tests/partial-sigs/should_fail/PatBind3.stderr | 8 +- .../tests/partial-sigs/should_fail/T10615.stderr | 6 +- .../tests/partial-sigs/should_fail/T10999.stderr | 3 +- .../tests/partial-sigs/should_fail/T11122.stderr | 4 +- .../tests/partial-sigs/should_fail/T11515.stderr | 2 +- .../tests/partial-sigs/should_fail/T11976.stderr | 6 +- .../tests/partial-sigs/should_fail/T12634.stderr | 2 +- .../tests/partial-sigs/should_fail/T14040a.stderr | 6 +- .../tests/partial-sigs/should_fail/T14584.stderr | 8 +- .../partial-sigs/should_fail/TidyClash.stderr | 18 +- .../partial-sigs/should_fail/TidyClash2.stderr | 53 ++- .../should_fail/WildcardInstantiations.stderr | 34 +- .../WildcardsInPatternAndExprSig.stderr | 46 +- .../tests/partial-sigs/should_run/T15415.stderr | 44 +- .../tests/partial-sigs/should_run/T15415.stdout | 4 +- testsuite/tests/perf/compiler/T13035.stderr | 4 +- testsuite/tests/polykinds/T14172.stderr | 5 +- testsuite/tests/polykinds/T14265.stderr | 30 +- testsuite/tests/th/ClosedFam2TH.hs | 32 +- testsuite/tests/th/T12045TH1.hs | 17 + testsuite/tests/th/T12045TH1.stderr | 18 + testsuite/tests/th/T12045TH2.hs | 30 ++ testsuite/tests/th/T12045TH2.stderr | 5 + testsuite/tests/th/T12503.hs | 4 +- testsuite/tests/th/T13618.hs | 8 +- testsuite/tests/th/T15360b.stderr | 8 +- testsuite/tests/th/T15362.hs | 9 + testsuite/tests/th/T15362.stderr | 10 + testsuite/tests/th/T5886a.hs | 4 +- testsuite/tests/th/T6018th.hs | 83 ++-- testsuite/tests/th/T6018th.stderr | 6 +- testsuite/tests/th/T7532a.hs | 2 +- testsuite/tests/th/T8884.hs | 10 +- testsuite/tests/th/TH_TyInstWhere2.hs | 11 +- testsuite/tests/th/TH_TyInstWhere2.stderr | 7 +- testsuite/tests/th/TH_reifyDecl1.hs | 8 +- testsuite/tests/th/TH_reifyDecl1.stderr | 22 +- testsuite/tests/th/all.T | 3 + .../tests/typecheck/should_compile/T10072.stderr | 6 +- .../tests/typecheck/should_compile/T12045a.hs | 83 ++++ testsuite/tests/typecheck/should_compile/T14366.hs | 13 + testsuite/tests/typecheck/should_compile/T15788.hs | 11 + testsuite/tests/typecheck/should_compile/T15793.hs | 18 + .../tests/typecheck/should_compile/T15807a.hs | 12 + testsuite/tests/typecheck/should_compile/all.T | 5 + testsuite/tests/typecheck/should_fail/T12045b.hs | 8 + .../tests/typecheck/should_fail/T12045b.stderr | 5 + testsuite/tests/typecheck/should_fail/T12045c.hs | 9 + .../tests/typecheck/should_fail/T12045c.stderr | 5 + .../tests/typecheck/should_fail/T13819.stderr | 4 +- testsuite/tests/typecheck/should_fail/T15592a.hs | 9 + .../tests/typecheck/should_fail/T15592a.stderr | 8 + testsuite/tests/typecheck/should_fail/T15797.hs | 26 ++ .../tests/typecheck/should_fail/T15797.stderr | 6 + testsuite/tests/typecheck/should_fail/T15799.hs | 47 ++ .../tests/typecheck/should_fail/T15799.stderr | 7 + testsuite/tests/typecheck/should_fail/T15801.hs | 53 +++ .../tests/typecheck/should_fail/T15801.stderr | 6 + testsuite/tests/typecheck/should_fail/T15807.hs | 12 + .../tests/typecheck/should_fail/T15807.stderr | 16 + testsuite/tests/typecheck/should_fail/T15816.hs | 8 + .../tests/typecheck/should_fail/T15816.stderr | 5 + testsuite/tests/typecheck/should_fail/all.T | 8 + utils/haddock | 2 +- 141 files changed, 3060 insertions(+), 1205 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 17bd163566153babbf51adaff8397f948ae363ca From git at git.haskell.org Sun Jan 6 09:26:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:33 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Fix some typos, etc., in comments. (7fcd680) Message-ID: <20190106092633.2EA363ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/7fcd6808d73178f76e1b4d5d11d2abdd9aca5591/ghc >--------------------------------------------------------------- commit 7fcd6808d73178f76e1b4d5d11d2abdd9aca5591 Author: Richard Eisenberg Date: Thu Jan 3 19:02:10 2019 -0500 Fix some typos, etc., in comments. [ci skip] >--------------------------------------------------------------- 7fcd6808d73178f76e1b4d5d11d2abdd9aca5591 compiler/types/CoAxiom.hs | 2 +- compiler/types/FamInstEnv.hs | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs index 5c4237c..112ab27 100644 --- a/compiler/types/CoAxiom.hs +++ b/compiler/types/CoAxiom.hs @@ -223,7 +223,7 @@ data CoAxBranch , cab_tvs :: [TyVar] -- Bound type variables; not necessarily fresh , cab_eta_tvs :: [TyVar] -- Eta-reduced tyvars -- See Note [CoAxBranch type variables] - -- cab_tvs and cab_lhsmay be eta-reduded; see FamInstEnv + -- cab_tvs and cab_lhs may be eta-reduded; see -- Note [Eta reduction for data families] , cab_cvs :: [CoVar] -- Bound coercion variables -- Always empty, for now. diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs index c6dcab6..d721ad2 100644 --- a/compiler/types/FamInstEnv.hs +++ b/compiler/types/FamInstEnv.hs @@ -615,10 +615,11 @@ If we're not careful during tidying, then when this program is compiled with axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 :: Sing _ = DataFamilyInstanceLHS.R:SingMyKind_ _ -Its misleading to have a wildcard type appearing on the RHS like -that. To avoid this issue, during tidying, we always opt to add a -numeric suffix to types that are simply `_`. That way, you instead end -up with: +It's misleading to have a wildcard type appearing on the RHS like +that. To avoid this issue, when building a CoAxiom (which is what eventually +gets printed above), we tidy all the variables in an env that already contains +'_'. Thus, any variable named '_' will be renamed, giving us the nicer output +here: COERCION AXIOMS axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 :: @@ -626,7 +627,9 @@ up with: Which is at least legal syntax. -See also Note [CoAxBranch type variables] in CoAxiom +See also Note [CoAxBranch type variables] in CoAxiom; note that we +are tidying (changing OccNames only), not freshening, in accordance with +that Note. -} -- all axiom roles are Nominal, as this is only used with type families From git at git.haskell.org Sun Jan 6 09:26:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:36 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Mark GHC.Maybe as not-home for haddock (5387483) Message-ID: <20190106092636.323C33ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/53874834b779ad0dfbcde6650069c37926da1b79/ghc >--------------------------------------------------------------- commit 53874834b779ad0dfbcde6650069c37926da1b79 Author: Simon Jakobi Date: Fri Jan 4 03:56:51 2019 +0100 Mark GHC.Maybe as not-home for haddock Previously haddock would link 'Maybe' to GHC.Maybe. Now it links to Data.Maybe. >--------------------------------------------------------------- 53874834b779ad0dfbcde6650069c37926da1b79 libraries/base/GHC/Maybe.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/base/GHC/Maybe.hs b/libraries/base/GHC/Maybe.hs index 2bdfac5..4624560 100644 --- a/libraries/base/GHC/Maybe.hs +++ b/libraries/base/GHC/Maybe.hs @@ -1,4 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_HADDOCK not-home #-} -- | Maybe type module GHC.Maybe From git at git.haskell.org Sun Jan 6 09:26:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:39 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Dump Cmm with -ddump-cmm when building .cmm files (2880cb9) Message-ID: <20190106092639.2D2B93ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/2880cb9840e268fdc33347a87a8276b03c227db8/ghc >--------------------------------------------------------------- commit 2880cb9840e268fdc33347a87a8276b03c227db8 Author: Ömer Sinan Ağacan Date: Sat Jan 5 08:40:19 2019 +0300 Dump Cmm with -ddump-cmm when building .cmm files Fixes #16131 >--------------------------------------------------------------- 2880cb9840e268fdc33347a87a8276b03c227db8 compiler/main/HscMain.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index c2c9124..2ff2ca0 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -1438,6 +1438,7 @@ hscCompileCmmFile hsc_env filename output_filename = runHsc hsc_env $ do mod_name = mkModuleName $ "Cmm$" ++ FilePath.takeFileName filename cmm_mod = mkModule (thisPackage dflags) mod_name (_, cmmgroup) <- cmmPipeline hsc_env (emptySRT cmm_mod) cmm + dumpIfSet_dyn dflags Opt_D_dump_cmm "Output Cmm" (ppr cmmgroup) rawCmms <- cmmToRawCmm dflags (Stream.yield cmmgroup) _ <- codeOutput dflags cmm_mod output_filename no_loc NoStubs [] [] rawCmms From git at git.haskell.org Sun Jan 6 09:26:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:42 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Improve code for pext primop (553f083) Message-ID: <20190106092642.30A5F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/553f0834b789de144b023cc80aac74d33120f880/ghc >--------------------------------------------------------------- commit 553f0834b789de144b023cc80aac74d33120f880 Author: Peter Trommler Date: Wed Jun 20 20:03:17 2018 +0200 Improve code for pext primop >--------------------------------------------------------------- 553f0834b789de144b023cc80aac74d33120f880 libraries/ghc-prim/cbits/pext.c | 81 ++++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/libraries/ghc-prim/cbits/pext.c b/libraries/ghc-prim/cbits/pext.c index 9cddede..2cac9a4 100644 --- a/libraries/ghc-prim/cbits/pext.c +++ b/libraries/ghc-prim/cbits/pext.c @@ -4,36 +4,89 @@ StgWord64 hs_pext64(StgWord64 src, StgWord64 mask) { - uint64_t result = 0; - int offset = 0; + uint64_t mk, mp, mv, t; - for (int bit = 0; bit != sizeof(uint64_t) * 8; ++bit) { - const uint64_t src_bit = (src >> bit) & 1; - const uint64_t mask_bit = (mask >> bit) & 1; + src = src & mask; + mk = ~mask << 1; - if (mask_bit) { - result |= (uint64_t)(src_bit) << offset; - ++offset; - } + for (int i = 0; i < 6 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mp = mp ^ (mp << 32); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; } - - return result; + return src; } StgWord hs_pext32(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint32_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 5 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } StgWord hs_pext16(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint16_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 4 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } StgWord hs_pext8(StgWord src, StgWord mask) { - return hs_pext64(src, mask); + uint8_t mk, mp, mv, t; + + src = src & mask; + mk = ~mask << 1; + + for (int i = 0; i < 3 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mv = mp & mask; + mask = (mask ^ mv) | (mv >> (1 << i)); + t = src & mv; + src = (src ^ t) | (t >> (1 << i)); + mk = mk & ~mp; + } + return src; } From git at git.haskell.org Sun Jan 6 09:26:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:45 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Efficient pdep implementation (513aa2b) Message-ID: <20190106092645.31C8A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/513aa2b8f06ea8499392e60408bd0753e018d9ed/ghc >--------------------------------------------------------------- commit 513aa2b8f06ea8499392e60408bd0753e018d9ed Author: Peter Trommler Date: Sat Oct 27 22:46:17 2018 +0200 Efficient pdep implementation >--------------------------------------------------------------- 513aa2b8f06ea8499392e60408bd0753e018d9ed libraries/ghc-prim/cbits/pdep.c | 107 +++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 17 deletions(-) diff --git a/libraries/ghc-prim/cbits/pdep.c b/libraries/ghc-prim/cbits/pdep.c index 58e8611..2769008 100644 --- a/libraries/ghc-prim/cbits/pdep.c +++ b/libraries/ghc-prim/cbits/pdep.c @@ -4,40 +4,113 @@ StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask) { - uint64_t result = 0; + uint64_t m0, mk, mp, mv, t; + uint64_t array[6]; - while (1) { - // Mask out all but the lowest bit - const uint64_t lowest = (-mask & mask); + m0 = mask; + mk = ~mask << 1; - if (lowest == 0) { - break; - } - - const uint64_t lsb = (uint64_t)((int64_t)(src << 63) >> 63); - - result |= lsb & lowest; - mask &= ~lowest; - src >>= 1; + for (int i = 0; i < 6 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mp = mp ^ (mp << 32); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; } - return result; + for (int i = 5; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep32(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint32_t m0, mk, mp, mv, t; + uint32_t array[5]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 5 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 4; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep16(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint16_t m0, mk, mp, mv, t; + uint16_t array[4]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 4 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 3; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } StgWord hs_pdep8(StgWord src, StgWord mask) { - return hs_pdep64(src, mask); + uint8_t m0, mk, mp, mv, t; + uint8_t array[3]; + + m0 = mask; + mk = ~mask << 1; + + for (int i = 0; i < 3 ; i++) { + mp = mk ^ (mk << 1); + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mv = mp & mask; + array[i] = mv; + mask = (mask ^ mv) | (mv >> (1 << i)); + mk = mk & ~mp; + } + + for (int i = 2; i >= 0; i--) { + mv = array[i]; + t = src << (1 << i); + src = (src & ~ mv) | (t & mv); + } + return src & m0; } From git at git.haskell.org Sun Jan 6 09:26:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 09:26:48 +0000 (UTC) Subject: [commit: ghc] wip/improve-pext-pdep: Add references to Hacker's Delight (7070bce) Message-ID: <20190106092648.2B2723ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/improve-pext-pdep Link : http://ghc.haskell.org/trac/ghc/changeset/7070bceed6ae9448c290987ded6d8e6132c0797e/ghc >--------------------------------------------------------------- commit 7070bceed6ae9448c290987ded6d8e6132c0797e Author: Peter Trommler Date: Sat Jan 5 15:48:23 2019 +0100 Add references to Hacker's Delight >--------------------------------------------------------------- 7070bceed6ae9448c290987ded6d8e6132c0797e libraries/ghc-prim/cbits/pdep.c | 6 ++++++ libraries/ghc-prim/cbits/pext.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libraries/ghc-prim/cbits/pdep.c b/libraries/ghc-prim/cbits/pdep.c index 2769008..52325ff 100644 --- a/libraries/ghc-prim/cbits/pdep.c +++ b/libraries/ghc-prim/cbits/pdep.c @@ -1,6 +1,12 @@ #include "Rts.h" #include "MachDeps.h" +/* + * The algorithm for PDEP or generalized insert or expand is from + * Henry S. Warren, Hacker's Delight, 2nd ed, p 157, Figure 7-12 + * "Parallel suffix method for the /expand/ operation". + */ + StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask) { diff --git a/libraries/ghc-prim/cbits/pext.c b/libraries/ghc-prim/cbits/pext.c index 2cac9a4..27894fd 100644 --- a/libraries/ghc-prim/cbits/pext.c +++ b/libraries/ghc-prim/cbits/pext.c @@ -1,6 +1,12 @@ #include "Rts.h" #include "MachDeps.h" +/* + * The algorithm for PEXT or generalized extract or compress is from + * Henry S. Warren, Hacker's Delight, 2nd ed, p 153, Figure 7-10 + * "Parallel suffix method for the /compress/ operation". + */ + StgWord64 hs_pext64(StgWord64 src, StgWord64 mask) { From git at git.haskell.org Sun Jan 6 12:33:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:09 +0000 (UTC) Subject: [commit: ghc] branch 'wip/merge-queue' created Message-ID: <20190106123309.4832F3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/merge-queue Referencing: bbd58fb5f029b632e2d8977518723feee0737ba7 From git at git.haskell.org Sun Jan 6 12:33:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:12 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Fix broken links (#16125) (b565d41) Message-ID: <20190106123312.440C43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/b565d418ff5f9501abecf130dafc2b9837460a96/ghc >--------------------------------------------------------------- commit b565d418ff5f9501abecf130dafc2b9837460a96 Author: Sven Tennie Date: Fri Jan 4 20:17:07 2019 +0100 Fix broken links (#16125) >--------------------------------------------------------------- b565d418ff5f9501abecf130dafc2b9837460a96 docs/users_guide/using-optimisation.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index bdae8b6..cacc553 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -999,10 +999,10 @@ by saying ``-fno-wombat``. :default: off - Turn on the static argument transformation, which turns a recursive - function into a non-recursive one with a local recursive loop. See - Chapter 7 of `Andre Santos's PhD - thesis `__ + Turn on the static argument transformation, which turns a recursive function + into a non-recursive one with a local recursive loop. See Chapter 7 of + `Andre Santos's PhD thesis + `__. .. ghc-flag:: -fstg-lift-lams :shortdesc: Enable late lambda lifting on the STG intermediate @@ -1065,8 +1065,9 @@ by saying ``-fno-wombat``. :default: on - Switch on the strictness analyser. The - implementation is described in the paper `Theory and Practice of Demand Analysis in Haskell``__. + Switch on the strictness analyser. The implementation is described in the + paper `Theory and Practice of Demand Analysis in Haskell + `__. The strictness analyser figures out when arguments and variables in a function can be treated 'strictly' (that is they are always From git at git.haskell.org Sun Jan 6 12:33:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:15 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Respect prompt in GhciSettings (08b8ea2) Message-ID: <20190106123315.406323ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/08b8ea2f4f1bbc1c61a7cca03ae7fa8ffb099556/ghc >--------------------------------------------------------------- commit 08b8ea2f4f1bbc1c61a7cca03ae7fa8ffb099556 Author: Zejun Wu Date: Tue Dec 18 18:29:44 2018 -0800 Respect prompt in GhciSettings Summary: This was broken when PromptFunction was introduced that the settings are ignored and default values are always used. Test Plan: ./validate >--------------------------------------------------------------- 08b8ea2f4f1bbc1c61a7cca03ae7fa8ffb099556 ghc/GHCi/UI.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 105324f..2cc055a 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -468,8 +468,8 @@ interactiveUI config srcs maybe_exprs = do GHCiState{ progname = default_progname, args = default_args, evalWrapper = eval_wrapper, - prompt = default_prompt, - prompt_cont = default_prompt_cont, + prompt = defPrompt config, + prompt_cont = defPromptCont config, stop = default_stop, editor = default_editor, options = [], From git at git.haskell.org Sun Jan 6 12:33:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:18 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Remove OPTIONS_HADDOCK hide in favour for not-home (24b39ce) Message-ID: <20190106123318.5A86E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/24b39ce53eedad4cefc30f6786542d2072d1f9b0/ghc >--------------------------------------------------------------- commit 24b39ce53eedad4cefc30f6786542d2072d1f9b0 Author: Adam Sandberg Eriksson Date: Sun Dec 30 20:04:15 2018 +0100 Remove OPTIONS_HADDOCK hide in favour for not-home GHC Trac Issues: #15447 >--------------------------------------------------------------- 24b39ce53eedad4cefc30f6786542d2072d1f9b0 compiler/types/TyCoRep.hs | 2 +- libraries/base/Control/Monad/ST/Imp.hs | 2 +- libraries/base/Control/Monad/ST/Lazy/Imp.hs | 2 +- libraries/base/Foreign/ForeignPtr/Imp.hs | 2 +- libraries/base/GHC/Arr.hs | 2 +- libraries/base/GHC/Base.hs | 2 +- libraries/base/GHC/Desugar.hs | 2 +- libraries/base/GHC/Enum.hs | 2 +- libraries/base/GHC/Err.hs | 2 +- libraries/base/GHC/Exception.hs | 2 +- libraries/base/GHC/Exception/Type.hs | 2 +- libraries/base/GHC/Float.hs | 2 +- libraries/base/GHC/Float/ConversionUtils.hs | 2 +- libraries/base/GHC/Float/RealFracMethods.hs | 2 +- libraries/base/GHC/ForeignPtr.hs | 2 +- libraries/base/GHC/GHCi.hs | 2 +- libraries/base/GHC/IO.hs | 2 +- libraries/base/GHC/IO/Encoding/Iconv.hs | 2 +- libraries/base/GHC/IO/Exception.hs | 2 +- libraries/base/GHC/IO/FD.hs | 2 +- libraries/base/GHC/IO/Handle/Internals.hs | 2 +- libraries/base/GHC/IO/Handle/Text.hs | 2 +- libraries/base/GHC/IO/Handle/Types.hs | 2 +- libraries/base/GHC/IO/IOMode.hs | 2 +- libraries/base/GHC/IO/Unsafe.hs | 2 +- libraries/base/GHC/IOArray.hs | 2 +- libraries/base/GHC/IORef.hs | 2 +- libraries/base/GHC/Int.hs | 2 +- libraries/base/GHC/MVar.hs | 2 +- libraries/base/GHC/Num.hs | 2 +- libraries/base/GHC/Pack.hs | 2 +- libraries/base/GHC/Ptr.hs | 2 +- libraries/base/GHC/Read.hs | 2 +- libraries/base/GHC/Real.hs | 2 +- libraries/base/GHC/ST.hs | 2 +- libraries/base/GHC/STRef.hs | 2 +- libraries/base/GHC/Show.hs | 2 +- libraries/base/GHC/Stable.hs | 2 +- libraries/base/GHC/Stack/Types.hs | 2 +- libraries/base/GHC/Storable.hs | 2 +- libraries/base/GHC/TopHandler.hs | 2 +- libraries/base/GHC/Unicode.hs | 2 +- libraries/base/GHC/Weak.hs | 2 +- libraries/base/GHC/Word.hs | 2 +- libraries/base/System/Posix/Internals.hs | 2 +- libraries/ghc-prim/GHC/Classes.hs | 2 +- libraries/ghc-prim/GHC/IntWord64.hs | 2 +- libraries/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs | 2 +- libraries/integer-simple/GHC/Integer/Logarithms/Internals.hs | 2 +- 49 files changed, 49 insertions(+), 49 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 24b39ce53eedad4cefc30f6786542d2072d1f9b0 From git at git.haskell.org Sun Jan 6 12:33:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:21 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Fix bindist for ghci library (3fb726d) Message-ID: <20190106123321.54DE23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/3fb726d0696f4c59e58331e505e49f02f135a2f1/ghc >--------------------------------------------------------------- commit 3fb726d0696f4c59e58331e505e49f02f135a2f1 Author: Zejun Wu Date: Tue Jan 1 18:59:23 2019 -0800 Fix bindist for ghci library Summary: https://phabricator.haskell.org/D5169 built libghci for both vanilla way and profiling way. We need to include both in the bindist list so they will be installed. Test Plan: ``` $ grep '^BuildFlavour' mk/build.mk BuildFlavour=perf $ make test_bindist $ grep HSghc-prim bindist-list.uniq ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a ``` >--------------------------------------------------------------- 3fb726d0696f4c59e58331e505e49f02f135a2f1 ghc.mk | 7 +++++-- rules/build-package-way.mk | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ghc.mk b/ghc.mk index e0d5837..f6d3b48 100644 --- a/ghc.mk +++ b/ghc.mk @@ -784,8 +784,11 @@ ifneq "$(BINDIST)" "YES" # Make sure we have all the GHCi libs by the time we've built # ghc-stage2. # -GHCI_LIBS = $(foreach lib,$(PACKAGES_STAGE1),$(libraries/$(lib)_dist-install_GHCI_LIB)) \ - $(compiler_stage2_GHCI_LIB) +GHCI_LIBS = \ + $(foreach way,$(GhcLibWays),\ + $(foreach lib,$(PACKAGES_STAGE1),\ + $(libraries/$(lib)_dist-install_$(way)_GHCI_LIB)) \ + $(compiler_stage2_$(way)_GHCI_LIB)) ifeq "$(UseArchivesForGhci)" "NO" ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS) diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 0a762d3..f9eca23 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -113,14 +113,14 @@ endif # Build the GHCi library ifneq "$(filter $3, v p)" "" -$1_$2_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) +$1_$2_$3_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" # Don't put bootstrapping packages in the bindist ifneq "$4" "0" -BINDIST_LIBS += $$($1_$2_GHCI_LIB) +BINDIST_LIBS += $$($1_$2_$3_GHCI_LIB) endif endif -$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT) +$$($1_$2_$3_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT) $$(call cmd,LD_NO_GOLD) $$(CONF_LD_LINKER_OPTS_STAGE$4) -r $$(if $$($1_$2_LD_SCRIPT),$$($1_$2_LD_SCRIPT_CMD) $$($1_$2_LD_SCRIPT)) -o $$@ $$(EXTRA_LD_LINKER_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) # NB. LD_NO_GOLD above: see #14328 (symptoms: #14675,#14291). At least # some versions of ld.gold appear to have a bug that causes the @@ -129,7 +129,7 @@ $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OB ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" # Don't bother making ghci libs for bootstrapping packages ifneq "$4" "0" -$(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) +$(call all-target,$1_$2,$$($1_$2_$3_GHCI_LIB)) endif endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES" endif # "$(filter $3, v p)" "" From git at git.haskell.org Sun Jan 6 12:33:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:24 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: gitlab-ci: Try reenabling PDF documentation on Darwin (66b88dd) Message-ID: <20190106123324.5A4603ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/66b88dddb3188cc63b4b4f4f065b6548aedfa403/ghc >--------------------------------------------------------------- commit 66b88dddb3188cc63b4b4f4f065b6548aedfa403 Author: Ben Gamari Date: Sun Dec 30 13:49:47 2018 -0500 gitlab-ci: Try reenabling PDF documentation on Darwin Carter says that the builder issues have now been sorted. >--------------------------------------------------------------- 66b88dddb3188cc63b4b4f4f065b6548aedfa403 .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05d32ad..a18757b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,8 +126,6 @@ validate-x86_64-darwin: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" - # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex - - echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache From git at git.haskell.org Sun Jan 6 12:33:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:27 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Fix precedence handling for Data.Fixed's Show instance (#16031) (01b60b0) Message-ID: <20190106123327.559BD3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/01b60b0e1ee57f882c5b729854343916c2295c51/ghc >--------------------------------------------------------------- commit 01b60b0e1ee57f882c5b729854343916c2295c51 Author: Sven Tennie Date: Wed Dec 26 12:04:36 2018 +0100 Fix precedence handling for Data.Fixed's Show instance (#16031) Use `showsPrec` instead of `show` to respect the precedence of the surrounding context. >--------------------------------------------------------------- 01b60b0e1ee57f882c5b729854343916c2295c51 libraries/base/Data/Fixed.hs | 2 +- libraries/base/tests/data-fixed-show-read.hs | 4 ++++ libraries/base/tests/data-fixed-show-read.stdout | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/base/Data/Fixed.hs b/libraries/base/Data/Fixed.hs index 98acb76..482ec0a 100644 --- a/libraries/base/Data/Fixed.hs +++ b/libraries/base/Data/Fixed.hs @@ -158,7 +158,7 @@ showFixed chopTrailingZeros fa@(MkFixed a) = (show i) ++ (withDot (showIntegerZe -- | @since 2.01 instance (HasResolution a) => Show (Fixed a) where - show = showFixed False + showsPrec p n = showParen (p > 6 && n < 0) $ showString $ showFixed False n -- | @since 4.3.0.0 instance (HasResolution a) => Read (Fixed a) where diff --git a/libraries/base/tests/data-fixed-show-read.hs b/libraries/base/tests/data-fixed-show-read.hs index 7e947f4..8766f0a 100644 --- a/libraries/base/tests/data-fixed-show-read.hs +++ b/libraries/base/tests/data-fixed-show-read.hs @@ -21,6 +21,10 @@ main = do doit 38.001 print (read "-38" :: Centi) print (read "0.008" :: Fixed B7) print (read "-0.008" :: Fixed B7) + print $ show (Just (-1 :: Milli)) + print $ show (Just (1 :: Milli)) + print ((read $ show (Just (-1 :: Deci))) :: Maybe Deci) + print ((read $ show (Just (1 :: Deci))) :: Maybe Deci) doit :: Centi -> IO () doit c = do let s = show c diff --git a/libraries/base/tests/data-fixed-show-read.stdout b/libraries/base/tests/data-fixed-show-read.stdout index 4abb2d9..4f24242 100644 --- a/libraries/base/tests/data-fixed-show-read.stdout +++ b/libraries/base/tests/data-fixed-show-read.stdout @@ -18,3 +18,7 @@ -38.00 0.008 -0.008 +"Just (-1.000)" +"Just 1.000" +Just (-1.0) +Just 1.0 From git at git.haskell.org Sun Jan 6 12:33:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:30 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: make: Silence some xelatex output (3a509d2) Message-ID: <20190106123330.4BC313ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/3a509d2999d499793075b47d1fb7380c9e896ea1/ghc >--------------------------------------------------------------- commit 3a509d2999d499793075b47d1fb7380c9e896ea1 Author: Ben Gamari Date: Sun Dec 30 16:36:21 2018 -0500 make: Silence some xelatex output Currently build logs from GitLab CI around around 7 megabytes each. Of this, around 2 megabytes is latex output. This is quite silly as essentially all of this output is unresolved references in the early latex iterations. Here we silence this output. However, to make sure that we don't silence errors we allow each xelatex invocation besides the last to fail. >--------------------------------------------------------------- 3a509d2999d499793075b47d1fb7380c9e896ea1 rules/sphinx.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/rules/sphinx.mk b/rules/sphinx.mk index 4929f3c..32ef3e4 100644 --- a/rules/sphinx.mk +++ b/rules/sphinx.mk @@ -56,13 +56,18 @@ pdf_$1 : $1/$2.pdf pdf : pdf_$1 ifneq "$$(BINDIST)" "YES" +# N.B. If we don't redirect latex output to /dev/null then we end up with literally +# 30% of the build output being warnings, even in a successful build. However, +# to make sure that we don't silence errors we allow each xelatex invocation +# besides the last to fail. + $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 - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex + 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 ; makeindex $2.idx - cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex + 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 cp $1/build-pdf/$2/$2.pdf $1/$2.pdf endif From git at git.haskell.org Sun Jan 6 12:33:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:34 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Add -Wmissing-deriving-strategies (c121e33) Message-ID: <20190106123334.6338A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/c121e33f9b039acf2ac6939af8bfafe593560039/ghc >--------------------------------------------------------------- commit c121e33f9b039acf2ac6939af8bfafe593560039 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 >--------------------------------------------------------------- c121e33f9b039acf2ac6939af8bfafe593560039 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 c121e33f9b039acf2ac6939af8bfafe593560039 From git at git.haskell.org Sun Jan 6 12:33:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:38 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Fix #16133 by checking for TypeApplications in rnExpr (bbd58fb) Message-ID: <20190106123338.1E2243ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/bbd58fb5f029b632e2d8977518723feee0737ba7/ghc >--------------------------------------------------------------- commit bbd58fb5f029b632e2d8977518723feee0737ba7 Author: Ryan Scott Date: Sat Jan 5 12:40:39 2019 -0500 Fix #16133 by checking for TypeApplications in rnExpr >--------------------------------------------------------------- bbd58fb5f029b632e2d8977518723feee0737ba7 compiler/rename/RnExpr.hs | 6 ++++-- compiler/rename/RnTypes.hs | 8 ++------ compiler/rename/RnUtils.hs | 8 +++++++- compiler/typecheck/TcDeriv.hs | 3 +++ testsuite/tests/th/T16133.hs | 13 +++++++++++++ testsuite/tests/th/T16133.stderr | 8 ++++++++ testsuite/tests/th/all.T | 1 + 7 files changed, 38 insertions(+), 9 deletions(-) diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs index 9ee9669..607f523 100644 --- a/compiler/rename/RnExpr.hs +++ b/compiler/rename/RnExpr.hs @@ -35,7 +35,7 @@ import RnFixity import RnUtils ( HsDocContext(..), bindLocalNamesFV, checkDupNames , bindLocalNames , mapMaybeFvRn, mapFvRn - , warnUnusedLocalBinds ) + , warnUnusedLocalBinds, typeAppErr ) import RnUnbound ( reportUnboundName ) import RnSplice ( rnBracket, rnSpliceExpr, checkThLocalName ) import RnTypes @@ -171,7 +171,9 @@ rnExpr (HsApp x fun arg) ; return (HsApp x fun' arg', fvFun `plusFV` fvArg) } rnExpr (HsAppType x fun arg) - = do { (fun',fvFun) <- rnLExpr fun + = do { type_app <- xoptM LangExt.TypeApplications + ; unless type_app $ addErr $ typeAppErr "type" $ hswc_body arg + ; (fun',fvFun) <- rnLExpr fun ; (arg',fvArg) <- rnHsWcType HsTypeCtx arg ; return (HsAppType x fun' arg', fvFun `plusFV` fvArg) } diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs index 735456d..f66c1bd 100644 --- a/compiler/rename/RnTypes.hs +++ b/compiler/rename/RnTypes.hs @@ -47,7 +47,7 @@ import RnHsDoc ( rnLHsDoc, rnMbLHsDoc ) import RnEnv import RnUnbound ( perhapsForallMsg ) import RnUtils ( HsDocContext(..), withHsDocContext, mapFvRn - , pprHsDocContext, bindLocalNamesFV + , pprHsDocContext, bindLocalNamesFV, typeAppErr , newLocalBndrRn, checkDupRdrNames, checkShadowedRdrNames ) import RnFixity ( lookupFieldFixityRn, lookupFixityRn , lookupTyFixityRn ) @@ -645,7 +645,7 @@ rnHsTyKi env (HsAppTy _ ty1 ty2) rnHsTyKi env (HsAppKindTy _ ty k) = do { kind_app <- xoptM LangExt.TypeApplications - ; unless kind_app (addErr (typeAppErr k)) + ; unless kind_app (addErr (typeAppErr "kind" k)) ; (ty', fvs1) <- rnLHsTyKi env ty ; (k', fvs2) <- rnLHsTyKi (env {rtke_level = KindLevel }) k ; return (HsAppKindTy noExt ty' k', fvs1 `plusFV` fvs2) } @@ -1477,10 +1477,6 @@ opTyErr op overall_ty | otherwise = text "Use TypeOperators to allow operators in types" -typeAppErr :: LHsKind GhcPs -> SDoc -typeAppErr (L _ k) - = hang (text "Illegal visible kind application" <+> quotes (ppr k)) - 2 (text "Perhaps you intended to use TypeApplications") {- ************************************************************************ * * diff --git a/compiler/rename/RnUtils.hs b/compiler/rename/RnUtils.hs index 0201822..3a743b5 100644 --- a/compiler/rename/RnUtils.hs +++ b/compiler/rename/RnUtils.hs @@ -3,6 +3,7 @@ This module contains miscellaneous functions related to renaming. -} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} @@ -14,7 +15,7 @@ module RnUtils ( warnUnusedMatches, warnUnusedTypePatterns, warnUnusedTopBinds, warnUnusedLocalBinds, mkFieldEnv, - unknownSubordinateErr, badQualBndrErr, + unknownSubordinateErr, badQualBndrErr, typeAppErr, HsDocContext(..), pprHsDocContext, inHsDocContext, withHsDocContext, @@ -363,6 +364,11 @@ badQualBndrErr :: RdrName -> SDoc badQualBndrErr rdr_name = text "Qualified name in binding position:" <+> ppr rdr_name +typeAppErr :: String -> LHsType GhcPs -> SDoc +typeAppErr what (L _ k) + = hang (text "Illegal visible" <+> text what <+> text "application" + <+> quotes (char '@' <> ppr k)) + 2 (text "Perhaps you intended to use TypeApplications") checkTupSize :: Int -> RnM () checkTupSize tup_size diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs index dd50786..90b230a 100644 --- a/compiler/typecheck/TcDeriv.hs +++ b/compiler/typecheck/TcDeriv.hs @@ -330,6 +330,9 @@ renameDeriv is_boot inst_infos bagBinds setXOptM LangExt.KindSignatures $ -- Derived decls (for newtype-deriving) can use ScopedTypeVariables & -- KindSignatures + setXOptM LangExt.TypeApplications $ + -- GND/DerivingVia uses TypeApplications in generated code + -- (See Note [Newtype-deriving instances] in TcGenDeriv) unsetXOptM LangExt.RebindableSyntax $ -- See Note [Avoid RebindableSyntax when deriving] do { diff --git a/testsuite/tests/th/T16133.hs b/testsuite/tests/th/T16133.hs new file mode 100644 index 0000000..b7f5e23 --- /dev/null +++ b/testsuite/tests/th/T16133.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TemplateHaskell #-} +module T16133 where + +import Data.Kind +import Language.Haskell.TH hiding (Type) + +data P (a :: k) = MkP + +$([d| f :: Int + f = $(varE 'id `appTypeE` conT ''Int `appE` litE (integerL 42)) + + type P' = $(conT ''P `appKindT` conT ''Type) |]) diff --git a/testsuite/tests/th/T16133.stderr b/testsuite/tests/th/T16133.stderr new file mode 100644 index 0000000..30dcd3a --- /dev/null +++ b/testsuite/tests/th/T16133.stderr @@ -0,0 +1,8 @@ + +T16133.hs:10:3: error: + Illegal visible kind application ‘@Type’ + Perhaps you intended to use TypeApplications + +T16133.hs:10:3: error: + Illegal visible type application ‘@Int’ + Perhaps you intended to use TypeApplications diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 7f420fb..48b7681 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -465,3 +465,4 @@ test('T15845', normal, compile, ['-v0 -dsuppress-uniques']) test('T15437', expect_broken(15437), multimod_compile, ['T15437', '-v0 ' + config.ghc_th_way_flags]) test('T15985', normal, compile, ['']) +test('T16133', normal, compile_fail, ['']) From git at git.haskell.org Sun Jan 6 12:33:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:33:41 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Add entry for #16031 to base/changelog.md (0ff42f3) Message-ID: <20190106123341.1B1643ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/0ff42f3f6e85c1c3beca3bd9c5c034b667243239/ghc >--------------------------------------------------------------- commit 0ff42f3f6e85c1c3beca3bd9c5c034b667243239 Author: Sven Tennie Date: Thu Dec 27 17:21:41 2018 +0100 Add entry for #16031 to base/changelog.md >--------------------------------------------------------------- 0ff42f3f6e85c1c3beca3bd9c5c034b667243239 libraries/base/changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 06f62f5..07df8fc 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -3,6 +3,11 @@ ## 4.12.0.0 *TBA* * Bundled with GHC *TBA* + * Fix `Show` instance of `Data.Fixed`: Negative numbers are now parenthesized + according to their surrounding context. I.e. `Data.Fixed.show` produces + syntactically correct Haskell for expressions like `Just (-1 :: Fixed E2)`. + (#16031) + * Support the characters from recent versions of Unicode (up to v. 12) in literals (#5518). From git at git.haskell.org Sun Jan 6 12:45:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 6 Jan 2019 12:45:34 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Hadrian: merge sections in profiling _p.a to .p_o for ghci (9ea8dce) Message-ID: <20190106124534.7D2793ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/9ea8dcea3e5ba96808ef91028e0efde9d31f7272/ghc >--------------------------------------------------------------- commit 9ea8dcea3e5ba96808ef91028e0efde9d31f7272 Author: Zejun Wu Date: Sun Jan 6 07:40:05 2019 -0500 Hadrian: merge sections in profiling _p.a to .p_o for ghci This is the hadrain version of {D5169} * We build squashed .o and .p_o for ghci when `dynamicGhcPrograms` is `False` * We no longer build them for rts as ghci never loads it we need https://github.com/haskell/cabal/pull/5592 for cabal to copy the built `.p_o` file. Test Plan: ``` $ grep dynamicGhc hadrian/UserSettings.hs , dynamicGhcPrograms = return False $ touch ... $ hadrian/build.sh --flavour=user -j --digest-or $ find _build/stage1/libraries/ -name 'HS*-*.*o' | wc 62 62 3664 ``` ``` $ grep -C3 dynamicGhc hadrian/UserSettings.hs userFlavour :: Flavour userFlavour = performanceFlavour { name = "user" , dynamicGhcPrograms = return False } $ hadrian/build.sh -j --flavour=user test --verbose Unexpected results from: TEST="T3807 T9208 T9293 annth_make ghci057 haddock.Cabal haddock.base haddock.compiler" SUMMARY for test run started at Wed Dec 5 17:45:39 2018 PST 0:03:16 spent to go through 6708 total tests, which gave rise to 26015 test cases, of which 19290 were skipped 29 had missing libraries 6600 expected passes 88 expected failures 3 caused framework failures 0 caused framework warnings 1 unexpected passes 7 unexpected failures 0 unexpected stat failures $ find _build -name 'HSbase*.*o' _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1 2.0.0.o _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1 2.0.0.p_o _build/stage1/libraries/base/build/HSbase-4.12.0.0.o _build/stage1/libraries/base/build/HSbase-4.12.0.0.p_o ``` Reviewers: bgamari, simonmar, snowleopard Reviewed By: snowleopard Subscribers: alpmestan, rwbarton, carter GHC Trac Issues: #15779 Differential Revision: https://phabricator.haskell.org/D5270 >--------------------------------------------------------------- 9ea8dcea3e5ba96808ef91028e0efde9d31f7272 hadrian/src/Context.hs | 4 +++- hadrian/src/Rules/Library.hs | 9 ++++++--- hadrian/src/Settings/Builders/Cabal.hs | 17 +++++++++++------ hadrian/src/Utilities.hs | 4 ++-- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index 7459011..672b3a6 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -96,7 +96,9 @@ pkgLibraryFile context at Context {..} = do -- | Path to the GHCi library file of a given 'Context', e.g.: -- @_build/stage1/libraries/array/build/HSarray-0.5.1.0.o at . pkgGhciLibraryFile :: Context -> Action FilePath -pkgGhciLibraryFile context = pkgFile context "HS" ".o" +pkgGhciLibraryFile context at Context {..} = do + let extension = "" <.> osuf way + pkgFile context "HS" extension -- | Path to the configuration file of a given 'Context'. pkgConfFile :: Context -> Action FilePath diff --git a/hadrian/src/Rules/Library.hs b/hadrian/src/Rules/Library.hs index 24a9424..1220040 100644 --- a/hadrian/src/Rules/Library.hs +++ b/hadrian/src/Rules/Library.hs @@ -25,7 +25,9 @@ libraryRules = do root -/- "//libHS*-*.dylib" %> buildDynamicLibUnix root "dylib" root -/- "//libHS*-*.so" %> buildDynamicLibUnix root "so" root -/- "//*.a" %> buildStaticLib root - priority 2 $ root -/- "//HS*-*.o" %> buildGhciLibO root + priority 2 $ do + root -/- "//HS*-*.o" %> buildGhciLibO root + root -/- "//HS*-*.p_o" %> buildGhciLibO root -- * 'Action's for building libraries @@ -193,8 +195,9 @@ parseLibGhciFilename :: Parsec.Parsec String () LibGhci parseLibGhciFilename = do _ <- Parsec.string "HS" (pkgname, pkgver) <- parsePkgId - way <- parseWaySuffix vanilla - _ <- Parsec.string ".o" + _ <- Parsec.string "." + way <- parseWayPrefix vanilla + _ <- Parsec.string "o" return (LibGhci pkgname pkgver way) -- | Parse the filename of a dynamic library to be built into a 'LibDyn' value. diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs index f33e9b4..80b9b67 100644 --- a/hadrian/src/Settings/Builders/Cabal.hs +++ b/hadrian/src/Settings/Builders/Cabal.hs @@ -57,19 +57,24 @@ libraryArgs :: Args libraryArgs = do flavourWays <- getLibraryWays contextWay <- getWay + package <- getPackage withGhci <- expr ghcWithInterpreter dynPrograms <- expr (flavour >>= dynamicGhcPrograms) let ways = flavourWays ++ [contextWay] - pure [ if vanilla `elem` ways + hasVanilla = vanilla `elem` ways + hasProfiling = any (wayUnit Profiling) ways + hasDynamic = any (wayUnit Dynamic) ways + pure [ if hasVanilla then "--enable-library-vanilla" else "--disable-library-vanilla" - , if vanilla `elem` ways && withGhci && not dynPrograms - then "--enable-library-for-ghci" - else "--disable-library-for-ghci" - , if or [Profiling `wayUnit` way | way <- ways] + , if hasProfiling then "--enable-library-profiling" else "--disable-library-profiling" - , if or [Dynamic `wayUnit` way | way <- ways] + , if (hasVanilla || hasProfiling) && + package /= rts && withGhci && not dynPrograms + then "--enable-library-for-ghci" + else "--disable-library-for-ghci" + , if hasDynamic then "--enable-shared" else "--disable-shared" ] diff --git a/hadrian/src/Utilities.hs b/hadrian/src/Utilities.hs index 7fe6a89..d31f6cc 100644 --- a/hadrian/src/Utilities.hs +++ b/hadrian/src/Utilities.hs @@ -61,10 +61,10 @@ stage1Dependencies = -- | Given a library 'Package' this action computes all of its targets. See -- 'packageTargets' for the explanation of the @includeGhciLib@ parameter. libraryTargets :: Bool -> Context -> Action [FilePath] -libraryTargets includeGhciLib context = do +libraryTargets includeGhciLib context at Context {..} = do libFile <- pkgLibraryFile context ghciLib <- pkgGhciLibraryFile context - ghci <- if includeGhciLib + ghci <- if includeGhciLib && not (wayUnit Dynamic way) then interpretInContext context $ getContextData buildGhciLib else return False return $ [ libFile ] ++ [ ghciLib | ghci ] From git at git.haskell.org Mon Jan 7 17:18:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-8.6-backports' created Message-ID: <20190107171842.084433ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-8.6-backports Referencing: 08cfa6153171d7289e799b97940f51d322d8dd32 From git at git.haskell.org Mon Jan 7 17:18:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:44 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: testsuite: Skip ffi018_ghci when unregisterised (8b043e8) Message-ID: <20190107171844.D81AB3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/8b043e883f00e276b435324be5689e6b5e2de81e/ghc >--------------------------------------------------------------- commit 8b043e883f00e276b435324be5689e6b5e2de81e Author: Ben Gamari Date: Tue Dec 25 05:03:21 2018 -0500 testsuite: Skip ffi018_ghci when unregisterised As noted in #16085 this test is fragile in unregisterised compilers. (cherry picked from commit 7bfc1e81377d1e37069cf52bd090530124dcd871) >--------------------------------------------------------------- 8b043e883f00e276b435324be5689e6b5e2de81e testsuite/tests/ffi/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index fd0af7e..bcb06c8 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -87,6 +87,8 @@ test('ffi018', [omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c']) test('ffi018_ghci', [extra_files(['ffi018.h']), only_ways(['ghci']), + # This test is fragile when unregisterised; see #16085 + when(unregisterised(), skip), pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup')], compile_and_run, ['ffi018_ghci_c.o']) From git at git.haskell.org Mon Jan 7 17:18:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:47 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: gitlab-ci: Allow integer-simple and unregisterised builds to fail (b348b17) Message-ID: <20190107171847.B053C3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/b348b173eb4811760273f6abe603daac63b6debd/ghc >--------------------------------------------------------------- commit b348b173eb4811760273f6abe603daac63b6debd Author: Ben Gamari Date: Sat Dec 29 16:35:44 2018 -0500 gitlab-ci: Allow integer-simple and unregisterised builds to fail >--------------------------------------------------------------- b348b173eb4811760273f6abe603daac63b6debd .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 830250e..5538bb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -267,6 +267,7 @@ validate-x86_64-linux-fedora27: validate-x86_64-linux-deb9-integer-simple: extends: .validate-linux stage: full-build + allow_failure: true variables: INTEGER_LIBRARY: integer-simple image: ghcci/x86_64-linux-deb9:0.2 @@ -276,6 +277,7 @@ validate-x86_64-linux-deb9-integer-simple: nightly-x86_64-linux-deb9-integer-simple: extends: validate-x86_64-linux-deb9-integer-simple stage: full-build + allow_failure: true artifacts: expire_in: 2 year variables: @@ -287,6 +289,7 @@ nightly-x86_64-linux-deb9-integer-simple: validate-x86_64-linux-deb9-unreg: extends: .validate-linux stage: full-build + allow_failure: true variables: CONFIGURE_ARGS: --enable-unregisterised image: ghcci/x86_64-linux-deb9:0.2 From git at git.haskell.org Mon Jan 7 17:18:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:50 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: testsuite: Mark heapprof001 as broken in prof_hc_hb way on i386 (1acf0ce) Message-ID: <20190107171850.877803ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/1acf0ceb0156098b210d2b4bb879430519d313cf/ghc >--------------------------------------------------------------- commit 1acf0ceb0156098b210d2b4bb879430519d313cf Author: Ben Gamari Date: Sat Dec 22 13:02:08 2018 -0500 testsuite: Mark heapprof001 as broken in prof_hc_hb way on i386 As documented in #15382, this is known to fail in prof_hc_hb on i386. Concerningly, I have also seen this test non-deterministically fail in prof_hc_hb on amd64. We should really investigate this. (cherry picked from commit 8fd3f9a67f9c7b447a5bfcb3aefd8986794918ce) >--------------------------------------------------------------- 1acf0ceb0156098b210d2b4bb879430519d313cf testsuite/tests/profiling/should_run/all.T | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 8d605f2..c3d34af 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -23,7 +23,9 @@ expect_broken_for_10037 = expect_broken_for( # e.g. prof and profllvm test('heapprof001', - [when(have_profiling(), extra_ways(extra_prof_ways)), extra_run_opts('7')], + [when(have_profiling(), extra_ways(extra_prof_ways)), + when(arch('i386'), expect_broken_for(15382, ['prof_hc_hb'])), + extra_run_opts('7')], compile_and_run, ['']) test('T2592', From git at git.haskell.org Mon Jan 7 17:18:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:53 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: testsuite: Mark objcpp-hi and T13366 as broken on Darwin due to #16083 (ee6cf4b) Message-ID: <20190107171853.6372A3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/ee6cf4b33936ff4baeded74c1945c766e5259b7d/ghc >--------------------------------------------------------------- commit ee6cf4b33936ff4baeded74c1945c766e5259b7d Author: Ben Gamari Date: Sat Dec 22 10:01:46 2018 -0500 testsuite: Mark objcpp-hi and T13366 as broken on Darwin due to #16083 (cherry picked from commit 1c0c5e844226f3d77af31d97b21ffb8b14b55740) >--------------------------------------------------------------- ee6cf4b33936ff4baeded74c1945c766e5259b7d testsuite/tests/driver/objc/all.T | 1 + testsuite/tests/th/all.T | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/driver/objc/all.T b/testsuite/tests/driver/objc/all.T index 68b7628..894de0c 100644 --- a/testsuite/tests/driver/objc/all.T +++ b/testsuite/tests/driver/objc/all.T @@ -15,5 +15,6 @@ test('objc-hi', test('objcpp-hi', [ skip_if_not_osx, objcpp_src, + when(opsys('darwin'), expect_broken(16083)), expect_fail_for(['ghci']) ], compile_and_run, ['-framework Foundation -lstdc++']) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index ddc2708..cd39e48 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -383,7 +383,10 @@ test('T13018', normal, compile, ['-v0']) test('T13123', normal, compile, ['-v0']) test('T13098', normal, compile, ['-v0']) test('T11046', normal, multimod_compile, ['T11046','-v0']) -test('T13366', expect_broken_for(13366, ['ghci']), compile_and_run, ['-lstdc++ -v0']) +test('T13366', + [expect_broken_for(13366, ['ghci']), when(opsys('darwin'), expect_broken(16083))], + compile_and_run, + ['-lstdc++ -v0']) test('T13473', normal, multimod_compile_and_run, ['T13473.hs', '-v0 ' + config.ghc_th_way_flags]) test('T13587', expect_broken(13587), compile_and_run, ['-v0']) From git at git.haskell.org Mon Jan 7 17:18:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 7 Jan 2019 17:18:57 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: Fix recompilation bug with default class methods (#15970) (08cfa61) Message-ID: <20190107171857.7DBC43ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/08cfa6153171d7289e799b97940f51d322d8dd32/ghc >--------------------------------------------------------------- commit 08cfa6153171d7289e799b97940f51d322d8dd32 Author: Simon Marlow Date: Tue Dec 11 13:18:47 2018 -0500 Fix recompilation bug with default class methods (#15970) If a module uses a class, then it can instantiate the class and thereby use its default methods, so we must include the default methods when calculating the fingerprint for the class. Test Plan: New unit test: driver/T15970 Before: ``` =====> T15970(normal) 1 of 1 [0, 0, 0] cd "T15970.run" && $MAKE -s --no-print-directory T15970 Wrong exit code for T15970()(expected 0 , actual 2 ) Stdout ( T15970 ): Makefile:13: recipe for target 'T15970' failed Stderr ( T15970 ): C.o:function Main_zdfTypeClassMyDataType1_info: error: undefined reference to 'A_toTypedData2_closure' C.o:function Main_main1_info: error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x298): error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x480): error: undefined reference to 'A_toTypedData2_closure' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) ``` After: test passes. Reviewers: bgamari, simonpj, erikd, watashi, afarmer Subscribers: rwbarton, carter GHC Trac Issues: #15970 Differential Revision: https://phabricator.haskell.org/D5394 (cherry picked from commit 288f681e06accbae690c46eb8a6e997fa9e5f56a) >--------------------------------------------------------------- 08cfa6153171d7289e799b97940f51d322d8dd32 compiler/iface/MkIface.hs | 78 ++++++++++++++++++++++++++++------ testsuite/tests/driver/T15970/A1.hs | 13 ++++++ testsuite/tests/driver/T15970/A2.hs | 13 ++++++ testsuite/tests/driver/T15970/B.hs | 9 ++++ testsuite/tests/driver/T15970/C.hs | 15 +++++++ testsuite/tests/driver/T15970/Makefile | 17 ++++++++ testsuite/tests/driver/T15970/all.T | 2 + 7 files changed, 134 insertions(+), 13 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 08cfa6153171d7289e799b97940f51d322d8dd32 From git at git.haskell.org Tue Jan 8 12:51:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 8 Jan 2019 12:51:39 +0000 (UTC) Subject: [commit: nofib] branch 'distclean-git-clean' created Message-ID: <20190108125139.336A13ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : distclean-git-clean Referencing: 58f710d162962bf20f6e39faccf35c436712c266 From git at git.haskell.org Tue Jan 8 12:51:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 8 Jan 2019 12:51:41 +0000 (UTC) Subject: [commit: nofib] distclean-git-clean: Make `git clean -nxd` silent after `make distclean` (58f710d) Message-ID: <20190108125141.3A93E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : distclean-git-clean Link : http://ghc.haskell.org/trac/ghc/changeset/58f710d162962bf20f6e39faccf35c436712c266/nofib >--------------------------------------------------------------- commit 58f710d162962bf20f6e39faccf35c436712c266 Author: Sebastian Graf Date: Tue Jan 8 13:45:02 2019 +0100 Make `git clean -nxd` silent after `make distclean` Also check that invariant in CI: After a `make distclean` `git clean -nxd` should find no files. The hope is that this catches cases were a `make clean` would forget to list a `.gitignore`d file that should either be registered as a `(DIST_)CLEAN_FILE` or should be unignored and committed into the repository. >--------------------------------------------------------------- 58f710d162962bf20f6e39faccf35c436712c266 .gitlab-ci.yml | 6 ++++++ nofib-analyse/Makefile | 13 +++++++++++-- real/maillist/Makefile | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1acca61..cb47c1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,3 +11,9 @@ validate: - make boot mode=fast - "make mode=fast NoFibRuns=1 2>&1 | tee log" - "nofib-analyse/nofib-analyse log" + - # The following checks that `make distclean` removes any files reported + - # by `git clean -fxd` + - make distclean + - files=$(git clean -nxd | cut -d' ' -f3) + - echo $files + - [ -z $files ] || exit 1 diff --git a/nofib-analyse/Makefile b/nofib-analyse/Makefile index 5691121..0e9236b 100644 --- a/nofib-analyse/Makefile +++ b/nofib-analyse/Makefile @@ -10,8 +10,17 @@ all :: $(PROG) boot :: $(PROG) -clean: - rm -f $(PROG) +# This clean hierarchy mirrors mk/ghc-target.mk. +# See mk/ghc-paths.mk for the semantics. + +.PHONY: mostlyclean clean distclean maintainer-clean + +mostlyclean:: rm -f CmdLine.hi GenUtils.hi Main.hi Slurp.hi rm -f CmdLine.o GenUtils.o Main.o Slurp.o +clean:: mostlyclean + rm -f $(PROG) + +distclean:: clean +maintainer-clean:: distclean diff --git a/real/maillist/Makefile b/real/maillist/Makefile index cfa1f48..ef6c11f 100644 --- a/real/maillist/Makefile +++ b/real/maillist/Makefile @@ -2,3 +2,4 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/target.mk +CLEAN_FILES += runtime_files/addresses.tex From git at git.haskell.org Tue Jan 8 20:53:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 8 Jan 2019 20:53:43 +0000 (UTC) Subject: [commit: ghc] branch 'wip/gitlab-ci-perf-notes' created Message-ID: <20190108205343.8DC243ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/gitlab-ci-perf-notes Referencing: 16bd9dc3ed65fdcb10312c195ad5e899f81fd8a7 From git at git.haskell.org Tue Jan 8 20:53:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 8 Jan 2019 20:53:47 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes: Performance tests: recover a baseline (expected value) from ancestor commits and CI results. (16bd9dc) Message-ID: <20190108205347.098D93ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes Link : http://ghc.haskell.org/trac/ghc/changeset/16bd9dc3ed65fdcb10312c195ad5e899f81fd8a7/ghc >--------------------------------------------------------------- commit 16bd9dc3ed65fdcb10312c195ad5e899f81fd8a7 Author: David Eichmann Date: Thu Dec 20 09:56:23 2018 -0700 Performance tests: recover a baseline (expected value) from ancestor commits and CI results. >--------------------------------------------------------------- 16bd9dc3ed65fdcb10312c195ad5e899f81fd8a7 .circleci/config.yml | 2 +- .gitlab-ci.yml | 46 ++++++++- .gitlab/push-test-metrics.sh | 77 ++++++++++++++++ testsuite/driver/perf_notes.py | 200 ++++++++++++++++++++++++++++++++++++++-- testsuite/driver/runtests.py | 35 +++++-- testsuite/driver/testglobals.py | 12 ++- testsuite/driver/testlib.py | 69 ++++++-------- testsuite/driver/testutil.py | 2 +- 8 files changed, 380 insertions(+), 63 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 16bd9dc3ed65fdcb10312c195ad5e899f81fd8a7 From git at git.haskell.org Wed Jan 9 13:52:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 13:52:36 +0000 (UTC) Subject: [commit: nofib] branch 'reenable-cacheprof' created Message-ID: <20190109135236.A01883ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : reenable-cacheprof Referencing: 626289f56dadde8d41155a800ce223d290795f35 From git at git.haskell.org Wed Jan 9 13:52:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 13:52:38 +0000 (UTC) Subject: [commit: nofib] reenable-cacheprof: Re-enable cacheprof (626289f) Message-ID: <20190109135238.A6FE73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : reenable-cacheprof Link : http://ghc.haskell.org/trac/ghc/changeset/626289f56dadde8d41155a800ce223d290795f35/nofib >--------------------------------------------------------------- commit 626289f56dadde8d41155a800ce223d290795f35 Author: Sebastian Graf Date: Wed Jan 9 14:52:10 2019 +0100 Re-enable cacheprof >--------------------------------------------------------------- 626289f56dadde8d41155a800ce223d290795f35 real/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/real/Makefile b/real/Makefile index ce7d850..64a9e8e 100644 --- a/real/Makefile +++ b/real/Makefile @@ -1,7 +1,7 @@ TOP = .. include $(TOP)/mk/boilerplate.mk -SUBDIRS = anna bspt compress compress2 fem fluid fulsom gamteb gg \ +SUBDIRS = anna bspt cacheprof compress compress2 fem fluid fulsom gamteb gg \ grep hidden hpg infer lift linear maillist mkhprog parser pic prolog \ reptile rsa scs symalg veritas eff From git at git.haskell.org Wed Jan 9 17:34:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 17:34:42 +0000 (UTC) Subject: [commit: nofib] master: Stabilise benchmarks wrt. GC (8632268) Message-ID: <20190109173442.1E5EB3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8632268ad8405f0c01aaad3ad16e23c65771ba49/nofib >--------------------------------------------------------------- commit 8632268ad8405f0c01aaad3ad16e23c65771ba49 Author: Sebastian Graf Date: Sun Dec 30 19:36:23 2018 +0100 Stabilise benchmarks wrt. GC Summary: This is due to #15999, a follow-up on #5793 and #15357 and changes all benchmarks, some of them (i.e. `wheel-sieve1`, `awards`) rather drastically. The general plan is outlined in #15999: Identify GC-sensitive benchmarks by looking at how productivity rates change over different nursery sizes and iterate `main` of these benchmarks often enough for the non-monotony and discontinuities to go away. I was paying attention that the benchmarked logic is actually run $n times more often, rather than just benchmarking IO operations printing the result of CAFs. When I found benchmarks with insignificant runtime (#15357), I made sure that parameters/input files were adjusted so that runtime of the different modes fall within the ranges proposed in https://ghc.haskell.org/trac/ghc/ticket/15357#comment:4 - fast: 0.1-0.2s - norm: 1-2s - slow: 5-10s This is what I did: - Stabilise bernoulli - Stabilise digits-of-e1 - Stabilise digits-of-e2 - Stabilise gen_regexp - Adjust running time of integrate - Adjust running time of kahan - Stabilise paraffins - Stabilise primes - Adjust running time of rfib - Adjust running time of tak - Stabilise wheel-sieve1 - Stabilise wheel-sieve2 - Adjust running time of x2n1 - Adjust running time of ansi - Adjust running time of atom - Make awards benchmark something other than IO - Adjust running time of banner - Stabilise boyer - Adjust running time of boyer2 - Adjust running time of queens - Adjust running time of calendar - Adjust runtime of cichelli - Stabilise circsim - Stabilise clausify - Stabilise constraints with moderate success - Adjust running time of cryptarithm1 - Adjust running time of cryptarythm2 - Adjust running time of cse - Adjust running time of eliza - Adjust running time of exact-reals - Adjust running time of expert - Stabilise fft2 - Stabilise fibheaps - Stabilise fish - Adjust running time for gcd - Stabilise comp_lab_zift - Stabilise event - Stabilise fft - Stabilise genfft - Stabilise ida - Adjust running time for listcompr - Adjust running time for listcopy - Adjust running time of nucleic2 - Attempt to stabilise parstof - Stabilise sched - Stabilise solid - Adjust running time of transform - Adjust running time of typecheck - Stabilise wang - Stabilise wave4main - Adjust running time of integer - Adjust running time of knights - Stabilise lambda - Stabilise lcss - Stabilise life - Stabilise mandel - Stabilise mandel2 - Adjust running time of mate - Stabilise minimax - Adjust running time of multiplier - Adjust running time of para - Stabilise power - Adjust running time of primetest - Stabilise puzzle with mild success - Adjust running time for rewrite - Stabilise simple with mild success - Stabilise sorting - Stabilise sphere - Stabilise treejoin - Stabilise anna - Stabilise bspt - Stabilise cacheprof - Stablise compress - Stablise compress2 - Stabilise fem - Adjust running time of fluid - Stabilise fulsom - Stabilise gamteb - Stabilise gg - Stabilise grep - Adjust running time of hidden - Stabilise hpg - Stabilise infer - Stabilise lift - Stabilise linear - Attempt to stabilise maillist - Stabilise mkhprog - Stabilise parser - Stabilise pic - Stabilise prolog - Attempt to stabilise reptile - Adjust running time of rsa - Adjust running time of scs - Stabilise symalg - Stabilise veritas - Stabilise binary-trees - Adjust running time of fasta - Adjust running time of k-nucleotide - Adjust running time of pidigits - Adjust running time of reverse-complement - Adjust running time of spectral-norm - Adjust running time of fannkuch-redux - Adjust running time for n-body Problematic benchmarks: - `last-piece`: Unclear how to stabilise. Runs for 300ms and I can't make up smaller inputs because I don't understand what it does. - `pretty`: It's just much too small to be relevant at all. Maybe we want to get rid of this one? - `scc`: Same as `pretty`. The input graph for which SCC analysis is done is much too small and I can't find good directed example graphs on the internet. - `secretary`: Apparently this needs `-package random` and consequently hasn't been run for a long time. - `simple`: Same as `last-piece`. Decent runtime (70ms), but it's unstable and I see no way to iterate it ~100 times in fast mode. - `eff`: Every benchmark is problematic here. Not from the point of view of allocations, but because the actual logic is vacuous. IMO, these should be performance tests, not actual benchmarks. Alternatively, write an actual application that makes use of algebraic effects. - `maillist`: Too trivial. It's just String/list manipulation, not representative of any Haskell code we would write today (no use of base library functions which could be fused, uses String instead of Text). It's only 75 loc according to `cloc`, that's not a `real` application. Reviewers: simonpj, simonmar, bgamari, AndreasK, osa1, alpmestan, O26 nofib GHC Trac Issues: #15999 Differential Revision: https://phabricator.haskell.org/D5438 >--------------------------------------------------------------- 8632268ad8405f0c01aaad3ad16e23c65771ba49 .gitignore | 8 +- README.md | 113 +- Simon-nofib-notes | 6 - common/NofibUtils.hs | 30 + imaginary/bernouilli/Main.hs | 7 +- imaginary/bernouilli/Makefile | 6 +- imaginary/bernouilli/NofibUtils.hs | 1 + imaginary/bernouilli/bernouilli.faststdout | 501 +- imaginary/bernouilli/bernouilli.slowstdout | 500 + imaginary/bernouilli/bernouilli.stdout | 501 +- imaginary/digits-of-e1/Main.lhs | 17 +- imaginary/digits-of-e1/Makefile | 6 +- imaginary/digits-of-e1/NofibUtils.hs | 1 + imaginary/digits-of-e1/digits-of-e1.faststdout | 101 +- imaginary/digits-of-e1/digits-of-e1.slowstdout | 101 +- imaginary/digits-of-e1/digits-of-e1.stdout | 101 +- imaginary/digits-of-e2/Main.lhs | 13 +- imaginary/digits-of-e2/Makefile | 6 +- imaginary/digits-of-e2/NofibUtils.hs | 1 + imaginary/digits-of-e2/digits-of-e2.faststdout | 101 +- imaginary/digits-of-e2/digits-of-e2.slowstdout | 101 +- imaginary/digits-of-e2/digits-of-e2.stdout | 101 +- imaginary/exp3_8/Makefile | 2 + imaginary/gen_regexps/Main.hs | 6 +- imaginary/gen_regexps/Makefile | 3 + imaginary/gen_regexps/gen_regexps.faststdin | 1 - imaginary/gen_regexps/gen_regexps.faststdout | 101 +- imaginary/gen_regexps/gen_regexps.slowstdout | 100 + imaginary/gen_regexps/gen_regexps.stdin | 1 - imaginary/gen_regexps/gen_regexps.stdout | 101 +- imaginary/integrate/Makefile | 4 +- imaginary/integrate/integrate.stdout | 2 +- imaginary/kahan/Main.hs | 9 +- imaginary/kahan/Makefile | 6 +- imaginary/kahan/kahan.faststdout | 1 - imaginary/kahan/kahan.faststdout-x86-linux | 1 - imaginary/kahan/kahan.slowstdout | 1 - imaginary/kahan/kahan.slowstdout-x86-linux | 1 - imaginary/kahan/kahan.stdout | 1 - imaginary/kahan/kahan.stdout-x86-linux | 1 - imaginary/paraffins/Main.hs | 3 +- imaginary/paraffins/Makefile | 7 +- imaginary/paraffins/paraffins.faststdout | 4004 +- imaginary/paraffins/paraffins.slowstdout | 4000 + imaginary/paraffins/paraffins.stdout | 4004 +- imaginary/primes/Main.hs | 12 +- imaginary/primes/Makefile | 6 +- imaginary/primes/primes.faststdout | 101 +- imaginary/primes/primes.slowstdout | 101 +- imaginary/primes/primes.stdout | 101 +- imaginary/queens/Makefile | 4 +- imaginary/queens/queens.faststdout | 2 +- imaginary/queens/queens.slowstdout | 1 + imaginary/rfib/Makefile | 2 +- imaginary/rfib/rfib.slowstdout | 1 + imaginary/tak/Makefile | 6 +- imaginary/tak/{tak.stdout => tak.slowstdout} | 0 imaginary/wheel-sieve1/Main.hs | 30 +- imaginary/wheel-sieve1/Makefile | 6 +- imaginary/wheel-sieve1/wheel-sieve1.faststdout | 101 +- imaginary/wheel-sieve1/wheel-sieve1.slowstdout | 101 +- imaginary/wheel-sieve1/wheel-sieve1.stdout | 101 +- imaginary/wheel-sieve2/Main.hs | 30 +- imaginary/wheel-sieve2/Makefile | 6 +- imaginary/wheel-sieve2/wheel-sieve2.faststdout | 101 +- imaginary/wheel-sieve2/wheel-sieve2.slowstdout | 100 + imaginary/wheel-sieve2/wheel-sieve2.stdout | 101 +- imaginary/x2n1/Makefile | 6 +- imaginary/x2n1/x2n1.faststdout | 2 +- imaginary/x2n1/x2n1.slowstdout | 1 + imaginary/x2n1/x2n1.stdout | 2 +- real/anna/Main.hs | 19 +- real/anna/Makefile | 6 +- real/anna/NofibUtils.hs | 1 + real/anna/anna.faststdin | 268 - real/anna/anna.faststdout | 2000 +- real/anna/{anna.stdin => anna.full} | 0 real/anna/anna.slowstdin | 603 + real/anna/anna.slowstdout | 100 + real/anna/anna.stdin | 1039 - real/anna/anna.stdout | 6101 +- real/bspt/Input.lhs | 3 +- real/bspt/Main.hs | 12 + real/bspt/Main.lhs | 8 - real/bspt/Makefile | 3 + real/bspt/NofibUtils.hs | 1 + real/bspt/{Prog.lhs => Prog.hs} | 2 - real/bspt/bspt.faststdout | 2500 + real/bspt/bspt.slowstdout | 125000 +++++++++ real/bspt/bspt.stdout | 25004 +- real/cacheprof/Main.hs | 80 +- real/cacheprof/cacheprof.faststdin | 76 + .../cacheprof/cacheprof.full | 0 real/cacheprof/cacheprof.slowstdin | 3040 + real/cacheprof/cacheprof.stdin | 13108 - real/cacheprof/cacheprof.stdout | 107220 -------- real/compress/Main.hs | 15 +- real/compress/Makefile | 9 +- real/compress/NofibUtils.hs | 1 + real/compress/compress.faststdin | 20051 +- real/compress/compress.faststdout | 201 +- real/compress/compress.slowstdin | 298 + real/compress/compress.slowstdout | 200 + real/compress/compress.stdin | 147 + real/compress/compress.stdout | 201 +- real/compress2/Main.hs | 15 +- real/compress2/Makefile | 11 +- real/compress2/NofibUtils.hs | 1 + real/compress2/compress2.faststdin | 20051 +- real/compress2/compress2.faststdout | 501 +- real/compress2/compress2.slowstdin | 298 + real/compress2/compress2.slowstdout | 500 + real/compress2/compress2.stdin | 147 + real/compress2/compress2.stdout | 501 +- real/fem/Main.hs | 32 +- real/fem/Makefile | 4 + real/fem/NofibUtils.hs | 1 + real/fem/fem.stdout | 257 - real/fem/fem.stdout-linux | 257 - real/fem/fem.stdout-x86-linux | 257 - real/fem/fem.stdout1 | 257 - real/fem/fem.stdout2 | 257 - real/fluid/Main.hs | 49 +- real/fluid/Makefile | 3 + real/fluid/NofibUtils.hs | 1 + real/fluid/fluid.stdout | 6 - real/fluid/fluid.stdout-freebsd | 6 - real/fluid/fluid.stdout-linux | 6 - real/fluid/fluid.stdout1 | 6 - real/fulsom/Main.hs | 6 +- real/fulsom/Makefile | 8 +- real/fulsom/NofibUtils.hs | 1 + real/fulsom/fulsom.faststdout | Bin 87916 -> 20000 bytes real/fulsom/fulsom.slowstdout | 1000 + real/fulsom/fulsom.stdout | Bin 346864 -> 20000 bytes real/gamteb/Main.hs | 15 +- real/gamteb/Makefile | 3 + real/gamteb/NofibUtils.hs | 1 + real/gamteb/gamteb.faststdin | 1 - real/gamteb/gamteb.faststdout | 2748 +- real/gamteb/gamteb.faststdout1 | 2548 - real/gamteb/gamteb.slowstdout | 200 + real/gamteb/gamteb.stderr | 1 - real/gamteb/gamteb.stdin | 1 - real/gamteb/gamteb.stdout | 80629 +----- real/gg/Main.hs | 13 +- real/gg/Makefile | 4 + real/gg/NofibUtils.hs | 1 + real/gg/gg.faststdin | 46 + real/gg/gg.faststdout | 150 + real/gg/{gg.stdin => gg.slowstdin} | 0 real/gg/gg.slowstdout | 1500 + real/gg/gg.stdin | 86 - real/gg/gg.stdout | 1723 +- real/grep/Main.lhs | 19 +- real/grep/Makefile | 7 +- real/grep/NofibUtils.hs | 1 + real/grep/grep.faststdin | 174 + real/grep/grep.faststdout | 100 + real/grep/grep.slowstdin | 4000 + real/grep/grep.slowstdout | 250 + real/grep/grep.stdin | 1000 + real/grep/grep.stdout | 169 +- real/hidden/Main.hs | 12 +- real/hidden/Makefile | 4 +- real/hidden/MyIO.hs | 5 +- real/hidden/NofibUtils.hs | 1 + real/hidden/hidden.stderr | 76 + real/hidden/hidden.stdout | 452 - real/hidden/hidden.stdout-x86-linux | 454 - real/hidden/hidden.stdout2 | 460 - real/hidden/hidden.stdout3 | 448 - real/hidden/hidden.stdout4 | 458 - real/hidden/hidden.stdout5 | 458 - real/hpg/Main.lhs | 5 +- real/hpg/Makefile | 8 +- real/hpg/NofibUtils.hs | 1 + real/hpg/Utils.lhs | 4 +- real/hpg/hpg.faststdout | 3162 +- real/hpg/hpg.slowstdout | 300 + real/hpg/hpg.stdout | 25744 +- real/infer/Main.hs | 16 +- real/infer/NofibUtils.hs | 1 + real/infer/infer.faststdin | 16 + real/infer/infer.faststdout | 200 + real/infer/{infer.stdin => infer.slowstdin} | 0 real/infer/infer.slowstdout | 200 + real/infer/infer.stdin | 2 +- real/infer/infer.stdout | 220 +- real/lift/Main.lhs | 25 +- real/lift/Makefile | 4 + real/lift/NofibUtils.hs | 1 + real/lift/lift.faststdout | 400 + real/lift/lift.slowstdout | 20000 ++ real/lift/lift.stdout | 4094 +- real/linear/Main.lhs | 12 +- real/linear/Makefile | 3 + real/linear/NofibUtils.hs | 1 + real/linear/linear.faststdout | 200 + real/linear/linear.slowstdout | 200 + real/linear/linear.stdout | 256 +- real/maillist/Main.hs | 8 +- real/maillist/Makefile | 3 + real/maillist/maillist.faststdout | 600 + real/maillist/maillist.slowstdout | 600 + real/maillist/maillist.stdin | 1 - real/maillist/maillist.stdout | 596 +- real/maillist/runtime_files/fast | 4 + real/maillist/runtime_files/norm | 584 + real/maillist/runtime_files/{addresses => slow} | 0 real/mkhprog/Main.lhs | 14 +- real/mkhprog/Makefile | 9 +- real/mkhprog/NofibUtils.hs | 1 + real/mkhprog/mkhprog.stdout | 113 - real/parser/Main.hs | 14 +- real/parser/Makefile | 3 - real/parser/NofibUtils.hs | 1 + real/parser/parser.faststdin | 40 + real/parser/parser.faststdout | 500 + real/parser/{big_big_test.hs => parser.slowstdin} | 0 real/parser/parser.slowstdout | 500 + real/parser/parser.stdin | 297 + real/parser/parser.stdout | 508 +- real/pic/Main.hs | 13 +- real/pic/Makefile | 6 + real/pic/NofibUtils.hs | 1 + real/pic/pic.stderr | 1 - real/pic/pic.stdin | 1 - real/pic/pic.stdout | 1 - real/pic/pic.stdout-linux | 1 - real/pic/pic.stdout-linux2 | 1 - real/pic/pic.stdout-mingw | 1 - real/pic/pic.stdout1 | 1 - real/pic/pic.stdout3 | 1 - real/pic/pic.stdout4 | 1 - real/prolog/Main.hs | 12 +- real/prolog/NofibUtils.hs | 1 + real/prolog/{prolog.stdin => prolog.faststdin} | 0 real/prolog/prolog.faststdout | 203 + real/prolog/prolog.slowstdin | 1203 + real/prolog/prolog.slowstdout | 203 + real/prolog/prolog.stdin | 252 +- real/prolog/prolog.stdout | 279 +- real/reptile/Main.hs | 30 +- real/reptile/NofibUtils.hs | 1 + real/reptile/reptile.faststdin | 1 + real/reptile/reptile.faststdout | 500 + real/reptile/reptile.slowstdin | 66 + real/reptile/reptile.slowstdout | 500 + real/reptile/reptile.stdout | 507 +- real/rsa/Main.hs | 13 +- real/rsa/NofibUtils.hs | 1 + real/rsa/rsa.faststdin | 7 + real/rsa/rsa.faststdout | 100 + real/rsa/rsa.slowstdin | 377 + real/rsa/rsa.slowstdout | 100 + real/rsa/rsa.stdin | 3493 - real/rsa/rsa.stdout | 1443 +- real/scs/Makefile | 4 +- real/symalg/NofibUtils.hs | 1 + real/symalg/Print.hs | 5 +- real/symalg/symalg.faststdin | 262 +- real/symalg/symalg.faststdout | 266 +- real/symalg/symalg.slowstdin | 263 + real/symalg/symalg.slowstdout | 264 + real/symalg/symalg.stdin | 262 +- real/symalg/symalg.stdout | 266 +- real/veritas/Main.hs | 9 +- real/veritas/Makefile | 7 + real/veritas/NofibUtils.hs | 1 + real/veritas/veritas.faststdout | 400 + real/veritas/veritas.slowstdout | 20000 ++ real/veritas/veritas.stdout | Bin 1391 -> 84000 bytes shootout/binary-trees/Main.hs | 28 +- shootout/binary-trees/Makefile | 9 +- shootout/binary-trees/binary-trees.faststdout | 97 +- shootout/binary-trees/binary-trees.slowstdout | 491 +- shootout/binary-trees/binary-trees.stdout | 359 +- shootout/fannkuch-redux/Makefile | 9 +- shootout/fannkuch-redux/fannkuch-redux.slowstdout | 2 - shootout/fasta/Makefile | 4 +- shootout/k-nucleotide/Makefile | 9 +- shootout/k-nucleotide/k-nucleotide.faststdout | 50 +- shootout/k-nucleotide/k-nucleotide.slowstdout | 18 +- shootout/k-nucleotide/k-nucleotide.stdout | 40 +- shootout/n-body/Makefile | 8 +- shootout/n-body/n-body.slowstdout | 2 +- shootout/pidigits/Makefile | 8 +- shootout/pidigits/pidigits.faststdout | 150 + shootout/pidigits/pidigits.slowstdout | 1200 + shootout/pidigits/pidigits.stdout | 300 + shootout/reverse-complement/Makefile | 16 +- shootout/spectral-norm/Makefile | 4 +- shootout/spectral-norm/spectral-norm.faststdout | 2 +- spectral/ansi/Makefile | 6 +- spectral/ansi/ansi.faststdout | 1 + spectral/ansi/ansi.slowstdout | 2 +- spectral/ansi/ansi.stdout | 2 +- spectral/ansi/{ansi.slowstdout => blub} | 2 +- spectral/atom/Makefile | 6 +- spectral/atom/atom.faststdout | 600 + spectral/atom/{atom.stdout => atom.slowstdout} | 2000 + spectral/atom/atom.stdout | 500 + spectral/awards/Main.hs | 17 +- spectral/awards/Makefile | 31 +- spectral/awards/awards.faststdout | 2000 + spectral/awards/awards.stdout | 1 - spectral/banner/Main.hs | 4 +- spectral/banner/Makefile | 34 + .../banner/{banner.stdin => banner.stdin.template} | 0 spectral/banner/banner.stdout | 6 - spectral/banner/banner.stdout.template | 12 + spectral/boyer/Main.lhs | 3 +- spectral/boyer/Makefile | 6 +- spectral/boyer/boyer.faststdout | 100 + spectral/boyer/boyer.slowstdout | 100 + spectral/boyer/boyer.stdout | 99 + spectral/boyer2/Main.hs | 30 +- spectral/boyer2/Makefile | 3 + spectral/boyer2/boyer2.faststdout | 60 + spectral/boyer2/boyer2.slowstdout | 3000 + spectral/boyer2/boyer2.stdout | 599 + spectral/calendar/Main.hs | 24 +- spectral/calendar/Makefile | 6 +- .../{calendar.slowstdout => calendar.faststdout} | 1000 - spectral/calendar/calendar.slowstdout | 48000 ++++ spectral/calendar/calendar.stdout | 9999 + spectral/cichelli/Auxil.hs | 6 +- spectral/cichelli/Main.hs | 12 +- spectral/cichelli/Makefile | 3 + spectral/cichelli/Prog.hs | 12 +- spectral/cichelli/cichelli.faststdout | 1 + spectral/cichelli/cichelli.slowstdout | 1 + spectral/cichelli/cichelli.stdout | 2 +- spectral/circsim/Main.lhs | 6 +- spectral/circsim/Makefile | 6 +- spectral/circsim/circsim.faststdout | 98 +- spectral/circsim/circsim.slowstdout | 98 +- spectral/circsim/circsim.stdout | 98 +- spectral/clausify/Main.hs | 3 +- spectral/clausify/Makefile | 6 +- spectral/clausify/clausify.faststdout | 60 + spectral/clausify/clausify.slowstdout | 2345 + spectral/clausify/clausify.stdout | 269 + spectral/constraints/Main.hs | 13 +- spectral/constraints/Makefile | 7 +- spectral/constraints/constraints.faststdout | 1205 +- spectral/constraints/constraints.slowstdout | 1200 + spectral/constraints/constraints.stdout | 1205 +- spectral/cryptarithm1/Main.hs | 16 +- spectral/cryptarithm1/Makefile | 3 + ...cryptarithm1.stdout => cryptarithm1.faststdout} | 0 spectral/cryptarithm1/cryptarithm1.slowstdout | 15 + spectral/cryptarithm1/cryptarithm1.stdout | 2 + spectral/cryptarithm2/Main.hs | 20 +- spectral/cryptarithm2/Makefile | 4 + spectral/cryptarithm2/cryptarithm2.faststdout | 300 + spectral/cryptarithm2/cryptarithm2.slowstdout | 15000 ++ spectral/cryptarithm2/cryptarithm2.stdout | 2990 + spectral/cse/Main.hs | 34 +- spectral/cse/Makefile | 3 + .../soda7.stdout => spectral/cse/cse.faststdout | 0 .../soda7.stdout => spectral/cse/cse.slowstdout | 0 spectral/cse/cse.stdout | 221 - spectral/eliza/Main.hs | 22 +- spectral/eliza/Makefile | 3 + spectral/eliza/eliza.faststdout | 1300 + spectral/eliza/eliza.slowstdout | 65000 +++++ spectral/eliza/eliza.stdout | 13032 +- spectral/exact-reals/Era.hs | 6 +- spectral/exact-reals/Makefile | 3 + spectral/expert/Main.hs | 20 +- spectral/expert/Makefile | 4 + spectral/expert/expert.faststdout | 1000 + spectral/expert/expert.slowstdout | 50000 ++++ spectral/expert/expert.stdout | 10016 +- spectral/fft2/Main.lhs | 7 +- spectral/fft2/Makefile | 6 +- spectral/fft2/fft2.stdout | 1 - spectral/fibheaps/Main.lhs | 6 +- spectral/fibheaps/Makefile | 6 +- spectral/fibheaps/fibheaps.stdout | 1 - spectral/fish/Main.hs | 9 +- spectral/fish/Makefile | 3 + spectral/fish/fish.stdout | 9345 - spectral/gcd/Makefile | 6 +- spectral/gcd/gcd.faststdout | 2 +- spectral/gcd/gcd.slowstdout | 1 + spectral/gcd/gcd.stdout | 2 +- spectral/hartel/comp_lab_zift/Main.hs | 5 +- spectral/hartel/comp_lab_zift/Makefile | 6 +- .../hartel/comp_lab_zift/comp_lab_zift.faststdout | 101 +- .../hartel/comp_lab_zift/comp_lab_zift.slowstdout | 100 + spectral/hartel/comp_lab_zift/comp_lab_zift.stdout | 101 +- spectral/hartel/event/Main.hs | 5 +- spectral/hartel/event/Makefile | 6 +- spectral/hartel/event/event.faststdout | 100 + spectral/hartel/event/event.slowstdout | 100 + spectral/hartel/event/event.stdout | 99 + spectral/hartel/fft/Main.hs | 5 +- spectral/hartel/fft/Makefile | 6 +- spectral/hartel/fft/fft.faststdout | 361 +- spectral/hartel/fft/fft.slowstdout | 360 + spectral/hartel/fft/fft.stdout | 361 +- spectral/hartel/genfft/Main.hs | 5 +- spectral/hartel/genfft/Makefile | 6 +- spectral/hartel/genfft/genfft.faststdout | 301 +- spectral/hartel/genfft/genfft.slowstdout | 300 + spectral/hartel/genfft/genfft.stdout | 301 +- spectral/hartel/ida/Main.hs | 7 +- spectral/hartel/ida/Makefile | 11 +- spectral/hartel/ida/ida.faststdout | 3002 +- spectral/hartel/ida/ida.slowstdout | 6000 + spectral/hartel/ida/ida.stdout | 1202 +- spectral/hartel/listcompr/Main.hs | 6 +- spectral/hartel/listcompr/Makefile | 7 +- spectral/hartel/listcompr/listcompr.faststdout | 1 + spectral/hartel/listcompr/listcompr.slowstdout | 1 + spectral/hartel/listcompr/listcompr.stdout | 20001 +- spectral/hartel/listcopy/Main.hs | 6 +- spectral/hartel/listcopy/Makefile | 7 +- spectral/hartel/listcopy/listcopy.faststdout | 1 + spectral/hartel/listcopy/listcopy.slowstdout | 1 + spectral/hartel/listcopy/listcopy.stdout | 20001 +- spectral/hartel/nucleic2/Main.hs | 16 +- spectral/hartel/nucleic2/Makefile | 3 + spectral/hartel/nucleic2/nucleic2.stdout1 | 1 - spectral/hartel/nucleic2/nucleic2.stdout2 | 1 - spectral/hartel/nucleic2/nucleic2.stdout3 | 1 - spectral/hartel/nucleic2/nucleic2.stdout4 | 1 - spectral/hartel/nucleic2/nucleic2.stdout5 | 1 - spectral/hartel/nucleic2/nucleic2.stdout6 | 1 - spectral/hartel/parstof/Main.hs | 17 +- spectral/hartel/parstof/Makefile | 7 +- spectral/hartel/parstof/parstof.faststdout | 200 + spectral/hartel/parstof/parstof.slowstdout | 200 + spectral/hartel/parstof/parstof.stdout | 201 +- spectral/hartel/sched/Main.hs | 7 +- spectral/hartel/sched/Makefile | 6 +- spectral/hartel/sched/sched.faststdout | 201 +- spectral/hartel/sched/sched.slowstdout | 500 + spectral/hartel/sched/sched.stdout | 101 +- spectral/hartel/solid/Main.hs | 5 +- spectral/hartel/solid/Makefile | 6 +- spectral/hartel/solid/solid.faststdout | 1990 +- spectral/hartel/solid/solid.slowstdout | 4776 +- spectral/hartel/solid/solid.stdout | 3582 +- spectral/hartel/transform/Makefile | 6 +- spectral/hartel/transform/transform.faststdout | 2 +- spectral/hartel/transform/transform.slowstdout | 1 + spectral/hartel/transform/transform.stdout | 2 +- spectral/hartel/typecheck/Makefile | 6 +- spectral/hartel/typecheck/typecheck.faststdout | 2 +- spectral/hartel/typecheck/typecheck.slowstdout | 1 + spectral/hartel/typecheck/typecheck.stdout | 2 +- spectral/hartel/wang/Main.hs | 5 +- spectral/hartel/wang/Makefile | 6 +- spectral/hartel/wang/wang.faststdout | 501 +- spectral/hartel/wang/wang.slowstdout | 500 + spectral/hartel/wang/wang.stdout | 501 +- spectral/hartel/wave4main/Main.hs | 5 +- spectral/hartel/wave4main/Makefile | 6 +- spectral/hartel/wave4main/wave4main.faststdout | 501 +- spectral/hartel/wave4main/wave4main.slowstdout | 500 + spectral/hartel/wave4main/wave4main.stdout | 501 +- spectral/integer/Makefile | 6 +- spectral/knights/Main.lhs | 5 +- spectral/knights/Makefile | 6 +- spectral/knights/knights.faststdout | 130 +- spectral/knights/knights.slowstdout | 404 +- spectral/knights/knights.stdout | 138 +- spectral/lambda/Main.hs | 3 +- spectral/lambda/Makefile | 7 +- spectral/lambda/lambda.faststdout | 200 + spectral/lambda/lambda.slowstdout | 200 + spectral/lambda/lambda.stdout | 202 +- spectral/lcss/Main.hs | 3 +- spectral/lcss/Makefile | 6 +- spectral/lcss/lcss.faststdout | 501 +- spectral/lcss/lcss.slowstdout | 500 + spectral/lcss/lcss.stdout | 501 +- spectral/life/Main.hs | 16 +- spectral/life/Makefile | 3 + spectral/life/life.faststdout | 250 + spectral/life/life.slowstdout | 250 + spectral/life/life.stdout | 282 +- spectral/mandel/Main.hs | 33 + spectral/mandel/Main.lhs | 37 - spectral/mandel/Makefile | 7 +- spectral/mandel/mandel.slowstdin | 7 - spectral/mandel/mandel.slowstdout | Bin 67602 -> 0 bytes spectral/mandel/mandel.stderr | 1 - spectral/mandel/mandel.stdin | 7 - spectral/mandel/mandel.stdout | Bin 67601 -> 0 bytes spectral/mandel/mandel.stdout-mingw | Bin 67693 -> 0 bytes spectral/mandel2/Main.hs | 16 +- spectral/mandel2/Makefile | 3 + spectral/mandel2/mandel2.stdout | 1 - spectral/mate/Main.hs | 0 spectral/mate/Makefile | 4 +- spectral/mate/mate.faststdout | 20 + spectral/mate/{mate.stdout => mate.slowstdout} | 0 spectral/mate/mate.stdout | 70 +- spectral/minimax/Main.hs | 8 +- spectral/minimax/Makefile | 3 + spectral/minimax/Prog.hs | 6 +- spectral/minimax/minimax.stdout | 36 - spectral/multiplier/Makefile | 6 +- .../{multiplier.stdout => multiplier.faststdout} | 0 .../{multiplier.stdout => multiplier.slowstdout} | 0 spectral/para/Main.lhs | 14 +- spectral/para/Makefile | 5 +- spectral/para/para.stdout | 17253 -- spectral/power/Main.hs | 17 +- spectral/power/Makefile | 6 +- spectral/power/power.faststdout | 4 - spectral/power/power.stdout | 4 - spectral/primetest/primetest.faststdin | 4 + spectral/primetest/primetest.faststdout | 2 +- spectral/primetest/primetest.slowstdin | 300 + spectral/primetest/primetest.slowstdout | 1 + spectral/primetest/primetest.stdin | 30 + spectral/primetest/primetest.stdout | 2 +- spectral/puzzle/Main.hs | 21 +- spectral/puzzle/Makefile | 3 + spectral/puzzle/puzzle.stdout | 86 - spectral/rewrite/Makefile | 6 +- spectral/simple/Main.hs | 41 +- spectral/simple/Makefile | 6 +- spectral/simple/simple.stdin | 1 - spectral/simple/simple.stdout | 3 - spectral/simple/simple.stdout-linux | 3 - spectral/simple/simple.stdout1 | 3 - spectral/simple/simple.stdout2 | 3 - spectral/simple/simple.stdout3 | 3 - spectral/simple/simple.stdout4 | 3 - spectral/simple/simple.stdout5 | 3 - spectral/simple/simple.stdout6 | 3 - spectral/sorting/Main.hs | 37 +- spectral/sorting/Makefile | 5 +- spectral/sorting/NofibUtils.hs | 1 + spectral/sorting/sorting.faststdout | 600 + spectral/sorting/sorting.slowstdout | 3000 + spectral/sorting/sorting.stdout | 740 +- spectral/sphere/Main.lhs | 39 +- spectral/sphere/Makefile | 6 +- spectral/sphere/sphere.faststdout | 10103 +- spectral/sphere/sphere.slowstdout | 100 + spectral/sphere/sphere.stdout | 250103 +----------------- spectral/treejoin/Main.hs | 3 +- spectral/treejoin/Makefile | 7 +- spectral/treejoin/runtime_files/1500.1 | 1500 + spectral/treejoin/runtime_files/1500.2 | 1500 + spectral/treejoin/runtime_files/8000.1 | 8000 + spectral/treejoin/runtime_files/8000.2 | 8000 + spectral/treejoin/treejoin.stdout | 99 + 556 files changed, 532310 insertions(+), 623604 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 8632268ad8405f0c01aaad3ad16e23c65771ba49 From git at git.haskell.org Wed Jan 9 21:35:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:35:50 +0000 (UTC) Subject: [commit: ghc] branch 'wip/alp/hadrian-docs-crosslinking' created Message-ID: <20190109213550.21C8C3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/alp/hadrian-docs-crosslinking Referencing: 47d62d041bc62a5820776633541da839e5f06947 From git at git.haskell.org Wed Jan 9 21:35:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:35:52 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15971' created Message-ID: <20190109213552.226743ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15971 Referencing: 453dc7f2c53fec02a13f1a9b952f1c6f783a65ab From git at git.haskell.org Wed Jan 9 21:35:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:35:54 +0000 (UTC) Subject: [commit: ghc] branch 'wip/bump-cabal' created Message-ID: <20190109213554.2367D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/bump-cabal Referencing: 77cffedf5fc8b2061e44b37539688a658cacf8f1 From git at git.haskell.org Wed Jan 9 21:35:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:35:56 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16150' created Message-ID: <20190109213556.24B7D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16150 Referencing: 37a7a83772a643c307c06cfaba8c98e943d06fd1 From git at git.haskell.org Wed Jan 9 21:35:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:35:58 +0000 (UTC) Subject: [commit: ghc] branch 'wip/misc-testsuite' created Message-ID: <20190109213558.25CE13ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/misc-testsuite Referencing: ee93940fb6f2fcf483428d590f4897daea2e522a From git at git.haskell.org Wed Jan 9 21:36:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:01 +0000 (UTC) Subject: [commit: ghc] wip/T15971, wip/T16150, wip/alp/hadrian-docs-crosslinking, wip/misc-testsuite: fix-submodules: Rip out typing (1c9dab2) Message-ID: <20190109213601.288C63ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T15971,wip/T16150,wip/alp/hadrian-docs-crosslinking,wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/1c9dab22f010352884d6f7e5b62251bc4b0cca7c/ghc >--------------------------------------------------------------- commit 1c9dab22f010352884d6f7e5b62251bc4b0cca7c Author: Ben Gamari Date: Sat Jan 5 23:34:12 2019 -0500 fix-submodules: Rip out typing Debian Jessie only runs Python 3.4, whereas typing was introduced in Python 3.5. >--------------------------------------------------------------- 1c9dab22f010352884d6f7e5b62251bc4b0cca7c .gitlab/fix-submodules.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py index 621d692..548e960 100755 --- a/.gitlab/fix-submodules.py +++ b/.gitlab/fix-submodules.py @@ -6,7 +6,6 @@ clone their submodules from its usual location. Otherwise users would need to fork all submodules before their CI builds would succeed. """ -from typing import List, Dict from pathlib import Path import re @@ -16,7 +15,7 @@ open('.gitmodules', 'w').write(x) import subprocess -def get_configs(config_file: Path) -> Dict[str, str]: +def get_configs(config_file): args = ['git', 'config', '-f', config_file.as_posix(), '--list'] out = subprocess.check_output(args) configs = {} @@ -27,7 +26,7 @@ def get_configs(config_file: Path) -> Dict[str, str]: return configs -def set_config(config_file: Path, key: str, value: str) -> None: +def set_config(config_file, key, value): args = ['git', 'config', '-f', config_file.as_posix(), '--replace', key, value] subprocess.check_call(args) From git at git.haskell.org Wed Jan 9 21:36:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:04 +0000 (UTC) Subject: [commit: ghc] wip/T15971, wip/T16150, wip/alp/hadrian-docs-crosslinking, wip/misc-testsuite: gitlab-ci: Clone haddock from its upstream repository (c0448c1) Message-ID: <20190109213604.29BE23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T15971,wip/T16150,wip/alp/hadrian-docs-crosslinking,wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/c0448c18946e63bf47fc7da51c9bea2ee1b1740e/ghc >--------------------------------------------------------------- commit c0448c18946e63bf47fc7da51c9bea2ee1b1740e Author: Ben Gamari Date: Sat Jan 5 14:16:56 2019 -0500 gitlab-ci: Clone haddock from its upstream repository This ensures that changes requiring haddock changes can be built under CI. >--------------------------------------------------------------- c0448c18946e63bf47fc7da51c9bea2ee1b1740e .gitlab-ci.yml | 2 +- .gitlab/fix-submodules.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a18757b..67b2830 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,7 @@ validate-x86_64-darwin: LANG: "en_US.UTF-8" before_script: - git clean -xdf && git submodule foreach git clean -xdf - - python .gitlab/fix-submodules.py + - python3 .gitlab/fix-submodules.py - git submodule sync --recursive - git submodule update --init --recursive - git checkout .gitmodules diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py old mode 100644 new mode 100755 index 2ff8e41..621d692 --- a/.gitlab/fix-submodules.py +++ b/.gitlab/fix-submodules.py @@ -1,8 +1,54 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +""" +Fix submodule upstream URLs. This ensures that CI builds of GHC forks +clone their submodules from its usual location. Otherwise users would need to +fork all submodules before their CI builds would succeed. +""" + +from typing import List, Dict +from pathlib import Path import re x = open('.gitmodules').read() x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x) open('.gitmodules', 'w').write(x) +import subprocess + +def get_configs(config_file: Path) -> Dict[str, str]: + args = ['git', 'config', '-f', config_file.as_posix(), '--list'] + out = subprocess.check_output(args) + configs = {} + for line in out.decode('UTF-8').split('\n'): + if '=' in line: + k,v = line.split('=') + configs[k] = v + + return configs + +def set_config(config_file: Path, key: str, value: str) -> None: + args = ['git', 'config', '-f', config_file.as_posix(), '--replace', key, value] + subprocess.check_call(args) + +upstreams = { + 'utils/haddock': 'https://github.com/haskell/haddock' +} + +modules_config = Path('.gitmodules') + +def main(): + for k,v in get_configs(modules_config).items(): + match = re.match('submodule\.(.+)\.url', k) + if match is not None: + submod = match.group(1) + if submod in upstreams: + url = upstreams[submod] + else: + url = re.sub('\.\.', 'https://gitlab.haskell.org/ghc', v) + + print('Using {submod} from {url}'.format(submod=submod, url=url)) + set_config(modules_config, k, url) + +if __name__ == '__main__': + main() From git at git.haskell.org Wed Jan 9 21:36:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:07 +0000 (UTC) Subject: [commit: ghc] wip/T15971, wip/T16150, wip/alp/hadrian-docs-crosslinking, wip/misc-testsuite: Check that libs found by GCC aren't folders (6b5ec08) Message-ID: <20190109213607.2F5673ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T15971,wip/T16150,wip/alp/hadrian-docs-crosslinking,wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/6b5ec08a4a64525bae87a8c2202688ffc6f86aa8/ghc >--------------------------------------------------------------- commit 6b5ec08a4a64525bae87a8c2202688ffc6f86aa8 Author: Alec Theriault Date: Mon Jan 7 12:59:36 2019 -0800 Check that libs found by GCC aren't folders Summary: We use 'gcc -B --print-file-name mylib.a' as a way of checking if 'gcc' can discover 'mylib.a' at the given location. However, this can break down if there is a folder caller 'mylib.a' that 'gcc' can discover. We can guard against this by explicitly checking that the path returned by 'gcc' is a file. This may seem like a far-fetched scenario, but since 3d17f1f10fc00540ac052f2fd03182906aa47e35, we look for libraries without any prefix or suffix (ie. 'extra-libraries: softfloat', we look for just 'softfloat' as well as 'softloat.a', 'softfloat.dll.a', etc.) which means that there might actusally be a folder of that name in one of the base locations. Reviewers: Phyx, bgamari, hvr, angerman Reviewed By: Phyx, angerman Subscribers: angerman, rwbarton, carter GHC Trac Issues: #16063 Differential Revision: https://phabricator.haskell.org/D5462 >--------------------------------------------------------------- 6b5ec08a4a64525bae87a8c2202688ffc6f86aa8 compiler/ghci/Linker.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 3f4264c..dad13b7 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -1556,7 +1556,8 @@ searchForLibUsingGcc dflags so dirs = do l:_ -> l if (file == so) then return Nothing - else return (Just file) + else do b <- doesFileExist file -- file could be a folder (see #16063) + return (if b then Just file else Nothing) -- | Retrieve the list of search directory GCC and the System use to find -- libraries and components. See Note [Fork/Exec Windows]. From git at git.haskell.org Wed Jan 9 21:36:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:10 +0000 (UTC) Subject: [commit: ghc] wip/T15971, wip/T16150, wip/alp/hadrian-docs-crosslinking, wip/misc-testsuite: Be pickier about unsaturated synonyms in :kind (6b70cf6) Message-ID: <20190109213610.D814E3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T15971,wip/T16150,wip/alp/hadrian-docs-crosslinking,wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/6b70cf611e5ddc475edaa54b893d20990699ddb8/ghc >--------------------------------------------------------------- commit 6b70cf611e5ddc475edaa54b893d20990699ddb8 Author: Ryan Scott Date: Tue Jan 8 07:37:18 2019 -0500 Be pickier about unsaturated synonyms in :kind Summary: We currently permit any and all uses of unsaturated type synonyms and type families in GHCi's `:kind` command, which allows strange interactions like this one: ``` > :set -XTypeFamilies -XPolyKinds > type family Id (a :: k) > type instance Id a = a > type Foo x = Maybe > :kind! Id Foo ``` This is probably a stretch too far, so this patch moves to disallow unsaturated synonyms that aren't at the top level (we still want to allow `:kind Id`, for instance). We do this by augmenting `GhciCtxt` with an additional `Bool` field to indicate if we are at the outermost level of the type being passed to `:kind` or not. See `Note [Unsaturated type synonyms in GHCi]` in `TcValidity` for the full story. Test Plan: make test TEST=T16013 Reviewers: goldfire, bgamari Reviewed By: goldfire Subscribers: simonpj, goldfire, rwbarton, carter GHC Trac Issues: #16013 Differential Revision: https://phabricator.haskell.org/D5471 >--------------------------------------------------------------- 6b70cf611e5ddc475edaa54b893d20990699ddb8 compiler/typecheck/TcHsType.hs | 2 +- compiler/typecheck/TcRnDriver.hs | 2 +- compiler/typecheck/TcType.hs | 8 +++- compiler/typecheck/TcValidity.hs | 61 +++++++++++++++++++++++--- testsuite/tests/ghci/should_fail/T16013.script | 5 +++ testsuite/tests/ghci/should_fail/T16013.stderr | 3 ++ testsuite/tests/ghci/should_fail/all.T | 1 + 7 files changed, 71 insertions(+), 11 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 6b70cf611e5ddc475edaa54b893d20990699ddb8 From git at git.haskell.org Wed Jan 9 21:36:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:13 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes: Skip build, dont check origin url (4a1bb28) Message-ID: <20190109213613.D84943ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes Link : http://ghc.haskell.org/trac/ghc/changeset/4a1bb28eaacf9261dec36aeb4e963c704b6f77ac/ghc >--------------------------------------------------------------- commit 4a1bb28eaacf9261dec36aeb4e963c704b6f77ac Author: David Eichmann Date: Tue Jan 8 15:22:59 2019 -0700 Skip build, dont check origin url >--------------------------------------------------------------- 4a1bb28eaacf9261dec36aeb4e963c704b6f77ac .gitlab-ci.yml | 16 +++++++++++++--- .gitlab/push-test-metrics.sh | 8 +------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 674fcc8..ce1c332 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,10 +92,20 @@ validate-x86_64-linux-deb8-hadrian: - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` - make V=0 -j$THREADS + + + + + + #make V=0 -j$THREADS - | - make binary-dist TAR_COMP_OPTS="-1" - mv ghc-*.tar.xz ghc.tar.xz + # make binary-dist TAR_COMP_OPTS="-1" + # mv ghc-*.tar.xz ghc.tar.xz + + + + + - | # Prepare to push git notes. METRICS_FILE=$(mktemp) diff --git a/.gitlab/push-test-metrics.sh b/.gitlab/push-test-metrics.sh index f934083..8d2557d 100755 --- a/.gitlab/push-test-metrics.sh +++ b/.gitlab/push-test-metrics.sh @@ -9,15 +9,9 @@ fail() { GHC_ORIGIN="git at gitlab.haskell.org:ghc/ghc.git" -# Only push git notes when on the official gitlab ghc repo. -if [ "$CI_REPOSITORY_URL" != "$GHC_ORIGIN" ]; then - echo "Not pushing performance git notes: expected repo $GHC_ORIGIN but on repo $CI_REPOSITORY_URL" - exit 0 -fi - # Check that private key is available (Set on all GitLab protected branches). if [ "$PERF_NOTE_KEY" = "" ]; then - echo "Not pushing performance git notes: PERF_NOTE_KEY not set." + echo "Not pushing performance git notes: PERF_NOTE_KEY is not set." exit 0 fi From git at git.haskell.org Wed Jan 9 21:36:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:16 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes: mk ~/.ssh (b4d08a6) Message-ID: <20190109213616.DA60D3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes Link : http://ghc.haskell.org/trac/ghc/changeset/b4d08a6eaf190819ad4e264bbc53b0fa21293c9b/ghc >--------------------------------------------------------------- commit b4d08a6eaf190819ad4e264bbc53b0fa21293c9b Author: David Eichmann Date: Tue Jan 8 15:29:52 2019 -0700 mk ~/.ssh >--------------------------------------------------------------- b4d08a6eaf190819ad4e264bbc53b0fa21293c9b .gitlab-ci.yml | 4 ++-- .gitlab/push-test-metrics.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce1c332..6e14ebe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,8 +88,8 @@ validate-x86_64-linux-deb8-hadrian: before_script: - git clean -xdf && git submodule foreach git clean -xdf script: - - ./boot - - ./configure $CONFIGURE_ARGS +# - ./boot +# - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` diff --git a/.gitlab/push-test-metrics.sh b/.gitlab/push-test-metrics.sh index 8d2557d..637cd6c 100755 --- a/.gitlab/push-test-metrics.sh +++ b/.gitlab/push-test-metrics.sh @@ -21,6 +21,7 @@ if [ "$TEST_ENV" = "" ]; then fi # Setup ssh keys. +mkdir -p ~/.ssh echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC94vDmRcDXPTuZktLvMFXHD2X6H2GEdnP+7VO0QbwNje9jsPLpofQRHJKXG/9sm0a6NT9qXt9eccRNklP0AkW36LcNRni7ji8NxlrE9ASuXGqa4TTk83pOLFCzWmdcdVIxz3bxPfa/ECmyRmTxp3+mTW0eJrUEdVwprAieNoTH+ZLyDmq+IfAD5239ea+gAZzfCy5WcTbsSXOOJEAZKqqfzyog18agptzAWu/tCfzvyiGlkoQj+PE1MMEfnmWQC8d2bOhC6kQZZtPrGNhFU75JifYGT7y0e1EVa5bhqcZZ9cdGSli1S8T9MpSimVII6iZOFdho3+shbUX3ObagUl09 ben at ben-laptop" > ~/.ssh/perf_rsa.pub echo $PERF_NOTE_KEY > ~/.ssh/perf_rsa ssh-add ~/.ssh/perf_rsa From git at git.haskell.org Wed Jan 9 21:36:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:19 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes: Start ssh-agent (e364e4a) Message-ID: <20190109213619.D62AE3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes Link : http://ghc.haskell.org/trac/ghc/changeset/e364e4a51beaf215a6edabfdb31a9bb995aad228/ghc >--------------------------------------------------------------- commit e364e4a51beaf215a6edabfdb31a9bb995aad228 Author: David Eichmann Date: Tue Jan 8 15:37:20 2019 -0700 Start ssh-agent >--------------------------------------------------------------- e364e4a51beaf215a6edabfdb31a9bb995aad228 .gitlab/push-test-metrics.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/push-test-metrics.sh b/.gitlab/push-test-metrics.sh index 637cd6c..4210399 100755 --- a/.gitlab/push-test-metrics.sh +++ b/.gitlab/push-test-metrics.sh @@ -21,6 +21,7 @@ if [ "$TEST_ENV" = "" ]; then fi # Setup ssh keys. +ssh-agent mkdir -p ~/.ssh echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC94vDmRcDXPTuZktLvMFXHD2X6H2GEdnP+7VO0QbwNje9jsPLpofQRHJKXG/9sm0a6NT9qXt9eccRNklP0AkW36LcNRni7ji8NxlrE9ASuXGqa4TTk83pOLFCzWmdcdVIxz3bxPfa/ECmyRmTxp3+mTW0eJrUEdVwprAieNoTH+ZLyDmq+IfAD5239ea+gAZzfCy5WcTbsSXOOJEAZKqqfzyog18agptzAWu/tCfzvyiGlkoQj+PE1MMEfnmWQC8d2bOhC6kQZZtPrGNhFU75JifYGT7y0e1EVa5bhqcZZ9cdGSli1S8T9MpSimVII6iZOFdho3+shbUX3ObagUl09 ben at ben-laptop" > ~/.ssh/perf_rsa.pub echo $PERF_NOTE_KEY > ~/.ssh/perf_rsa From git at git.haskell.org Wed Jan 9 21:36:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:22 +0000 (UTC) Subject: [commit: ghc] wip/T16150: itimer: Don't free condvar until we know ticker is stopped (65c2b24) Message-ID: <20190109213622.D12373ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16150 Link : http://ghc.haskell.org/trac/ghc/changeset/65c2b249a398bcd1c53acf51f36c2018d5b78ef3/ghc >--------------------------------------------------------------- commit 65c2b249a398bcd1c53acf51f36c2018d5b78ef3 Author: Ben Gamari Date: Wed Jan 9 00:20:19 2019 -0500 itimer: Don't free condvar until we know ticker is stopped When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150). Avoid this by moving the mutex destruction to the main thread. >--------------------------------------------------------------- 65c2b249a398bcd1c53acf51f36c2018d5b78ef3 rts/posix/itimer/Pthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index d8f2497..817c40f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -147,8 +147,6 @@ static void *itimer_thread_func(void *_handle_tick) if (USE_TIMERFD_FOR_ITIMER) close(timerfd); - closeMutex(&mutex); - closeCondition(&start_cond); return NULL; } @@ -207,6 +205,8 @@ exitTicker (bool wait) if (pthread_join(thread, NULL)) { sysErrorBelch("Itimer: Failed to join"); } + closeMutex(&mutex); + closeCondition(&start_cond); } else { pthread_detach(thread); } From git at git.haskell.org Wed Jan 9 21:36:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:25 +0000 (UTC) Subject: [commit: ghc] wip/alp/hadrian-docs-crosslinking: crosslink hadrian/README.md and hadrian/doc/make.md (47d62d0) Message-ID: <20190109213625.CC67B3ABB3@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/47d62d041bc62a5820776633541da839e5f06947/ghc >--------------------------------------------------------------- commit 47d62d041bc62a5820776633541da839e5f06947 Author: Alp Mestanogullari Date: Wed Jan 9 12:51:50 2019 +0100 crosslink hadrian/README.md and hadrian/doc/make.md >--------------------------------------------------------------- 47d62d041bc62a5820776633541da839e5f06947 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 16a26d0..f3d468c 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -12,8 +12,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 ---------------- @@ -53,6 +51,13 @@ Stack (`build.stack.*`). Also see * 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 Wed Jan 9 21:36:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:28 +0000 (UTC) Subject: [commit: ghc] wip/T16150: rts: Use always-available locking operations in pthread Itimer implementation (37a7a83) Message-ID: <20190109213628.D1AE23ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16150 Link : http://ghc.haskell.org/trac/ghc/changeset/37a7a83772a643c307c06cfaba8c98e943d06fd1/ghc >--------------------------------------------------------------- commit 37a7a83772a643c307c06cfaba8c98e943d06fd1 Author: Ben Gamari Date: Wed Jan 9 09:17:05 2019 -0500 rts: Use always-available locking operations in pthread Itimer implementation Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK instead. >--------------------------------------------------------------- 37a7a83772a643c307c06cfaba8c98e943d06fd1 rts/posix/itimer/Pthread.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index 817c40f..6f9cd8f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -134,12 +134,12 @@ static void *itimer_thread_func(void *_handle_tick) // first try a cheap test if (stopped) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); // should we really stop? if (stopped) { waitCondition(&start_cond, &mutex); } - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } else { handle_tick(0); } @@ -176,19 +176,19 @@ initTicker (Time interval, TickProc handle_tick) void startTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 0; signalCondition(&start_cond); - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ void stopTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 1; - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ From git at git.haskell.org Wed Jan 9 21:36:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:31 +0000 (UTC) Subject: [commit: ghc] wip/misc-testsuite: testsuite: Print timeout duration on timeout failure (a2051df) Message-ID: <20190109213631.CC5D53ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/a2051df4463c89e4c6900bbd60c39999caef85ef/ghc >--------------------------------------------------------------- commit a2051df4463c89e4c6900bbd60c39999caef85ef Author: Ben Gamari Date: Wed Jan 9 11:38:46 2019 -0500 testsuite: Print timeout duration on timeout failure >--------------------------------------------------------------- a2051df4463c89e4c6900bbd60c39999caef85ef 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 96024a9..bae4955 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1921,7 +1921,7 @@ def runCmd(cmd, stdin=None, stdout=None, stderr=None, timeout_multiplier=1.0, pr stopNow() if r.returncode == 99 and getTestOpts().exit_code != 99: # Only print a message when timeout killed the process unexpectedly. - if_verbose(1, 'Timeout happened...killed process "{0}"...\n'.format(cmd)) + if_verbose(1, 'Timeout happened ({0} seconds)...killed process "{1}"...\n'.format(timeout, cmd)) return r.returncode # ----------------------------------------------------------------------------- From git at git.haskell.org Wed Jan 9 21:36:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:34 +0000 (UTC) Subject: [commit: ghc] wip/misc-testsuite: gitlab: Don't use /tmp in win32-init (ee93940) Message-ID: <20190109213634.C9FF73ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/ee93940fb6f2fcf483428d590f4897daea2e522a/ghc >--------------------------------------------------------------- commit ee93940fb6f2fcf483428d590f4897daea2e522a Author: Ben Gamari Date: Wed Jan 9 13:17:45 2019 -0500 gitlab: Don't use /tmp in win32-init To avoid coupling between multiple builds. >--------------------------------------------------------------- ee93940fb6f2fcf483428d590f4897daea2e522a .gitlab/win32-init.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh index dce9be8..ea05769 100644 --- a/.gitlab/win32-init.sh +++ b/.gitlab/win32-init.sh @@ -15,8 +15,9 @@ if [ ! -e $toolchain/bin/ghc ]; then fi if [ ! -e $toolchain/bin/cabal ]; then - curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > /tmp/cabal.zip - unzip /tmp/cabal.zip + curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > cabal.zip + unzip cabal.zip + rm cabal.zip mv cabal.exe $toolchain/bin fi From git at git.haskell.org Wed Jan 9 21:36:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:37 +0000 (UTC) Subject: [commit: ghc] wip/misc-testsuite: testsuite: Allow application of a global timeout multiplier (c91c9f2) Message-ID: <20190109213637.CB9DF3ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/misc-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/c91c9f2870cc88c66b7cfd68206cace8d02d18ae/ghc >--------------------------------------------------------------- commit c91c9f2870cc88c66b7cfd68206cace8d02d18ae Author: Ben Gamari Date: Wed Jan 9 11:47:37 2019 -0500 testsuite: Allow application of a global timeout multiplier As noted in #16156, many tests fail on Windows with timeouts. I believe this is because we tend to underestimate the timeout on Windows, which seems to slow severely under load. Work around this by introducing a global timeout multiplier. Note that this doesn't yet add support for the multiplier in Hadrian. >--------------------------------------------------------------- c91c9f2870cc88c66b7cfd68206cace8d02d18ae .gitlab-ci.yml | 4 ++-- testsuite/driver/runtests.py | 3 +++ testsuite/mk/test.mk | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67b2830..9742cb4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -341,7 +341,7 @@ validate-x86_64-windows-hadrian: # FIXME: --no-lint due to #15950 - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --no-lint" - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh binary-dist" - - bash -c 'make V=0 test THREADS=`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 TIMEOUT_MULT=2' cache: key: x86_64-windows tags: @@ -362,7 +362,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 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 TIMEOUT_MULT=2' cache: key: x86_64-windows tags: diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 55b13df..32d5460 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -58,6 +58,7 @@ parser.add_argument("--way", action="append", help="just this way") parser.add_argument("--skipway", action="append", help="skip this way") parser.add_argument("--threads", type=int, help="threads to run simultaneously") parser.add_argument("--verbose", type=int, choices=[0,1,2,3,4,5], help="verbose (Values 0 through 5 accepted)") +parser.add_argument("--timeout-mult", type=float, default=1, help="apply a global multiplier to timeout values") parser.add_argument("--junit", type=argparse.FileType('wb'), help="output testsuite summary in JUnit format") parser.add_argument("--test-env", default='local', help="Override default chosen test-env.") perf_group.add_argument("--skip-perf-tests", action="store_true", help="skip performance tests") @@ -244,6 +245,8 @@ testopts_local.x = TestOptions() if config.timeout == -1: config.timeout = int(read_no_crs(config.top + '/timeout/calibrate.out')) +config.timeout *= args.timeout_mult + print('Timeout is ' + str(config.timeout)) print('Known ways: ' + ', '.join(config.other_ways)) print('Run ways: ' + ', '.join(config.run_ways)) diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index a517698..c9076aa 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -223,6 +223,10 @@ ifneq "$(TEST_ENV)" "" RUNTEST_OPTS += --test-env="$(TEST_ENV)" endif +ifneq "$(TIMEOUT_MULT)" "" +RUNTEST_OPTS += --timeout-mult="$(TIMEOUT_MULT)" +endif + ifeq "$(CLEANUP)" "0" RUNTEST_OPTS += -e config.cleanup=False else ifeq "$(CLEANUP)" "NO" From git at git.haskell.org Wed Jan 9 21:36:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:40 +0000 (UTC) Subject: [commit: ghc] wip/bump-cabal: Update `Cabal` submodule (77cffed) Message-ID: <20190109213640.D41A83ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/bump-cabal Link : http://ghc.haskell.org/trac/ghc/changeset/77cffedf5fc8b2061e44b37539688a658cacf8f1/ghc >--------------------------------------------------------------- commit 77cffedf5fc8b2061e44b37539688a658cacf8f1 Author: Herbert Valerio Riedel Date: Mon Jan 7 00:59:23 2019 +0100 Update `Cabal` submodule This also requires adapting `ghc-pkg` to use the new Cabal parsing API as the old ReadP-based one has finally been evicted for good. Hadrian bit finished by: Ben Gamari >--------------------------------------------------------------- 77cffedf5fc8b2061e44b37539688a658cacf8f1 ghc.mk | 3 - hadrian/src/Rules/Register.hs | 16 ++- libraries/Cabal | 2 +- testsuite/tests/cabal/ghcpkg01.stdout | 246 ++++++++++++++++------------------ testsuite/tests/cabal/ghcpkg07.stdout | 13 +- utils/ghc-cabal/ghc.mk | 10 +- utils/ghc-pkg/Main.hs | 51 +++---- 7 files changed, 159 insertions(+), 182 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 77cffedf5fc8b2061e44b37539688a658cacf8f1 From git at git.haskell.org Wed Jan 9 21:36:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 9 Jan 2019 21:36:43 +0000 (UTC) Subject: [commit: ghc] wip/T15971: Switch to the untracked version of getDirectoryFiles when scanning for GMP objects (453dc7f) Message-ID: <20190109213643.CC2903ABB3@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15971 Link : http://ghc.haskell.org/trac/ghc/changeset/453dc7f2c53fec02a13f1a9b952f1c6f783a65ab/ghc >--------------------------------------------------------------- commit 453dc7f2c53fec02a13f1a9b952f1c6f783a65ab 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. >--------------------------------------------------------------- 453dc7f2c53fec02a13f1a9b952f1c6f783a65ab 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 Thu Jan 10 22:36:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:26 +0000 (UTC) Subject: [commit: ghc] branch 'wip/andrey/hadrian-readme' created Message-ID: <20190110223626.79A8C3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/andrey/hadrian-readme Referencing: 8c5f3dd024c221add63cef845748d814ba41fcb6 From git at git.haskell.org Thu Jan 10 22:36:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:28 +0000 (UTC) Subject: [commit: ghc] branch 'wip/andrey/windows-cabal' created Message-ID: <20190110223628.795943ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/andrey/windows-cabal Referencing: 36a04020db8d4ba5cf20354f5bb81b919605ad29 From git at git.haskell.org Thu Jan 10 22:36:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:30 +0000 (UTC) Subject: [commit: ghc] branch 'wip/spj-wibbles' created Message-ID: <20190110223630.7A6363ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/spj-wibbles Referencing: ba3b196fbcb16b2bf96a847419567053e9492bdc From git at git.haskell.org Thu Jan 10 22:36:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-junit' created Message-ID: <20190110223632.7B3663ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-junit Referencing: c48e11be7a26d3a37b716f3c7665a4bbb9c81957 From git at git.haskell.org Thu Jan 10 22:36:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:35 +0000 (UTC) Subject: [commit: ghc] wip/andrey/hadrian-readme, wip/andrey/windows-cabal, wip/fix-junit, wip/spj-wibbles: Hadrian: Add support for building stage3 (6486c6e) Message-ID: <20190110223635.86D383ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/andrey/hadrian-readme,wip/andrey/windows-cabal,wip/fix-junit,wip/spj-wibbles Link : http://ghc.haskell.org/trac/ghc/changeset/6486c6e49c53e75f37ed732b38c5be7ae64785e8/ghc >--------------------------------------------------------------- commit 6486c6e49c53e75f37ed732b38c5be7ae64785e8 Author: Matthew Pickering Date: Sun Dec 16 08:58:41 2018 +0000 Hadrian: Add support for building stage3 This ticket enables the building of a `stage3` compiler by making the build logic more consistent and predictable in Hadrian. Two of the main changes are: 1. In order to build anything at stageN we use the package database present at stageN. Fixing #16069 2. `haddock` and `ghc-tags` are built as stage1 executables (with the stage1 compiler) rather than as stage2 compiler. Fixing [hadrian#661](https://github.com/snowleopard/hadrian/issues/661) In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`. >--------------------------------------------------------------- 6486c6e49c53e75f37ed732b38c5be7ae64785e8 hadrian/README.md | 7 +++ hadrian/cfg/system.config.in | 4 ++ hadrian/doc/cross-compile.md | 1 - hadrian/doc/user-settings.md | 20 +++++++-- hadrian/src/Base.hs | 4 +- hadrian/src/Builder.hs | 4 +- hadrian/src/Context.hs | 4 +- hadrian/src/Packages.hs | 22 ++++----- hadrian/src/Rules.hs | 22 +++++---- hadrian/src/Rules/BinaryDist.hs | 4 +- hadrian/src/Rules/Generate.hs | 7 +-- hadrian/src/Rules/Libffi.hs | 72 ++++++++++++++++-------------- hadrian/src/Rules/Program.hs | 2 +- hadrian/src/Settings/Builders/Common.hs | 3 +- hadrian/src/Settings/Builders/Configure.hs | 3 +- hadrian/src/Settings/Builders/Make.hs | 9 ++-- hadrian/src/Settings/Default.hs | 9 ++-- hadrian/src/UserSettings.hs | 15 +++---- hadrian/src/Utilities.hs | 13 +++--- 19 files changed, 127 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 6486c6e49c53e75f37ed732b38c5be7ae64785e8 From git at git.haskell.org Thu Jan 10 22:36:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:38 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-cabal: Hadrian: Use the Cabal build script on Windows by default (36a0402) Message-ID: <20190110223638.885993ABB5@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/36a04020db8d4ba5cf20354f5bb81b919605ad29/ghc >--------------------------------------------------------------- commit 36a04020db8d4ba5cf20354f5bb81b919605ad29 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. >--------------------------------------------------------------- 36a04020db8d4ba5cf20354f5bb81b919605ad29 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 Thu Jan 10 22:36:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:41 +0000 (UTC) Subject: [commit: ghc] wip/andrey/hadrian-readme: Hadrian: Update README.md (8c5f3dd) Message-ID: <20190110223641.8923C3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/hadrian-readme Link : http://ghc.haskell.org/trac/ghc/changeset/8c5f3dd024c221add63cef845748d814ba41fcb6/ghc >--------------------------------------------------------------- commit 8c5f3dd024c221add63cef845748d814ba41fcb6 Author: Andrey Mokhov Date: Thu Jan 10 02:13:46 2019 +0000 Hadrian: Update README.md * Update or remove a few outdated paragraphs * Use consistent naming (e.g. "Stage1" instead of occasionally "stage1") * Rewrite acknowledgements * Some more minor revisions >--------------------------------------------------------------- 8c5f3dd024c221add63cef845748d814ba41fcb6 hadrian/README.md | 181 +++++++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 90 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 8c5f3dd024c221add63cef845748d814ba41fcb6 From git at git.haskell.org Thu Jan 10 22:36:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:44 +0000 (UTC) Subject: [commit: ghc] wip/spj-wibbles: Comments about data constructor wrappers (381a26a) Message-ID: <20190110223644.8F6173ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/spj-wibbles Link : http://ghc.haskell.org/trac/ghc/changeset/381a26ae437799b7f261842e0531fb5bb841ffdb/ghc >--------------------------------------------------------------- commit 381a26ae437799b7f261842e0531fb5bb841ffdb Author: Simon Peyton Jones Date: Thu Jan 10 12:07:57 2019 +0000 Comments about data constructor wrappers >--------------------------------------------------------------- 381a26ae437799b7f261842e0531fb5bb841ffdb compiler/basicTypes/DataCon.hs | 70 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs index de4fd12..5f72b51 100644 --- a/compiler/basicTypes/DataCon.hs +++ b/compiler/basicTypes/DataCon.hs @@ -172,9 +172,38 @@ The "wrapper Id", \$WC, goes as follows nothing for the wrapper to do. That is, if its defn would be \$wC = C +Note [Data constructor workers and wrappers] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Algebraic data types + - Always have a worker, with no unfolding + - May or may not have a wrapper; see Note [The need for a wrapper] + +* Newtypes + - Always have a worker, which has a compulsory unfolding (just a cast) + - May or may not have a wrapper; see Note [The need for a wrapper] + +* INVARIANT: the dictionary constructor for a class + never has a wrapper. + +* Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments + +* The wrapper (if it exists) takes dcOrigArgTys as its arguments + The worker takes dataConRepArgTys as its arguments + If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys + +* The 'NoDataConRep' case of DataConRep is important. Not only is it + efficient, but it also ensures that the wrapper is replaced by the + worker (because it *is* the worker) even when there are no + args. E.g. in + f (:) x + the (:) *is* the worker. This is really important in rule matching, + (We could match on the wrappers, but that makes it less likely that + rules will match when we bring bits of unfoldings together.) + Note [The need for a wrapper] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Why might the wrapper have anything to do? Two reasons: +Why might the wrapper have anything to do? The full story is +in wrapper_reqd in MkId.mkDataConRep. * Unboxing strict fields (with -funbox-strict-fields) data T = MkT !(Int,Int) @@ -197,12 +226,14 @@ Why might the wrapper have anything to do? Two reasons: The third argument is a coercion [a] :: [a]~[a] -INVARIANT: the dictionary constructor for a class - never has a wrapper. +* Data family instances may do a cast on the result +* Type variables may be permuted; see MkId + Note [Data con wrappers and GADT syntax] -A note about the stupid context -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note [The stupid context] +~~~~~~~~~~~~~~~~~~~~~~~~~ Data types can have a context: data (Eq a, Ord b) => T a b = T1 a b | T2 a @@ -566,9 +597,12 @@ perspective. -} -- | Data Constructor Representation +-- See Note [Data constructor workers and wrappers] data DataConRep - = NoDataConRep -- No wrapper + = -- NoDataConRep means that the data con has no wrapper + NoDataConRep + -- DCR means that the data con has a wrapper | DCR { dcr_wrap_id :: Id -- Takes src args, unboxes/flattens, -- and constructs the representation @@ -586,30 +620,6 @@ data DataConRep -- See Note [Bangs on data constructor arguments] } --- Algebraic data types always have a worker, and --- may or may not have a wrapper, depending on whether --- the wrapper does anything. --- --- Data types have a worker with no unfolding --- Newtypes just have a worker, which has a compulsory unfolding (just a cast) - --- _Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments - --- The wrapper (if it exists) takes dcOrigArgTys as its arguments --- The worker takes dataConRepArgTys as its arguments --- If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys - --- The 'NoDataConRep' case is important --- Not only is this efficient, --- but it also ensures that the wrapper is replaced --- by the worker (because it *is* the worker) --- even when there are no args. E.g. in --- f (:) x --- the (:) *is* the worker. --- This is really important in rule matching, --- (We could match on the wrappers, --- but that makes it less likely that rules will match --- when we bring bits of unfoldings together.) ------------------------- From git at git.haskell.org Thu Jan 10 22:36:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:47 +0000 (UTC) Subject: [commit: ghc] wip/spj-wibbles: Remove export of checkValidFamPats, never used (e4abe33) Message-ID: <20190110223647.8E44C3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/spj-wibbles Link : http://ghc.haskell.org/trac/ghc/changeset/e4abe3346fadff7e54c1987da010f342d59d1721/ghc >--------------------------------------------------------------- commit e4abe3346fadff7e54c1987da010f342d59d1721 Author: Simon Peyton Jones Date: Thu Jan 10 12:08:15 2019 +0000 Remove export of checkValidFamPats, never used >--------------------------------------------------------------- e4abe3346fadff7e54c1987da010f342d59d1721 compiler/typecheck/TcValidity.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 64f5bc7..5636b44 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -7,7 +7,7 @@ module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, - checkValidTheta, checkValidFamPats, + checkValidTheta, checkValidInstance, checkValidInstHead, validDerivPred, checkTySynRhs, checkValidCoAxiom, checkValidCoAxBranch, From git at git.haskell.org Thu Jan 10 22:36:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:50 +0000 (UTC) Subject: [commit: ghc] wip/spj-wibbles: Small refactor (ba3b196) Message-ID: <20190110223650.92E9E3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/spj-wibbles Link : http://ghc.haskell.org/trac/ghc/changeset/ba3b196fbcb16b2bf96a847419567053e9492bdc/ghc >--------------------------------------------------------------- commit ba3b196fbcb16b2bf96a847419567053e9492bdc Author: Simon Peyton Jones Date: Thu Jan 10 12:08:47 2019 +0000 Small refactor ...to use the same error message rather than duplicating it >--------------------------------------------------------------- ba3b196fbcb16b2bf96a847419567053e9492bdc compiler/typecheck/TcInstDcls.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index ba33fe2..fccf8b7 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -21,7 +21,7 @@ import TcBinds import TcTyClsDecls import TcTyDecls ( addTyConsToGblEnv ) import TcClassDcl( tcClassDecl2, tcATDefault, - HsSigFun, mkHsSigFun, + HsSigFun, mkHsSigFun, badMethodErr, findMethodBind, instantiateMethod ) import TcSigs import TcRnMonad @@ -1539,13 +1539,11 @@ tcMethods dfun_id clas tyvars dfun_ev_vars inst_tys -- Check if any method bindings do not correspond to the class. -- See Note [Mismatched class methods and associated type families]. checkMethBindMembership - = let bind_nms = map unLoc $ collectMethodBinders binds - cls_meth_nms = map (idName . fst) op_items - mismatched_meths = bind_nms `minusList` cls_meth_nms - in forM_ mismatched_meths $ \mismatched_meth -> - addErrTc $ hsep - [ text "Class", quotes (ppr (className clas)) - , text "does not have a method", quotes (ppr mismatched_meth)] + = mapM_ (addErrTc . badMethodErr clas) mismatched_meths + where + bind_nms = map unLoc $ collectMethodBinders binds + cls_meth_nms = map (idName . fst) op_items + mismatched_meths = bind_nms `minusList` cls_meth_nms {- Note [Mismatched class methods and associated type families] From git at git.haskell.org Thu Jan 10 22:36:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:53 +0000 (UTC) Subject: [commit: ghc] wip/fix-junit: testsuite: Show both test name and way in JUnit output (c48e11b) Message-ID: <20190110223653.8F4843ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-junit Link : http://ghc.haskell.org/trac/ghc/changeset/c48e11be7a26d3a37b716f3c7665a4bbb9c81957/ghc >--------------------------------------------------------------- commit c48e11be7a26d3a37b716f3c7665a4bbb9c81957 Author: Ben Gamari Date: Thu Jan 10 11:45:32 2019 -0500 testsuite: Show both test name and way in JUnit output >--------------------------------------------------------------- c48e11be7a26d3a37b716f3c7665a4bbb9c81957 testsuite/driver/junit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/driver/junit.py b/testsuite/driver/junit.py index f2dbebb..f5daec1 100644 --- a/testsuite/driver/junit.py +++ b/testsuite/driver/junit.py @@ -15,24 +15,24 @@ def junit(t): ('unexpected failure', t.unexpected_failures)]: for (directory, testname, reason, way) in group: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'failure', type = res_type, message = reason) for (directory, testname, reason, way) in t.framework_failures: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'error', type = "framework failure", message = reason) for (directory, testname, way) in t.expected_passes: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) return ET.ElementTree(testsuites) From git at git.haskell.org Thu Jan 10 22:36:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 10 Jan 2019 22:36:56 +0000 (UTC) Subject: [commit: ghc] wip/T15971: Disable Shake Lint by default. (bc3dd0b) Message-ID: <20190110223656.8E3223ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15971 Link : http://ghc.haskell.org/trac/ghc/changeset/bc3dd0b45e2a5a73bf4c95eac9164a0fc7bded73/ghc >--------------------------------------------------------------- commit bc3dd0b45e2a5a73bf4c95eac9164a0fc7bded73 Author: Andrey Mokhov Date: Thu Jan 10 22:35:22 2019 +0000 Disable Shake Lint by default. >--------------------------------------------------------------- bc3dd0b45e2a5a73bf4c95eac9164a0fc7bded73 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 Fri Jan 11 09:48:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 09:48:13 +0000 (UTC) Subject: [commit: nofib] branch 'patch-1' created Message-ID: <20190111094813.868C13ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : patch-1 Referencing: 43d347f38de5051686342e4bfa38ffedcc99ebf7 From git at git.haskell.org Fri Jan 11 09:48:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 09:48:15 +0000 (UTC) Subject: [commit: nofib] patch-1: Mention symlink situation on Git for Windows in README.md (43d347f) Message-ID: <20190111094815.8FA443ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : patch-1 Link : http://ghc.haskell.org/trac/ghc/changeset/43d347f38de5051686342e4bfa38ffedcc99ebf7/nofib >--------------------------------------------------------------- commit 43d347f38de5051686342e4bfa38ffedcc99ebf7 Author: Sebastian Graf Date: Fri Jan 11 04:48:07 2019 -0500 Mention symlink situation on Git for Windows in README.md >--------------------------------------------------------------- 43d347f38de5051686342e4bfa38ffedcc99ebf7 README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a72a09e..69e16a6 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,19 @@ system GHC: ## Using +
+ Git symlink support for Windows machines + + NoFib uses a few symlinks here and there to share code between benchmarks. + Git for Windows has symlinks support for some time now, but + [it may not be enabled by default](https://stackoverflow.com/a/42137273/388010). + You will notice strange `make boot` failures if it's not enabled for you. + + Make sure you follow the instructions in the link to enable symlink support, + possibly as simple as through `git config core.symlinks true` or cloning with + `git clone -c core.symlinks=true `. +
+ Then, to run the tests, execute: ``` From git at git.haskell.org Fri Jan 11 10:30:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 10:30:32 +0000 (UTC) Subject: [commit: nofib] branch 'stab-gen_regexp' created Message-ID: <20190111103032.6ADFB3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : stab-gen_regexp Referencing: e1b0cfad28e1dd745be143e320416af65744a923 From git at git.haskell.org Fri Jan 11 10:30:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 10:30:34 +0000 (UTC) Subject: [commit: nofib] stab-gen_regexp: Stabilise gen_regexp again (e1b0cfa) Message-ID: <20190111103034.759263ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : stab-gen_regexp Link : http://ghc.haskell.org/trac/ghc/changeset/e1b0cfad28e1dd745be143e320416af65744a923/nofib >--------------------------------------------------------------- commit e1b0cfad28e1dd745be143e320416af65744a923 Author: Sebastian Graf Date: Fri Jan 11 11:28:47 2019 +0100 Stabilise gen_regexp again While investigating a 5% runtime regression, I realised that `gen_regexp` wasn't sufficiently stable wrt. GC parameterisations. This is now rectified by iterating 500 instead of 100 times. >--------------------------------------------------------------- e1b0cfad28e1dd745be143e320416af65744a923 imaginary/gen_regexps/Main.hs | 7 +- imaginary/gen_regexps/Makefile | 6 +- .../{bernouilli => gen_regexps}/NofibUtils.hs | 0 imaginary/gen_regexps/gen_regexps.faststdout | 600 +++++++++++++++++---- imaginary/gen_regexps/gen_regexps.slowstdout | 600 +++++++++++++++++---- imaginary/gen_regexps/gen_regexps.stdout | 600 +++++++++++++++++---- 6 files changed, 1507 insertions(+), 306 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 e1b0cfad28e1dd745be143e320416af65744a923 From git at git.haskell.org Fri Jan 11 22:39:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 22:39:22 +0000 (UTC) Subject: [commit: ghc] branch 'wip/armv7-bindists' created Message-ID: <20190111223922.A6CA63ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/armv7-bindists Referencing: a45d9d885a520008656bb599b24b6c25efa661c1 From git at git.haskell.org Fri Jan 11 22:39:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 22:39:25 +0000 (UTC) Subject: [commit: ghc] wip/armv7-bindists: Implement a sanity check for CCS fields in profiling builds (82d1a88) Message-ID: <20190111223925.B4F5F3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/armv7-bindists Link : http://ghc.haskell.org/trac/ghc/changeset/82d1a88dec216d761b17252ede760da5c566007f/ghc >--------------------------------------------------------------- commit 82d1a88dec216d761b17252ede760da5c566007f Author: Ömer Sinan Ağacan Date: Thu Jan 10 12:42:04 2019 +0300 Implement a sanity check for CCS fields in profiling builds This helped me debug one of the bugs in #15508. I'm not sure if this is a good idea, but it worked for me, so wanted to submit this as a MR. >--------------------------------------------------------------- 82d1a88dec216d761b17252ede760da5c566007f rts/Arena.c | 13 +++++++++++++ rts/Arena.h | 4 ++++ rts/Profiling.c | 4 ++++ rts/Profiling.h | 6 ++++++ rts/sm/Sanity.c | 17 +++++++++++++++++ 5 files changed, 44 insertions(+) diff --git a/rts/Arena.c b/rts/Arena.c index cd547e5..e0b4ebd 100644 --- a/rts/Arena.c +++ b/rts/Arena.c @@ -117,3 +117,16 @@ arenaBlocks( void ) { return arena_blocks; } + +#if defined(DEBUG) +void checkPtrInArena( StgPtr p, Arena *arena ) +{ + for (bdescr *bd = arena->current; bd; bd = bd->link) { + if (p >= bd->start && p < bd->free) { + return; + } + } + + barf("Location %p is not in arena %p", (void*)p, (void*)arena); +} +#endif diff --git a/rts/Arena.h b/rts/Arena.h index 8fa8236..4929871 100644 --- a/rts/Arena.h +++ b/rts/Arena.h @@ -20,3 +20,7 @@ RTS_PRIVATE void arenaFree ( Arena * ); // For internal use only: RTS_PRIVATE unsigned long arenaBlocks( void ); + +#if defined(DEBUG) +void checkPtrInArena( StgPtr p, Arena *arena ); +#endif diff --git a/rts/Profiling.c b/rts/Profiling.c index 7abad59..70bf375 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -32,7 +32,11 @@ /* * Profiling allocation arena. */ +#if defined(DEBUG) +Arena *prof_arena; +#else static Arena *prof_arena; +#endif /* * Global variables used to assign unique IDs to cc's, ccs's, and diff --git a/rts/Profiling.h b/rts/Profiling.h index 45725e5..c692c22 100644 --- a/rts/Profiling.h +++ b/rts/Profiling.h @@ -13,6 +13,10 @@ #include "BeginPrivate.h" #include "Rts.h" +#if defined(DEBUG) +#include "Arena.h" +#endif + #if defined(PROFILING) #define PROFILING_ONLY(s) s #else @@ -46,6 +50,8 @@ bool ignoreCCS (CostCentreStack const *ccs); bool ignoreCC (CostCentre const *cc); #if defined(DEBUG) +extern Arena *prof_arena; + void debugCCS( CostCentreStack *ccs ); #endif diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 1da3e44..28c9b43 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -29,6 +29,7 @@ #include "Arena.h" #include "RetainerProfile.h" #include "CNF.h" +#include "Profiling.h" // prof_arena /* ----------------------------------------------------------------------------- Forward decls. @@ -210,6 +211,17 @@ checkPAP (StgClosure *tagged_fun, StgClosure** payload, StgWord n_args) : GET_CLOSURE_TAG(tagged_fun) == fun_info->f.arity); } +#if defined(PROFILING) +static void +checkClosureProfSanity(const StgClosure *p) +{ + StgProfHeader prof_hdr = p->header.prof; + CostCentreStack *ccs = prof_hdr.ccs; + if (HEAP_ALLOCED_GC((void*)ccs)) { + checkPtrInArena((StgPtr)ccs, prof_arena); + } +} +#endif StgOffset checkClosure( const StgClosure* p ) @@ -225,6 +237,11 @@ checkClosure( const StgClosure* p ) if (IS_FORWARDING_PTR(info)) { barf("checkClosure: found EVACUATED closure %d", info->type); } + +#if defined(PROFILING) + checkClosureProfSanity(p); +#endif + info = INFO_PTR_TO_STRUCT(info); switch (info->type) { From git at git.haskell.org Fri Jan 11 22:39:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 22:39:29 +0000 (UTC) Subject: [commit: ghc] wip/armv7-bindists: CI: Add armv7 dockerfile (a45d9d8) Message-ID: <20190111223929.114C33ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/armv7-bindists Link : http://ghc.haskell.org/trac/ghc/changeset/a45d9d885a520008656bb599b24b6c25efa661c1/ghc >--------------------------------------------------------------- commit a45d9d885a520008656bb599b24b6c25efa661c1 Author: Ben Gamari Date: Thu Jan 10 18:05:38 2019 -0500 CI: Add armv7 dockerfile >--------------------------------------------------------------- a45d9d885a520008656bb599b24b6c25efa661c1 .../Dockerfile | 49 ++++++++++------------ 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/.circleci/images/aarch64-linux-deb9/Dockerfile b/.circleci/images/armv7l-linux-deb9/Dockerfile similarity index 51% copy from .circleci/images/aarch64-linux-deb9/Dockerfile copy to .circleci/images/armv7l-linux-deb9/Dockerfile index f871f75..f275b6f 100644 --- a/.circleci/images/aarch64-linux-deb9/Dockerfile +++ b/.circleci/images/armv7l-linux-deb9/Dockerfile @@ -1,4 +1,4 @@ -FROM aarch64/debian:stretch +FROM arm32v7/debian:stretch ENV LANG C.UTF-8 @@ -7,41 +7,36 @@ RUN apt-get update -qq RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \ ca-certificates g++ git make automake autoconf gcc \ perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo \ - jq wget curl libnuma-dev + jq wget curl libgmp-dev # Documentation tools -RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra +# RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra # Boot LLVM -ENV PATH /usr/local/bin:$PATH -ENV LLVM_TARBALL http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-aarch64-linux-gnu.tar.xz -RUN curl $LLVM_TARBALL | tar -xJC .. && \ - mkdir /opt/llvm6 && \ - cp -R clang+llvm*/* /opt/llvm6 && \ - rm -R clang+llvm* && \ - /opt/llvm6/bin/llc --version + +# Using a local one I fixed the user and owner in because Docker can't +# deal with the userid not being mapped on my aystem (and its chown +# doesn't occur until after it fails to extract). +ADD clang-6.0.1.tar.xz /opt/ +ENV PATH /usr/local/bin:/usr/local/clang-6.0.1/bin:$PATH +ENV LLC /opt/clang-6.0.1/bin/llc +ENV OPT /opt/clang-6.0.1/bin/opt + +# ENV PATH /usr/local/bin:$PATH +# ENV LLVM_TARBALL http://releases.llvm.org/6.0.1/clang+llvm-6.0.1-armv7a-linux-gnueabihf.tar.xz +# RUN curl $LLVM_TARBALL | tar -xJC .. && \ +# mkdir /opt/llvm6 && \ +# cp -R clang+llvm*/* /opt/llvm6 && \ +# rm -R clang+llvm* && \ +# /opt/llvm6/bin/llc --version # GHC #RUN curl http://downloads.haskell.org/~ghc/8.6.2/ghc-8.6.2-aarch64-deb8-linux.tar.xz | tar -xJ && \ -COPY ghc-8.6.2-aarch64-unknown-linux.tar.xz . -RUN cat ghc-8.6.2-aarch64-unknown-linux.tar.xz | tar -xJ && \ - cd ghc-8.6.2 && \ - ./configure --prefix=/usr/local LLC=/opt/llvm6/bin/llc OPT=/opt/llvm6/bin/opt && \ - make install && \ - cd .. && \ - rm -Rf ghc-* +ADD ghc-8.2.2-armv7-deb8-linux.tar.xz /tmp +RUN (cd /tmp/ghc-8.2.2 && ./configure --prefix=/usr/local/ghc-8.2.2 && make install && rm -rf /tmp/ghc-8.2.2) +ENV PATH /usr/local/ghc-8.2.2/bin:$PATH RUN ghc --version -# LLVM -ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-aarch64-linux-gnu.tar.xz -ENV LLC /opt/llvm7/bin/llc -ENV OPT /opt/llvm7/bin/opt -RUN curl $LLVM_TARBALL | tar -xJC .. && \ - mkdir /opt/llvm7 && \ - cp -R clang+llvm*/* /opt/llvm7 && \ - rm -R clang+llvm* && \ - $LLC --version - # Cabal RUN git clone https://github.com/haskell/Cabal && \ cd Cabal && \ From git at git.haskell.org Fri Jan 11 22:39:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 11 Jan 2019 22:39:32 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-backports: Release notes for 8.6.4 (a7fdfd9) Message-ID: <20190111223932.61AEC3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-backports Link : http://ghc.haskell.org/trac/ghc/changeset/a7fdfd95b3bc6502884149b12823ca3930647f00/ghc >--------------------------------------------------------------- commit a7fdfd95b3bc6502884149b12823ca3930647f00 Author: Ben Gamari Date: Thu Jan 10 11:40:07 2019 -0500 Release notes for 8.6.4 >--------------------------------------------------------------- a7fdfd95b3bc6502884149b12823ca3930647f00 .../{8.6.3-notes.rst => 8.6.4-notes.rst} | 21 +++++++-------------- docs/users_guide/index.rst | 1 + 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/docs/users_guide/8.6.3-notes.rst b/docs/users_guide/8.6.4-notes.rst similarity index 76% copy from docs/users_guide/8.6.3-notes.rst copy to docs/users_guide/8.6.4-notes.rst index f666e52..738b89b 100644 --- a/docs/users_guide/8.6.3-notes.rst +++ b/docs/users_guide/8.6.4-notes.rst @@ -1,27 +1,20 @@ -.. _release-8-6-3: +.. _release-8-6-4: -Release notes for version 8.6.3 +Release notes for version 8.6.4 =============================== -GHC 8.6.3 is a bug-fix release, fixing a few regressions found in 8.6.1 and -8.6.2. As some of these issues are soundness issues users are strongly -encouraged to upgrade. +GHC 8.6.4 is a bug-fix release, fixing a few regressions found in 8.6.3. Highlights ---------- -The highlights, since the 8.6.2 release, are: +The highlights, since the 8.6.3 release, are: -- A bug resulting in segmentation faults in some programs has been fixed - (:ghc-ticket:`15892`) -- Darwin binary distributions are now correctly built against an in-tree - ``libgmp`` (:ghc-ticket:`15404`) -- Three bugs leading to linker failures on Windows has been fixed +- 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 leading to programs with deep stacks crashing when run with retainer profiling enabled has been fixed (:ghc-ticket:`14758`) -- A bug resulting in potential heap corruption during stable name allocation has been fixed (:ghc-ticket:`15906`) -- Plugins are now loaded during GHCi sessions (:ghc-ticket:`15633`) +- A bug wherein changes in default method definitions would fail to trigger + recompilation has been fixed (:ghc-ticket:`15970`). Known issues ------------ diff --git a/docs/users_guide/index.rst b/docs/users_guide/index.rst index 11718d8..c98434c 100644 --- a/docs/users_guide/index.rst +++ b/docs/users_guide/index.rst @@ -15,6 +15,7 @@ Contents: 8.6.1-notes 8.6.2-notes 8.6.3-notes + 8.6.4-notes ghci runghc usage From git at git.haskell.org Sun Jan 13 00:06:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:03 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Run typed splices in the zonker (c2455e6) Message-ID: <20190113000603.78D8F3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/c2455e647501c5a382861196b64df3dd05b620a2/ghc >--------------------------------------------------------------- commit c2455e647501c5a382861196b64df3dd05b620a2 Author: Matthew Pickering Date: Wed Jan 9 14:52:30 2019 +0000 Run typed splices in the zonker Summary: This fixes #15471 In the typechecker we check that the splice has the right type but we crucially don't zonk the generated expression. This is because we might end up unifying type variables from outer scopes later on. Reviewers: simonpj, goldfire, bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15471 Differential Revision: https://phabricator.haskell.org/D5286 >--------------------------------------------------------------- c2455e647501c5a382861196b64df3dd05b620a2 compiler/deSugar/DsMeta.hs | 1 + compiler/hieFile/HieAst.hs | 2 + compiler/hsSyn/HsExpr.hs | 20 +++++++ compiler/rename/RnSplice.hs | 12 ++++- compiler/typecheck/TcHsSyn.hs | 5 ++ compiler/typecheck/TcPatSyn.hs | 1 + compiler/typecheck/TcRnDriver.hs | 73 ++++++++++++++++--------- compiler/typecheck/TcRnTypes.hs-boot | 6 +++ compiler/typecheck/TcSplice.hs | 101 +++++++++++++++++++++++++++++------ compiler/typecheck/TcSplice.hs-boot | 6 ++- testsuite/tests/th/T15471.hs | 11 ++++ testsuite/tests/th/T15471A.hs | 14 +++++ testsuite/tests/th/all.T | 1 + 13 files changed, 209 insertions(+), 44 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 c2455e647501c5a382861196b64df3dd05b620a2 From git at git.haskell.org Sun Jan 13 00:06:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:06 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: More minor comment improvements (92b684d) Message-ID: <20190113000606.74BBF3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/92b684ded87d24b5770f1abd23c07570bbde43db/ghc >--------------------------------------------------------------- commit 92b684ded87d24b5770f1abd23c07570bbde43db Author: Richard Eisenberg Date: Fri Jan 11 16:42:06 2019 -0500 More minor comment improvements [skip ci] >--------------------------------------------------------------- 92b684ded87d24b5770f1abd23c07570bbde43db compiler/types/CoAxiom.hs | 14 ++++---------- compiler/types/Type.hs | 6 ++++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs index 112ab27..57fb2ef 100644 --- a/compiler/types/CoAxiom.hs +++ b/compiler/types/CoAxiom.hs @@ -319,20 +319,14 @@ Note [CoAxBranch type variables] In the case of a CoAxBranch of an associated type-family instance, we use the *same* type variables (where possible) as the enclosing class or instance. Consider - class C a b where - type F x b - type F [y] b = ... -- Second param must be b - instance C Int [z] where + instance C Int [z] where type F Int [z] = ... -- Second param must be [z] In the CoAxBranch in the instance decl (F Int [z]) we use the same 'z', so that it's easy to check that that type is the same as that in the instance header. -Similarly in the CoAxBranch for the default decl for F in the -class decl, we use the same 'b' to make the same check easy. - So, unlike FamInsts, there is no expectation that the cab_tvs are fresh wrt each other, or any other CoAxBranch. @@ -412,13 +406,13 @@ Now For a CoAxBranch for a data family instance with representation TyCon rep_tc: - - cab_tvs of its CoAxiom) may be shorter + - cab_tvs (of its CoAxiom) may be shorter than tyConTyVars of rep_tc. - cab_lhs may be shorter than tyConArity of the family tycon i.e. LHS is unsaturated - - cab_rhs will be (rep_tc cab__tvs) + - cab_rhs will be (rep_tc cab_tvs) i.e. RHS is un-saturated - This eta reduction happens for data instances as well @@ -431,7 +425,7 @@ But for a /type/ family There are certain situations (e.g., pretty-printing) where it is necessary to deal with eta-expanded data family instances. For these situations, the -cab_eta_tvs field records the stuff that has been eta-expanded away. +cab_eta_tvs field records the stuff that has been eta-reduced away. So if we have axiom forall a b. F [a->b] = D b a and cab_eta_tvs is [p,q], then the original user-written definition diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs index 0fff81c..2fd060a 100644 --- a/compiler/types/Type.hs +++ b/compiler/types/Type.hs @@ -1389,14 +1389,16 @@ mkLamType v ty mkLamTypes vs ty = foldr mkLamType ty vs --- | Given a list of type-level vars and a result kind, +-- | Given a list of type-level vars and the free vars of a result kind, -- makes TyCoBinders, preferring anonymous binders -- if the variable is, in fact, not dependent. -- e.g. mkTyConBindersPreferAnon [(k:*),(b:k),(c:k)] (k->k) -- We want (k:*) Named, (b:k) Anon, (c:k) Anon -- -- All non-coercion binders are /visible/. -mkTyConBindersPreferAnon :: [TyVar] -> TyCoVarSet -> [TyConBinder] +mkTyConBindersPreferAnon :: [TyVar] -- ^ binders + -> TyCoVarSet -- ^ free variables of result + -> [TyConBinder] mkTyConBindersPreferAnon vars inner_tkvs = ASSERT( all isTyVar vars) fst (go vars) where From git at git.haskell.org Sun Jan 13 00:06:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:09 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: rts: Use always-available locking operations in pthread Itimer implementation (de5bed4) Message-ID: <20190113000609.773C03ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/de5bed4064380343cc8286eea626e38d64fd1f68/ghc >--------------------------------------------------------------- commit de5bed4064380343cc8286eea626e38d64fd1f68 Author: Ben Gamari Date: Wed Jan 9 09:17:05 2019 -0500 rts: Use always-available locking operations in pthread Itimer implementation Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK instead. >--------------------------------------------------------------- de5bed4064380343cc8286eea626e38d64fd1f68 rts/posix/itimer/Pthread.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index 817c40f..6f9cd8f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -134,12 +134,12 @@ static void *itimer_thread_func(void *_handle_tick) // first try a cheap test if (stopped) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); // should we really stop? if (stopped) { waitCondition(&start_cond, &mutex); } - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } else { handle_tick(0); } @@ -176,19 +176,19 @@ initTicker (Time interval, TickProc handle_tick) void startTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 0; signalCondition(&start_cond); - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ void stopTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 1; - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ From git at git.haskell.org Sun Jan 13 00:06:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:12 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Document the Shake Lint feature. (eaa62f8) Message-ID: <20190113000612.917FD3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/eaa62f8ad88737d08b07d64405a56d98340e7556/ghc >--------------------------------------------------------------- commit eaa62f8ad88737d08b07d64405a56d98340e7556 Author: Andrey Mokhov Date: Thu Jan 10 23:27:07 2019 +0000 Document the Shake Lint feature. >--------------------------------------------------------------- eaa62f8ad88737d08b07d64405a56d98340e7556 hadrian/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadrian/README.md b/hadrian/README.md index 2400699..a94a51b 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -116,6 +116,11 @@ this flag. * `--verbose`: run Hadrian in verbose mode. In particular this prints diagnostic messages by Shake oracles. +* `--lint`: run [Shake Lint](https://shakebuild.com/manual#lint) during the +build to check that the build system is well formed. Note that the Lint check +currently fails under certain circumstances, as discussed in +[this ticket](https://ghc.haskell.org/trac/ghc/ticket/15971). + #### User settings The Make-based build system uses `mk/build.mk` to specify user build settings. From git at git.haskell.org Sun Jan 13 00:06:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:15 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Clarify when to follow the instructions in doc/windows.md. (0b57486) Message-ID: <20190113000615.898CC3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/0b57486fb002ff2a42b1478d4e48d961a381912e/ghc >--------------------------------------------------------------- commit 0b57486fb002ff2a42b1478d4e48d961a381912e Author: Andrey Mokhov Date: Thu Jan 10 23:18:47 2019 +0000 Clarify when to follow the instructions in doc/windows.md. See https://gitlab.haskell.org/ghc/ghc/merge_requests/100#note_2349. >--------------------------------------------------------------- 0b57486fb002ff2a42b1478d4e48d961a381912e hadrian/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hadrian/README.md b/hadrian/README.md index 9909f10..2400699 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -40,10 +40,14 @@ or simply `-c`. See the overview of command line flags below. Notes: -* If the default build script doesn't work, you might want to give a try to -another one, e.g. based on Cabal sandboxes (`build.cabal.*`) or -Stack (`build.stack.*`). Also see -[instructions for building GHC on Windows using Stack][windows-build]. +* If the default build script doesn't work, you might want to try another one, +e.g. based on Cabal sandboxes (`build.cabal.*`), Stack (`build.stack.*`) or Nix +(`build.stack.nix.*`). + +* On Windows, if you do not want to install MSYS, you can use the Stack-based +build script (Stack provides a managed MSYS environment), as described in +[these instructions][windows-build]. If you don't mind installing MSYS yourself +or already have it, you can use the Cabal-based build script. * Hadrian is written in Haskell and depends on `shake` (plus a few packages that `shake` depends on), `mtl`, `quickcheck`, and GHC core libraries. From git at git.haskell.org Sun Jan 13 00:06:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:18 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: gitlab-ci: Cleanup Windows builds (ad82b7b) Message-ID: <20190113000618.82C3E3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/ad82b7b08e4a34a81765b9636e75472654c3c52e/ghc >--------------------------------------------------------------- commit ad82b7b08e4a34a81765b9636e75472654c3c52e Author: Ben Gamari Date: Sat Jan 5 23:28:49 2019 -0500 gitlab-ci: Cleanup Windows builds See Note [Cleanup on Windows]. >--------------------------------------------------------------- ad82b7b08e4a34a81765b9636e75472654c3c52e .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67b2830..162c19c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: - lint - build - full-build + - cleanup # See Note [Cleanup on Windows] ############################################################ # Runner Tags @@ -368,6 +369,35 @@ validate-x86_64-windows: tags: - x86_64-windows +# Note [Cleanup on Windows] +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# As noted in [1], gitlab-runner's shell executor doesn't clean up its working +# directory after builds. Unfortunately, we are forced to use the shell executor +# on Windows. To avoid running out of disk space we add a stage at the end of +# the build to remove the \GitLabRunner\builds directory. Since we only run a +# single build at a time on Windows this should be safe. +# +# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856 + +# See Note [Cleanup on Windows] +cleanup-windows: + stage: cleanup + tags: + - x86_64-windows + when: always + before_script: + - echo "Time to clean up" + script: + - echo "Let's go" + after_script: + - set "BUILD_DIR=%CI_PROJECT_DIR%" + - set "BUILD_DIR=%BUILD_DIR:/=\%" + - echo "Cleaning %BUILD_DIR%" + - cd \GitLabRunner + - rmdir /S /Q %BUILD_DIR%/* + - exit /b 0 + ############################################################ # Validation via CircleCI ############################################################ From git at git.haskell.org Sun Jan 13 00:06:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:21 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Hadrian: Update README.md (40e0104) Message-ID: <20190113000621.875E43ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/40e010470a20d1c0d60ecaa2bb231eb3f962c0f6/ghc >--------------------------------------------------------------- commit 40e010470a20d1c0d60ecaa2bb231eb3f962c0f6 Author: Andrey Mokhov Date: Thu Jan 10 02:13:46 2019 +0000 Hadrian: Update README.md * Update or remove a few outdated paragraphs * Use consistent naming (e.g. "Stage1" instead of occasionally "stage1") * Rewrite acknowledgements * Some more minor revisions >--------------------------------------------------------------- 40e010470a20d1c0d60ecaa2bb231eb3f962c0f6 hadrian/README.md | 181 +++++++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 90 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 40e010470a20d1c0d60ecaa2bb231eb3f962c0f6 From git at git.haskell.org Sun Jan 13 00:06:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:24 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: itimer: Don't free condvar until we know ticker is stopped (688956a) Message-ID: <20190113000624.8485F3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/688956a33fafa00cae869fa6f8df6c98448598e0/ghc >--------------------------------------------------------------- commit 688956a33fafa00cae869fa6f8df6c98448598e0 Author: Ben Gamari Date: Wed Jan 9 00:20:19 2019 -0500 itimer: Don't free condvar until we know ticker is stopped When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150). Avoid this by moving the mutex destruction to the main thread. >--------------------------------------------------------------- 688956a33fafa00cae869fa6f8df6c98448598e0 rts/posix/itimer/Pthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index d8f2497..817c40f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -147,8 +147,6 @@ static void *itimer_thread_func(void *_handle_tick) if (USE_TIMERFD_FOR_ITIMER) close(timerfd); - closeMutex(&mutex); - closeCondition(&start_cond); return NULL; } @@ -207,6 +205,8 @@ exitTicker (bool wait) if (pthread_join(thread, NULL)) { sysErrorBelch("Itimer: Failed to join"); } + closeMutex(&mutex); + closeCondition(&start_cond); } else { pthread_detach(thread); } From git at git.haskell.org Sun Jan 13 00:06:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:27 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: Update `Cabal` submodule (ffca99b) Message-ID: <20190113000627.9DCE63ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/ffca99b91058f62ccee1a89d822dac91bf74ee0d/ghc >--------------------------------------------------------------- commit ffca99b91058f62ccee1a89d822dac91bf74ee0d Author: Herbert Valerio Riedel Date: Mon Jan 7 00:59:23 2019 +0100 Update `Cabal` submodule This also requires adapting `ghc-pkg` to use the new Cabal parsing API as the old ReadP-based one has finally been evicted for good. Hadrian bit finished by: Ben Gamari >--------------------------------------------------------------- ffca99b91058f62ccee1a89d822dac91bf74ee0d ghc.mk | 3 - hadrian/src/Rules/Register.hs | 16 ++- libraries/Cabal | 2 +- testsuite/tests/cabal/ghcpkg01.stdout | 246 ++++++++++++++++------------------ testsuite/tests/cabal/ghcpkg07.stdout | 13 +- utils/ghc-cabal/ghc.mk | 10 +- utils/ghc-pkg/Main.hs | 51 +++---- 7 files changed, 159 insertions(+), 182 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 ffca99b91058f62ccee1a89d822dac91bf74ee0d From git at git.haskell.org Sun Jan 13 00:06:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:30 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue: testsuite: Show both test name and way in JUnit output (6b38ddc) Message-ID: <20190113000630.973D83ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/merge-queue Link : http://ghc.haskell.org/trac/ghc/changeset/6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf/ghc >--------------------------------------------------------------- commit 6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf Author: Ben Gamari Date: Thu Jan 10 11:45:32 2019 -0500 testsuite: Show both test name and way in JUnit output >--------------------------------------------------------------- 6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf testsuite/driver/junit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/driver/junit.py b/testsuite/driver/junit.py index f2dbebb..f5daec1 100644 --- a/testsuite/driver/junit.py +++ b/testsuite/driver/junit.py @@ -15,24 +15,24 @@ def junit(t): ('unexpected failure', t.unexpected_failures)]: for (directory, testname, reason, way) in group: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'failure', type = res_type, message = reason) for (directory, testname, reason, way) in t.framework_failures: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'error', type = "framework failure", message = reason) for (directory, testname, way) in t.expected_passes: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) return ET.ElementTree(testsuites) From git at git.haskell.org Sun Jan 13 00:06:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 13 Jan 2019 00:06:33 +0000 (UTC) Subject: [commit: ghc] wip/merge-queue's head updated: gitlab-ci: Cleanup Windows builds (ad82b7b) Message-ID: <20190113000633.9AC803ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'wip/merge-queue' now includes: c0448c1 gitlab-ci: Clone haddock from its upstream repository 1c9dab2 fix-submodules: Rip out typing 6b5ec08 Check that libs found by GCC aren't folders 6b70cf6 Be pickier about unsaturated synonyms in :kind 6486c6e Hadrian: Add support for building stage3 82d1a88 Implement a sanity check for CCS fields in profiling builds c2455e6 Run typed splices in the zonker 92b684d More minor comment improvements 688956a itimer: Don't free condvar until we know ticker is stopped de5bed4 rts: Use always-available locking operations in pthread Itimer implementation ffca99b Update `Cabal` submodule 6b38ddc testsuite: Show both test name and way in JUnit output 40e0104 Hadrian: Update README.md 0b57486 Clarify when to follow the instructions in doc/windows.md. eaa62f8 Document the Shake Lint feature. ad82b7b gitlab-ci: Cleanup Windows builds From git at git.haskell.org Tue Jan 15 12:15:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 12:15:38 +0000 (UTC) Subject: [commit: nofib] master: Update README.md (e62a49d) Message-ID: <20190115121538.3EF313ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e62a49d30bd175c5e98b79cba7e7789dd6c387cd/nofib >--------------------------------------------------------------- commit e62a49d30bd175c5e98b79cba7e7789dd6c387cd Author: Abhiroop Sarkar Date: Sun Jan 13 17:09:28 2019 -0500 Update README.md >--------------------------------------------------------------- e62a49d30bd175c5e98b79cba7e7789dd6c387cd README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a72a09e..629cb4b 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ system GHC: Then, to run the tests, execute: ``` +$ cabal install html regex-compat $ make clean # or git clean -fxd, it's faster $ # Generates input files for the benchmarks and builds compilation $ # dependencies for make (ghc -M) From git at git.haskell.org Tue Jan 15 12:24:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 12:24:13 +0000 (UTC) Subject: [commit: nofib] branch 'patch-2' created Message-ID: <20190115122413.196CA3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : patch-2 Referencing: 8a85944c3456bdc86b6638edf91677daead036ad From git at git.haskell.org Tue Jan 15 12:24:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 12:24:15 +0000 (UTC) Subject: [commit: nofib] patch-2: READE.md: Move `cabal install` instructions (8a85944) Message-ID: <20190115122415.21FD23ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : patch-2 Link : http://ghc.haskell.org/trac/ghc/changeset/8a85944c3456bdc86b6638edf91677daead036ad/nofib >--------------------------------------------------------------- commit 8a85944c3456bdc86b6638edf91677daead036ad Author: Sebastian Graf Date: Tue Jan 15 07:23:57 2019 -0500 READE.md: Move `cabal install` instructions >--------------------------------------------------------------- 8a85944c3456bdc86b6638edf91677daead036ad README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 629cb4b..38fd5dc 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,15 @@ system GHC: ## Using -Then, to run the tests, execute: +Install the [package dependencies](#package-dependencies): ``` $ cabal install html regex-compat +``` + +Then, to run the tests, execute: + +``` $ make clean # or git clean -fxd, it's faster $ # Generates input files for the benchmarks and builds compilation $ # dependencies for make (ghc -M) From git at git.haskell.org Tue Jan 15 13:18:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 13:18:05 +0000 (UTC) Subject: [commit: nofib] master: Make `git clean -nxd` silent after `make distclean` (cc8fc60) Message-ID: <20190115131805.61E453ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/cc8fc601f8869ebf75c58abccd8afc04dd8f0ec4/nofib >--------------------------------------------------------------- commit cc8fc601f8869ebf75c58abccd8afc04dd8f0ec4 Author: Sebastian Graf Date: Tue Jan 8 13:45:02 2019 +0100 Make `git clean -nxd` silent after `make distclean` Also check that invariant in CI: After a `make distclean` `git clean -nxd` should find no files. The hope is that this catches cases were a `make clean` would forget to list a `.gitignore`d file that should either be registered as a `(DIST_)CLEAN_FILES` or should be unignored and committed into the repository. >--------------------------------------------------------------- cc8fc601f8869ebf75c58abccd8afc04dd8f0ec4 .gitlab-ci.yml | 10 ++++++++++ nofib-analyse/Makefile | 13 +++++++++++-- real/maillist/Makefile | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1acca61..8b6c308 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,3 +11,13 @@ validate: - make boot mode=fast - "make mode=fast NoFibRuns=1 2>&1 | tee log" - "nofib-analyse/nofib-analyse log" + - | + # The following checks that `make distclean` removes any files reported + # by `git clean -fxd` + make distclean + files=$(git clean -nxd | cut -d" " -f3 | sed "/log/d") + if ! [ -z $files ] + then + echo "The following files weren't cleaned:\n$files" + exit 1 + fi diff --git a/nofib-analyse/Makefile b/nofib-analyse/Makefile index 5691121..0e9236b 100644 --- a/nofib-analyse/Makefile +++ b/nofib-analyse/Makefile @@ -10,8 +10,17 @@ all :: $(PROG) boot :: $(PROG) -clean: - rm -f $(PROG) +# This clean hierarchy mirrors mk/ghc-target.mk. +# See mk/ghc-paths.mk for the semantics. + +.PHONY: mostlyclean clean distclean maintainer-clean + +mostlyclean:: rm -f CmdLine.hi GenUtils.hi Main.hi Slurp.hi rm -f CmdLine.o GenUtils.o Main.o Slurp.o +clean:: mostlyclean + rm -f $(PROG) + +distclean:: clean +maintainer-clean:: distclean diff --git a/real/maillist/Makefile b/real/maillist/Makefile index c9a17b2..f575874 100644 --- a/real/maillist/Makefile +++ b/real/maillist/Makefile @@ -5,3 +5,5 @@ include $(TOP)/mk/target.mk FAST_OPTS = runtime_files/fast NORM_OPTS = runtime_files/norm SLOW_OPTS = runtime_files/slow + +CLEAN_FILES += runtime_files/*.tex From git at git.haskell.org Tue Jan 15 16:28:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 16:28:39 +0000 (UTC) Subject: [commit: nofib] master: Re-enable cacheprof (6cfa098) Message-ID: <20190115162839.C3A853ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6cfa09804f79153c5f1ddb03d1806ccbfbe48fc5/nofib >--------------------------------------------------------------- commit 6cfa09804f79153c5f1ddb03d1806ccbfbe48fc5 Author: Sebastian Graf Date: Wed Jan 9 14:52:10 2019 +0100 Re-enable cacheprof >--------------------------------------------------------------- 6cfa09804f79153c5f1ddb03d1806ccbfbe48fc5 real/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/real/Makefile b/real/Makefile index ce7d850..64a9e8e 100644 --- a/real/Makefile +++ b/real/Makefile @@ -1,7 +1,7 @@ TOP = .. include $(TOP)/mk/boilerplate.mk -SUBDIRS = anna bspt compress compress2 fem fluid fulsom gamteb gg \ +SUBDIRS = anna bspt cacheprof compress compress2 fem fluid fulsom gamteb gg \ grep hidden hpg infer lift linear maillist mkhprog parser pic prolog \ reptile rsa scs symalg veritas eff From git at git.haskell.org Tue Jan 15 17:42:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:42:50 +0000 (UTC) Subject: [commit: ghc] branch 'wip/gitlab-ci-perf-notes_2' created Message-ID: <20190115174250.550A13ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/gitlab-ci-perf-notes_2 Referencing: d1a2c4dd3c4f0c634e4c4439ce1a66f4a9bc549b From git at git.haskell.org Tue Jan 15 17:42:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:42:52 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16185' created Message-ID: <20190115174252.54F0D3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16185 Referencing: 4d76b1084f6c386cc945341ebf3377339f41572d From git at git.haskell.org Tue Jan 15 17:42:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:42:55 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Documentation and refactoring in CCS related code (cb2349a) Message-ID: <20190115174255.6DDCE3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/cb2349a4233d6bdef2d7090853397e6278a7378c/ghc >--------------------------------------------------------------- commit cb2349a4233d6bdef2d7090853397e6278a7378c Author: Ömer Sinan Ağacan Date: Thu Jan 10 14:39:16 2019 +0300 Documentation and refactoring in CCS related code - Remove REGISTER_CC and REGISTER_CCS macros, add functions registerCC and registerCCS to Profiling.c. - Reduce scope of symbols: CC_LIST, CCS_LIST, CC_ID, CCS_ID - Document CC_LIST and CCS_LIST >--------------------------------------------------------------- cb2349a4233d6bdef2d7090853397e6278a7378c includes/rts/prof/CCS.h | 32 ----------------- includes/stg/MiscClosures.h | 4 --- rts/Profiling.c | 86 +++++++++++++++++++++++++++++---------------- rts/RtsSymbols.c | 3 -- 4 files changed, 56 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 cb2349a4233d6bdef2d7090853397e6278a7378c From git at git.haskell.org Tue Jan 15 17:42:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:42:58 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime (74cd4ec) Message-ID: <20190115174258.7BC143ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/74cd4ec5d2f9321aad5db3285cb60d78f2562996/ghc >--------------------------------------------------------------- commit 74cd4ec5d2f9321aad5db3285cb60d78f2562996 Author: Ömer Sinan Ağacan Date: Thu Jan 10 11:55:25 2019 +0300 Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime UNDERFLOW_FRAMEs don't have profiling headers so we have to use the AP_STACK's function's CCS as the new frame's CCS. Fixes one of the many bugs caught by concprog001 (#15508). >--------------------------------------------------------------- 74cd4ec5d2f9321aad5db3285cb60d78f2562996 rts/RaiseAsync.c | 3 +-- testsuite/tests/concurrent/prog001/all.T | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index 72f5dff..f58f917 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -921,8 +921,7 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception, ap->payload[i] = (StgClosure *)*sp++; } - SET_HDR(ap,&stg_AP_STACK_NOUPD_info, - ((StgClosure *)frame)->header.prof.ccs /* ToDo */); + SET_HDR(ap,&stg_AP_STACK_NOUPD_info,stack->header.prof.ccs); TICK_ALLOC_SE_THK(WDS(words+1),0); stack->sp = sp; diff --git a/testsuite/tests/concurrent/prog001/all.T b/testsuite/tests/concurrent/prog001/all.T index 1476b4f..e319583 100644 --- a/testsuite/tests/concurrent/prog001/all.T +++ b/testsuite/tests/concurrent/prog001/all.T @@ -13,5 +13,6 @@ # right now. --SDM 1/4/2010 test('concprog001', [extra_files(['Arithmetic.hs', 'Converter.hs', 'Mult.hs', 'Stream.hs', 'Thread.hs', 'Trit.hs', 'Utilities.hs']), - when(fast(), skip), only_ways(['threaded2'])], + when(fast(), skip), only_ways(['threaded2']), + run_timeout_multiplier(2)], multimod_compile_and_run, ['Mult', '']) From git at git.haskell.org Tue Jan 15 17:43:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:02 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Fix negative mutator time in GC stats in prof builds (19670bc) Message-ID: <20190115174302.4168D3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/19670bc397d858b04eb9b4eb01480f7f8c59e2f5/ghc >--------------------------------------------------------------- commit 19670bc397d858b04eb9b4eb01480f7f8c59e2f5 Author: Ömer Sinan Ağacan Date: Fri Dec 28 13:51:28 2018 +0300 Fix negative mutator time in GC stats in prof builds Because garbage collector calls `retainerProfile()` and `heapCensus()`, GC times normally include some of PROF times too. To fix this we have these lines: // heapCensus() is called by the GC, so RP and HC time are // included in the GC stats. We therefore subtract them to // obtain the actual GC cpu time. stats.gc_cpu_ns -= prof_cpu; stats.gc_elapsed_ns -= prof_elapsed; These variables are later used for calculating GC time excluding the final GC (which should be attributed to EXIT). exit_gc_elapsed = stats.gc_elapsed_ns - start_exit_gc_elapsed; The problem is if we subtract PROF times from `gc_elapsed_ns` and then subtract `start_exit_gc_elapsed` from the result, we end up subtracting PROF times twice, because `start_exit_gc_elapsed` also includes PROF times. We now subtract PROF times from GC after the calculations for EXIT and MUT times. The existing assertion that checks INIT + MUT + GC + EXIT = TOTAL now holds. When we subtract PROF numbers from GC, and a new assertion INIT + MUT + GC + PROF + EXIT = TOTAL also holds. Fixes #15897. New assertions added in this commit also revealed #16102, which is also fixed by this commit. >--------------------------------------------------------------- 19670bc397d858b04eb9b4eb01480f7f8c59e2f5 rts/Schedule.c | 4 + rts/Stats.c | 114 ++++++++++++++----------- rts/Stats.h | 1 + testsuite/tests/profiling/should_run/Makefile | 8 ++ testsuite/tests/profiling/should_run/T15897.hs | 7 ++ testsuite/tests/profiling/should_run/all.T | 5 ++ 6 files changed, 90 insertions(+), 49 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 19670bc397d858b04eb9b4eb01480f7f8c59e2f5 From git at git.haskell.org Tue Jan 15 17:43:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:05 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Don't invoke dataConSrcToImplBang on newtypes (076f586) Message-ID: <20190115174305.CDD593ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/076f5862a9e46eef762ba19fb7b14e75fa03c2c0/ghc >--------------------------------------------------------------- commit 076f5862a9e46eef762ba19fb7b14e75fa03c2c0 Author: Ryan Scott Date: Sat Jan 12 19:05:46 2019 -0500 Don't invoke dataConSrcToImplBang on newtypes >--------------------------------------------------------------- 076f5862a9e46eef762ba19fb7b14e75fa03c2c0 compiler/basicTypes/MkId.hs | 48 ++++++++++++++++++---- testsuite/tests/typecheck/should_compile/T16141.hs | 13 ++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index 5a6f1fb..17916cf 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -616,6 +616,8 @@ mkDataConRep dflags fam_envs wrap_name mb_bangs data_con , dcr_boxer = mk_boxer boxers , dcr_arg_tys = rep_tys , dcr_stricts = rep_strs + -- For newtypes, dcr_bangs is always [HsLazy]. + -- See Note [HsImplBangs for newtypes]. , dcr_bangs = arg_ibangs }) } where @@ -637,11 +639,16 @@ mkDataConRep dflags fam_envs wrap_name mb_bangs data_con -- Because we are going to apply the eq_spec args manually in the -- wrapper - arg_ibangs = - case mb_bangs of - Nothing -> zipWith (dataConSrcToImplBang dflags fam_envs) - orig_arg_tys orig_bangs - Just bangs -> bangs + new_tycon = isNewTyCon tycon + arg_ibangs + | new_tycon + = ASSERT( isSingleton orig_arg_tys ) + [HsLazy] -- See Note [HsImplBangs for newtypes] + | otherwise + = case mb_bangs of + Nothing -> zipWith (dataConSrcToImplBang dflags fam_envs) + orig_arg_tys orig_bangs + Just bangs -> bangs (rep_tys_w_strs, wrappers) = unzip (zipWith dataConArgRep all_arg_tys (ev_ibangs ++ arg_ibangs)) @@ -650,7 +657,7 @@ mkDataConRep dflags fam_envs wrap_name mb_bangs data_con (rep_tys, rep_strs) = unzip (concat rep_tys_w_strs) wrapper_reqd = - (not (isNewTyCon tycon) + (not new_tycon -- (Most) newtypes have only a worker, with the exception -- of some newtypes written with GADT syntax. See below. && (any isBanged (ev_ibangs ++ arg_ibangs) @@ -774,6 +781,29 @@ wrappers! After all, a newtype can also be written with GADT syntax: Again, this needs a wrapper data con to reorder the type variables. It does mean that this newtype constructor requires another level of indirection when being called, but the inliner should make swift work of that. + +Note [HsImplBangs for newtypes] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Most of the time, we use the dataConSrctoImplBang function to decide what +strictness/unpackedness to use for the fields of a data type constructor. But +there is an exception to this rule: newtype constructors. You might not think +that newtypes would pose a challenge, since newtypes are seemingly forbidden +from having strictness annotations in the first place. But consider this +(from Trac #16141): + + {-# LANGUAGE StrictData #-} + {-# OPTIONS_GHC -O #-} + newtype T a b where + MkT :: forall b a. Int -> T a b + +Because StrictData (plus optimization) is enabled, invoking +dataConSrcToImplBang would sneak in and unpack the field of type Int to Int#! +This would be disastrous, since the wrapper for `MkT` uses a coercion involving +Int, not Int#. + +Bottom line: dataConSrcToImplBang should never be invoked for newtypes. In the +case of a newtype constructor, we simply hardcode its dcr_bangs field to +[HsLazy]. -} ------------------------- @@ -781,7 +811,11 @@ newLocal :: Type -> UniqSM Var newLocal ty = do { uniq <- getUniqueM ; return (mkSysLocalOrCoVar (fsLit "dt") uniq ty) } --- | Unpack/Strictness decisions from source module +-- | Unpack/Strictness decisions from source module. +-- +-- This function should only ever be invoked for data constructor fields, and +-- never on the field of a newtype constructor. +-- See @Note [HsImplBangs for newtypes]@. dataConSrcToImplBang :: DynFlags -> FamInstEnvs diff --git a/testsuite/tests/typecheck/should_compile/T16141.hs b/testsuite/tests/typecheck/should_compile/T16141.hs new file mode 100644 index 0000000..da9f2cc --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16141.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StrictData #-} +{-# LANGUAGE TypeFamilies #-} +module T16141 where + +data family T1 +newtype instance T1 = MkT1 Int + deriving Eq + +newtype T2 a b where + MkT2 :: forall b a. Int -> T2 a b + deriving Eq diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 9d1fc18..3ad727d 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -663,3 +663,4 @@ test('T15778', normal, compile, ['']) test('T14761c', normal, compile, ['']) test('T16008', normal, compile, ['']) test('T16033', normal, compile, ['']) +test('T16141', normal, compile, ['-O']) From git at git.haskell.org Tue Jan 15 17:43:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:08 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Fix checkPtrInArena (448f0e7) Message-ID: <20190115174308.C55E73ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/448f0e7dd78a8d9404f1aa5e8522cc284360c06d/ghc >--------------------------------------------------------------- commit 448f0e7dd78a8d9404f1aa5e8522cc284360c06d Author: Ömer Sinan Ağacan Date: Sat Jan 12 16:08:24 2019 +0300 Fix checkPtrInArena (See comments) >--------------------------------------------------------------- 448f0e7dd78a8d9404f1aa5e8522cc284360c06d rts/Arena.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rts/Arena.c b/rts/Arena.c index e0b4ebd..a4ff11b 100644 --- a/rts/Arena.c +++ b/rts/Arena.c @@ -121,8 +121,17 @@ arenaBlocks( void ) #if defined(DEBUG) void checkPtrInArena( StgPtr p, Arena *arena ) { - for (bdescr *bd = arena->current; bd; bd = bd->link) { - if (p >= bd->start && p < bd->free) { + // We don't update free pointers of arena blocks, so we have to check cached + // free pointer for the first block. + if (p >= arena->current->start && p < arena->free) { + return; + } + + // Rest of the blocks should be full (except there may be a little bit of + // slop at the end). Again, free pointers are not updated so we can't use + // those. + for (bdescr *bd = arena->current->link; bd; bd = bd->link) { + if (p >= bd->start && p < bd->start + (bd->blocks*BLOCK_SIZE_W)) { return; } } From git at git.haskell.org Tue Jan 15 17:43:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:13 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Refactor GHCi UI to fix #11606, #12091, #15721, #16096 (a34ee61) Message-ID: <20190115174313.8122A3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/a34ee61545930d569d0dbafb3a4a5db3a7a711e5/ghc >--------------------------------------------------------------- commit a34ee61545930d569d0dbafb3a4a5db3a7a711e5 Author: Ömer Sinan Ağacan Date: Wed Jan 9 18:44:48 2019 +0300 Refactor GHCi UI to fix #11606, #12091, #15721, #16096 Instead of parsing and executing a statement or declaration directly we now parse them first and then execute in a separate step. This gives us the flexibility to inspect the parsed declaration before execution. Using this we now inspect parsed declarations, and if it's a single declaration of form `x = y` we execute it as `let x = y` instead, fixing a ton of problems caused by poor declaration support in GHCi. To avoid any users of the modules I left `execStmt` and `runDecls` unchanged and added `execStmt'` and `runDecls'` which work on parsed statements/declarations. >--------------------------------------------------------------- a34ee61545930d569d0dbafb3a4a5db3a7a711e5 compiler/deSugar/Desugar.hs | 19 +---- compiler/main/GHC.hs | 4 +- compiler/main/HscMain.hs | 18 ++++- compiler/main/HscTypes.hs | 12 +-- compiler/main/InteractiveEval.hs | 54 ++++++++++---- ghc/GHCi/UI.hs | 101 +++++++++++++++++++------- ghc/GHCi/UI/Monad.hs | 22 ++++-- testsuite/tests/ghci/scripts/T11606.script | 5 ++ testsuite/tests/ghci/scripts/T11606.stderr | 12 +++ testsuite/tests/ghci/scripts/T16089.script | 4 + testsuite/tests/ghci/scripts/T16089.stdout | 3 + testsuite/tests/ghci/scripts/all.T | 4 +- testsuite/tests/ghci/should_run/T12525.stdout | 2 +- testsuite/tests/ghci/should_run/T16096.script | 4 + testsuite/tests/ghci/should_run/T16096.stdout | 56 ++++++++++++++ testsuite/tests/ghci/should_run/all.T | 2 + 16 files changed, 246 insertions(+), 76 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 a34ee61545930d569d0dbafb3a4a5db3a7a711e5 From git at git.haskell.org Tue Jan 15 17:43:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:16 +0000 (UTC) Subject: [commit: ghc] wip/T16185: PPC NCG: Reduce memory consumption emitting string literals (4ad9ffd) Message-ID: <20190115174316.78EC23ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/4ad9ffd3897924313fb509515c60b4f09429e5cf/ghc >--------------------------------------------------------------- commit 4ad9ffd3897924313fb509515c60b4f09429e5cf Author: Peter Trommler Date: Sun Jan 13 16:36:07 2019 -0500 PPC NCG: Reduce memory consumption emitting string literals >--------------------------------------------------------------- 4ad9ffd3897924313fb509515c60b4f09429e5cf compiler/nativeGen/PPC/Ppr.hs | 18 +++------------- compiler/nativeGen/PprBase.hs | 47 +++++++++++++++++++++++++++++++++++++++++ compiler/nativeGen/SPARC/Ppr.hs | 15 +++++-------- compiler/nativeGen/X86/Ppr.hs | 41 ----------------------------------- 4 files changed, 55 insertions(+), 66 deletions(-) diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index d7175b8..6aafb59 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -125,12 +125,9 @@ pprDatas :: CmmStatics -> SDoc pprDatas (Statics lbl dats) = vcat (pprLabel lbl : map pprData dats) pprData :: CmmStatic -> SDoc -pprData (CmmString str) = pprASCII str -pprData (CmmUninitialised bytes) = keyword <> int bytes - where keyword = sdocWithPlatform $ \platform -> - case platformOS platform of - OSAIX -> text ".space " - _ -> text ".skip " +pprData (CmmString str) + = text "\t.string" <+> doubleQuotes (pprASCII str) +pprData (CmmUninitialised bytes) = text ".space " <> int bytes pprData (CmmStaticLit lit) = pprDataItem lit pprGloblDecl :: CLabel -> SDoc @@ -151,15 +148,6 @@ pprLabel lbl = pprGloblDecl lbl $$ pprTypeAndSizeDecl lbl $$ (ppr lbl <> char ':') - -pprASCII :: [Word8] -> SDoc -pprASCII str - = vcat (map do1 str) $$ do1 0 - where - do1 :: Word8 -> SDoc - do1 w = text "\t.byte\t" <> int (fromIntegral w) - - -- ----------------------------------------------------------------------------- -- pprInstr: print an 'Instr' diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs index d96b187..58566cf 100644 --- a/compiler/nativeGen/PprBase.hs +++ b/compiler/nativeGen/PprBase.hs @@ -11,6 +11,7 @@ module PprBase ( castDoubleToWord8Array, floatToBytes, doubleToBytes, + pprASCII, pprSectionHeader ) @@ -32,6 +33,7 @@ import Data.Array.ST import Control.Monad.ST import Data.Word +import Data.Char @@ -82,6 +84,51 @@ doubleToBytes d return (map fromIntegral [i0,i1,i2,i3,i4,i5,i6,i7]) ) +-- --------------------------------------------------------------------------- +-- Printing ASCII strings. +-- +-- Print as a string and escape non-printable characters. +-- This is similar to charToC in Utils. + +pprASCII :: [Word8] -> SDoc +pprASCII str + -- Transform this given literal bytestring to escaped string and construct + -- the literal SDoc directly. + -- See Trac #14741 + -- and Note [Pretty print ASCII when AsmCodeGen] + = text $ foldr (\w s -> (do1 . fromIntegral) w ++ s) "" str + where + do1 :: Int -> String + do1 w | '\t' <- chr w = "\\t" + | '\n' <- chr w = "\\n" + | '"' <- chr w = "\\\"" + | '\\' <- chr w = "\\\\" + | isPrint (chr w) = [chr w] + | otherwise = '\\' : octal w + + octal :: Int -> String + octal w = [ chr (ord '0' + (w `div` 64) `mod` 8) + , chr (ord '0' + (w `div` 8) `mod` 8) + , chr (ord '0' + w `mod` 8) + ] + +{- +Note [Pretty print ASCII when AsmCodeGen] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Previously, when generating assembly code, we created SDoc with +`(ptext . sLit)` for every bytes in literal bytestring, then +combine them using `hcat`. + +When handling literal bytestrings with millions of bytes, +millions of SDoc would be created and to combine, leading to +high memory usage. + +Now we escape the given bytestring to string directly and construct +SDoc only once. This improvement could dramatically decrease the +memory allocation from 4.7GB to 1.3GB when embedding a 3MB literal +string in source code. See Trac #14741 for profiling results. +-} + -- ---------------------------------------------------------------------------- -- Printing section headers. -- diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index b4cdbda..7fc3e21 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -109,7 +109,11 @@ pprDatas :: CmmStatics -> SDoc pprDatas (Statics lbl dats) = vcat (pprLabel lbl : map pprData dats) pprData :: CmmStatic -> SDoc -pprData (CmmString str) = pprASCII str +pprData (CmmString str) + = vcat (map do1 str) $$ do1 0 + where + do1 :: Word8 -> SDoc + do1 w = text "\t.byte\t" <> int (fromIntegral w) pprData (CmmUninitialised bytes) = text ".skip " <> int bytes pprData (CmmStaticLit lit) = pprDataItem lit @@ -130,15 +134,6 @@ pprLabel lbl = pprGloblDecl lbl $$ pprTypeAndSizeDecl lbl $$ (ppr lbl <> char ':') - -pprASCII :: [Word8] -> SDoc -pprASCII str - = vcat (map do1 str) $$ do1 0 - where - do1 :: Word8 -> SDoc - do1 w = text "\t.byte\t" <> int (fromIntegral w) - - -- ----------------------------------------------------------------------------- -- pprInstr: print an 'Instr' diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 141e781..bf449d0 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -48,8 +48,6 @@ import Outputable import Data.Word -import Data.Char - import Data.Bits -- ----------------------------------------------------------------------------- @@ -243,45 +241,6 @@ pprLabel lbl = pprGloblDecl lbl $$ pprTypeDecl lbl $$ (ppr lbl <> char ':') -{- -Note [Pretty print ASCII when AsmCodeGen] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, when generating assembly code, we created SDoc with -`(ptext . sLit)` for every bytes in literal bytestring, then -combine them using `hcat`. - -When handling literal bytestrings with millions of bytes, -millions of SDoc would be created and to combine, leading to -high memory usage. - -Now we escape the given bytestring to string directly and construct -SDoc only once. This improvement could dramatically decrease the -memory allocation from 4.7GB to 1.3GB when embedding a 3MB literal -string in source code. See Trac #14741 for profiling results. --} - -pprASCII :: [Word8] -> SDoc -pprASCII str - -- Transform this given literal bytestring to escaped string and construct - -- the literal SDoc directly. - -- See Trac #14741 - -- and Note [Pretty print ASCII when AsmCodeGen] - = ptext $ sLit $ foldr (\w s -> (do1 . fromIntegral) w ++ s) "" str - where - do1 :: Int -> String - do1 w | '\t' <- chr w = "\\t" - | '\n' <- chr w = "\\n" - | '"' <- chr w = "\\\"" - | '\\' <- chr w = "\\\\" - | isPrint (chr w) = [chr w] - | otherwise = '\\' : octal w - - octal :: Int -> String - octal w = [ chr (ord '0' + (w `div` 64) `mod` 8) - , chr (ord '0' + (w `div` 8) `mod` 8) - , chr (ord '0' + w `mod` 8) - ] - pprAlign :: Int -> SDoc pprAlign bytes = sdocWithPlatform $ \platform -> From git at git.haskell.org Tue Jan 15 17:43:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:19 +0000 (UTC) Subject: [commit: ghc] wip/T16185: rts: Use always-available locking operations in pthread Itimer implementation (ce11f6f) Message-ID: <20190115174319.7436C3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/ce11f6f25c1160262830d9670c4eaaebac37cbaf/ghc >--------------------------------------------------------------- commit ce11f6f25c1160262830d9670c4eaaebac37cbaf Author: Ben Gamari Date: Wed Jan 9 09:17:05 2019 -0500 rts: Use always-available locking operations in pthread Itimer implementation Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK instead. >--------------------------------------------------------------- ce11f6f25c1160262830d9670c4eaaebac37cbaf rts/posix/itimer/Pthread.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index 817c40f..6f9cd8f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -134,12 +134,12 @@ static void *itimer_thread_func(void *_handle_tick) // first try a cheap test if (stopped) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); // should we really stop? if (stopped) { waitCondition(&start_cond, &mutex); } - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } else { handle_tick(0); } @@ -176,19 +176,19 @@ initTicker (Time interval, TickProc handle_tick) void startTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 0; signalCondition(&start_cond); - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ void stopTicker(void) { - ACQUIRE_LOCK(&mutex); + OS_ACQUIRE_LOCK(&mutex); stopped = 1; - RELEASE_LOCK(&mutex); + OS_RELEASE_LOCK(&mutex); } /* There may be at most one additional tick fired after a call to this */ From git at git.haskell.org Tue Jan 15 17:43:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:22 +0000 (UTC) Subject: [commit: ghc] wip/T16185: gitlab-ci: Cleanup Windows builds (69947d5) Message-ID: <20190115174322.6A7B73ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/69947d58c29cc0b047cc34fb4873e12f47e9674c/ghc >--------------------------------------------------------------- commit 69947d58c29cc0b047cc34fb4873e12f47e9674c Author: Ben Gamari Date: Sat Jan 5 23:28:49 2019 -0500 gitlab-ci: Cleanup Windows builds See Note [Cleanup on Windows]. >--------------------------------------------------------------- 69947d58c29cc0b047cc34fb4873e12f47e9674c .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67b2830..162c19c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: - lint - build - full-build + - cleanup # See Note [Cleanup on Windows] ############################################################ # Runner Tags @@ -368,6 +369,35 @@ validate-x86_64-windows: tags: - x86_64-windows +# Note [Cleanup on Windows] +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# As noted in [1], gitlab-runner's shell executor doesn't clean up its working +# directory after builds. Unfortunately, we are forced to use the shell executor +# on Windows. To avoid running out of disk space we add a stage at the end of +# the build to remove the \GitLabRunner\builds directory. Since we only run a +# single build at a time on Windows this should be safe. +# +# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856 + +# See Note [Cleanup on Windows] +cleanup-windows: + stage: cleanup + tags: + - x86_64-windows + when: always + before_script: + - echo "Time to clean up" + script: + - echo "Let's go" + after_script: + - set "BUILD_DIR=%CI_PROJECT_DIR%" + - set "BUILD_DIR=%BUILD_DIR:/=\%" + - echo "Cleaning %BUILD_DIR%" + - cd \GitLabRunner + - rmdir /S /Q %BUILD_DIR%/* + - exit /b 0 + ############################################################ # Validation via CircleCI ############################################################ From git at git.haskell.org Tue Jan 15 17:43:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:25 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Clarify when to follow the instructions in doc/windows.md. (ef8fedc) Message-ID: <20190115174325.6728D3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/ef8fedc17355b9f9b5dd08521248462be25c324c/ghc >--------------------------------------------------------------- commit ef8fedc17355b9f9b5dd08521248462be25c324c Author: Andrey Mokhov Date: Thu Jan 10 23:18:47 2019 +0000 Clarify when to follow the instructions in doc/windows.md. See https://gitlab.haskell.org/ghc/ghc/merge_requests/100#note_2349. >--------------------------------------------------------------- ef8fedc17355b9f9b5dd08521248462be25c324c hadrian/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hadrian/README.md b/hadrian/README.md index 9909f10..2400699 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -40,10 +40,14 @@ or simply `-c`. See the overview of command line flags below. Notes: -* If the default build script doesn't work, you might want to give a try to -another one, e.g. based on Cabal sandboxes (`build.cabal.*`) or -Stack (`build.stack.*`). Also see -[instructions for building GHC on Windows using Stack][windows-build]. +* If the default build script doesn't work, you might want to try another one, +e.g. based on Cabal sandboxes (`build.cabal.*`), Stack (`build.stack.*`) or Nix +(`build.stack.nix.*`). + +* On Windows, if you do not want to install MSYS, you can use the Stack-based +build script (Stack provides a managed MSYS environment), as described in +[these instructions][windows-build]. If you don't mind installing MSYS yourself +or already have it, you can use the Cabal-based build script. * Hadrian is written in Haskell and depends on `shake` (plus a few packages that `shake` depends on), `mtl`, `quickcheck`, and GHC core libraries. From git at git.haskell.org Tue Jan 15 17:43:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:28 +0000 (UTC) Subject: [commit: ghc] wip/T16185: testsuite: Show both test name and way in JUnit output (0f3c04e) Message-ID: <20190115174328.60E853ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/0f3c04e4017b33f204efb2a62ae3a61d241eb700/ghc >--------------------------------------------------------------- commit 0f3c04e4017b33f204efb2a62ae3a61d241eb700 Author: Ben Gamari Date: Thu Jan 10 11:45:32 2019 -0500 testsuite: Show both test name and way in JUnit output >--------------------------------------------------------------- 0f3c04e4017b33f204efb2a62ae3a61d241eb700 testsuite/driver/junit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/driver/junit.py b/testsuite/driver/junit.py index f2dbebb..f5daec1 100644 --- a/testsuite/driver/junit.py +++ b/testsuite/driver/junit.py @@ -15,24 +15,24 @@ def junit(t): ('unexpected failure', t.unexpected_failures)]: for (directory, testname, reason, way) in group: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'failure', type = res_type, message = reason) for (directory, testname, reason, way) in t.framework_failures: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) result = ET.SubElement(testcase, 'error', type = "framework failure", message = reason) for (directory, testname, way) in t.expected_passes: testcase = ET.SubElement(testsuite, 'testcase', - classname = testname, - name = way) + classname = way, + name = '%s(%s)' % (testname, way)) return ET.ElementTree(testsuites) From git at git.haskell.org Tue Jan 15 17:43:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:31 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Update `Cabal` submodule (cb31b23) Message-ID: <20190115174331.68B633ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/cb31b23d39151c9a8b3c80ca11dd299224940f0d/ghc >--------------------------------------------------------------- commit cb31b23d39151c9a8b3c80ca11dd299224940f0d Author: Herbert Valerio Riedel Date: Mon Jan 7 00:59:23 2019 +0100 Update `Cabal` submodule This also requires adapting `ghc-pkg` to use the new Cabal parsing API as the old ReadP-based one has finally been evicted for good. Hadrian bit finished by: Ben Gamari >--------------------------------------------------------------- cb31b23d39151c9a8b3c80ca11dd299224940f0d ghc.mk | 3 - hadrian/src/Rules/Register.hs | 16 ++- libraries/Cabal | 2 +- testsuite/tests/cabal/ghcpkg01.stdout | 246 ++++++++++++++++------------------ testsuite/tests/cabal/ghcpkg07.stdout | 13 +- utils/ghc-cabal/ghc.mk | 10 +- utils/ghc-pkg/Main.hs | 51 +++---- 7 files changed, 159 insertions(+), 182 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 cb31b23d39151c9a8b3c80ca11dd299224940f0d From git at git.haskell.org Tue Jan 15 17:43:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:34 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Document the Shake Lint feature. (2f07a97) Message-ID: <20190115174334.66CDA3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/2f07a97ce9cbdb17e511897d514a6cffb678a843/ghc >--------------------------------------------------------------- commit 2f07a97ce9cbdb17e511897d514a6cffb678a843 Author: Andrey Mokhov Date: Thu Jan 10 23:27:07 2019 +0000 Document the Shake Lint feature. >--------------------------------------------------------------- 2f07a97ce9cbdb17e511897d514a6cffb678a843 hadrian/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadrian/README.md b/hadrian/README.md index 2400699..a94a51b 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -116,6 +116,11 @@ this flag. * `--verbose`: run Hadrian in verbose mode. In particular this prints diagnostic messages by Shake oracles. +* `--lint`: run [Shake Lint](https://shakebuild.com/manual#lint) during the +build to check that the build system is well formed. Note that the Lint check +currently fails under certain circumstances, as discussed in +[this ticket](https://ghc.haskell.org/trac/ghc/ticket/15971). + #### User settings The Make-based build system uses `mk/build.mk` to specify user build settings. From git at git.haskell.org Tue Jan 15 17:43:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:37 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Hadrian: Update README.md (ec752c4) Message-ID: <20190115174337.69E493ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/ec752c4c88ef09f84492f42f7677e90953c6bed7/ghc >--------------------------------------------------------------- commit ec752c4c88ef09f84492f42f7677e90953c6bed7 Author: Andrey Mokhov Date: Thu Jan 10 02:13:46 2019 +0000 Hadrian: Update README.md * Update or remove a few outdated paragraphs * Use consistent naming (e.g. "Stage1" instead of occasionally "stage1") * Rewrite acknowledgements * Some more minor revisions >--------------------------------------------------------------- ec752c4c88ef09f84492f42f7677e90953c6bed7 hadrian/README.md | 181 +++++++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 90 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 ec752c4c88ef09f84492f42f7677e90953c6bed7 From git at git.haskell.org Tue Jan 15 17:43:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:40 +0000 (UTC) Subject: [commit: ghc] wip/T16185: itimer: Don't free condvar until we know ticker is stopped (7b12b3f) Message-ID: <20190115174340.6648F3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/7b12b3f0240321ac1ee43f14eb9c07e015022eeb/ghc >--------------------------------------------------------------- commit 7b12b3f0240321ac1ee43f14eb9c07e015022eeb Author: Ben Gamari Date: Wed Jan 9 00:20:19 2019 -0500 itimer: Don't free condvar until we know ticker is stopped When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150). Avoid this by moving the mutex destruction to the main thread. >--------------------------------------------------------------- 7b12b3f0240321ac1ee43f14eb9c07e015022eeb rts/posix/itimer/Pthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index d8f2497..817c40f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -147,8 +147,6 @@ static void *itimer_thread_func(void *_handle_tick) if (USE_TIMERFD_FOR_ITIMER) close(timerfd); - closeMutex(&mutex); - closeCondition(&start_cond); return NULL; } @@ -207,6 +205,8 @@ exitTicker (bool wait) if (pthread_join(thread, NULL)) { sysErrorBelch("Itimer: Failed to join"); } + closeMutex(&mutex); + closeCondition(&start_cond); } else { pthread_detach(thread); } From git at git.haskell.org Tue Jan 15 17:43:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:43 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes_2: Performance tests: recover a baseline (expected value) from ancestor commits and CI results. (f3058e3) Message-ID: <20190115174343.D45543ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes_2 Link : http://ghc.haskell.org/trac/ghc/changeset/f3058e3d13137ce21d9accd4b244c84d67f98378/ghc >--------------------------------------------------------------- commit f3058e3d13137ce21d9accd4b244c84d67f98378 Author: David Eichmann Date: Thu Dec 20 09:56:23 2018 -0700 Performance tests: recover a baseline (expected value) from ancestor commits and CI results. >--------------------------------------------------------------- f3058e3d13137ce21d9accd4b244c84d67f98378 .circleci/config.yml | 2 +- .gitlab-ci.yml | 46 ++++++++- .gitlab/push-test-metrics.sh | 77 ++++++++++++++++ testsuite/driver/perf_notes.py | 200 ++++++++++++++++++++++++++++++++++++++-- testsuite/driver/runtests.py | 35 +++++-- testsuite/driver/testglobals.py | 12 ++- testsuite/driver/testlib.py | 69 ++++++-------- testsuite/driver/testutil.py | 2 +- 8 files changed, 380 insertions(+), 63 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 f3058e3d13137ce21d9accd4b244c84d67f98378 From git at git.haskell.org Tue Jan 15 17:43:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:46 +0000 (UTC) Subject: [commit: ghc] wip/gitlab-ci-perf-notes_2: Setup GitLab CI to push performance metrics as git notes to the "GHC Performance Notes" repository. (d1a2c4d) Message-ID: <20190115174346.CB7DD3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/gitlab-ci-perf-notes_2 Link : http://ghc.haskell.org/trac/ghc/changeset/d1a2c4dd3c4f0c634e4c4439ce1a66f4a9bc549b/ghc >--------------------------------------------------------------- commit d1a2c4dd3c4f0c634e4c4439ce1a66f4a9bc549b Author: David Eichmann Date: Fri Jan 11 16:13:21 2019 -0700 Setup GitLab CI to push performance metrics as git notes to the "GHC Performance Notes" repository. >--------------------------------------------------------------- d1a2c4dd3c4f0c634e4c4439ce1a66f4a9bc549b .gitlab-ci.yml | 23 ++++++++++++------ .gitlab/push-test-metrics.sh | 56 +++++++++++++++++--------------------------- testsuite/driver/runtests.py | 5 ++-- 3 files changed, 41 insertions(+), 43 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 674fcc8..a192c89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,14 +88,24 @@ validate-x86_64-linux-deb8-hadrian: before_script: - git clean -xdf && git submodule foreach git clean -xdf script: - - ./boot - - ./configure $CONFIGURE_ARGS +# - ./boot +# - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` - make V=0 -j$THREADS + + + + + + #make V=0 -j$THREADS - | - make binary-dist TAR_COMP_OPTS="-1" - mv ghc-*.tar.xz ghc.tar.xz + # make binary-dist TAR_COMP_OPTS="-1" + # mv ghc-*.tar.xz ghc.tar.xz + + + + + - | # Prepare to push git notes. METRICS_FILE=$(mktemp) @@ -112,7 +122,6 @@ validate-x86_64-linux-deb8-hadrian: THREADS=`mk/detect-cpu-count.sh` #make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml METRICS_FILE=$METRICS_FILE - echo "test" > $METRICS_FILE @@ -122,7 +131,7 @@ validate-x86_64-linux-deb8-hadrian: - | # Push git notes. - .gitlab/push-test-metrics.sh + METRICS_FILE=$METRICS_FILE .gitlab/push-test-metrics.sh artifacts: reports: junit: junit.xml diff --git a/.gitlab/push-test-metrics.sh b/.gitlab/push-test-metrics.sh index f934083..9005665 100755 --- a/.gitlab/push-test-metrics.sh +++ b/.gitlab/push-test-metrics.sh @@ -2,22 +2,17 @@ # vim: sw=2 et set -euo pipefail +GHC_ORIGIN="git at gitlab.haskell.org:ghc/ghc-performance-notes.git" +REF="perf" + fail() { echo "ERROR: $*" >&2 exit 1 } -GHC_ORIGIN="git at gitlab.haskell.org:ghc/ghc.git" - -# Only push git notes when on the official gitlab ghc repo. -if [ "$CI_REPOSITORY_URL" != "$GHC_ORIGIN" ]; then - echo "Not pushing performance git notes: expected repo $GHC_ORIGIN but on repo $CI_REPOSITORY_URL" - exit 0 -fi - # Check that private key is available (Set on all GitLab protected branches). if [ "$PERF_NOTE_KEY" = "" ]; then - echo "Not pushing performance git notes: PERF_NOTE_KEY not set." + echo "Not pushing performance git notes: PERF_NOTE_KEY is not set." exit 0 fi @@ -26,43 +21,36 @@ if [ "$TEST_ENV" = "" ]; then fail "Not pushing performance git notes: TEST_ENV must be set." fi -# Setup ssh keys. -echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC94vDmRcDXPTuZktLvMFXHD2X6H2GEdnP+7VO0QbwNje9jsPLpofQRHJKXG/9sm0a6NT9qXt9eccRNklP0AkW36LcNRni7ji8NxlrE9ASuXGqa4TTk83pOLFCzWmdcdVIxz3bxPfa/ECmyRmTxp3+mTW0eJrUEdVwprAieNoTH+ZLyDmq+IfAD5239ea+gAZzfCy5WcTbsSXOOJEAZKqqfzyog18agptzAWu/tCfzvyiGlkoQj+PE1MMEfnmWQC8d2bOhC6kQZZtPrGNhFU75JifYGT7y0e1EVa5bhqcZZ9cdGSli1S8T9MpSimVII6iZOFdho3+shbUX3ObagUl09 ben at ben-laptop" > ~/.ssh/perf_rsa.pub -echo $PERF_NOTE_KEY > ~/.ssh/perf_rsa -ssh-add ~/.ssh/perf_rsa - -# Check that git notes don't already exist. -# This is a percausion as we reset refs/notes/perf and we want to avoid data loss. - - - - - -# TODO CHANGE ME BEFORE MERGE -REF="perf_tmp" - - - - - - -if [ $(git notes --ref=$REF list | wc -l) -ne 0 ] +# Assert that the METRICS_FILE exists and can be read. +if [ "$METRICS_FILE" = "" ] then - fail "Found an existing git note. Expected no git note." + fail "\$METRICS_FILE not set." fi - -# Assert that the METRICS_FILE exists and can be read. -if [ "$METRICS_FILE" = "" ] || ! [ -r $METRICS_FILE ] +if ! [ -r $METRICS_FILE ] then fail "Metrics file not found: $METRICS_FILE" fi +# Add gitlab as a known host. +mkdir -p ~/.ssh +echo "|1|+AUrMGS1elvPeLNt+NHGa5+c6pU=|4XvfRsQftO1OgZD4c0JJ7oNaii8= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXilA5l4kOZPx0nM6xDATF+t4fS6te0eYPDwBI/jLWD9cJVtCnsrwMl5ar+/NfmcD0jnCYztUiVHuXyTaWPJYSQpwltfpTeqpo9/z/0MxkPtSl1uMP2cLbDiqA01OWveChktOXwU6hRQ+7MmO+dNRS/iXrRmYrGv/p1W811QgLBLS9fefEdF25n+0dP71L7Ov7riOawlDmd0C11FraE/R8HX6gs6lbXta1kisdxGyKojYSiCtobUaJxRoatMfUP0a9rwTAyl8tf56LgB+igjMky879VAbL7eQ/AmfHYPrSGJ/YlWP6Jj23Dnos5nOVlWL/rVTs9Y/NakLpPwMs75KTC0Pd74hdf2e3folDdAi2kLrQgO2SI6so7rOYZ+mFkCM751QdDVy4DzjmDvSgSIVf9SV7RQf7e7unE7pSZ/ILupZqz9KhR1MOwVO+ePa5qJMNSdC204PIsRWkIO5KP0QLl507NI9Ri84+aODoHD7gDIWNhU08J2P8/E6r0wcC8uWaxh+HaOjI9BkHjqRYsrgfn54BAuO9kw1cDvyi3c8n7VFlNtvQP15lANwim3gr9upV+r95KEPJCgZMYWJBDPIVtp4GdYxCfXxWj5oMXbA5pf0tNixwNJjAsY7I6RN2htHbuySH36JybOZk+gCj6mQkxpCT/tKaUn14hBJWLq7Q+Q==" >> ~/.ssh/known_hosts +echo "|1|JZkdAPJmpX6SzGeqhmQLfMWLGQA=|4vTELroOlbFxbCr0WX+PK9EcpD0= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJknufU+I6A5Nm58lmse4/o11Ai2UzYbYe7782J1+kRk" >> ~/.ssh/known_hosts + +# Setup ssh keys. +eval `ssh-agent` +echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJPR1vrZgeGTXmgJw2PsJfMjf22LcDnVVwt3l0rwTZ+8Q2J0bHaYxMRKBco1sON6LGcZepw0Hy76RQ87v057pTz18SXvnfE7U/B6v9qBk0ILJz+4BOX9sEhxu2XmScp/wMxkG9IoyruMlsxXzd1sz09o+rzzx24U2Rp27PRm08vG0oipve6BWLbYEqYrE4/nCufqOJmGd56fju7OTU0lTpEkGDEDWGMxutaX2CbTbDju7qy07Ld8BjSc9aHfvuQaslUbj3ex3EF8EXahURzGpHQn/UFFzVGMokFumiJCAagHQb7cj6jOkKseZLaysbA/mTBQsOzjWiRmkN23bQf1wF ben+ghc-ci at smart-cactus.org" > ~/.ssh/perf_rsa.pub +touch ~/.ssh/perf_rsa +chmod 0600 ~/.ssh/perf_rsa +echo "$PERF_NOTE_KEY" >> ~/.ssh/perf_rsa +ssh-add ~/.ssh/perf_rsa + # Reset the git notes and append the metrics file to the notes, then push and return the result. # This is favoured over a git notes merge as it avoids potential data loss/duplication from the merge strategy. function reset_append_note_push { git fetch -f $GHC_ORIGIN refs/notes/$REF:refs/notes/$REF || true echo "git notes --ref=$REF append -F $METRICS_FILE HEAD" git notes --ref=$REF append -F $METRICS_FILE HEAD + echo "git push $GHC_ORIGIN refs/notes/$REF" git push $GHC_ORIGIN refs/notes/$REF } diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 707f37a..59f6aba 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -383,8 +383,9 @@ else: ' the missing metrics. Alternatively, a baseline may be' + \ ' recovered from ci results once fetched (where origin' + \ ' is the official ghc git repo):\n\n' + \ - spacing + 'git fetch origin' + \ - ' refs/notes/perf:refs/notes/' + Perf.CiNamespace + spacing + 'git fetch ' + \ + 'https://gitlab.haskell.org/ghc/ghc-performance-notes.git' + \ + ' refs/notes/perf:refs/notes/' + Perf.CiNamespace else: reason = "this is not a git repo so the previous git commit's" + \ " metrics cannot be loaded from git notes:" From git at git.haskell.org Tue Jan 15 17:43:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 15 Jan 2019 17:43:50 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Work in progress on Trac #16185 (4d76b10) Message-ID: <20190115174350.14DCF3ABB5@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/4d76b1084f6c386cc945341ebf3377339f41572d/ghc >--------------------------------------------------------------- commit 4d76b1084f6c386cc945341ebf3377339f41572d Author: Simon Peyton Jones Date: Tue Jan 15 17:42:12 2019 +0000 Work in progress on Trac #16185 >--------------------------------------------------------------- 4d76b1084f6c386cc945341ebf3377339f41572d compiler/backpack/RnModIface.hs | 6 +-- compiler/basicTypes/DataCon.hs | 6 +-- compiler/basicTypes/MkId.hs | 19 +++---- compiler/basicTypes/PatSyn.hs | 4 +- compiler/basicTypes/Var.hs | 32 ++++++++++- compiler/codeGen/StgCmmClosure.hs | 6 +-- compiler/coreSyn/CoreLint.hs | 2 +- compiler/coreSyn/CoreMap.hs | 4 ++ compiler/coreSyn/CoreUtils.hs | 9 ++-- compiler/coreSyn/MkCore.hs | 6 +-- compiler/deSugar/DsCCall.hs | 6 +-- compiler/deSugar/DsForeign.hs | 4 +- compiler/deSugar/DsListComp.hs | 6 +-- compiler/deSugar/DsUtils.hs | 2 +- compiler/ghci/ByteCodeGen.hs | 2 +- compiler/ghci/RtClosureInspect.hs | 6 +-- compiler/hieFile/HieUtils.hs | 14 ++--- compiler/hsSyn/HsUtils.hs | 8 +-- compiler/iface/IfaceSyn.hs | 7 ++- compiler/iface/IfaceType.hs | 37 +++++-------- compiler/iface/TcIface.hs | 11 ++-- compiler/iface/ToIface.hs | 7 ++- compiler/prelude/PrimOp.hs | 8 +-- compiler/prelude/TysWiredIn.hs | 2 +- compiler/simplCore/SimplUtils.hs | 4 +- compiler/typecheck/ClsInst.hs | 2 +- compiler/typecheck/Inst.hs | 81 ++++++++++++++-------------- compiler/typecheck/TcArrows.hs | 4 +- compiler/typecheck/TcCanonical.hs | 7 ++- compiler/typecheck/TcDerivInfer.hs | 2 +- compiler/typecheck/TcErrors.hs | 8 ++- compiler/typecheck/TcEvidence.hs | 2 +- compiler/typecheck/TcExpr.hs | 10 ++-- compiler/typecheck/TcFlatten.hs | 12 +++-- compiler/typecheck/TcForeign.hs | 4 +- compiler/typecheck/TcGenDeriv.hs | 8 +-- compiler/typecheck/TcGenFunctor.hs | 9 ++-- compiler/typecheck/TcHoleErrors.hs | 2 +- compiler/typecheck/TcHsType.hs | 12 +++-- compiler/typecheck/TcMType.hs | 6 +-- compiler/typecheck/TcMatches.hs | 28 +++++----- compiler/typecheck/TcPatSyn.hs | 12 ++--- compiler/typecheck/TcRnTypes.hs | 2 +- compiler/typecheck/TcSigs.hs | 4 +- compiler/typecheck/TcSplice.hs | 8 +-- compiler/typecheck/TcTyClsDecls.hs | 10 ++-- compiler/typecheck/TcTyDecls.hs | 5 +- compiler/typecheck/TcType.hs | 45 ++++++++-------- compiler/typecheck/TcTypeable.hs | 4 +- compiler/typecheck/TcUnify.hs | 26 ++++----- compiler/typecheck/TcValidity.hs | 5 +- compiler/types/Coercion.hs | 7 +-- compiler/types/FamInstEnv.hs | 11 ++-- compiler/types/TyCoRep.hs | 79 ++++++++++++++++++--------- compiler/types/Type.hs | 106 ++++++++++++++++++------------------- compiler/types/Unify.hs | 5 ++ utils/genprimopcode/Main.hs | 4 +- 57 files changed, 412 insertions(+), 336 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 4d76b1084f6c386cc945341ebf3377339f41572d From git at git.haskell.org Wed Jan 16 05:48:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 05:48:29 +0000 (UTC) Subject: [commit: ghc] branch 'ghc-8.8' created Message-ID: <20190116054829.C74813ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : ghc-8.8 Referencing: ec76213931f2b32ff5e54808881b20d237f97a8b From git at git.haskell.org Wed Jan 16 05:48:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 05:48:32 +0000 (UTC) Subject: [commit: ghc] ghc-8.8: Fix bindist for ghci library (4985e1c) Message-ID: <20190116054832.C5A983ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.8 Link : http://ghc.haskell.org/trac/ghc/changeset/4985e1c6cf9f577a913bcafbc5500e185096b460/ghc >--------------------------------------------------------------- commit 4985e1c6cf9f577a913bcafbc5500e185096b460 Author: Zejun Wu Date: Tue Jan 1 18:59:23 2019 -0800 Fix bindist for ghci library Summary: https://phabricator.haskell.org/D5169 built libghci for both vanilla way and profiling way. We need to include both in the bindist list so they will be installed. Test Plan: ``` $ grep '^BuildFlavour' mk/build.mk BuildFlavour=perf $ make test_bindist $ grep HSghc-prim bindist-list.uniq ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a ``` (cherry picked from commit 3fb726d0696f4c59e58331e505e49f02f135a2f1) >--------------------------------------------------------------- 4985e1c6cf9f577a913bcafbc5500e185096b460 ghc.mk | 7 +++++-- rules/build-package-way.mk | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ghc.mk b/ghc.mk index e0d5837..f6d3b48 100644 --- a/ghc.mk +++ b/ghc.mk @@ -784,8 +784,11 @@ ifneq "$(BINDIST)" "YES" # Make sure we have all the GHCi libs by the time we've built # ghc-stage2. # -GHCI_LIBS = $(foreach lib,$(PACKAGES_STAGE1),$(libraries/$(lib)_dist-install_GHCI_LIB)) \ - $(compiler_stage2_GHCI_LIB) +GHCI_LIBS = \ + $(foreach way,$(GhcLibWays),\ + $(foreach lib,$(PACKAGES_STAGE1),\ + $(libraries/$(lib)_dist-install_$(way)_GHCI_LIB)) \ + $(compiler_stage2_$(way)_GHCI_LIB)) ifeq "$(UseArchivesForGhci)" "NO" ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS) diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 0a762d3..f9eca23 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -113,14 +113,14 @@ endif # Build the GHCi library ifneq "$(filter $3, v p)" "" -$1_$2_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) +$1_$2_$3_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" # Don't put bootstrapping packages in the bindist ifneq "$4" "0" -BINDIST_LIBS += $$($1_$2_GHCI_LIB) +BINDIST_LIBS += $$($1_$2_$3_GHCI_LIB) endif endif -$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT) +$$($1_$2_$3_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT) $$(call cmd,LD_NO_GOLD) $$(CONF_LD_LINKER_OPTS_STAGE$4) -r $$(if $$($1_$2_LD_SCRIPT),$$($1_$2_LD_SCRIPT_CMD) $$($1_$2_LD_SCRIPT)) -o $$@ $$(EXTRA_LD_LINKER_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) # NB. LD_NO_GOLD above: see #14328 (symptoms: #14675,#14291). At least # some versions of ld.gold appear to have a bug that causes the @@ -129,7 +129,7 @@ $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OB ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" # Don't bother making ghci libs for bootstrapping packages ifneq "$4" "0" -$(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) +$(call all-target,$1_$2,$$($1_$2_$3_GHCI_LIB)) endif endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES" endif # "$(filter $3, v p)" "" From git at git.haskell.org Wed Jan 16 05:48:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 05:48:35 +0000 (UTC) Subject: [commit: ghc] ghc-8.8: gitlab-ci: Try reenabling PDF documentation on Darwin (ec76213) Message-ID: <20190116054835.C0A673ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-8.8 Link : http://ghc.haskell.org/trac/ghc/changeset/ec76213931f2b32ff5e54808881b20d237f97a8b/ghc >--------------------------------------------------------------- commit ec76213931f2b32ff5e54808881b20d237f97a8b Author: Ben Gamari Date: Sun Dec 30 13:49:47 2018 -0500 gitlab-ci: Try reenabling PDF documentation on Darwin Carter says that the builder issues have now been sorted. (cherry picked from commit 66b88dddb3188cc63b4b4f4f065b6548aedfa403) >--------------------------------------------------------------- ec76213931f2b32ff5e54808881b20d237f97a8b .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87a5333..1ad2771 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,8 +126,6 @@ validate-x86_64-darwin: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" - # Disable sphinx PDF output as MacTeX apparently doesn't provide xelatex - - echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache From git at git.haskell.org Wed Jan 16 05:52:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 05:52:16 +0000 (UTC) Subject: [commit: ghc] master: testsuite: Add test for #16104 (312c957) Message-ID: <20190116055216.914383ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/312c957f1cc7ff2ba3bc7eb258c477ed4a7e14c8/ghc >--------------------------------------------------------------- commit 312c957f1cc7ff2ba3bc7eb258c477ed4a7e14c8 Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- 312c957f1cc7ff2ba3bc7eb258c477ed4a7e14c8 testsuite/tests/plugins/T16104.hs | 4 ++++ testsuite/tests/plugins/T16104_Plugin.hs | 20 ++++++++++++++++++++ testsuite/tests/plugins/all.T | 2 ++ 3 files changed, 26 insertions(+) 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_Plugin.hs b/testsuite/tests/plugins/T16104_Plugin.hs new file mode 100644 index 0000000..cad54f6 --- /dev/null +++ b/testsuite/tests/plugins/T16104_Plugin.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TestPlugin (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/all.T b/testsuite/tests/plugins/all.T index da6294e..2e3be77 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -208,3 +208,5 @@ test('T15858', extra_hc_opts("-package-db plugin-recomp/pkg.plugins01/local.package.conf ") ], ghci_script, ['T15858.script']) + +test('T16104', default, compile, ['']) From git at git.haskell.org Wed Jan 16 05:52:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 05:52:19 +0000 (UTC) Subject: [commit: ghc] master's head updated: testsuite: Add test for #16104 (312c957) Message-ID: <20190116055219.536103ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 374e447 PPC NCG: Remove Darwin support 7fcc07c configure: introduce HAPPY and ALEX vars and deprecate --with-ghc in favour of the GHC var 9c0e3e4 core-spec: Modify `.lhs` to `.hs` (source files) 58da9c7 core-spec: Modify `.lhs` to `.hs` (generated PDF) 05cd231 stg-spec: Modify `.lhs` to `.hs` 6e4e637 Minor refactoring and documentation in profiling RTS code 17bd163 Visible kind application 7fcd680 Fix some typos, etc., in comments. 5387483 Mark GHC.Maybe as not-home for haddock 2880cb9 Dump Cmm with -ddump-cmm when building .cmm files b565d41 Fix broken links (#16125) 08b8ea2 Respect prompt in GhciSettings c121e33 Add -Wmissing-deriving-strategies 01b60b0 Fix precedence handling for Data.Fixed's Show instance (#16031) 0ff42f3 Add entry for #16031 to base/changelog.md 66b88dd gitlab-ci: Try reenabling PDF documentation on Darwin 24b39ce Remove OPTIONS_HADDOCK hide in favour for not-home 3a509d2 make: Silence some xelatex output 3fb726d Fix bindist for ghci library bbd58fb Fix #16133 by checking for TypeApplications in rnExpr 9ea8dce Hadrian: merge sections in profiling _p.a to .p_o for ghci c0448c1 gitlab-ci: Clone haddock from its upstream repository 1c9dab2 fix-submodules: Rip out typing 6b5ec08 Check that libs found by GCC aren't folders 6b70cf6 Be pickier about unsaturated synonyms in :kind 6486c6e Hadrian: Add support for building stage3 82d1a88 Implement a sanity check for CCS fields in profiling builds c2455e6 Run typed splices in the zonker 92b684d More minor comment improvements 312c957 testsuite: Add test for #16104 From git at git.haskell.org Wed Jan 16 09:44:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 09:44:23 +0000 (UTC) Subject: [commit: nofib] master: Mention symlink situation on Git for Windows in README.md (c20122e) Message-ID: <20190116094423.DF6273ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c20122e0188b44d2a98dcada99ae41eb47c71f94/nofib >--------------------------------------------------------------- commit c20122e0188b44d2a98dcada99ae41eb47c71f94 Author: Sebastian Graf Date: Fri Jan 11 04:48:07 2019 -0500 Mention symlink situation on Git for Windows in README.md >--------------------------------------------------------------- c20122e0188b44d2a98dcada99ae41eb47c71f94 README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 629cb4b..3e215e4 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,19 @@ system GHC: ## Using +
+ Git symlink support for Windows machines + + NoFib uses a few symlinks here and there to share code between benchmarks. + Git for Windows has symlinks support for some time now, but + [it may not be enabled by default](https://stackoverflow.com/a/42137273/388010). + You will notice strange `make boot` failures if it's not enabled for you. + + Make sure you follow the instructions in the link to enable symlink support, + possibly as simple as through `git config core.symlinks true` or cloning with + `git clone -c core.symlinks=true `. +
+ Then, to run the tests, execute: ``` From git at git.haskell.org Wed Jan 16 09:58:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 09:58:45 +0000 (UTC) Subject: [commit: nofib] master: Stabilise gen_regexp again (271dc00) Message-ID: <20190116095845.E9E2B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/271dc00f7442446b72b68ca53eb88d366bf0a903/nofib >--------------------------------------------------------------- commit 271dc00f7442446b72b68ca53eb88d366bf0a903 Author: Sebastian Graf Date: Fri Jan 11 11:28:47 2019 +0100 Stabilise gen_regexp again While investigating a 5% runtime regression, I realised that `gen_regexp` wasn't sufficiently stable wrt. GC parameterisations. This is now rectified by iterating 500 instead of 100 times. >--------------------------------------------------------------- 271dc00f7442446b72b68ca53eb88d366bf0a903 imaginary/gen_regexps/Main.hs | 7 +- imaginary/gen_regexps/Makefile | 6 +- .../{bernouilli => gen_regexps}/NofibUtils.hs | 0 imaginary/gen_regexps/gen_regexps.faststdout | 600 +++++++++++++++++---- imaginary/gen_regexps/gen_regexps.slowstdout | 600 +++++++++++++++++---- imaginary/gen_regexps/gen_regexps.stdout | 600 +++++++++++++++++---- 6 files changed, 1507 insertions(+), 306 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 271dc00f7442446b72b68ca53eb88d366bf0a903 From git at git.haskell.org Wed Jan 16 10:11:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 10:11:21 +0000 (UTC) Subject: [commit: nofib] master: READE.md: Move `cabal install` instructions (b760674) Message-ID: <20190116101121.BCE793ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b760674c194a0150e66992f5ab815441c1f64bbd/nofib >--------------------------------------------------------------- commit b760674c194a0150e66992f5ab815441c1f64bbd Author: Sebastian Graf Date: Tue Jan 15 07:23:57 2019 -0500 READE.md: Move `cabal install` instructions >--------------------------------------------------------------- b760674c194a0150e66992f5ab815441c1f64bbd README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e215e4..6e610a6 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,15 @@ system GHC: `git clone -c core.symlinks=true `. -Then, to run the tests, execute: +Install the [package dependencies](#package-dependencies): ``` $ cabal install html regex-compat +``` + +Then, to run the tests, execute: + +``` $ make clean # or git clean -fxd, it's faster $ # Generates input files for the benchmarks and builds compilation $ # dependencies for make (ghc -M) From git at git.haskell.org Wed Jan 16 18:22:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:19 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16191' created Message-ID: <20190116182219.B333B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16191 Referencing: 791be466105807c1afd05a0ca9eb9585f3da4e45 From git at git.haskell.org Wed Jan 16 18:22:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:21 +0000 (UTC) Subject: [commit: ghc] branch 'alp/circleci/debug' created Message-ID: <20190116182221.B325C3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : alp/circleci/debug Referencing: 881e23efc440105ef571f9e5b6071268db1fb83c From git at git.haskell.org Wed Jan 16 18:22:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:24 +0000 (UTC) Subject: [commit: ghc] alp/circleci/debug: debug output (67b7cd4) Message-ID: <20190116182224.B4C143ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : alp/circleci/debug Link : http://ghc.haskell.org/trac/ghc/changeset/67b7cd4e4eefff622e2d8c04107bd4e850559e05/ghc >--------------------------------------------------------------- commit 67b7cd4e4eefff622e2d8c04107bd4e850559e05 Author: Alp Mestanogullari Date: Sat Dec 22 09:03:10 2018 +0100 debug output >--------------------------------------------------------------- 67b7cd4e4eefff622e2d8c04107bd4e850559e05 .gitlab/circle-ci-job.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab/circle-ci-job.sh b/.gitlab/circle-ci-job.sh index bbb00e0..0c4eb64 100755 --- a/.gitlab/circle-ci-job.sh +++ b/.gitlab/circle-ci-job.sh @@ -33,18 +33,28 @@ GHCCI_URL="localhost:8888" [ ${CI_PIPELINE_ID:-} ] || (echo "CI_PIPELINE_ID is not set"; exit 1) # the first argument to this script is the Circle CI job type: # validate-x86_64-linux, validate-i386-linux, ... -CIRCLE_JOB="circleci-$1" +CIRCLE_JOB="$1" +echo "Job type: $CIRCLE_JOB" gitlab_user=$(echo $CI_REPOSITORY_URL | cut -d/ -f4) gitlab_repo=$(echo $CI_REPOSITORY_URL | cut -d/ -f5 | cut -d. -f1) +echo "Gitlab user: $gitlab_user" +echo "Gitlab repo: $gitlab_repo" + BODY="{ \"jobType\": \"$CIRCLE_JOB\", \"source\": { \"user\": \"$gitlab_user\", \"project\":\"$gitlab_repo\", \"commit\":\"$CI_COMMIT_SHA\" }, \"pipelineID\": $CI_PIPELINE_ID, \"runnerID\": $CI_RUNNER_ID, \"jobID\": $CI_JOB_ID }" +echo "About to send:" +echo $BODY RESP=$(curl -s -XPOST -H "Content-Type: application/json" -d "$BODY" \ http://${GHCCI_URL}/job) +echo "Submitted job, response:" +echo $RESP + if [ $? -eq 0 ]; then + echo "Submission went fine" build_num=$(echo $RESP | jq '.build_num') circle_url=$(echo $RESP | jq '.url') else From git at git.haskell.org Wed Jan 16 18:22:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:27 +0000 (UTC) Subject: [commit: ghc] alp/circleci/debug: tweak (cdba63a) Message-ID: <20190116182227.AC0423ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : alp/circleci/debug Link : http://ghc.haskell.org/trac/ghc/changeset/cdba63aad2d573f1d509883b886fa939c95869f7/ghc >--------------------------------------------------------------- commit cdba63aad2d573f1d509883b886fa939c95869f7 Author: Alp Mestanogullari Date: Sat Dec 22 13:56:10 2018 +0100 tweak >--------------------------------------------------------------- cdba63aad2d573f1d509883b886fa939c95869f7 .gitlab/circle-ci-job.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/circle-ci-job.sh b/.gitlab/circle-ci-job.sh index 0c4eb64..89939e2 100755 --- a/.gitlab/circle-ci-job.sh +++ b/.gitlab/circle-ci-job.sh @@ -47,7 +47,7 @@ BODY="{ \"jobType\": \"$CIRCLE_JOB\", \"source\": { \"user\": \"$gitlab_user\", echo "About to send:" echo $BODY -RESP=$(curl -s -XPOST -H "Content-Type: application/json" -d "$BODY" \ +RESP=$(curl -XPOST -H "Content-Type: application/json" -d "$BODY" \ http://${GHCCI_URL}/job) echo "Submitted job, response:" From git at git.haskell.org Wed Jan 16 18:22:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:30 +0000 (UTC) Subject: [commit: ghc] alp/circleci/debug: oops (881e23e) Message-ID: <20190116182230.AB0993ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : alp/circleci/debug Link : http://ghc.haskell.org/trac/ghc/changeset/881e23efc440105ef571f9e5b6071268db1fb83c/ghc >--------------------------------------------------------------- commit 881e23efc440105ef571f9e5b6071268db1fb83c Author: Alp Mestanogullari Date: Sat Dec 22 17:13:59 2018 +0100 oops >--------------------------------------------------------------- 881e23efc440105ef571f9e5b6071268db1fb83c .gitlab/circle-ci-job.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/circle-ci-job.sh b/.gitlab/circle-ci-job.sh index 89939e2..c8f1619 100755 --- a/.gitlab/circle-ci-job.sh +++ b/.gitlab/circle-ci-job.sh @@ -33,7 +33,7 @@ GHCCI_URL="localhost:8888" [ ${CI_PIPELINE_ID:-} ] || (echo "CI_PIPELINE_ID is not set"; exit 1) # the first argument to this script is the Circle CI job type: # validate-x86_64-linux, validate-i386-linux, ... -CIRCLE_JOB="$1" +CIRCLE_JOB="circleci-$1" echo "Job type: $CIRCLE_JOB" gitlab_user=$(echo $CI_REPOSITORY_URL | cut -d/ -f4) From git at git.haskell.org Wed Jan 16 18:22:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:34 +0000 (UTC) Subject: [commit: ghc] wip/T16191: Fix #16114 by adding a validity check to rnClsInstDecl (83a2206) Message-ID: <20190116182234.682783ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/83a22066fbe136e4a984e8c90c1d3fd72b6ec4b9/ghc >--------------------------------------------------------------- commit 83a22066fbe136e4a984e8c90c1d3fd72b6ec4b9 Author: Ryan Scott Date: Tue Jan 15 08:08:43 2019 -0500 Fix #16114 by adding a validity check to rnClsInstDecl >--------------------------------------------------------------- 83a22066fbe136e4a984e8c90c1d3fd72b6ec4b9 compiler/rename/RnSource.hs | 26 ++++++++++++++++++------ compiler/rename/RnTypes.hs | 7 ------- testsuite/tests/rename/should_fail/T16114.hs | 4 ++++ testsuite/tests/rename/should_fail/T16114.stderr | 6 ++++++ testsuite/tests/rename/should_fail/T5951.stderr | 17 ++++------------ testsuite/tests/rename/should_fail/all.T | 2 +- 6 files changed, 35 insertions(+), 27 deletions(-) diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index ca35e94..e5fe3a3 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -648,13 +648,27 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds , cid_sigs = uprags, cid_tyfam_insts = ats , cid_overlap_mode = oflag , cid_datafam_insts = adts }) - = do { (inst_ty', inst_fvs) <- rnLHsInstType (text "an instance declaration") inst_ty + = do { (inst_ty', inst_fvs) + <- rnHsSigType (GenericCtx $ text "an instance declaration") inst_ty ; let (ktv_names, _, head_ty') = splitLHsInstDeclTy inst_ty' - ; let cls = case hsTyGetAppHead_maybe head_ty' of - Nothing -> mkUnboundName (mkTcOccFS (fsLit "")) - Just (dL->L _ cls) -> cls - -- rnLHsInstType has added an error message - -- if hsTyGetAppHead_maybe fails + ; cls <- + case hsTyGetAppHead_maybe head_ty' of + Just (dL->L _ cls) -> pure cls + Nothing -> do + -- The instance is malformed. We'd still like + -- to make *some* progress (rather than failing outright), so + -- we report an error and continue for as long as we can. + -- Importantly, this error should be thrown before we reach the + -- typechecker, lest we encounter different errors that are + -- hopelessly confusing (such as the one in Trac #16114). + addErrAt (getLoc (hsSigType inst_ty)) $ + hang (text "Illegal class instance:" <+> quotes (ppr inst_ty)) + 2 (vcat [ text "Class instances must be of the form" + , nest 2 $ text "context => C ty_1 ... ty_n" + , text "where" <+> quotes (char 'C') + <+> text "is a class" + ]) + pure $ mkUnboundName (mkTcOccFS (fsLit "")) -- Rename the bindings -- The typechecker (not the renamer) checks that all diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs index f66c1bd..3703f1a 100644 --- a/compiler/rename/RnTypes.hs +++ b/compiler/rename/RnTypes.hs @@ -15,7 +15,6 @@ module RnTypes ( rnHsKind, rnLHsKind, rnLHsTypeArgs, rnHsSigType, rnHsWcType, HsSigWcTypeScoping(..), rnHsSigWcType, rnHsSigWcTypeScoped, - rnLHsInstType, newTyVarNameRn, rnConDeclFields, rnLTyVar, @@ -374,12 +373,6 @@ rnImplicitBndrs bind_free_tvs , text "Suggested fix: add" <+> quotes (text "forall" <+> hsep (map ppr kvs) <> char '.') ] -rnLHsInstType :: SDoc -> LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars) --- Rename the type in an instance. --- The 'doc_str' is "an instance declaration". --- Do not try to decompose the inst_ty in case it is malformed -rnLHsInstType doc inst_ty = rnHsSigType (GenericCtx doc) inst_ty - {- ****************************************************** * * LHsType and HsType diff --git a/testsuite/tests/rename/should_fail/T16114.hs b/testsuite/tests/rename/should_fail/T16114.hs new file mode 100644 index 0000000..ce891b5 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16114.hs @@ -0,0 +1,4 @@ +module T16114 where + +data T a +instance Eq a => Eq a => Eq (T a) where (==) = undefined diff --git a/testsuite/tests/rename/should_fail/T16114.stderr b/testsuite/tests/rename/should_fail/T16114.stderr new file mode 100644 index 0000000..aec0e3e --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16114.stderr @@ -0,0 +1,6 @@ + +T16114.hs:4:10: error: + Illegal class instance: ‘Eq a => Eq a => Eq (T a)’ + Class instances must be of the form + context => C ty_1 ... ty_n + where ‘C’ is a class diff --git a/testsuite/tests/rename/should_fail/T5951.stderr b/testsuite/tests/rename/should_fail/T5951.stderr index 8fda353..b325493 100644 --- a/testsuite/tests/rename/should_fail/T5951.stderr +++ b/testsuite/tests/rename/should_fail/T5951.stderr @@ -1,15 +1,6 @@ T5951.hs:8:8: error: - • Expecting one more argument to ‘A’ - Expected a constraint, but ‘A’ has kind ‘* -> Constraint’ - • In the instance declaration for ‘B => C’ - -T5951.hs:9:8: error: - • Expecting one more argument to ‘B’ - Expected a constraint, but ‘B’ has kind ‘* -> Constraint’ - • In the instance declaration for ‘B => C’ - -T5951.hs:10:8: error: - • Expecting one more argument to ‘C’ - Expected a constraint, but ‘C’ has kind ‘* -> Constraint’ - • In the instance declaration for ‘B => C’ + Illegal class instance: ‘A => B => C’ + Class instances must be of the form + context => C ty_1 ... ty_n + where ‘C’ is a class diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 5693426..d5a5ec5 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -143,5 +143,5 @@ test('T15611a', normal, compile_fail, ['']) test('T15611b', normal, ghci_script, ['T15611b.script']) test('T15828', normal, compile_fail, ['']) test('T16002', normal, compile_fail, ['']) - +test('T16114', normal, compile_fail, ['']) test('ExplicitForAllRules2', normal, compile_fail, ['']) From git at git.haskell.org Wed Jan 16 18:22:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:38 +0000 (UTC) Subject: [commit: ghc] wip/T16191: Fix #16116 by removing badAssocRhs (e63518f) Message-ID: <20190116182238.457E23ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/e63518f5d6a93be111f9108c0990a1162f88d615/ghc >--------------------------------------------------------------- commit e63518f5d6a93be111f9108c0990a1162f88d615 Author: Ryan Scott Date: Tue Jan 15 16:02:07 2019 -0500 Fix #16116 by removing badAssocRhs >--------------------------------------------------------------- e63518f5d6a93be111f9108c0990a1162f88d615 compiler/rename/RnSource.hs | 30 +++++++++++----------- .../tests/indexed-types/should_fail/T5515.stderr | 28 +++++++++++++++----- testsuite/tests/rename/should_compile/T16116a.hs | 9 +++++++ testsuite/tests/rename/should_compile/all.T | 2 +- testsuite/tests/rename/should_fail/T16116b.hs | 7 +++++ testsuite/tests/rename/should_fail/T16116b.stderr | 2 ++ testsuite/tests/rename/should_fail/all.T | 1 + 7 files changed, 57 insertions(+), 22 deletions(-) diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index e5fe3a3..0699f80 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -784,14 +784,6 @@ rnFamInstEqn doc mb_cls rhs_kvars ++ map hsLTyVarName bndrs' ; warnUnusedTypePatterns all_nms nms_used - -- See Note [Renaming associated types] - ; let bad_tvs = maybe [] (filter is_bad . snd) mb_cls - var_name_set = mkNameSet (map hsLTyVarName bndrs' - ++ all_imp_var_names) - is_bad cls_tkv = cls_tkv `elemNameSet` rhs_fvs - && not (cls_tkv `elemNameSet` var_name_set) - ; unless (null bad_tvs) (badAssocRhs bad_tvs) - ; return ((bndrs', pats', payload'), rhs_fvs `plusFV` pat_fvs) } ; let all_fvs = fvs `addOneFV` unLoc tycon' @@ -999,6 +991,21 @@ can all be in scope (Trac #5862): id :: Ob x a => x a a (.) :: (Ob x a, Ob x b, Ob x c) => x b c -> x a b -> x a c Here 'k' is in scope in the kind signature, just like 'x'. + +Although type family equations can bind type variables with explicit foralls, +it need not be the case that all variables that appear on the RHS must be bound +by a forall. For instance, the following is acceptable: + + class C a where + type T a b + instance C (Maybe a) where + type forall b. T (Maybe a) b = Either a b + +Even though `a` is not bound by the forall, this is still accepted because `a` +was previously bound by the `instance C (Maybe a)` part. (see Trac #16116). + +In each case, the function which detects improperly bound variables on the RHS +is TcValidity.checkValidFamPats. -} @@ -2078,13 +2085,6 @@ are no data constructors we allow h98_style = True ***************************************************** -} --------------- -badAssocRhs :: [Name] -> RnM () -badAssocRhs ns - = addErr (hang (text "The RHS of an associated type declaration mentions" - <+> text "out-of-scope variable" <> plural ns - <+> pprWithCommas (quotes . ppr) ns) - 2 (text "All such variables must be bound on the LHS")) - wrongTyFamName :: Name -> Name -> SDoc wrongTyFamName fam_tc_name eqn_tc_name = hang (text "Mismatched type name in type family instance.") diff --git a/testsuite/tests/indexed-types/should_fail/T5515.stderr b/testsuite/tests/indexed-types/should_fail/T5515.stderr index 688eef6..ebeb52b 100644 --- a/testsuite/tests/indexed-types/should_fail/T5515.stderr +++ b/testsuite/tests/indexed-types/should_fail/T5515.stderr @@ -1,8 +1,24 @@ -T5515.hs:9:3: error: - The RHS of an associated type declaration mentions out-of-scope variable ‘a’ - All such variables must be bound on the LHS +T5515.hs:6:16: error: + • Expecting one more argument to ‘ctx’ + Expected a type, but ‘ctx’ has kind ‘* -> Constraint’ + • In the first argument of ‘Arg’, namely ‘ctx’ + In the first argument of ‘ctx’, namely ‘(Arg ctx)’ + In the class declaration for ‘Bome’ -T5515.hs:15:3: error: - The RHS of an associated type declaration mentions out-of-scope variable ‘a’ - All such variables must be bound on the LHS +T5515.hs:14:1: error: + • Type variable ‘a’ is mentioned in the RHS, + but not bound on the LHS of the family instance + • In the type instance declaration for ‘Arg’ + In the instance declaration for ‘Some f’ + +T5515.hs:14:10: error: + • Could not deduce (C f a0) + from the context: C f a + bound by an instance declaration: + forall f a. C f a => Some f + at T5515.hs:14:10-24 + The type variable ‘a0’ is ambiguous + • In the ambiguity check for an instance declaration + To defer the ambiguity check to use sites, enable AllowAmbiguousTypes + In the instance declaration for ‘Some f’ diff --git a/testsuite/tests/rename/should_compile/T16116a.hs b/testsuite/tests/rename/should_compile/T16116a.hs new file mode 100644 index 0000000..b5be6cc --- /dev/null +++ b/testsuite/tests/rename/should_compile/T16116a.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} +module T16616a where + +class C a where + type T a b + +instance C (Maybe a) where + type forall b. T (Maybe a) b = Either a b diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 0bcd25c..a7c8da4 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -166,4 +166,4 @@ test('T15994', [], run_command, ['$MAKE -s --no-print-directory T15994']) test('T15798a', normal, compile, ['']) test('T15798b', normal, compile, ['']) test('T15798c', normal, compile, ['']) - +test('T16116a', normal, compile, ['']) diff --git a/testsuite/tests/rename/should_fail/T16116b.hs b/testsuite/tests/rename/should_fail/T16116b.hs new file mode 100644 index 0000000..c1de71d --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16116b.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TypeFamilies #-} +module T16116b where + +class C a where + type F a +instance C [a] where + type F [a] = b diff --git a/testsuite/tests/rename/should_fail/T16116b.stderr b/testsuite/tests/rename/should_fail/T16116b.stderr new file mode 100644 index 0000000..ff6b5e1 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T16116b.stderr @@ -0,0 +1,2 @@ + +T16116b.hs:7:16: error: Not in scope: type variable ‘b’ diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index d5a5ec5..03ee63b 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -144,4 +144,5 @@ test('T15611b', normal, ghci_script, ['T15611b.script']) test('T15828', normal, compile_fail, ['']) test('T16002', normal, compile_fail, ['']) test('T16114', normal, compile_fail, ['']) +test('T16116b', normal, compile_fail, ['']) test('ExplicitForAllRules2', normal, compile_fail, ['']) From git at git.haskell.org Wed Jan 16 18:22:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:41 +0000 (UTC) Subject: [commit: ghc] wip/T16191: @simonpj's suggested refactor (36e3e74) Message-ID: <20190116182241.4FD4C3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/36e3e7472fd138fca21e447cdb17d38525278e81/ghc >--------------------------------------------------------------- commit 36e3e7472fd138fca21e447cdb17d38525278e81 Author: Ryan Scott Date: Mon Jan 14 20:28:59 2019 -0500 @simonpj's suggested refactor >--------------------------------------------------------------- 36e3e7472fd138fca21e447cdb17d38525278e81 compiler/typecheck/TcValidity.hs | 107 ++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 36 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 36e3e7472fd138fca21e447cdb17d38525278e81 From git at git.haskell.org Wed Jan 16 18:22:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:45 +0000 (UTC) Subject: [commit: ghc] wip/T16191: Control validity-checking of type synonym applications more carefully (9dc56b6) Message-ID: <20190116182245.AE0773ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/9dc56b61ae10cb26ec8b2bc132ae6c9b620707a8/ghc >--------------------------------------------------------------- commit 9dc56b61ae10cb26ec8b2bc132ae6c9b620707a8 Author: Ryan Scott Date: Thu Jan 10 16:55:51 2019 -0500 Control validity-checking of type synonym applications more carefully Trac #16059 shows that when validity checking applications of type synonyms, GHC sometimes wasn't checking the expanded type enough. We must be careful, however, since checking both the expanded type as well as the arguments to the type synonym can lead to exponential blowup (see https://ghc.haskell.org/trac/ghc/ticket/16059#comment:4). Nor can we omit checking either the expanded type or the argument for correctness reasons. The solution here is to introduce a new `ExpandMode` data type that is plumbed through all of the type-validity-checking functions in `TcValidity`. `ExpandMode` dictates whether we only check the expanded type (`Expand`), only check the arguments (`NoExpand), or both (`Both`). Importantly, if we check `Both` in the function for validity checking type synonym applications, then we switch to `NoExpand` when checking the arguments so as to avoid exponential blowup. See `Note [Correctness and performance of type synonym validity checking]` for the full story. >--------------------------------------------------------------- 9dc56b61ae10cb26ec8b2bc132ae6c9b620707a8 compiler/typecheck/TcValidity.hs | 241 ++++++++++++++++----- testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs | 1 + .../tests/safeHaskell/unsafeLibs/Dep05.stderr | 2 +- testsuite/tests/typecheck/should_fail/T16059a.hs | 12 + .../tests/typecheck/should_fail/T16059a.stderr | 9 + testsuite/tests/typecheck/should_fail/T16059b.hs | 6 + testsuite/tests/typecheck/should_fail/T16059c.hs | 6 + .../tests/typecheck/should_fail/T16059c.stderr | 6 + testsuite/tests/typecheck/should_fail/T16059d.hs | 5 + .../tests/typecheck/should_fail/T16059d.stderr | 6 + testsuite/tests/typecheck/should_fail/T16059e.hs | 15 ++ .../tests/typecheck/should_fail/T16059e.stderr | 7 + .../tests/typecheck/should_fail/T9858a.stderr | 18 +- testsuite/tests/typecheck/should_fail/all.T | 7 + 14 files changed, 271 insertions(+), 70 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 9dc56b61ae10cb26ec8b2bc132ae6c9b620707a8 From git at git.haskell.org Wed Jan 16 18:22:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:48 +0000 (UTC) Subject: [commit: ghc] wip/T16191: Bump Cabal submodule (3429ec8) Message-ID: <20190116182248.BE5193ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/3429ec8d65ca996e9e48e04959ca54c9421eb994/ghc >--------------------------------------------------------------- commit 3429ec8d65ca996e9e48e04959ca54c9421eb994 Author: Ryan Scott Date: Mon Jan 14 10:41:26 2019 -0500 Bump Cabal submodule >--------------------------------------------------------------- 3429ec8d65ca996e9e48e04959ca54c9421eb994 libraries/Cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Cabal b/libraries/Cabal index b96c601..98fcb3a 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit b96c601d084e89361ff867a90424d4aef7fa0207 +Subproject commit 98fcb3a964a4deef67920020a4a02d4d8552cc19 From git at git.haskell.org Wed Jan 16 18:22:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:51 +0000 (UTC) Subject: [commit: ghc] wip/T16191: Fix bogus worker for newtypes (791be46) Message-ID: <20190116182251.DD6303ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16191 Link : http://ghc.haskell.org/trac/ghc/changeset/791be466105807c1afd05a0ca9eb9585f3da4e45/ghc >--------------------------------------------------------------- commit 791be466105807c1afd05a0ca9eb9585f3da4e45 Author: Simon Peyton Jones Date: Wed Jan 16 16:34:24 2019 +0000 Fix bogus worker for newtypes The "worker" for a newtype is actually a function with a small (compulsory) unfolding, namely a cast. But the construction of this function was plain wrong for newtype /instances/; it cast the arguemnt to the family type rather than the representation type. This never actually bit us because, in the case of a family instance, we immediately cast the result to the family type. So we get \x. (x |> co1) |> co2 where the compositio of co1 and co2 is ill-kinded. However the optimiser (even the simple optimiser) just collapsed those casts, ignoring the mis-match in the middle, so we never saw the problem. Trac #16191 is indeed a dup of #16141; but the resaon these tickets produce Lint errors is not the unnecessary forcing; it's because of the ill-typed casts. This patch fixes the ill-typed casts, properly. I can't see a way to trigger an actual failure prior to this patch, but it's still wrong wrong wrong to have ill-typed casts, so better to get rid of them. >--------------------------------------------------------------- 791be466105807c1afd05a0ca9eb9585f3da4e45 compiler/basicTypes/MkId.hs | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index 17916cf..3e70fdb 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -425,26 +425,26 @@ dictSelRule val_index n_ty_args _ id_unf _ args mkDataConWorkId :: Name -> DataCon -> Id mkDataConWorkId wkr_name data_con | isNewTyCon tycon - = mkGlobalId (DataConWrapId data_con) wkr_name nt_wrap_ty nt_work_info + = mkGlobalId (DataConWrapId data_con) wkr_name wkr_ty nt_work_info | otherwise - = mkGlobalId (DataConWorkId data_con) wkr_name alg_wkr_ty wkr_info + = mkGlobalId (DataConWorkId data_con) wkr_name wkr_ty alg_wkr_info where - tycon = dataConTyCon data_con + tycon = dataConTyCon data_con -- The representation TyCon + wkr_ty = dataConRepType data_con ----------- Workers for data types -------------- - alg_wkr_ty = dataConRepType data_con + alg_wkr_info = noCafIdInfo + `setArityInfo` wkr_arity + `setStrictnessInfo` wkr_sig + `setUnfoldingInfo` evaldUnfolding -- Record that it's evaluated, + -- even if arity = 0 + `setLevityInfoWithType` wkr_ty + -- NB: unboxed tuples have workers, so we can't use + -- setNeverLevPoly + wkr_arity = dataConRepArity data_con - wkr_info = noCafIdInfo - `setArityInfo` wkr_arity - `setStrictnessInfo` wkr_sig - `setUnfoldingInfo` evaldUnfolding -- Record that it's evaluated, - -- even if arity = 0 - `setLevityInfoWithType` alg_wkr_ty - -- NB: unboxed tuples have workers, so we can't use - -- setNeverLevPoly - - wkr_sig = mkClosedStrictSig (replicate wkr_arity topDmd) (dataConCPR data_con) + wkr_sig = mkClosedStrictSig (replicate wkr_arity topDmd) (dataConCPR data_con) -- Note [Data-con worker strictness] -- Notice that we do *not* say the worker Id is strict -- even if the data constructor is declared strict @@ -465,20 +465,21 @@ mkDataConWorkId wkr_name data_con -- not from the worker Id. ----------- Workers for newtypes -------------- - (nt_tvs, _, nt_arg_tys, _) = dataConSig data_con - res_ty_args = mkTyCoVarTys nt_tvs - nt_wrap_ty = dataConUserType data_con + univ_tvs = dataConUnivTyVars data_con + arg_tys = dataConRepArgTys data_con -- Should be same as dataConOrigArgTys nt_work_info = noCafIdInfo -- The NoCaf-ness is set by noCafIdInfo `setArityInfo` 1 -- Arity 1 `setInlinePragInfo` alwaysInlinePragma `setUnfoldingInfo` newtype_unf - `setLevityInfoWithType` nt_wrap_ty - id_arg1 = mkTemplateLocal 1 (head nt_arg_tys) + `setLevityInfoWithType` wkr_ty + id_arg1 = mkTemplateLocal 1 (head arg_tys) + res_ty_args = mkTyCoVarTys univ_tvs newtype_unf = ASSERT2( isVanillaDataCon data_con && - isSingleton nt_arg_tys, ppr data_con ) + isSingleton arg_tys + , ppr data_con ) -- Note [Newtype datacons] mkCompulsoryUnfolding $ - mkLams nt_tvs $ Lam id_arg1 $ + mkLams univ_tvs $ Lam id_arg1 $ wrapNewTypeBody tycon res_ty_args (Var id_arg1) dataConCPR :: DataCon -> DmdResult From git at git.haskell.org Wed Jan 16 18:22:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 16 Jan 2019 18:22:55 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Progress on #16185 (07e58c7) Message-ID: <20190116182255.BC72C3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/07e58c7d5b2186954987578abc0889cfe0fd9625/ghc >--------------------------------------------------------------- commit 07e58c7d5b2186954987578abc0889cfe0fd9625 Author: Simon Peyton Jones Date: Wed Jan 16 17:28:27 2019 +0000 Progress on #16185 >--------------------------------------------------------------- 07e58c7d5b2186954987578abc0889cfe0fd9625 compiler/basicTypes/Var.hs-boot | 7 ++++ compiler/iface/IfaceType.hs | 16 +++++--- compiler/prelude/TysWiredIn.hs | 10 ----- compiler/prelude/TysWiredIn.hs-boot | 5 --- compiler/typecheck/TcFlatten.hs | 4 +- compiler/typecheck/TcHsType.hs | 4 +- compiler/typecheck/TcMatches.hs | 4 +- compiler/typecheck/TcSigs.hs | 1 + compiler/typecheck/TcUnify.hs | 4 +- compiler/types/OptCoercion.hs | 10 +++-- compiler/types/TyCoRep.hs | 21 ++++++---- compiler/types/TyCoRep.hs-boot | 6 ++- compiler/types/TyCon.hs | 45 ++++++++++++---------- compiler/types/Type.hs | 4 +- .../tests/typecheck/should_fail/tcfail057.stderr | 2 +- 15 files changed, 79 insertions(+), 64 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 07e58c7d5b2186954987578abc0889cfe0fd9625 From git at git.haskell.org Thu Jan 17 12:17:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 12:17:13 +0000 (UTC) Subject: [commit: packages/haskeline] branch 'haskeline-0.7' created Message-ID: <20190117121713.C9F393ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/haskeline New branch : haskeline-0.7 Referencing: eb46ad15f603068546f9dce8130d0b63d3f3ab64 From git at git.haskell.org Thu Jan 17 12:17:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 12:17:15 +0000 (UTC) Subject: [commit: packages/haskeline] haskeline-0.7: Add fallbackCompletion to support module completion in ghci :add (#91) (85cbdff) Message-ID: <20190117121715.D1F743ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/haskeline On branch : haskeline-0.7 Link : http://git.haskell.org/packages/haskeline.git/commitdiff/85cbdff43efb645956ac64aefd06839e56c367b4 >--------------------------------------------------------------- commit 85cbdff43efb645956ac64aefd06839e56c367b4 Author: Ken Micklas Date: Sat Oct 20 12:23:08 2018 -0400 Add fallbackCompletion to support module completion in ghci :add (#91) >--------------------------------------------------------------- 85cbdff43efb645956ac64aefd06839e56c367b4 System/Console/Haskeline/Completion.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/System/Console/Haskeline/Completion.hs b/System/Console/Haskeline/Completion.hs index b17bb0c..04b8e9a 100644 --- a/System/Console/Haskeline/Completion.hs +++ b/System/Console/Haskeline/Completion.hs @@ -3,6 +3,7 @@ module System.Console.Haskeline.Completion( Completion(..), noCompletion, simpleCompletion, + fallbackCompletion, -- * Word completion completeWord, completeWordWithPrev, @@ -188,3 +189,12 @@ fixPath ('~':c:path) | isPathSeparator c = do home <- getHomeDirectory return (home path) fixPath path = return path + +-- | If the first completer produces no suggestions, fallback to the second +-- completer's output. +fallbackCompletion :: Monad m => CompletionFunc m -> CompletionFunc m -> CompletionFunc m +fallbackCompletion a b input = do + aCompletions <- a input + if null (snd aCompletions) + then b input + else return aCompletions From git at git.haskell.org Thu Jan 17 12:17:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 12:17:17 +0000 (UTC) Subject: [commit: packages/haskeline] haskeline-0.7: Bump to 0.7.5.0 and update the changelog. (eb46ad1) Message-ID: <20190117121717.D82623ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/haskeline On branch : haskeline-0.7 Link : http://git.haskell.org/packages/haskeline.git/commitdiff/eb46ad15f603068546f9dce8130d0b63d3f3ab64 >--------------------------------------------------------------- commit eb46ad15f603068546f9dce8130d0b63d3f3ab64 Author: Judah Jacobson Date: Wed Jan 16 21:03:09 2019 -0800 Bump to 0.7.5.0 and update the changelog. >--------------------------------------------------------------- eb46ad15f603068546f9dce8130d0b63d3f3ab64 Changelog | 6 ++++++ haskeline.cabal | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 4095f03..7c206e2 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,9 @@ +Changed in version 0.7.5.0: + * Add the new function `fallbackCompletion` to combine + multiple `CompletionFunc`s + * Fix warnings + * Bump the lower bound to ghc-8.0 + Changed in version 0.7.4.3: * Bump upper bounds on base, containers, stm and unix * Fix redundant "Category" field in haskeline.cabal diff --git a/haskeline.cabal b/haskeline.cabal index a915766..2c64537 100644 --- a/haskeline.cabal +++ b/haskeline.cabal @@ -1,6 +1,6 @@ Name: haskeline Cabal-Version: >=1.10 -Version: 0.7.4.3 +Version: 0.7.5.0 Category: User Interfaces License: BSD3 License-File: LICENSE From git at git.haskell.org Thu Jan 17 13:58:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:04 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16197' created Message-ID: <20190117135804.C79833ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16197 Referencing: a1e9cd6af8b41fa451fd3be806f4aced0040a14c From git at git.haskell.org Thu Jan 17 13:58:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:08 +0000 (UTC) Subject: [commit: ghc] wip/T16197: hWaitForInput-accurate-socket test (ce2f77d) Message-ID: <20190117135808.379C53ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/ce2f77d5656e847e8411805906f736a4a0a1242e/ghc >--------------------------------------------------------------- commit ce2f77d5656e847e8411805906f736a4a0a1242e Author: Tom Sydney Kerckhove Date: Fri Dec 21 12:41:13 2018 +0200 hWaitForInput-accurate-socket test >--------------------------------------------------------------- ce2f77d5656e847e8411805906f736a4a0a1242e libraries/base/tests/all.T | 1 + .../base/tests/hWaitForInput-accurate-socket.hs | 48 ++++++++++++++++++++++ .../tests/hWaitForInput-accurate-socket.stdout | 1 + 3 files changed, 50 insertions(+) diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index aaf4aa2..457d9f4 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -200,6 +200,7 @@ test('T9681', normal, compile_fail, ['']) test('T8089', [exit_code(99), run_timeout_multiplier(0.01)], compile_and_run, ['']) +test('hWaitForInput-accurate-socket', normal, compile_and_run, ['']) test('T8684', expect_broken(8684), compile_and_run, ['']) test('T9826',normal, compile_and_run,['']) test('T9848', diff --git a/libraries/base/tests/hWaitForInput-accurate-socket.hs b/libraries/base/tests/hWaitForInput-accurate-socket.hs new file mode 100644 index 0000000..ea3580e --- /dev/null +++ b/libraries/base/tests/hWaitForInput-accurate-socket.hs @@ -0,0 +1,48 @@ +import Control.Concurrent +import Control.Monad +import Foreign.C +import GHC.Clock +import GHC.IO.Device +import GHC.IO.Handle.FD +import System.IO +import System.Posix.IO +import System.Posix.Types +import System.Timeout + +main :: IO () +main = do + socketHandle <- makeTestSocketHandle + let nanoSecondsPerSecond = 1000 * 1000 * 1000 + let milliSecondsPerSecond = 1000 + let timeToSpend = 1 + let timeToSpendNano = timeToSpend * nanoSecondsPerSecond + let timeToSpendMilli = timeToSpend * milliSecondsPerSecond + start <- getMonotonicTimeNSec + b <- hWaitForInput socketHandle timeToSpendMilli + end <- getMonotonicTimeNSec + let timeSpentNano = fromIntegral $ end - start + let delta = timeSpentNano - timeToSpendNano + -- We can never wait for a shorter amount of time than specified + putStrLn $ "delta >= 0: " ++ show (delta >= 0) + +foreign import ccall unsafe "socket" c_socket :: + CInt -> CInt -> CInt -> IO CInt + +makeTestSocketHandle :: IO Handle +makeTestSocketHandle = do + sockNum <- + c_socket + 1 -- PF_LOCAL + 2 -- SOCK_DGRAM + 0 + let fd = fromIntegral sockNum :: Fd + h <- + fdToHandle' + (fromIntegral fd) + (Just GHC.IO.Device.Stream) + True + "testsocket" + ReadMode + True + hSetBuffering h NoBuffering + pure h diff --git a/libraries/base/tests/hWaitForInput-accurate-socket.stdout b/libraries/base/tests/hWaitForInput-accurate-socket.stdout new file mode 100644 index 0000000..f1e939c --- /dev/null +++ b/libraries/base/tests/hWaitForInput-accurate-socket.stdout @@ -0,0 +1 @@ +delta >= 0: True From git at git.haskell.org Thu Jan 17 13:58:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:12 +0000 (UTC) Subject: [commit: ghc] wip/T16197: GHCi ignores cmd line flags XMonomorphismRestr.. XNoExtendedDef..#10857 (9fb744b) Message-ID: <20190117135812.130C23ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/9fb744bdc54c75cf5b91aa783b18233ba8da04a6/ghc >--------------------------------------------------------------- commit 9fb744bdc54c75cf5b91aa783b18233ba8da04a6 Author: Roland Senn Date: Mon Dec 24 14:14:25 2018 +0100 GHCi ignores cmd line flags XMonomorphismRestr.. XNoExtendedDef..#10857 >--------------------------------------------------------------- 9fb744bdc54c75cf5b91aa783b18233ba8da04a6 compiler/main/DynFlags.hs | 17 +++++++++++++++++ ghc/GHCi/UI.hs | 12 ++++++++++-- testsuite/tests/ghci/should_run/T10857a.script | 1 + testsuite/tests/ghci/should_run/T10857a.stdout | 6 ++++++ testsuite/tests/ghci/should_run/T10857b.script | 1 + testsuite/tests/ghci/should_run/T10857b.stdout | 4 ++++ testsuite/tests/ghci/should_run/all.T | 4 ++++ 7 files changed, 43 insertions(+), 2 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 7296809..ccc2a05 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -34,6 +34,7 @@ module DynFlags ( wopt, wopt_set, wopt_unset, wopt_fatal, wopt_set_fatal, wopt_unset_fatal, xopt, xopt_set, xopt_unset, + xopt_set_unlessExplSpec, lang_set, useUnicodeSyntax, useStarIsType, @@ -1077,6 +1078,9 @@ data DynFlags = DynFlags { warnUnsafeOnLoc :: SrcSpan, trustworthyOnLoc :: SrcSpan, -- Don't change this without updating extensionFlags: + -- Here we collect the settings of the language extensions + -- from the command line, the ghci config file and + -- from interactive :set / :seti commands. extensions :: [OnOff LangExt.Extension], -- extensionFlags should always be equal to -- flattenExtensionFlags language extensions @@ -2378,6 +2382,19 @@ xopt_unset dfs f in dfs { extensions = onoffs, extensionFlags = flattenExtensionFlags (language dfs) onoffs } +-- | Set or unset a 'LangExt.Extension', unless it has been explicitely +-- set or unset before. +xopt_set_unlessExplSpec + :: LangExt.Extension + -> (DynFlags -> LangExt.Extension -> DynFlags) + -> DynFlags -> DynFlags +xopt_set_unlessExplSpec ext setUnset dflags = + let referedExts = stripOnOff <$> extensions dflags + stripOnOff (On x) = x + stripOnOff (Off x) = x + in + if ext `elem` referedExts then dflags else setUnset dflags ext + lang_set :: DynFlags -> Maybe Language -> DynFlags lang_set dflags lang = dflags { diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index d6d86fc..3a26dfe 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -433,9 +433,17 @@ interactiveUI config srcs maybe_exprs = do -- The initial set of DynFlags used for interactive evaluation is the same -- as the global DynFlags, plus -XExtendedDefaultRules and -- -XNoMonomorphismRestriction. + -- However we set/unset these two extensions only, if they were not already + -- explicitely specified before. The function 'xopt_set_unlessExplSpec' + -- inspects the data field DynFlags.extensions. + -- At this point of the GHCi initialization this data field contains only + -- the extensions specified at the command line. + -- The ghci config file has not yet been processed. (#10857) dflags <- getDynFlags - let dflags' = (`xopt_set` LangExt.ExtendedDefaultRules) - . (`xopt_unset` LangExt.MonomorphismRestriction) + let dflags' = (xopt_set_unlessExplSpec + LangExt.ExtendedDefaultRules xopt_set) + . (xopt_set_unlessExplSpec + LangExt.MonomorphismRestriction xopt_unset) $ dflags GHC.setInteractiveDynFlags dflags' diff --git a/testsuite/tests/ghci/should_run/T10857a.script b/testsuite/tests/ghci/should_run/T10857a.script new file mode 100644 index 0000000..d0b4977 --- /dev/null +++ b/testsuite/tests/ghci/should_run/T10857a.script @@ -0,0 +1 @@ +:showi lang diff --git a/testsuite/tests/ghci/should_run/T10857a.stdout b/testsuite/tests/ghci/should_run/T10857a.stdout new file mode 100644 index 0000000..a37151f --- /dev/null +++ b/testsuite/tests/ghci/should_run/T10857a.stdout @@ -0,0 +1,6 @@ +base language is: Haskell2010 +with the following modifiers: + -XNoDatatypeContexts + -XExtendedDefaultRules + -XNoMonomorphismRestriction + -XNondecreasingIndentation diff --git a/testsuite/tests/ghci/should_run/T10857b.script b/testsuite/tests/ghci/should_run/T10857b.script new file mode 100644 index 0000000..d0b4977 --- /dev/null +++ b/testsuite/tests/ghci/should_run/T10857b.script @@ -0,0 +1 @@ +:showi lang diff --git a/testsuite/tests/ghci/should_run/T10857b.stdout b/testsuite/tests/ghci/should_run/T10857b.stdout new file mode 100644 index 0000000..2619fae --- /dev/null +++ b/testsuite/tests/ghci/should_run/T10857b.stdout @@ -0,0 +1,4 @@ +base language is: Haskell2010 +with the following modifiers: + -XNoDatatypeContexts + -XNondecreasingIndentation diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T index 004794b..a9eded4 100644 --- a/testsuite/tests/ghci/should_run/all.T +++ b/testsuite/tests/ghci/should_run/all.T @@ -23,6 +23,10 @@ test('T9914', just_ghci, ghci_script, ['T9914.script']) test('T9915', just_ghci, ghci_script, ['T9915.script']) test('T10145', just_ghci, ghci_script, ['T10145.script']) test('T7253', just_ghci, ghci_script, ['T7253.script']) +test('T10857a', just_ghci, ghci_script, ['T10857a.script']) +test('T10857b', + [extra_hc_opts("-XMonomorphismRestriction -XNoExtendedDefaultRules")], + ghci_script, ['T10857b.script']) test('T11328', just_ghci, ghci_script, ['T11328.script']) test('T11825', just_ghci, ghci_script, ['T11825.script']) test('T12128', just_ghci, ghci_script, ['T12128.script']) From git at git.haskell.org Thu Jan 17 13:58:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:15 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Change comments as requested by code review. #10857 (f78048f) Message-ID: <20190117135815.1C93E3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/f78048f6575b370f078bcddc6b9e64bfe23932eb/ghc >--------------------------------------------------------------- commit f78048f6575b370f078bcddc6b9e64bfe23932eb Author: Roland Senn Date: Thu Dec 27 15:14:31 2018 +0100 Change comments as requested by code review. #10857 >--------------------------------------------------------------- f78048f6575b370f078bcddc6b9e64bfe23932eb compiler/main/DynFlags.hs | 2 +- ghc/GHCi/UI.hs | 33 +++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index ccc2a05..78be688 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -2382,7 +2382,7 @@ xopt_unset dfs f in dfs { extensions = onoffs, extensionFlags = flattenExtensionFlags (language dfs) onoffs } --- | Set or unset a 'LangExt.Extension', unless it has been explicitely +-- | Set or unset a 'LangExt.Extension', unless it has been explicitly -- set or unset before. xopt_set_unlessExplSpec :: LangExt.Extension diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 3a26dfe..0c09844 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -433,12 +433,7 @@ interactiveUI config srcs maybe_exprs = do -- The initial set of DynFlags used for interactive evaluation is the same -- as the global DynFlags, plus -XExtendedDefaultRules and -- -XNoMonomorphismRestriction. - -- However we set/unset these two extensions only, if they were not already - -- explicitely specified before. The function 'xopt_set_unlessExplSpec' - -- inspects the data field DynFlags.extensions. - -- At this point of the GHCi initialization this data field contains only - -- the extensions specified at the command line. - -- The ghci config file has not yet been processed. (#10857) + -- See note [Changing language extensions for interactive evaluation] #10857 dflags <- getDynFlags let dflags' = (xopt_set_unlessExplSpec LangExt.ExtendedDefaultRules xopt_set) @@ -509,6 +504,32 @@ interactiveUI config srcs maybe_exprs = do return () +{- +Note [Changing language extensions for interactive evaluation] +-------------------------------------------------------------- +GHCi maintains two sets of options: + +- The "loading options" apply when loading modules +- The "interactive options" apply when evaluating expressions and commands + typed at the GHCi prompt. + +The loading options are mostly created in ghc/Main.hs:main' from the command +line flags. In the function ghc/GHCi/UI.hs:interactiveUI the loading options +are copied to the interactive options. + +These interactive options (but not the loading options!) are supplemented +unconditionally by setting ExtendedDefaultRules ON and +MonomorphismRestriction OFF. The unconditional setting of these options +eventually overwrite settings already specified at the command line. + +Therefore instead of unconditionally setting ExtendedDefaultRules and +NoMonomorphismRestriction for the interactive options, we use the function +'xopt_set_unlessExplSpec' to first check whether the extension has already +specified at the command line. + +The ghci config file has not yet been processed. +-} + resetLastErrorLocations :: GHCi () resetLastErrorLocations = do st <- getGHCiState From git at git.haskell.org Thu Jan 17 13:58:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:18 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Hadrian: configure packages with right 'htmldir' (da2d9cf) Message-ID: <20190117135818.175583ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/da2d9cf8e028cd4e47285a71a720f33f112db69b/ghc >--------------------------------------------------------------- commit da2d9cf8e028cd4e47285a71a720f33f112db69b Author: Alec Theriault Date: Thu Dec 27 13:07:51 2018 -0800 Hadrian: configure packages with right 'htmldir' This means that we can query the package DB for haddock interfaces. Haddock uses this in its testsuite. 'cabal {v1-,v2,}-haddock' also uses this. Also thread through to Haddock package-specific overrides of GHC warnings. >--------------------------------------------------------------- da2d9cf8e028cd4e47285a71a720f33f112db69b hadrian/src/Settings/Builders/Cabal.hs | 14 +++++++++++++- hadrian/src/Settings/Builders/Ghc.hs | 4 +++- hadrian/src/Settings/Default.hs | 3 ++- hadrian/src/Settings/Warnings.hs | 6 +++--- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs index 80b9b67..8eedcde 100644 --- a/hadrian/src/Settings/Builders/Cabal.hs +++ b/hadrian/src/Settings/Builders/Cabal.hs @@ -13,6 +13,7 @@ cabalBuilderArgs :: Args cabalBuilderArgs = builder (Cabal Setup) ? do verbosity <- expr getVerbosity top <- expr topDirectory + pkg <- getPackage path <- getContextPath stage <- getStage mconcat [ arg "configure" @@ -25,13 +26,24 @@ cabalBuilderArgs = builder (Cabal Setup) ? do , flag CrossCompiling ? pure [ "--disable-executable-stripping" , "--disable-library-stripping" ] , arg "--cabal-file" - , arg =<< pkgCabalFile <$> getPackage + , arg $ pkgCabalFile pkg , arg "--distdir" , arg $ top -/- path , arg "--ipid" , arg "$pkg-$version" , arg "--prefix" , arg "${pkgroot}/.." + + -- NB: this is valid only because Hadrian puts the @docs@ and + -- @libraries@ folders in the same relative position: + -- + -- * libraries in @_build/stageN/libraries@ + -- * docs in @_build/docs/html/libraries@ + -- + -- This doesn't hold if we move the @docs@ folder anywhere else. + , arg "--htmldir" + , arg $ "${pkgroot}/../../docs/html/libraries/" ++ pkgName pkg + , withStaged $ Ghc CompileHs , withStaged (GhcPkg Update) , withBuilderArgs (GhcPkg Update stage) diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index e2cad2c..a605873 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -83,7 +83,9 @@ findHsDependencies = builder (Ghc FindHsDependencies) ? do , getInputs ] haddockGhcArgs :: Args -haddockGhcArgs = mconcat [ commonGhcArgs, getContextData hcOpts ] +haddockGhcArgs = mconcat [ commonGhcArgs + , getContextData hcOpts + , ghcWarningsArgs ] -- | Common GHC command line arguments used in 'ghcBuilderArgs', -- 'ghcCBuilderArgs', 'ghcMBuilderArgs' and 'haddockGhcArgs'. diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs index 2cadc4f..e2d7644 100644 --- a/hadrian/src/Settings/Default.hs +++ b/hadrian/src/Settings/Default.hs @@ -277,4 +277,5 @@ defaultBuilderArgs = mconcat -- | All 'Package'-dependent command line arguments. defaultPackageArgs :: Args -defaultPackageArgs = mconcat [ packageArgs, warningArgs ] +defaultPackageArgs = mconcat [ packageArgs + , builder Ghc ? ghcWarningsArgs ] diff --git a/hadrian/src/Settings/Warnings.hs b/hadrian/src/Settings/Warnings.hs index 5a9e831..42e7662 100644 --- a/hadrian/src/Settings/Warnings.hs +++ b/hadrian/src/Settings/Warnings.hs @@ -1,4 +1,4 @@ -module Settings.Warnings (defaultGhcWarningsArgs, warningArgs) where +module Settings.Warnings (defaultGhcWarningsArgs, ghcWarningsArgs) where import Expression import Oracles.Flag @@ -18,8 +18,8 @@ defaultGhcWarningsArgs = mconcat , flag GccIsClang ? arg "-optc-Wno-unknown-pragmas" ] -- | Package-specific warnings-related arguments, mostly suppressing various warnings. -warningArgs :: Args -warningArgs = builder Ghc ? do +ghcWarningsArgs :: Args +ghcWarningsArgs = do isIntegerSimple <- (== integerSimple) <$> getIntegerPackage mconcat [ stage0 ? mconcat From git at git.haskell.org Thu Jan 17 13:58:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:21 +0000 (UTC) Subject: [commit: ghc] wip/T16197: PPC NCG: Refactor stack allocation code (3f46cff) Message-ID: <20190117135821.11E643ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/3f46cffcc2850e68405a113d4df7210c4748b4c1/ghc >--------------------------------------------------------------- commit 3f46cffcc2850e68405a113d4df7210c4748b4c1 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. >--------------------------------------------------------------- 3f46cffcc2850e68405a113d4df7210c4748b4c1 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 6aafb59..47ab07b 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -892,24 +892,6 @@ pprInstr LWSYNC = text "\tlwsync" pprInstr NOP = text "\tnop" -pprInstr (UPDATE_SP fmt amount@(ImmInt offset)) - | fits16Bits offset = vcat [ - pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))), - pprInstr (STU fmt r0 (AddrRegImm sp amount)) - ] - -pprInstr (UPDATE_SP fmt amount) - = sdocWithPlatform $ \platform -> - let tmp = tmpReg platform in - vcat [ - pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))), - pprInstr (ADDIS tmp sp (HA amount)), - pprInstr (ADD tmp tmp (RIImm (LO amount))), - pprInstr (STU fmt r0 (AddrRegReg sp tmp)) - ] - --- pprInstr _ = panic "pprInstr (ppc)" - pprLogic :: PtrString -> Reg -> Reg -> RI -> SDoc pprLogic op reg1 reg2 ri = hcat [ From git at git.haskell.org Thu Jan 17 13:58:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:24 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Fix filename in comment again (c155ac9) Message-ID: <20190117135824.0DDF63ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/c155ac9c529945fa6f7803f5d3bc69abe3cafe99/ghc >--------------------------------------------------------------- commit c155ac9c529945fa6f7803f5d3bc69abe3cafe99 Author: Peter Trommler Date: Sun Dec 30 22:31:38 2018 +0100 Fix filename in comment again >--------------------------------------------------------------- c155ac9c529945fa6f7803f5d3bc69abe3cafe99 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 Thu Jan 17 13:58:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:27 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Fix reference to stack code in comment (ea79978) Message-ID: <20190117135827.254C53ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/ea79978b53727f5e5c3cfc413e60b6ba90451079/ghc >--------------------------------------------------------------- commit ea79978b53727f5e5c3cfc413e60b6ba90451079 Author: Peter Trommler Date: Sun Dec 30 22:28:45 2018 +0100 Fix reference to stack code in comment >--------------------------------------------------------------- ea79978b53727f5e5c3cfc413e60b6ba90451079 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 Thu Jan 17 13:58:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:30 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Introduce ghci command wrapper (6a7a6b8) Message-ID: <20190117135830.252853ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/6a7a6b865bdb637a3ab69b9bccc390b85c147878/ghc >--------------------------------------------------------------- commit 6a7a6b865bdb637a3ab69b9bccc390b85c147878 Author: Zejun Wu Date: Sat Dec 29 12:28:47 2018 -0800 Introduce ghci command wrapper Introduce ghci command wrapper, which can be used to cutomize ghci: * process additionals actions before/after the command * handle particular exceptions in given ways * logging stats We also split the timing and printing part of `timeIt` into different functions. >--------------------------------------------------------------- 6a7a6b865bdb637a3ab69b9bccc390b85c147878 ghc/GHCi/UI.hs | 36 +++++++++++++++----------- ghc/GHCi/UI/Monad.hs | 73 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 76 insertions(+), 33 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 6a7a6b865bdb637a3ab69b9bccc390b85c147878 From git at git.haskell.org Thu Jan 17 13:58:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:33 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Hadrian: support extra libraries + OSX rpath (2f65025) Message-ID: <20190117135833.26C523ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/2f65025eeb4a79458af26d759e932d70633a64db/ghc >--------------------------------------------------------------- commit 2f65025eeb4a79458af26d759e932d70633a64db Author: Alec Theriault Date: Mon Jan 7 11:38:11 2019 -0800 Hadrian: support extra libraries + OSX rpath Summary: This fixes some of the issues that surfaced when trying to build dynamic GHC on OSX. Unfortunately, due some other `libffi` issues, this doesn't completely fix dynamic builds on OSX. - Use 'extra-libraries' from .cabal files instead of hardcoding which packages need which extra libs. Also add support for 'extra-lib-dirs'. - Make sure Hadrian looks in the right places to support both plain '.buildinfo' and '.buildinfo.in' files. - Make the '-rpath' support more robust across OS's (it previously didn't work on OSX and possibly windows either). Reviewers: angerman, alpmestan, adamse, DavidEichmann, bgamari, Phyx Subscribers: rwbarton, carter GHC Trac Issues: #15990 Differential Revision: https://phabricator.haskell.org/D5409 >--------------------------------------------------------------- 2f65025eeb4a79458af26d759e932d70633a64db hadrian/src/Context.hs | 9 ++++++--- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 14 +++++++------- hadrian/src/Oracles/Setting.hs | 10 +++++++++- hadrian/src/Rules/BinaryDist.hs | 4 +--- hadrian/src/Settings/Builders/Ghc.hs | 21 +++++++++++---------- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index 8036eb0..7943e6d 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -51,12 +51,15 @@ libPath :: Context -> Action FilePath libPath context = buildRoot <&> (-/- libDir context) -- | Get the directory name for binary distribution files --- --ghc-. +-- @--ghc-@. +-- +-- We preform some renaming to accomodate Cabal's slightly different naming +-- conventions (see 'cabalOsString' and 'cabalArchString'). distDir :: Action FilePath distDir = do version <- setting ProjectVersion - hostOs <- setting BuildOs - hostArch <- setting BuildArch + hostOs <- cabalOsString <$> setting BuildOs + hostArch <- cabalArchString <$> setting BuildArch return $ hostArch ++ "-" ++ hostOs ++ "-ghc-" ++ version pkgFile :: Context -> String -> String -> Action FilePath diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs index bb2f0be..9952701 100644 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs @@ -208,7 +208,7 @@ resolveContextData context at Context {..} = do -- Create the @cabal_macros.h@, ... -- Note: the @cPath@ is ignored. The path that's used is the 'buildDir' path -- from the local build info @lbi at . - pdi <- liftIO $ getHookedBuildInfo (pkgPath package) + pdi <- liftIO $ getHookedBuildInfo [pkgPath package, cPath -/- "build"] let pd' = C.updatePackageDescription pdi pd lbi' = lbi { C.localPkgDescr = pd' } liftIO $ C.initialBuildSteps cPath pd' lbi' C.silent @@ -282,12 +282,12 @@ resolveContextData context at Context {..} = do , depLdOpts = forDeps Installed.ldOptions , buildGhciLib = C.withGHCiLib lbi' } -getHookedBuildInfo :: FilePath -> IO C.HookedBuildInfo -getHookedBuildInfo baseDir = do - -- TODO: We should probably better generate this in the build directory, - -- rather than in the base directory? However, @configure@ is run in the - -- base directory. +-- | Look for a @.buildinfo@ in all of the specified directories, stopping on +-- the first one we find. +getHookedBuildInfo :: [FilePath] -> IO C.HookedBuildInfo +getHookedBuildInfo [] = return C.emptyHookedBuildInfo +getHookedBuildInfo (baseDir:baseDirs) = do maybeInfoFile <- C.findHookedPackageDesc baseDir case maybeInfoFile of - Nothing -> return C.emptyHookedBuildInfo + Nothing -> getHookedBuildInfo baseDirs Just infoFile -> C.readHookedBuildInfo C.silent infoFile diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index 5197b8e..02ac42e 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -3,7 +3,7 @@ module Oracles.Setting ( getSettingList, anyTargetPlatform, anyTargetOs, anyTargetArch, anyHostOs, ghcWithInterpreter, ghcEnableTablesNextToCode, useLibFFIForAdjustors, ghcCanonVersion, cmdLineLengthLimit, iosHost, osxHost, windowsHost, - topDirectory, libsuf + hostSupportsRPaths, topDirectory, libsuf ) where import Hadrian.Expression @@ -166,6 +166,14 @@ iosHost = anyHostOs ["ios"] osxHost :: Action Bool osxHost = anyHostOs ["darwin"] +-- | Check whether the host OS supports the @-rpath@ linker option when +-- using dynamic linking. +-- +-- TODO: Windows supports lazy binding (but GHC doesn't currently support +-- dynamic way on Windows anyways). +hostSupportsRPaths :: Action Bool +hostSupportsRPaths = anyHostOs ["linux", "darwin", "freebsd"] + -- | Check whether the host OS setting is set to @"mingw32"@ or @"cygwin32"@. windowsHost :: Action Bool windowsHost = anyHostOs ["mingw32", "cygwin32"] diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index a589c7a..f847af9 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -98,14 +98,12 @@ bindistRules = do version <- setting ProjectVersion targetPlatform <- setting TargetPlatformFull - cabalHostOs <- cabalOsString <$> setting BuildOs - cabalHostArch <- cabalArchString <$> setting BuildArch + distDir <- Context.distDir rtsDir <- pkgIdentifier rts let ghcBuildDir = root -/- stageString Stage1 bindistFilesDir = root -/- "bindist" -/- ghcVersionPretty ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform - distDir = cabalHostArch ++ "-" ++ cabalHostOs ++ "-ghc-" ++ version rtsIncludeDir = ghcBuildDir -/- "lib" -/- distDir -/- rtsDir -/- "include" diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index a605873..4957de7 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -43,10 +43,10 @@ compileC = builder (Ghc CompileCWithGhc) ? do ghcLinkArgs :: Args ghcLinkArgs = builder (Ghc LinkHs) ? do pkg <- getPackage - libs <- pkg == hp2ps ? pure ["m"] - intLib <- getIntegerPackage - gmpLibs <- notStage0 ? intLib == integerGmp ? pure ["gmp"] + libs <- getContextData extraLibs + libDirs <- getContextData extraLibDirs dynamic <- requiresDynamic + darwin <- expr osxHost -- Relative path from the output (rpath $ORIGIN). originPath <- dropFileName <$> getOutput @@ -56,20 +56,21 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do let distPath = libPath' -/- distDir originToLibsDir = makeRelativeNoSysLink originPath distPath + rpath | darwin = "@loader_path" -/- originToLibsDir + | otherwise = "$ORIGIN" -/- originToLibsDir mconcat [ dynamic ? mconcat [ arg "-dynamic" - -- TODO what about windows / OSX? - , notStage0 ? pure - [ "-optl-Wl,-rpath" - , "-optl-Wl," ++ ("$ORIGIN" -/- originToLibsDir) ] + -- TODO what about windows? + , isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ] + , notStage0 ? + hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath) ] - , (dynamic && isLibrary pkg) ? - pure [ "-shared", "-dynload", "deploy" ] , arg "-no-auto-link-packages" , nonHsMainPackage pkg ? arg "-no-hs-main" , not (nonHsMainPackage pkg) ? arg "-rtsopts" - , pure [ "-optl-l" ++ lib | lib <- libs ++ gmpLibs ] + , pure [ "-l" ++ lib | lib <- libs ] + , pure [ "-L" ++ libDir | libDir <- libDirs ] ] findHsDependencies :: Args From git at git.haskell.org Thu Jan 17 13:58:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:36 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Create folder if missing for .hie files (9fb2702) Message-ID: <20190117135836.2E0033ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/9fb2702dec3e9419e1a229f8cd678324e89fdddf/ghc >--------------------------------------------------------------- commit 9fb2702dec3e9419e1a229f8cd678324e89fdddf Author: Alec Theriault Date: Tue Jan 8 06:31:32 2019 -0800 Create folder if missing for .hie files Summary: This matches the existing behaviour for .hi files: if the user requests the interface file be written in some location, we should create the parent folder if it doesn't already exist. Reviewers: bgamari, sjakobi Reviewed By: sjakobi Subscribers: sjakobi, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5463 >--------------------------------------------------------------- 9fb2702dec3e9419e1a229f8cd678324e89fdddf compiler/hieFile/HieBin.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/hieFile/HieBin.hs b/compiler/hieFile/HieBin.hs index fa33936..2734a9f 100644 --- a/compiler/hieFile/HieBin.hs +++ b/compiler/hieFile/HieBin.hs @@ -22,7 +22,8 @@ import Data.IORef import Data.List ( mapAccumR ) import Data.Word ( Word32 ) import Control.Monad ( replicateM ) - +import System.Directory ( createDirectoryIfMissing ) +import System.FilePath ( takeDirectory ) -- | `Name`'s get converted into `HieName`'s before being written into @.hie@ -- files. See 'toHieName' and 'fromHieName' for logic on how to convert between @@ -63,7 +64,7 @@ initBinMemSize :: Int initBinMemSize = 1024*1024 writeHieFile :: Binary a => FilePath -> a -> IO () -writeHieFile filename hiefile = do +writeHieFile hie_file_path hiefile = do bh0 <- openBinMem initBinMemSize -- remember where the dictionary pointer will go @@ -115,7 +116,8 @@ writeHieFile filename hiefile = do putDictionary bh dict_next dict_map -- and send the result to the file - writeBinMem bh filename + createDirectoryIfMissing True (takeDirectory hie_file_path) + writeBinMem bh hie_file_path return () readHieFile :: Binary a => NameCache -> FilePath -> IO (a, NameCache) From git at git.haskell.org Thu Jan 17 13:58:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:39 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Fix tests for `integer-simple` (d2eb344) Message-ID: <20190117135839.359B43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/d2eb344a38f6c727040ba76e584aeaca8e8aefb3/ghc >--------------------------------------------------------------- commit d2eb344a38f6c727040ba76e584aeaca8e8aefb3 Author: Alec Theriault Date: Tue Jan 8 10:50:30 2019 -0800 Fix tests for `integer-simple` A bunch of tests for `integer-simple` were now broken for a foolish reason: unlike the `integer-gmp` case, there is no CorePrep optimization for turning small integers directly into applications of `S#`. Rather than port this optimization to `integer-simple` (which would involve moving a bunch of `integer-simple` names into `PrelNames`), I switched as many tests as possible to use `Int`. The printing of `Integer` is already tested in `print037`. >--------------------------------------------------------------- d2eb344a38f6c727040ba76e584aeaca8e8aefb3 testsuite/driver/testlib.py | 3 -- testsuite/tests/ghci.debugger/GADT.hs | 2 +- testsuite/tests/ghci.debugger/QSort.hs | 2 +- testsuite/tests/ghci.debugger/scripts/T2740.script | 2 +- testsuite/tests/ghci.debugger/scripts/T2740.stdout | 4 +- testsuite/tests/ghci.debugger/scripts/all.T | 52 +++++++++++----------- .../tests/ghci.debugger/scripts/break001.script | 2 +- .../tests/ghci.debugger/scripts/break001.stdout | 12 ++--- .../tests/ghci.debugger/scripts/break005.script | 2 +- .../tests/ghci.debugger/scripts/break005.stdout | 8 ++-- .../tests/ghci.debugger/scripts/break006.script | 4 +- .../tests/ghci.debugger/scripts/break006.stdout | 24 +++++----- .../tests/ghci.debugger/scripts/break026.script | 4 +- .../tests/ghci.debugger/scripts/break026.stdout | 52 +++++++++++----------- .../tests/ghci.debugger/scripts/break027.script | 2 +- .../tests/ghci.debugger/scripts/break027.stdout | 10 ++--- .../tests/ghci.debugger/scripts/dynbrk002.stdout | 8 ++-- .../tests/ghci.debugger/scripts/print002.script | 10 ++++- .../tests/ghci.debugger/scripts/print002.stdout | 1 + .../tests/ghci.debugger/scripts/print003.script | 2 +- .../tests/ghci.debugger/scripts/print003.stdout | 5 +-- .../tests/ghci.debugger/scripts/print005.script | 2 +- .../tests/ghci.debugger/scripts/print005.stdout | 22 ++++----- .../tests/ghci.debugger/scripts/print006.script | 2 +- .../tests/ghci.debugger/scripts/print006.stdout | 5 +-- .../tests/ghci.debugger/scripts/print008.script | 2 +- .../tests/ghci.debugger/scripts/print008.stdout | 4 +- .../tests/ghci.debugger/scripts/print012.stdout | 6 +-- .../tests/ghci.debugger/scripts/print013.script | 2 +- .../tests/ghci.debugger/scripts/print014.script | 2 +- testsuite/tests/ghci/scripts/T2976.script | 2 +- testsuite/tests/ghci/scripts/T2976.stdout | 4 +- testsuite/tests/ghci/scripts/all.T | 4 +- testsuite/tests/ghci/scripts/ghci055.script | 2 +- testsuite/tests/ghci/scripts/ghci055.stdout | 2 +- testsuite/tests/lib/integer/all.T | 2 +- 36 files changed, 138 insertions(+), 136 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 d2eb344a38f6c727040ba76e584aeaca8e8aefb3 From git at git.haskell.org Thu Jan 17 13:58:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:42 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Remove from `base` obsolete CPP for `integer-gmp` (f7def74) Message-ID: <20190117135842.3D01F3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/f7def747cf0da103237cd17af5c8bfdbdf5823b2/ghc >--------------------------------------------------------------- commit f7def747cf0da103237cd17af5c8bfdbdf5823b2 Author: Alec Theriault Date: Tue Jan 8 10:41:50 2019 -0800 Remove from `base` obsolete CPP for `integer-gmp` * `GHC.Natural` now exports the same functions (regardless of integer backend) * remove unnecessary CPP around instances * remove the 'OPTIMISE_INTEGER_GCD_LCM' flag - almost all of those optimizations now work regardless of which integer backend is used Note that some CPP still remains for situations where there are backend-specific optimization hacks (like a more efficient GMP-only `gcd` for `Int#` and `Word#`). >--------------------------------------------------------------- f7def747cf0da103237cd17af5c8bfdbdf5823b2 libraries/base/Data/Bits.hs | 54 ------------------------------------------- libraries/base/GHC/Enum.hs | 28 ++-------------------- libraries/base/GHC/Natural.hs | 20 ++++++++++++---- libraries/base/GHC/Num.hs | 26 --------------------- libraries/base/GHC/Read.hs | 7 ------ libraries/base/GHC/Real.hs | 52 ++++++++--------------------------------- libraries/base/base.cabal | 1 - 7 files changed, 26 insertions(+), 162 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 f7def747cf0da103237cd17af5c8bfdbdf5823b2 From git at git.haskell.org Thu Jan 17 13:58:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:45 +0000 (UTC) Subject: [commit: ghc] wip/T16197: try to fix CI (a303695) Message-ID: <20190117135845.3A54B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/a303695b0ac8c73455d080808d437af1bed21b18/ghc >--------------------------------------------------------------- commit a303695b0ac8c73455d080808d437af1bed21b18 Author: Alec Theriault Date: Tue Jan 8 16:29:32 2019 -0800 try to fix CI >--------------------------------------------------------------- a303695b0ac8c73455d080808d437af1bed21b18 libraries/integer-simple/GHC/Integer/Type.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs index ed844f4..3317893 100644 --- a/libraries/integer-simple/GHC/Integer/Type.hs +++ b/libraries/integer-simple/GHC/Integer/Type.hs @@ -329,6 +329,7 @@ popCountPositive p = word2Int# (go 0## p) go acc# None = acc# go acc# (Some d ds) = go (popCnt# d `plusWord#` acc#) ds +{-# NOINLINE bitInteger #-} -- | 'Integer' for which only /n/-th bit is set. Undefined behaviour -- for negative /n/ values. bitInteger :: Int# -> Integer @@ -343,6 +344,7 @@ bitPositive i# then Some 0## (bitPositive (i# -# WORD_SIZE_IN_BITS#)) else Some (uncheckedShiftL# 1## i#) None +{-# NOINLINE testBitInteger #-} testBitInteger :: Integer -> Int# -> Bool testBitInteger (!_) i# | isTrue# (i# <# 0#) = False testBitInteger Naught _ = False From git at git.haskell.org Thu Jan 17 13:58:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:49 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Support printing `integer-simple` Integers in GHCi (582a96f) Message-ID: <20190117135849.3A0FC3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/582a96f422a8437f87da2539afc7d7e6772054df/ghc >--------------------------------------------------------------- commit 582a96f422a8437f87da2539afc7d7e6772054df Author: Alec Theriault Date: Tue Jan 8 10:28:10 2019 -0800 Support printing `integer-simple` Integers in GHCi This means that `:p` no longer leaks the implementation details of `Integer` with `integer-simple`. The `print037` test case should exercise all possible code paths for GHCi's code around printing `Integer`s (both in `integer-simple` and `integer-gmp`). `ghc` the package now also has a Cabal `integer-simple` flag (like the `integer-gmp` one). >--------------------------------------------------------------- 582a96f422a8437f87da2539afc7d7e6772054df compiler/ghc.cabal.in | 14 ++++++++++ compiler/ghci/RtClosureInspect.hs | 32 +++++++++++++++++++++- ghc.mk | 1 + hadrian/src/Settings/Packages.hs | 4 ++- testsuite/tests/ghci.debugger/scripts/all.T | 1 + .../tests/ghci.debugger/scripts/print037.script | 25 +++++++++++++++++ .../tests/ghci.debugger/scripts/print037.stdout | 5 ++++ 7 files changed, 80 insertions(+), 2 deletions(-) diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 5b93d3c..4be4d60 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -45,6 +45,11 @@ Flag terminfo Default: True Manual: True +Flag integer-simple + Description: Use integer-simple + Manual: True + Default: False + Flag integer-gmp Description: Use integer-gmp Manual: True @@ -89,11 +94,20 @@ Library CPP-Options: -DGHCI Include-Dirs: ../rts/dist/build @FFIIncludeDir@ + -- sanity-check to ensure not more than one integer flag is set + if flag(integer-gmp) && flag(integer-simple) + build-depends: invalid-cabal-flag-settings<0 + -- gmp internals are used by the GHCi debugger if available if flag(integer-gmp) CPP-Options: -DINTEGER_GMP build-depends: integer-gmp >= 1.0.2 + -- simple internals are used by the GHCi debugger if available + if flag(integer-simple) + CPP-Options: -DINTEGER_SIMPLE + build-depends: integer-simple >= 0.1.1.1 + Other-Extensions: BangPatterns CPP diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index a61d776..4a119a9 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -67,6 +67,9 @@ import Data.List import GHC.Exts import Data.Array.Base import GHC.Integer.GMP.Internals +#elif defined(INTEGER_SIMPLE) +import GHC.Exts +import GHC.Integer.Simple.Internals #endif import qualified Data.Sequence as Seq import Data.Sequence (viewl, ViewL(..)) @@ -410,9 +413,36 @@ cPprTermBase y = let !(UArray _ _ _ arr#) = listArray (0,length ws-1) ws constr - | "Jp#" <- occNameString (nameOccName (dataConName con)) = Jp# + | "Jp#" <- getOccString (dataConName con) = Jp# | otherwise = Jn# return (Just (Ppr.integer (constr (BN# arr#)))) +#elif defined(INTEGER_SIMPLE) + -- As with the GMP case, this depends deeply on the integer-simple + -- representation. + -- + -- @ + -- data Integer = Positive !Digits | Negative !Digits | Naught + -- + -- data Digits = Some !Word# !Digits + -- | None + -- @ + -- + -- NB: the above has some type synonyms expanded out for the sake of brevity + ppr_integer _ Term{subTerms=[]} = + return (Just (Ppr.integer Naught)) + ppr_integer _ Term{dc=Right con, subTerms=[digitTerm]} + | Just digits <- get_digits digitTerm + = return (Just (Ppr.integer (constr digits))) + where + get_digits :: Term -> Maybe Digits + get_digits Term{subTerms=[]} = Just None + get_digits Term{subTerms=[Prim{valRaw=[W# w]},t]} + = Some w <$> get_digits t + get_digits _ = Nothing + + constr + | "Positive" <- getOccString (dataConName con) = Positive + | otherwise = Negative #endif ppr_integer _ _ = return Nothing diff --git a/ghc.mk b/ghc.mk index d90800b..351012c 100644 --- a/ghc.mk +++ b/ghc.mk @@ -616,6 +616,7 @@ libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-gmp compiler_stage2_CONFIGURE_OPTS += --flags=integer-gmp else ifeq "$(INTEGER_LIBRARY)" "integer-simple" libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-simple +compiler_stage2_CONFIGURE_OPTS += --flags=integer-simple else $(error Unknown integer library: $(INTEGER_LIBRARY)) endif diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index 8963c76..5993723 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -72,7 +72,9 @@ packageArgs = do , ghcWithInterpreter ? notStage0 ? arg "ghci" , flag CrossCompiling ? arg "-terminfo" , notStage0 ? intLib == integerGmp ? - arg "integer-gmp" ] + arg "integer-gmp" + , notStage0 ? intLib == integerSimple ? + arg "integer-simple" ] , builder (Haddock BuildPackage) ? arg ("--optghc=-I" ++ path) ] diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index 1ecf08f..985f065 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -45,6 +45,7 @@ test('print033', normal, ghci_script, ['print033.script']) test('print034', extra_files(['../GADT.hs', '../Test.hs']), ghci_script, ['print034.script']) test('print035', extra_files(['../Unboxed.hs']), ghci_script, ['print035.script']) test('print036', expect_broken(9046), ghci_script, ['print036.script']) +test('print037', normal, ghci_script, ['print037.script']) test('break001', [broken_without_gmp, extra_files(['../Test2.hs'])], ghci_script, ['break001.script']) test('break002', extra_files(['../Test2.hs']), ghci_script, ['break002.script']) diff --git a/testsuite/tests/ghci.debugger/scripts/print037.script b/testsuite/tests/ghci.debugger/scripts/print037.script new file mode 100644 index 0000000..7bf332c --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/print037.script @@ -0,0 +1,25 @@ +-- Test out printing of integers in GHCi + +-- With @integer-gmp@, small integer literals get converted directly into +-- @S# i#@. This optimization means that small integers are always already +-- evaluated in the output for @:p at . +-- +-- Since we want this test to work on @integer-simple@ too, we explicitly +-- force the literals. + +let smallNeg = -53 :: Integer +:f smallNeg + +let smallPos = 89 :: Integer +:f smallPos + +let zero = 0 :: Integer +:f zero + +let largeNeg = -4123841823694876543987265438957349857349 :: Integer +:f largeNeg + +let largePos = 5402398759384752938475029384750298347554 :: Integer +:f largePos + +:q diff --git a/testsuite/tests/ghci.debugger/scripts/print037.stdout b/testsuite/tests/ghci.debugger/scripts/print037.stdout new file mode 100644 index 0000000..bce450e --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/print037.stdout @@ -0,0 +1,5 @@ +smallNeg = -53 +smallPos = 89 +zero = 0 +largeNeg = -4123841823694876543987265438957349857349 +largePos = 5402398759384752938475029384750298347554 From git at git.haskell.org Thu Jan 17 13:58:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:52 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Match `integer-simple`'s API with `integer-gmp` (6e320c2) Message-ID: <20190117135852.387673ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/6e320c279ddfde1e16da204590c1c66a511d9b52/ghc >--------------------------------------------------------------- commit 6e320c279ddfde1e16da204590c1c66a511d9b52 Author: Alec Theriault Date: Tue Jan 8 10:35:55 2019 -0800 Match `integer-simple`'s API with `integer-gmp` In `integer-simple`: * Added an efficient `popCountInteger` and `bitInteger` * Added an efficient `gcdInteger` and `lcmInteger` * Made `testBitInteger` more efficient >--------------------------------------------------------------- 6e320c279ddfde1e16da204590c1c66a511d9b52 libraries/integer-gmp/src/GHC/Integer.hs | 2 + .../integer-gmp/src/GHC/Integer/GMP/Internals.hs | 2 - libraries/integer-simple/GHC/Integer.hs | 3 +- libraries/integer-simple/GHC/Integer/Type.hs | 100 +++++++++++++++++++-- 4 files changed, 99 insertions(+), 8 deletions(-) diff --git a/libraries/integer-gmp/src/GHC/Integer.hs b/libraries/integer-gmp/src/GHC/Integer.hs index ab45887..00c26b0 100644 --- a/libraries/integer-gmp/src/GHC/Integer.hs +++ b/libraries/integer-gmp/src/GHC/Integer.hs @@ -64,6 +64,8 @@ module GHC.Integer ( complementInteger, shiftLInteger, shiftRInteger, testBitInteger, + popCountInteger, bitInteger, + -- * Hashing hashInteger, ) where diff --git a/libraries/integer-gmp/src/GHC/Integer/GMP/Internals.hs b/libraries/integer-gmp/src/GHC/Integer/GMP/Internals.hs index 6c7fccf..1d86fc1 100644 --- a/libraries/integer-gmp/src/GHC/Integer/GMP/Internals.hs +++ b/libraries/integer-gmp/src/GHC/Integer/GMP/Internals.hs @@ -41,8 +41,6 @@ module GHC.Integer.GMP.Internals , module GHC.Integer -- ** Additional 'Integer' operations - , bitInteger - , popCountInteger , gcdInteger , gcdExtInteger , lcmInteger diff --git a/libraries/integer-simple/GHC/Integer.hs b/libraries/integer-simple/GHC/Integer.hs index a519ace..1f2598c 100644 --- a/libraries/integer-simple/GHC/Integer.hs +++ b/libraries/integer-simple/GHC/Integer.hs @@ -33,9 +33,10 @@ module GHC.Integer ( divModInteger, quotRemInteger, quotInteger, remInteger, encodeFloatInteger, decodeFloatInteger, floatFromInteger, encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger, - -- gcdInteger, lcmInteger, -- XXX + gcdInteger, lcmInteger, andInteger, orInteger, xorInteger, complementInteger, shiftLInteger, shiftRInteger, testBitInteger, + popCountInteger, bitInteger, hashInteger, ) where diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs index b46eda1..ed844f4 100644 --- a/libraries/integer-simple/GHC/Integer/Type.hs +++ b/libraries/integer-simple/GHC/Integer/Type.hs @@ -316,12 +316,71 @@ shiftRInteger j@(Negative _) i = complementInteger (shiftRInteger (complementInteger j) i) shiftRInteger Naught _ = Naught --- XXX this could be a lot more efficient, but this is a quick --- reimplementation of the default Data.Bits instance, so that we can --- implement the Integer interface +{-# NOINLINE popCountInteger #-} +popCountInteger :: Integer -> Int# +popCountInteger (Positive p) = popCountPositive p +popCountInteger Naught = 0# +popCountInteger (Negative n) = negateInt# (popCountPositive n) + +popCountPositive :: Positive -> Int# +popCountPositive p = word2Int# (go 0## p) + where + go :: Word# -> Positive -> Word# + go acc# None = acc# + go acc# (Some d ds) = go (popCnt# d `plusWord#` acc#) ds + +-- | 'Integer' for which only /n/-th bit is set. Undefined behaviour +-- for negative /n/ values. +bitInteger :: Int# -> Integer +bitInteger i# = if isTrue# (i# <# 0#) + then Naught + else Positive (bitPositive i#) + +-- Assumes 0 <= i +bitPositive :: Int# -> Positive +bitPositive i# + = if isTrue# (i# >=# WORD_SIZE_IN_BITS#) + then Some 0## (bitPositive (i# -# WORD_SIZE_IN_BITS#)) + else Some (uncheckedShiftL# 1## i#) None + testBitInteger :: Integer -> Int# -> Bool -testBitInteger x i = (x `andInteger` (oneInteger `shiftLInteger` i)) - `neqInteger` Naught +testBitInteger (!_) i# | isTrue# (i# <# 0#) = False +testBitInteger Naught _ = False +testBitInteger (Positive p) i# = isTrue# (testBitPositive p i#) + where + -- Straightforward decrement of 'j#' by the word size stopping when + -- 'j#' is less than the word size or the number runs out. + testBitPositive :: Positive -> Int# -> Int# + testBitPositive None _ = 0# + testBitPositive (Some w# ws) j# + = if isTrue# (j# >=# WORD_SIZE_IN_BITS#) + then testBitPositive ws (j# -# WORD_SIZE_IN_BITS#) + else neWord# (uncheckedShiftL# 1## j# `and#` w#) 0## +testBitInteger (Negative n) i# = isTrue# (testBitNegative n i#) + where + -- For negative numbers, we want to inspect the correct bit of the two's + -- complement. Like for positive numbers, we walk down the words until + -- 'j#' is less than the word size (or the number runs out). + testBitNegative :: Positive -> Int# -> Int# + testBitNegative (Some 0## ws) j# + -- If the number starts (on the low end) with a bunch of '0##' and 'j#' + -- falls in those, we know that @n - 1@ would have flipped all those + -- bits, so @!(n - 1) & i@ is false. + = if isTrue# (j# >=# WORD_SIZE_IN_BITS#) + then testBitNegative ws (j# -# WORD_SIZE_IN_BITS#) + else 1# + testBitNegative (Some w# ws) j# + -- Yet, as soon as we find something that isn't a '0##', we can subtract + -- and forget about the 1 altogether! + = testBitNegativeMinus1 (Some (w# `minusWord#` 1##) ws) j# + testBitNegative None _ = 0# -- XXX Can't happen due to Positive's invariant + + testBitNegativeMinus1 :: Positive -> Int# -> Int# + testBitNegativeMinus1 None _ = 1# + testBitNegativeMinus1 (Some w# ws) j# + = if isTrue# (j# >=# WORD_SIZE_IN_BITS#) + then testBitNegativeMinus1 ws (j# -# WORD_SIZE_IN_BITS#) + else neWord# (uncheckedShiftL# 1## j# `and#` not# w#) 0## twosComplementPositive :: Positive -> DigitsOnes twosComplementPositive p = flipBits (p `minusPositive` onePositive) @@ -417,6 +476,37 @@ remInteger :: Integer -> Integer -> Integer x `remInteger` y = case x `quotRemInteger` y of (# _, r #) -> r +{-# NOINLINE gcdInteger #-} +gcdInteger :: Integer -> Integer -> Integer +gcdInteger (Positive a) (Positive b) = Positive (gcdPositive a b) +gcdInteger (Positive a) (Negative b) = Positive (gcdPositive a b) +gcdInteger (Negative a) (Positive b) = Positive (gcdPositive a b) +gcdInteger (Negative a) (Negative b) = Positive (gcdPositive a b) +gcdInteger Naught b = absInteger b +gcdInteger a Naught = absInteger a + +gcdPositive :: Positive -> Positive -> Positive +gcdPositive p1 p2 = case p1 `quotRemPositive` p2 of + (# _, Positive r #) -> gcdPositive p2 r + (# _, Naught #) -> p2 + (# _, Negative _ #) -> errorPositive -- XXX Can't happen + + +{-# NOINLINE lcmInteger #-} +lcmInteger :: Integer -> Integer -> Integer +lcmInteger (Positive a) (Positive b) = Positive (lcmPositive a b) +lcmInteger (Positive a) (Negative b) = Positive (lcmPositive a b) +lcmInteger (Negative a) (Positive b) = Positive (lcmPositive a b) +lcmInteger (Negative a) (Negative b) = Positive (lcmPositive a b) +lcmInteger Naught _ = Naught +lcmInteger _ Naught = Naught + +lcmPositive :: Positive -> Positive -> Positive +lcmPositive p1 p2 = case p1 `quotRemPositive` (p1 `gcdPositive` p2) of + (# Positive q, _ #) -> q `timesPositive` p2 + (# _, _ #) -> errorPositive -- XXX Can't happen + + {-# NOINLINE compareInteger #-} compareInteger :: Integer -> Integer -> Ordering Positive x `compareInteger` Positive y = x `comparePositive` y From git at git.haskell.org Thu Jan 17 13:58:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:55 +0000 (UTC) Subject: [commit: ghc] wip/T16197: rts: Allow heap prof by closure type in prof way (236abdb) Message-ID: <20190117135855.3187B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/236abdb80ab894b093faca7911ad8cabd6dc3e81/ghc >--------------------------------------------------------------- commit 236abdb80ab894b093faca7911ad8cabd6dc3e81 Author: Ben Price Date: Tue Jan 8 22:16:10 2019 +0000 rts: Allow heap prof by closure type in prof way Complete b7b6617a90824303daf555c817f538cd9c792671 (see ticket #15086) to actually enable profiling by closure type in the profiling rts. I.e. +RTS -p -hT is now accepted. >--------------------------------------------------------------- 236abdb80ab894b093faca7911ad8cabd6dc3e81 rts/RtsFlags.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 999b727..132d127 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -1906,6 +1906,7 @@ static bool read_heap_profiling_flag(const char *arg) case 'r': case 'B': case 'b': + case 'T': if (arg[2] != '\0' && arg[3] != '\0') { { const char *left = strchr(arg, '{'); From git at git.haskell.org Thu Jan 17 13:58:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:58:58 +0000 (UTC) Subject: [commit: ghc] wip/T16197: doc: behaviour of +RTS -h depends on profiling (6acb36d) Message-ID: <20190117135858.2D8943ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/6acb36d8ea169dfc0ddc4e10559a9bf6b4316212/ghc >--------------------------------------------------------------- commit 6acb36d8ea169dfc0ddc4e10559a9bf6b4316212 Author: Ben Price Date: Tue Jan 15 12:38:44 2019 +0000 doc: behaviour of +RTS -h depends on profiling The rts option `-h` behaves as `-hT` when compiled without profiling, and `-hc` when compiled with profiling. Add a note to the user's guide highlighting this inconsistency. >--------------------------------------------------------------- 6acb36d8ea169dfc0ddc4e10559a9bf6b4316212 docs/users_guide/profiling.rst | 5 +++++ docs/users_guide/runtime_control.rst | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst index def3596..c1379f3 100644 --- a/docs/users_guide/profiling.rst +++ b/docs/users_guide/profiling.rst @@ -697,6 +697,11 @@ following RTS options select which break-down to use: *Requires :ghc-flag:`-prof`.* Breaks down the graph by the cost-centre stack which produced the data. + .. note:: The meaning of the shortened :rts-flag:`-h` is dependent on whether + your program was compiled for profiling. When compiled for profiling, + :rts-flag:`-h` is equivalent to :rts-flag:`-hc`, but otherwise is + equivalent to :rts-flag:`-hT` (see :ref:`rts-profiling`). + .. rts-flag:: -hm *Requires :ghc-flag:`-prof`.* Break down the live heap by the module diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 7526b06..a5c2f14 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -984,6 +984,10 @@ executables: ``THUNK``). To get a more detailed profile, use the full profiling support (:ref:`profiling`). Can be shortened to :rts-flag:`-h`. + .. note:: The meaning of the shortened :rts-flag:`-h` is dependent on whether + your program was compiled for profiling. + (See :ref:`rts-options-heap-prof` for details.) + .. rts-flag:: -L ⟨n⟩ :default: 25 characters From git at git.haskell.org Thu Jan 17 13:59:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:01 +0000 (UTC) Subject: [commit: ghc] wip/T16197: doc: reorder heap profiling information in +RTS -? (61f178b) Message-ID: <20190117135901.2A5153ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/61f178b617fcb2c1102b0d0505bb3c70e83c1843/ghc >--------------------------------------------------------------- commit 61f178b617fcb2c1102b0d0505bb3c70e83c1843 Author: Ben Price Date: Mon Jan 14 18:26:45 2019 +0000 doc: reorder heap profiling information in +RTS -? >--------------------------------------------------------------- 61f178b617fcb2c1102b0d0505bb3c70e83c1843 rts/RtsFlags.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 132d127..ff9635a 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -323,9 +323,11 @@ usage_text[] = { " -Pa Give information about *all* cost centres in tree format", " -pj Output cost-center profile in JSON format", "", +" -h Heap residency profile, by cost centre stack", " -h Heap residency profile (hp2ps) (output file .hp)", " break-down: c = cost centre stack (default)", " m = module", +" T = closure type", " d = closure description", " y = type description", " r = retainer", @@ -347,9 +349,10 @@ usage_text[] = { " -xt Include threads (TSOs) in a heap profile", "", " -xc Show current cost centre stack on raising an exception", +#else /* PROFILING */ +" -h Heap residency profile (output file .hp)", +" -hT Produce a heap profile grouped by closure type", #endif /* PROFILING */ -"", -" -hT Produce a heap profile grouped by closure type" #if defined(TRACING) "", @@ -372,10 +375,6 @@ usage_text[] = { " the initial enabled event classes are 'sgpu'", #endif -#if !defined(PROFILING) -"", -" -h Heap residency profile (output file .hp)", -#endif " -i Time between heap profile samples (seconds, default: 0.1)", "", #if defined(TICKY_TICKY) From git at git.haskell.org Thu Jan 17 13:59:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:04 +0000 (UTC) Subject: [commit: ghc] wip/T16197: typo (78ae2d5) Message-ID: <20190117135904.23E393ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/78ae2d5d7984a44db28756677cf1e76369324b83/ghc >--------------------------------------------------------------- commit 78ae2d5d7984a44db28756677cf1e76369324b83 Author: Alp Mestanogullari Date: Wed Jan 9 22:40:25 2019 +0100 typo >--------------------------------------------------------------- 78ae2d5d7984a44db28756677cf1e76369324b83 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 Thu Jan 17 13:59:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:07 +0000 (UTC) Subject: [commit: ghc] wip/T16197: crosslink hadrian/README.md and hadrian/doc/make.md (ad5075d) Message-ID: <20190117135907.26AC33ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/ad5075d938921f85621187752cd1fa4b56813984/ghc >--------------------------------------------------------------- commit ad5075d938921f85621187752cd1fa4b56813984 Author: Alp Mestanogullari Date: Wed Jan 9 12:51:50 2019 +0100 crosslink hadrian/README.md and hadrian/doc/make.md >--------------------------------------------------------------- ad5075d938921f85621187752cd1fa4b56813984 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 Thu Jan 17 13:59:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:10 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Disable Shake Lint by default. (bfb3e30) Message-ID: <20190117135910.287303ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/bfb3e3072d25d983e2245e2cf2d491981f49549c/ghc >--------------------------------------------------------------- commit bfb3e3072d25d983e2245e2cf2d491981f49549c Author: Andrey Mokhov Date: Thu Jan 10 22:35:22 2019 +0000 Disable Shake Lint by default. >--------------------------------------------------------------- bfb3e3072d25d983e2245e2cf2d491981f49549c 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 Thu Jan 17 13:59:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:13 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Switch to the untracked version of getDirectoryFiles when scanning for GMP objects (7218270) Message-ID: <20190117135913.28F1A3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/7218270dee1067db9c4f342b97e07ca89b80b82d/ghc >--------------------------------------------------------------- commit 7218270dee1067db9c4f342b97e07ca89b80b82d 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. >--------------------------------------------------------------- 7218270dee1067db9c4f342b97e07ca89b80b82d 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 Thu Jan 17 13:59:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:16 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Hadrian: Use the Cabal build script on Windows by default (8d594be) Message-ID: <20190117135916.2678D3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/8d594beff68a6b12cdc8ccbd0cfc3e11cf184bfc/ghc >--------------------------------------------------------------- commit 8d594beff68a6b12cdc8ccbd0cfc3e11cf184bfc 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. >--------------------------------------------------------------- 8d594beff68a6b12cdc8ccbd0cfc3e11cf184bfc 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 Thu Jan 17 13:59:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:19 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Fix typo in maybeToList documentation (4204ed5) Message-ID: <20190117135919.2070D3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/4204ed581821df7f0a58d823347966ec541e1d99/ghc >--------------------------------------------------------------- commit 4204ed581821df7f0a58d823347966ec541e1d99 Author: Steve Hart Date: Wed Jan 9 22:21:38 2019 -0500 Fix typo in maybeToList documentation >--------------------------------------------------------------- 4204ed581821df7f0a58d823347966ec541e1d99 libraries/base/Data/Maybe.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs index 2a3e0ef..c3049f3 100644 --- a/libraries/base/Data/Maybe.hs +++ b/libraries/base/Data/Maybe.hs @@ -175,7 +175,7 @@ fromMaybe :: a -> Maybe a -> a fromMaybe d x = case x of {Nothing -> d;Just v -> v} -- | The 'maybeToList' function returns an empty list when given --- 'Nothing' or a singleton list when not given 'Nothing'. +-- 'Nothing' or a singleton list when not given 'Just'. -- -- ==== __Examples__ -- From git at git.haskell.org Thu Jan 17 13:59:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:22 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Improve clarity of documentation for maybeToList (46d46ed) Message-ID: <20190117135922.2C4263ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/46d46ede77ef327966e9364800c7da52c208d8ae/ghc >--------------------------------------------------------------- commit 46d46ede77ef327966e9364800c7da52c208d8ae Author: Steve Hart Date: Thu Jan 10 08:30:47 2019 -0500 Improve clarity of documentation for maybeToList >--------------------------------------------------------------- 46d46ede77ef327966e9364800c7da52c208d8ae libraries/base/Data/Maybe.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs index 2a3e0ef..2bd0b1e 100644 --- a/libraries/base/Data/Maybe.hs +++ b/libraries/base/Data/Maybe.hs @@ -175,7 +175,7 @@ fromMaybe :: a -> Maybe a -> a fromMaybe d x = case x of {Nothing -> d;Just v -> v} -- | The 'maybeToList' function returns an empty list when given --- 'Nothing' or a singleton list when not given 'Nothing'. +-- 'Nothing' or a singleton list when given 'Just'. -- -- ==== __Examples__ -- From git at git.haskell.org Thu Jan 17 13:59:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:25 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Revert "Fix typo in maybeToList documentation" (fe1f97c) Message-ID: <20190117135925.276A63ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/fe1f97ccdf5cbd96761d178a5f334d806e9501d0/ghc >--------------------------------------------------------------- commit fe1f97ccdf5cbd96761d178a5f334d806e9501d0 Author: Steve Hart Date: Thu Jan 10 08:29:29 2019 -0500 Revert "Fix typo in maybeToList documentation" This reverts commit af210f40ce7ad7b3351abc988b0351446e8b639e >--------------------------------------------------------------- fe1f97ccdf5cbd96761d178a5f334d806e9501d0 libraries/base/Data/Maybe.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs index c3049f3..2a3e0ef 100644 --- a/libraries/base/Data/Maybe.hs +++ b/libraries/base/Data/Maybe.hs @@ -175,7 +175,7 @@ fromMaybe :: a -> Maybe a -> a fromMaybe d x = case x of {Nothing -> d;Just v -> v} -- | The 'maybeToList' function returns an empty list when given --- 'Nothing' or a singleton list when not given 'Just'. +-- 'Nothing' or a singleton list when not given 'Nothing'. -- -- ==== __Examples__ -- From git at git.haskell.org Thu Jan 17 13:59:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:28 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Hadrian: handle Haddock's resource directory (2e05912) Message-ID: <20190117135928.23D413ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/2e05912086bbb8eab213d44af300ecc396d912aa/ghc >--------------------------------------------------------------- commit 2e05912086bbb8eab213d44af300ecc396d912aa Author: Alec Theriault Date: Thu Jan 10 03:45:06 2019 -0800 Hadrian: handle Haddock's resource directory Fixes #16105 * Require Haddock's resource as runtime dependencies of the Haddock builder. This means we no longer have to `need` particular resources in every other documentation rule. * Do a _tracked_ copy of both the 'html' and 'latex' folder resource folders. * Move resources into `stage1/lib` (NB: the `haddock` binary goes in `stage1/bin`). Besides now actually matching the Haddock script wrapper generated by BinaryDist, this also prepares for Haddock in relocatable build folder detecting its own resources. >--------------------------------------------------------------- 2e05912086bbb8eab213d44af300ecc396d912aa hadrian/src/Builder.hs | 11 +++++++++++ hadrian/src/Rules/Documentation.hs | 32 ++++++++++++++++---------------- hadrian/src/Settings/Builders/Haddock.hs | 4 ++-- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index a3a3f54..55dcb3c 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -23,6 +23,7 @@ import Hadrian.Builder.Sphinx import Hadrian.Builder.Tar import Hadrian.Oracles.Path import Hadrian.Oracles.TextFile +import Hadrian.Oracles.DirectoryContents import Hadrian.Utilities import Base @@ -187,6 +188,16 @@ instance H.Builder Builder where Hsc2Hs stage -> (\p -> [p]) <$> templateHscPath stage Make dir -> return [dir -/- "Makefile"] + + Haddock _ -> do + let resdir = "utils/haddock/haddock-api/resources" + latexResources <- directoryContents matchAll (resdir -/- "latex") + htmlResources <- directoryContents matchAll (resdir -/- "html") + + haddockLib <- stageLibPath Stage1 -- Haddock is built in stage1 + return $ [ haddockLib -/- makeRelative resdir f + | f <- latexResources ++ htmlResources ] + _ -> return [] -- query the builder for some information. diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs index f1a7454..2aa663f 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -36,9 +36,6 @@ pdfRoot = docRoot -/- "pdfs" archiveRoot :: FilePath archiveRoot = docRoot -/- "archives" -haddockHtmlLib :: FilePath -haddockHtmlLib = htmlRoot -/- "haddock-bundle.min.js" - manPageBuildPath :: FilePath manPageBuildPath = "docs/users_guide/build-man/ghc.1" @@ -67,6 +64,8 @@ pathPath _ = "" -- | Build all documentation documentationRules :: Rules () documentationRules = do + haddockResources + buildDocumentationArchives buildHtmlDocumentation buildManPage @@ -97,7 +96,6 @@ buildHtmlDocumentation = do root <- buildRootRules root -/- htmlRoot -/- "index.html" %> \file -> do - need [root -/- haddockHtmlLib] need $ map ((root -/-) . pathIndex) docPaths copyFileUntracked "docs/index.html" file @@ -106,25 +104,30 @@ buildSphinxHtml :: FilePath -> Rules () buildSphinxHtml path = do root <- buildRootRules root -/- htmlRoot -/- path -/- "index.html" %> \file -> do - need [root -/- haddockHtmlLib] let dest = takeDirectory file build $ target docContext (Sphinx Html) [pathPath path] [dest] ------------------------------------ Haddock ----------------------------------- +-- | Copy resources into the @lib@ directory +haddockResources :: Rules () +haddockResources = do + root <- buildRootRules + let resdir = "utils/haddock/haddock-api/resources" + haddockLib = root -/- "stage1/lib" -- Haddock is built in stage1 + + [ haddockLib -/- "html//*", haddockLib -/- "latex//*" ] |%> \target -> do + let source = resdir -/- makeRelative haddockLib target + copyFile source target + -- | Build the haddocks for GHC's libraries. buildLibraryDocumentation :: Rules () buildLibraryDocumentation = do root <- buildRootRules - -- Js and Css files for haddock output - root -/- haddockHtmlLib %> \_ -> - copyDirectory "utils/haddock/haddock-api/resources/html" (root -/- docRoot) - -- Building the "Haskell Hierarchical Libraries" index root -/- htmlRoot -/- "libraries/index.html" %> \file -> do - need [ root -/- haddockHtmlLib - , "libraries/prologue.txt" ] + need [ "libraries/prologue.txt" ] -- We want Haddocks for everything except `rts` to be built, but we -- don't want the index to be polluted by stuff from `ghc`-the-library @@ -152,7 +155,6 @@ buildPackageDocumentation = do -- Per-package haddocks root -/- htmlRoot -/- "libraries/*/haddock-prologue.txt" %> \file -> do ctx <- getPkgDocTarget root file >>= pkgDocContext - need [root -/- haddockHtmlLib] -- This is how @ghc-cabal@ used to produces "haddock-prologue.txt" files. syn <- pkgSynopsis (Context.package ctx) desc <- pkgDescription (Context.package ctx) @@ -172,7 +174,7 @@ buildPackageDocumentation = do vanillaSrcs <- hsSources context let srcs = vanillaSrcs `union` generatedSrcs - need $ srcs ++ haddocks ++ [root -/- haddockHtmlLib] + need $ srcs ++ haddocks -- Build Haddock documentation -- TODO: Pass the correct way from Rules via Context. @@ -220,7 +222,6 @@ buildSphinxPdf :: FilePath -> Rules () buildSphinxPdf path = do root <- buildRootRules root -/- pdfRoot -/- path <.> "pdf" %> \file -> do - need [root -/- haddockHtmlLib] withTempDir $ \dir -> do build $ target docContext (Sphinx Latex) [pathPath path] [dir] build $ target docContext Xelatex [path <.> "tex"] [dir] @@ -236,7 +237,6 @@ buildArchive :: FilePath -> Rules () buildArchive path = do root <- buildRootRules root -/- pathArchive path %> \file -> do - need [root -/- haddockHtmlLib] root <- buildRoot let src = root -/- pathIndex path need [src] @@ -247,7 +247,7 @@ buildManPage :: Rules () buildManPage = do root <- buildRootRules root -/- manPageBuildPath %> \file -> do - need [root -/- haddockHtmlLib, "docs/users_guide/ghc.rst"] + need ["docs/users_guide/ghc.rst"] withTempDir $ \dir -> do build $ target docContext (Sphinx Man) ["docs/users_guide"] [dir] copyFileUntracked (dir -/- "ghc.1") file diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs index 2830c20..92ac714 100644 --- a/hadrian/src/Settings/Builders/Haddock.hs +++ b/hadrian/src/Settings/Builders/Haddock.hs @@ -21,7 +21,7 @@ haddockBuilderArgs = mconcat root <- getBuildRoot mconcat [ arg $ "-B" ++ root -/- "stage1" -/- "lib" - , arg $ "--lib=" ++ root -/- "docs" + , arg $ "--lib=" ++ root -/- "stage1" -/- "lib" , arg "--gen-index" , arg "--gen-contents" , arg "-o", arg $ takeDirectory output @@ -46,7 +46,7 @@ haddockBuilderArgs = mconcat mconcat [ arg "--verbosity=0" , arg $ "-B" ++ root -/- "stage1" -/- "lib" - , arg $ "--lib=" ++ root -/- "docs" + , arg $ "--lib=" ++ root -/- "stage1" -/- "lib" , arg $ "--odir=" ++ takeDirectory output , arg "--no-tmp-comp-dir" , arg $ "--dump-interface=" ++ output From git at git.haskell.org Thu Jan 17 13:59:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:31 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Make sure 'haddock' package also copies resources (8765c1e) Message-ID: <20190117135931.1DB913ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/8765c1e6e6aca590a2fc252c64846890bf87f387/ghc >--------------------------------------------------------------- commit 8765c1e6e6aca590a2fc252c64846890bf87f387 Author: Alec Theriault Date: Thu Jan 10 04:37:36 2019 -0800 Make sure 'haddock' package also copies resources ...and does so in the lib folder of the right stage >--------------------------------------------------------------- 8765c1e6e6aca590a2fc252c64846890bf87f387 hadrian/src/Base.hs | 15 ++++++++++++++- hadrian/src/Builder.hs | 12 +----------- hadrian/src/Rules/Documentation.hs | 13 ------------- hadrian/src/Rules/Generate.hs | 14 +++++++++----- hadrian/src/Rules/Program.hs | 3 +++ hadrian/src/Settings/Builders/Haddock.hs | 8 ++++---- 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/hadrian/src/Base.hs b/hadrian/src/Base.hs index cb0dba0..277d614 100644 --- a/hadrian/src/Base.hs +++ b/hadrian/src/Base.hs @@ -24,7 +24,8 @@ module Base ( -- * Paths hadrianPath, configPath, configFile, sourcePath, shakeFilesDir, generatedDir, generatedPath, stageBinPath, stageLibPath, templateHscPath, - ghcDeps, relativePackageDbPath, packageDbPath, packageDbStamp, ghcSplitPath + ghcDeps, haddockDeps, relativePackageDbPath, packageDbPath, packageDbStamp, + ghcSplitPath ) where import Control.Applicative @@ -37,6 +38,7 @@ import Development.Shake hiding (parallel, unit, (*>), Normal) import Development.Shake.Classes import Development.Shake.FilePath import Development.Shake.Util +import Hadrian.Oracles.DirectoryContents import Hadrian.Utilities import Hadrian.Package @@ -114,6 +116,17 @@ ghcDeps stage = mapM (\f -> stageLibPath stage <&> (-/- f)) , "platformConstants" , "settings" ] +-- | Files the `haddock` binary depends on +haddockDeps :: Stage -> Action [FilePath] +haddockDeps stage = do + let resdir = "utils/haddock/haddock-api/resources" + latexResources <- directoryContents matchAll (resdir -/- "latex") + htmlResources <- directoryContents matchAll (resdir -/- "html") + + haddockLib <- stageLibPath stage + return $ [ haddockLib -/- makeRelative resdir f + | f <- latexResources ++ htmlResources ] + -- ref: utils/hsc2hs/ghc.mk -- | Path to 'hsc2hs' template. templateHscPath :: Stage -> Action FilePath diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 55dcb3c..d09af99 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -23,7 +23,6 @@ import Hadrian.Builder.Sphinx import Hadrian.Builder.Tar import Hadrian.Oracles.Path import Hadrian.Oracles.TextFile -import Hadrian.Oracles.DirectoryContents import Hadrian.Utilities import Base @@ -188,16 +187,7 @@ instance H.Builder Builder where Hsc2Hs stage -> (\p -> [p]) <$> templateHscPath stage Make dir -> return [dir -/- "Makefile"] - - Haddock _ -> do - let resdir = "utils/haddock/haddock-api/resources" - latexResources <- directoryContents matchAll (resdir -/- "latex") - htmlResources <- directoryContents matchAll (resdir -/- "html") - - haddockLib <- stageLibPath Stage1 -- Haddock is built in stage1 - return $ [ haddockLib -/- makeRelative resdir f - | f <- latexResources ++ htmlResources ] - + Haddock _ -> haddockDeps Stage1 -- Haddock currently runs in Stage1 _ -> return [] -- query the builder for some information. diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs index 2aa663f..954264a 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -64,8 +64,6 @@ pathPath _ = "" -- | Build all documentation documentationRules :: Rules () documentationRules = do - haddockResources - buildDocumentationArchives buildHtmlDocumentation buildManPage @@ -109,17 +107,6 @@ buildSphinxHtml path = do ------------------------------------ Haddock ----------------------------------- --- | Copy resources into the @lib@ directory -haddockResources :: Rules () -haddockResources = do - root <- buildRootRules - let resdir = "utils/haddock/haddock-api/resources" - haddockLib = root -/- "stage1/lib" -- Haddock is built in stage1 - - [ haddockLib -/- "html//*", haddockLib -/- "latex//*" ] |%> \target -> do - let source = resdir -/- makeRelative haddockLib target - copyFile source target - -- | Build the haddocks for GHC's libraries. buildLibraryDocumentation :: Rules () buildLibraryDocumentation = do diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index e035753..9db5b19 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -161,6 +161,12 @@ copyRules = do root <- buildRootRules forM_ [Stage0 ..] $ \stage -> do let prefix = root -/- stageString stage -/- "lib" + + infixl 1 <~ + pattern <~ mdir = pattern %> \file -> do + dir <- mdir + copyFile (dir -/- makeRelative prefix file) file + prefix -/- "ghc-usage.txt" <~ return "driver" prefix -/- "ghci-usage.txt" <~ return "driver" prefix -/- "llvm-targets" <~ return "." @@ -168,11 +174,9 @@ copyRules = do prefix -/- "platformConstants" <~ (buildRoot <&> (-/- generatedDir)) prefix -/- "settings" <~ return "." prefix -/- "template-hsc.h" <~ return (pkgPath hsc2hs) - where - infixl 1 <~ - pattern <~ mdir = pattern %> \file -> do - dir <- mdir - copyFile (dir -/- takeFileName file) file + + prefix -/- "html//*" <~ return "utils/haddock/haddock-api/resources" + prefix -/- "latex//*" <~ return "utils/haddock/haddock-api/resources" generateRules :: Rules () generateRules = do diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs index 9d8b6d0..c9df6f5 100644 --- a/hadrian/src/Rules/Program.hs +++ b/hadrian/src/Rules/Program.hs @@ -71,6 +71,9 @@ buildProgram bin ctx@(Context{..}) rs = do -- @llvm-targets@, @ghc-usage.txt@, @ghci-usage.txt@, -- @llvm-passes at . need =<< ghcDeps stage + when (package == haddock) $ do + -- Haddock has a resource folder + need =<< haddockDeps stage cross <- flag CrossCompiling -- For cross compiler, copy @stage0/bin/@ to @stage1/bin/@. diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs index 92ac714..65c7031 100644 --- a/hadrian/src/Settings/Builders/Haddock.hs +++ b/hadrian/src/Settings/Builders/Haddock.hs @@ -20,8 +20,8 @@ haddockBuilderArgs = mconcat inputs <- getInputs root <- getBuildRoot mconcat - [ arg $ "-B" ++ root -/- "stage1" -/- "lib" - , arg $ "--lib=" ++ root -/- "stage1" -/- "lib" + [ arg $ "-B" ++ root -/- stageString Stage1 -/- "lib" + , arg $ "--lib=" ++ root -/- stageString Stage1 -/- "lib" , arg "--gen-index" , arg "--gen-contents" , arg "-o", arg $ takeDirectory output @@ -45,8 +45,8 @@ haddockBuilderArgs = mconcat ghcOpts <- haddockGhcArgs mconcat [ arg "--verbosity=0" - , arg $ "-B" ++ root -/- "stage1" -/- "lib" - , arg $ "--lib=" ++ root -/- "stage1" -/- "lib" + , arg $ "-B" ++ root -/- stageString Stage1 -/- "lib" + , arg $ "--lib=" ++ root -/- stageString Stage1 -/- "lib" , arg $ "--odir=" ++ takeDirectory output , arg "--no-tmp-comp-dir" , arg $ "--dump-interface=" ++ output From git at git.haskell.org Thu Jan 17 13:59:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:34 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Documentation for StgRetFun (6aaa065) Message-ID: <20190117135934.1B4773ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/6aaa0655a721605740f23e49c5b4bf6165bfe865/ghc >--------------------------------------------------------------- commit 6aaa0655a721605740f23e49c5b4bf6165bfe865 Author: Ömer Sinan Ağacan Date: Wed Jan 16 09:47:35 2019 +0300 Documentation for StgRetFun >--------------------------------------------------------------- 6aaa0655a721605740f23e49c5b4bf6165bfe865 includes/rts/storage/Closures.h | 3 +++ utils/genapply/Main.hs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h index 7db67c7..3e90306 100644 --- a/includes/rts/storage/Closures.h +++ b/includes/rts/storage/Closures.h @@ -260,6 +260,9 @@ typedef struct { * info table describes the pointerhood of the arguments). * * The stack frame size is also cached in the frame for convenience. + * + * The only RET_FUN is stg_gc_fun, which is created by __stg_gc_fun, + * both in HeapStackCheck.cmm. */ typedef struct { const StgInfoTable* info; diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs index 71b84fd..7038dc5 100644 --- a/utils/genapply/Main.hs +++ b/utils/genapply/Main.hs @@ -903,7 +903,7 @@ genStackApply regstatus args = -- -- These code fragments are used to save registers on the stack at a heap -- check failure in the entry code for a function. We also have to save R1 --- and the return address (stg_gc_fun_info) on the stack. See stg_gc_fun_gen +-- and the return address (stg_gc_fun_info) on the stack. See __stg_gc_fun -- in HeapStackCheck.cmm for more details. mkStackSaveEntryLabel :: [ArgRep] -> Doc From git at git.haskell.org Thu Jan 17 13:59:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 13:59:38 +0000 (UTC) Subject: [commit: ghc] wip/T16197: Add test for #16197 (a1e9cd6) Message-ID: <20190117135938.291793ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16197 Link : http://ghc.haskell.org/trac/ghc/changeset/a1e9cd6af8b41fa451fd3be806f4aced0040a14c/ghc >--------------------------------------------------------------- commit a1e9cd6af8b41fa451fd3be806f4aced0040a14c Author: Ömer Sinan Ağacan Date: Thu Jan 17 16:57:20 2019 +0300 Add test for #16197 >--------------------------------------------------------------- a1e9cd6af8b41fa451fd3be806f4aced0040a14c testsuite/tests/stranal/should_run/Makefile | 8 ++++++++ testsuite/tests/stranal/should_run/T16197.hs | 25 ++++++++++++++++++++++++ testsuite/tests/stranal/should_run/T16197.stdout | 2 ++ testsuite/tests/stranal/should_run/all.T | 5 ++++- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/stranal/should_run/Makefile b/testsuite/tests/stranal/should_run/Makefile index 9101fbd..dae01b4 100644 --- a/testsuite/tests/stranal/should_run/Makefile +++ b/testsuite/tests/stranal/should_run/Makefile @@ -1,3 +1,11 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk + +.PHONY: T16197 +T16197: + '$(TEST_HC)' -O0 -v0 T16197.hs + ./T16197 + rm T16197.o T16197.hi T16197 + '$(TEST_HC)' -O1 -v0 T16197.hs + ./T16197 diff --git a/testsuite/tests/stranal/should_run/T16197.hs b/testsuite/tests/stranal/should_run/T16197.hs new file mode 100644 index 0000000..a1ab333 --- /dev/null +++ b/testsuite/tests/stranal/should_run/T16197.hs @@ -0,0 +1,25 @@ +import System.IO.Unsafe (unsafePerformIO) + +data T = T !Bool +data Box a = Box a + +f :: Int -> T -> Box Bool +f n t + | n <= 0 = case t of + T b -> Box b + | otherwise = f (n-2) t + +f1 :: Int -> Bool -> Box Bool +f1 n t + | n <= 0 = f (-n) $! T t + | otherwise = f1 (n-2) t + +g :: Int -> Bool +g k = if k <= 0 + then unsafePerformIO (putStrLn "Evaluated True" >> return True) + else unsafePerformIO (putStrLn "Evaluated False" >> return False) +{-# NOINLINE g #-} + +main :: IO () +main = case f1 4 (g 0) of + Box _ -> return () diff --git a/testsuite/tests/stranal/should_run/T16197.stdout b/testsuite/tests/stranal/should_run/T16197.stdout new file mode 100644 index 0000000..0eb6782 --- /dev/null +++ b/testsuite/tests/stranal/should_run/T16197.stdout @@ -0,0 +1,2 @@ +Evaluated True +Evaluated True diff --git a/testsuite/tests/stranal/should_run/all.T b/testsuite/tests/stranal/should_run/all.T index a9cc3d7..51b1e41 100644 --- a/testsuite/tests/stranal/should_run/all.T +++ b/testsuite/tests/stranal/should_run/all.T @@ -1,4 +1,7 @@ -# Optimised only, we're testing the strictness analyser here +# Run this always +test('T16197', normal, run_command, ['$MAKE -s --no-print-directory T16197']) + +# Run the rest only in optasm way, we're testing the strictness analyser here setTestOpts( only_ways(['optasm']) ) test('strun001', normal, compile_and_run, ['']) From git at git.haskell.org Thu Jan 17 16:12:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 16:12:14 +0000 (UTC) Subject: [commit: ghc] branch 'wip/check-submodules' created Message-ID: <20190117161214.040E93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/check-submodules Referencing: 6e0a518d24c7c15c291e8ba69d171b6897cfe683 From git at git.haskell.org Thu Jan 17 16:12:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 16:12:17 +0000 (UTC) Subject: [commit: ghc] wip/check-submodules: gitlab-ci: Add linter validating that all submodules are released (6e0a518) Message-ID: <20190117161217.5B9C93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/check-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/6e0a518d24c7c15c291e8ba69d171b6897cfe683/ghc >--------------------------------------------------------------- commit 6e0a518d24c7c15c291e8ba69d171b6897cfe683 Author: Ben Gamari Date: Thu Jan 17 11:07:30 2019 -0500 gitlab-ci: Add linter validating that all submodules are released >--------------------------------------------------------------- 6e0a518d24c7c15c291e8ba69d171b6897cfe683 .gitlab-ci.yml | 11 ++++++++ .gitlab/linters/check-submodules.py | 54 +++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..0fa772e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,6 +45,17 @@ ghc-linters: tags: - lint +check-submodules: + stage: lint + image: ghcci/linters:0.1 + script: + - | + if [ -n "$CI_COMMIT_TAG" -a -n "$RELEASE" ]; then + .gitlab/linters/check-submodules + fi + tags: + - lint + ############################################################ # Validation via Pipelines (hadrian) ############################################################ diff --git a/.gitlab/linters/check-submodules.py b/.gitlab/linters/check-submodules.py new file mode 100755 index 0000000..72862a4 --- /dev/null +++ b/.gitlab/linters/check-submodules.py @@ -0,0 +1,54 @@ +""" +Ensure all submodules point to released (tagged) commits. +""" + +from subprocess import run, PIPE +import re + +def get_submodules(): + p = run(['git', 'submodule'], stdout=PIPE) + for match in re.finditer('^.([0-9a-f]{40}) ([^ ]+) \(([^\)]+)\)', + p.stdout.decode('UTF-8'), re.M): + commit = match.group(1) + submodule = match.group(2) + rev = match.group(3) + yield (commit, submodule, rev) + +checked_submodules = { + 'libraries/array', + 'libraries/binary', + 'libraries/bytestring', + 'libraries/Cabal', + 'libraries/containers', + 'libraries/deepseq', + 'libraries/directory', + 'libraries/filepath', + 'libraries/haskeline', + 'libraries/hpc', + 'libraries/mtl', + 'libraries/parsec', + 'libraries/pretty', + 'libraries/process', + 'libraries/stm', + 'libraries/text', + 'libraries/terminfo', + 'libraries/time', + 'libraries/transformers', + 'libraries/unix', + 'libraries/Win32' +} + +def main(): + fail = False + for (commit, submodule, rev) in get_submodules(): + if submodule in check_submodules: + if re.match('.*-g[0-9a-f]+', rev): + fail = True + print('Error: Submodule {submodule} points to non-released commit {commit} (rev={rev})'.format( + commit=commit, submodule=submodule, rev=rev)) + + if fail: + sys.exit(1) + +if __name__ == "__main__": + main() From git at git.haskell.org Thu Jan 17 16:21:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 16:21:23 +0000 (UTC) Subject: [commit: ghc] branch 'wip/collect-windows-artifacts' created Message-ID: <20190117162123.C57743ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/collect-windows-artifacts Referencing: 051da1265b0f016e953d550db70ee835bb481705 From git at git.haskell.org Thu Jan 17 16:21:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 16:21:26 +0000 (UTC) Subject: [commit: ghc] wip/collect-windows-artifacts: gitlab: Collect artifacts on Windows (051da12) Message-ID: <20190117162126.C74133ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/collect-windows-artifacts Link : http://ghc.haskell.org/trac/ghc/changeset/051da1265b0f016e953d550db70ee835bb481705/ghc >--------------------------------------------------------------- commit 051da1265b0f016e953d550db70ee835bb481705 Author: Ben Gamari Date: Tue Jan 15 23:21:39 2019 -0500 gitlab: Collect artifacts on Windows >--------------------------------------------------------------- 051da1265b0f016e953d550db70ee835bb481705 .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..e7c11fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -363,11 +363,21 @@ 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 '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 + reports: + junit: junit.xml + paths: + - ghc.tar.xz + - junit.xml # Note [Cleanup on Windows] # ~~~~~~~~~~~~~~~~~~~~~~~~~ From git at git.haskell.org Thu Jan 17 17:47:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 17:47:18 +0000 (UTC) Subject: [commit: ghc] master's head updated: Documentation for StgRetFun (6aaa065) Message-ID: <20190117174718.92B9A3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: cb2349a Documentation and refactoring in CCS related code 74cd4ec Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime 19670bc Fix negative mutator time in GC stats in prof builds 076f586 Don't invoke dataConSrcToImplBang on newtypes 448f0e7 Fix checkPtrInArena a34ee61 Refactor GHCi UI to fix #11606, #12091, #15721, #16096 4ad9ffd PPC NCG: Reduce memory consumption emitting string literals 7b12b3f itimer: Don't free condvar until we know ticker is stopped ce11f6f rts: Use always-available locking operations in pthread Itimer implementation cb31b23 Update `Cabal` submodule 0f3c04e testsuite: Show both test name and way in JUnit output ec752c4 Hadrian: Update README.md ef8fedc Clarify when to follow the instructions in doc/windows.md. 2f07a97 Document the Shake Lint feature. 69947d5 gitlab-ci: Cleanup Windows builds 83a2206 Fix #16114 by adding a validity check to rnClsInstDecl e63518f Fix #16116 by removing badAssocRhs 9dc56b6 Control validity-checking of type synonym applications more carefully 3429ec8 Bump Cabal submodule 36e3e74 @simonpj's suggested refactor ce2f77d hWaitForInput-accurate-socket test 9fb744b GHCi ignores cmd line flags XMonomorphismRestr.. XNoExtendedDef..#10857 f78048f Change comments as requested by code review. #10857 da2d9cf Hadrian: configure packages with right 'htmldir' 3f46cff PPC NCG: Refactor stack allocation code ea79978 Fix reference to stack code in comment c155ac9 Fix filename in comment again 6a7a6b8 Introduce ghci command wrapper 2f65025 Hadrian: support extra libraries + OSX rpath 9fb2702 Create folder if missing for .hie files 582a96f Support printing `integer-simple` Integers in GHCi 6e320c2 Match `integer-simple`'s API with `integer-gmp` f7def74 Remove from `base` obsolete CPP for `integer-gmp` d2eb344 Fix tests for `integer-simple` a303695 try to fix CI 236abdb rts: Allow heap prof by closure type in prof way 61f178b doc: reorder heap profiling information in +RTS -? 6acb36d doc: behaviour of +RTS -h depends on profiling ad5075d crosslink hadrian/README.md and hadrian/doc/make.md 78ae2d5 typo 7218270 Switch to the untracked version of getDirectoryFiles when scanning for GMP objects bfb3e30 Disable Shake Lint by default. 8d594be Hadrian: Use the Cabal build script on Windows by default 4204ed5 Fix typo in maybeToList documentation fe1f97c Revert "Fix typo in maybeToList documentation" 46d46ed Improve clarity of documentation for maybeToList 2e05912 Hadrian: handle Haddock's resource directory 8765c1e Make sure 'haddock' package also copies resources 6aaa065 Documentation for StgRetFun From git at git.haskell.org Thu Jan 17 17:48:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 17:48:50 +0000 (UTC) Subject: [commit: ghc] master's head updated: Add test for #16197 (a1e9cd6) Message-ID: <20190117174850.495333ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: a1e9cd6 Add test for #16197 From git at git.haskell.org Thu Jan 17 18:56:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-osx-ci' created Message-ID: <20190117185642.F1E673ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-osx-ci Referencing: 4b8cfe263b141ead15ffee0c9fdf2c7d1a7fa650 From git at git.haskell.org Thu Jan 17 18:56:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:46 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: RTS: Use ELF v1 convention on all powerpc64 systems (3e19afb) Message-ID: <20190117185646.056C43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/3e19afb5e5b8f4deba89841b1b626a8465eec91a/ghc >--------------------------------------------------------------- commit 3e19afb5e5b8f4deba89841b1b626a8465eec91a Author: Peter Trommler Date: Fri Dec 28 22:30:34 2018 +0100 RTS: Use ELF v1 convention on all powerpc64 systems >--------------------------------------------------------------- 3e19afb5e5b8f4deba89841b1b626a8465eec91a 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 Thu Jan 17 18:56:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:49 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: PPC NCG: Make calling convention more general (c6ddea4) Message-ID: <20190117185649.07BA43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/c6ddea42aad6511dd1e4c01188a7ca7417950cf3/ghc >--------------------------------------------------------------- commit c6ddea42aad6511dd1e4c01188a7ca7417950cf3 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. >--------------------------------------------------------------- c6ddea42aad6511dd1e4c01188a7ca7417950cf3 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 Thu Jan 17 18:56:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:52 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: PPC NCG: GOT declaration for all 64-bit ELF systems (30b805e) Message-ID: <20190117185652.01D773ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/30b805e2d1d7a9b60d78ce2e848d7d70ee6d95ed/ghc >--------------------------------------------------------------- commit 30b805e2d1d7a9b60d78ce2e848d7d70ee6d95ed Author: Peter Trommler Date: Sat Dec 29 10:12:48 2018 +0100 PPC NCG: GOT declaration for all 64-bit ELF systems >--------------------------------------------------------------- 30b805e2d1d7a9b60d78ce2e848d7d70ee6d95ed 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 Thu Jan 17 18:56:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:55 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: PPC NCG: Register definitions for all 64-bit systems (06c3b16) Message-ID: <20190117185655.01CB93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/06c3b16358916e756cd508c498006f648878b8a2/ghc >--------------------------------------------------------------- commit 06c3b16358916e756cd508c498006f648878b8a2 Author: Peter Trommler Date: Sat Dec 29 10:14:12 2018 +0100 PPC NCG: Register definitions for all 64-bit systems >--------------------------------------------------------------- 06c3b16358916e756cd508c498006f648878b8a2 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 Thu Jan 17 18:56:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:56:58 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: PPC NCG: Make `stackHeaderSize` more general (15dc28d) Message-ID: <20190117185658.0DC163ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/15dc28d045bef251bf4ee2186c208ba50342bba4/ghc >--------------------------------------------------------------- commit 15dc28d045bef251bf4ee2186c208ba50342bba4 Author: Peter Trommler Date: Fri Dec 28 23:55:35 2018 +0100 PPC NCG: Make `stackHeaderSize` more general >--------------------------------------------------------------- 15dc28d045bef251bf4ee2186c208ba50342bba4 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 f8dba25..e618e18 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -582,14 +582,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 Thu Jan 17 18:57:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:01 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: Fix tab and improve whitespace (735a0d9) Message-ID: <20190117185701.0B6463ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/735a0d9acb0355334ebbb4d1aca71a3a07cc8591/ghc >--------------------------------------------------------------- commit 735a0d9acb0355334ebbb4d1aca71a3a07cc8591 Author: Peter Trommler Date: Sat Dec 29 11:29:02 2018 +0100 Fix tab and improve whitespace >--------------------------------------------------------------- 735a0d9acb0355334ebbb4d1aca71a3a07cc8591 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 Thu Jan 17 18:57:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:04 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: PPC NCG: Rename constructors (ec642d3) Message-ID: <20190117185704.115C23ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/ec642d38e658f73cf93aefa7f3add5099cace28d/ghc >--------------------------------------------------------------- commit ec642d38e658f73cf93aefa7f3add5099cace28d 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. >--------------------------------------------------------------- ec642d38e658f73cf93aefa7f3add5099cace28d 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 ec642d38e658f73cf93aefa7f3add5099cace28d From git at git.haskell.org Thu Jan 17 18:57:07 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:07 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: 'DynFlag'-free version of 'mkParserFlags' (2b013bd) Message-ID: <20190117185707.1C71B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/2b013bd84899d65f86bfed6407067f2608878475/ghc >--------------------------------------------------------------- commit 2b013bd84899d65f86bfed6407067f2608878475 Author: Alec Theriault Date: Tue Jan 8 12:07:07 2019 -0800 'DynFlag'-free version of 'mkParserFlags' Summary: This is a fixed version of the reverted d2fbc33c4ff3074126ab71654af8bbf8a46e4e11 and 5aa29231ab7603537284eff5e4caff3a73dba6d2. Obtaining a `DynFlags` is difficult, making using the lexer/parser for pure parsing/lexing unreasonably difficult, even with `mkPStatePure`. This is despite the fact that we only really need * language extension flags * warning flags * a handful of boolean options The new `mkParserFlags'` function makes is easier to directly construct a `ParserFlags`. Furthermore, since `pExtsBitmap` is just a footgun, I've gone ahead and made `ParserFlags` an abstract type. Also, we now export `ExtBits` and `getBit` instead of defining/exporting a bunch of boilerplate functions that test for a particular 'ExtBits'. In the process, I also * cleaned up an unneeded special case for `ITstatic` * made `UsePosPrags` another variant of `ExtBits` * made the logic in `reservedSymsFM` match that of `reservedWordsFM` Test Plan: make test Reviewers: bgamari, alanz, tdammers Subscribers: sjakobi, tdammers, rwbarton, mpickering, carter GHC Trac Issues: #11301 Differential Revision: https://phabricator.haskell.org/D5405 >--------------------------------------------------------------- 2b013bd84899d65f86bfed6407067f2608878475 compiler/parser/Lexer.x | 566 +++++++++++++++++++++----------------------- compiler/parser/Parser.y | 18 +- compiler/parser/RdrHsSyn.hs | 42 ++-- 3 files changed, 296 insertions(+), 330 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 2b013bd84899d65f86bfed6407067f2608878475 From git at git.haskell.org Thu Jan 17 18:57:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:10 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: Remove export of checkValidFamPats, never used (84ca4d5) Message-ID: <20190117185710.259C93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/84ca4d593743c6b8bfc88d1add7e01e9d60ffdb3/ghc >--------------------------------------------------------------- commit 84ca4d593743c6b8bfc88d1add7e01e9d60ffdb3 Author: Simon Peyton Jones Date: Thu Jan 10 12:08:15 2019 +0000 Remove export of checkValidFamPats, never used >--------------------------------------------------------------- 84ca4d593743c6b8bfc88d1add7e01e9d60ffdb3 compiler/typecheck/TcValidity.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 74c1279..3b88fe1 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -7,7 +7,7 @@ module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, - checkValidTheta, checkValidFamPats, + checkValidTheta, checkValidInstance, checkValidInstHead, validDerivPred, checkTySynRhs, checkValidCoAxiom, checkValidCoAxBranch, From git at git.haskell.org Thu Jan 17 18:57:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:13 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: Comments about data constructor wrappers (ed18192) Message-ID: <20190117185713.1FC953ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/ed18192bd01e4f7aa05ef6cf50a443edf7d2f456/ghc >--------------------------------------------------------------- commit ed18192bd01e4f7aa05ef6cf50a443edf7d2f456 Author: Simon Peyton Jones Date: Thu Jan 10 12:07:57 2019 +0000 Comments about data constructor wrappers >--------------------------------------------------------------- ed18192bd01e4f7aa05ef6cf50a443edf7d2f456 compiler/basicTypes/DataCon.hs | 70 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs index de4fd12..5f72b51 100644 --- a/compiler/basicTypes/DataCon.hs +++ b/compiler/basicTypes/DataCon.hs @@ -172,9 +172,38 @@ The "wrapper Id", \$WC, goes as follows nothing for the wrapper to do. That is, if its defn would be \$wC = C +Note [Data constructor workers and wrappers] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Algebraic data types + - Always have a worker, with no unfolding + - May or may not have a wrapper; see Note [The need for a wrapper] + +* Newtypes + - Always have a worker, which has a compulsory unfolding (just a cast) + - May or may not have a wrapper; see Note [The need for a wrapper] + +* INVARIANT: the dictionary constructor for a class + never has a wrapper. + +* Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments + +* The wrapper (if it exists) takes dcOrigArgTys as its arguments + The worker takes dataConRepArgTys as its arguments + If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys + +* The 'NoDataConRep' case of DataConRep is important. Not only is it + efficient, but it also ensures that the wrapper is replaced by the + worker (because it *is* the worker) even when there are no + args. E.g. in + f (:) x + the (:) *is* the worker. This is really important in rule matching, + (We could match on the wrappers, but that makes it less likely that + rules will match when we bring bits of unfoldings together.) + Note [The need for a wrapper] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Why might the wrapper have anything to do? Two reasons: +Why might the wrapper have anything to do? The full story is +in wrapper_reqd in MkId.mkDataConRep. * Unboxing strict fields (with -funbox-strict-fields) data T = MkT !(Int,Int) @@ -197,12 +226,14 @@ Why might the wrapper have anything to do? Two reasons: The third argument is a coercion [a] :: [a]~[a] -INVARIANT: the dictionary constructor for a class - never has a wrapper. +* Data family instances may do a cast on the result +* Type variables may be permuted; see MkId + Note [Data con wrappers and GADT syntax] -A note about the stupid context -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note [The stupid context] +~~~~~~~~~~~~~~~~~~~~~~~~~ Data types can have a context: data (Eq a, Ord b) => T a b = T1 a b | T2 a @@ -566,9 +597,12 @@ perspective. -} -- | Data Constructor Representation +-- See Note [Data constructor workers and wrappers] data DataConRep - = NoDataConRep -- No wrapper + = -- NoDataConRep means that the data con has no wrapper + NoDataConRep + -- DCR means that the data con has a wrapper | DCR { dcr_wrap_id :: Id -- Takes src args, unboxes/flattens, -- and constructs the representation @@ -586,30 +620,6 @@ data DataConRep -- See Note [Bangs on data constructor arguments] } --- Algebraic data types always have a worker, and --- may or may not have a wrapper, depending on whether --- the wrapper does anything. --- --- Data types have a worker with no unfolding --- Newtypes just have a worker, which has a compulsory unfolding (just a cast) - --- _Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments - --- The wrapper (if it exists) takes dcOrigArgTys as its arguments --- The worker takes dataConRepArgTys as its arguments --- If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys - --- The 'NoDataConRep' case is important --- Not only is this efficient, --- but it also ensures that the wrapper is replaced --- by the worker (because it *is* the worker) --- even when there are no args. E.g. in --- f (:) x --- the (:) *is* the worker. --- This is really important in rule matching, --- (We could match on the wrappers, --- but that makes it less likely that rules will match --- when we bring bits of unfoldings together.) ------------------------- From git at git.haskell.org Thu Jan 17 18:57:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:16 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: Small refactor (87f5755) Message-ID: <20190117185716.1A7393ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/87f5755d5c246c1cc9c8b7ed5c0d8fe30b6670cb/ghc >--------------------------------------------------------------- commit 87f5755d5c246c1cc9c8b7ed5c0d8fe30b6670cb Author: Simon Peyton Jones Date: Thu Jan 10 12:08:47 2019 +0000 Small refactor ...to use the same error message rather than duplicating it >--------------------------------------------------------------- 87f5755d5c246c1cc9c8b7ed5c0d8fe30b6670cb compiler/typecheck/TcInstDcls.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index ba33fe2..fccf8b7 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -21,7 +21,7 @@ import TcBinds import TcTyClsDecls import TcTyDecls ( addTyConsToGblEnv ) import TcClassDcl( tcClassDecl2, tcATDefault, - HsSigFun, mkHsSigFun, + HsSigFun, mkHsSigFun, badMethodErr, findMethodBind, instantiateMethod ) import TcSigs import TcRnMonad @@ -1539,13 +1539,11 @@ tcMethods dfun_id clas tyvars dfun_ev_vars inst_tys -- Check if any method bindings do not correspond to the class. -- See Note [Mismatched class methods and associated type families]. checkMethBindMembership - = let bind_nms = map unLoc $ collectMethodBinders binds - cls_meth_nms = map (idName . fst) op_items - mismatched_meths = bind_nms `minusList` cls_meth_nms - in forM_ mismatched_meths $ \mismatched_meth -> - addErrTc $ hsep - [ text "Class", quotes (ppr (className clas)) - , text "does not have a method", quotes (ppr mismatched_meth)] + = mapM_ (addErrTc . badMethodErr clas) mismatched_meths + where + bind_nms = map unLoc $ collectMethodBinders binds + cls_meth_nms = map (idName . fst) op_items + mismatched_meths = bind_nms `minusList` cls_meth_nms {- Note [Mismatched class methods and associated type families] From git at git.haskell.org Thu Jan 17 18:57:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:19 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: testsuite: Mark ghci063 as broken on Darwin (8178519) Message-ID: <20190117185719.1B5F23ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/8178519f6a43a68e7a437a6e9b1fcbb26889ebcb/ghc >--------------------------------------------------------------- commit 8178519f6a43a68e7a437a6e9b1fcbb26889ebcb Author: Ben Gamari Date: Thu Jan 17 13:55:00 2019 -0500 testsuite: Mark ghci063 as broken on Darwin This is the last failing test on Darwin preventing us from disallowing CI failures. See #16201. >--------------------------------------------------------------- 8178519f6a43a68e7a437a6e9b1fcbb26889ebcb testsuite/tests/ghci/scripts/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index a27ab32..1394a9a 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -106,7 +106,7 @@ test('ghci061', normal, ghci_script, ['ghci061.script']) test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']), when(config.have_ext_interp, extra_ways(['ghci-ext']))], ghci_script, ['ghci062.script']) -test('ghci063', normal, ghci_script, ['ghci063.script']) +test('ghci063', when(opsys('darwin'), expect_broken(16201)), ghci_script, ['ghci063.script']) test('T2452', [extra_hc_opts("-fno-implicit-import-qualified")], ghci_script, ['T2452.script']) From git at git.haskell.org Thu Jan 17 18:57:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 17 Jan 2019 18:57:22 +0000 (UTC) Subject: [commit: ghc] wip/fix-osx-ci: gitlab-ci: Disallow failure (4b8cfe2) Message-ID: <20190117185722.170573ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-osx-ci Link : http://ghc.haskell.org/trac/ghc/changeset/4b8cfe263b141ead15ffee0c9fdf2c7d1a7fa650/ghc >--------------------------------------------------------------- commit 4b8cfe263b141ead15ffee0c9fdf2c7d1a7fa650 Author: Ben Gamari Date: Thu Jan 17 13:56:00 2019 -0500 gitlab-ci: Disallow failure >--------------------------------------------------------------- 4b8cfe263b141ead15ffee0c9fdf2c7d1a7fa650 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..73b736b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,6 @@ validate-x86_64-linux-deb8-hadrian: validate-x86_64-darwin: extends: .validate stage: full-build - allow_failure: true tags: - x86_64-darwin variables: From git at git.haskell.org Fri Jan 18 01:42:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:16 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Make `stackHeaderSize` more general (539a8f0) Message-ID: <20190118014216.E19E03ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/539a8f0e23558b8652985049d1c104eb9058171f/ghc >--------------------------------------------------------------- commit 539a8f0e23558b8652985049d1c104eb9058171f Author: Peter Trommler Date: Fri Dec 28 23:55:35 2018 +0100 PPC NCG: Make `stackHeaderSize` more general >--------------------------------------------------------------- 539a8f0e23558b8652985049d1c104eb9058171f 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 f8dba25..e618e18 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -582,14 +582,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 Fri Jan 18 01:42:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:19 +0000 (UTC) Subject: [commit: ghc] master: Comments about data constructor wrappers (96e31b5) Message-ID: <20190118014219.DC64F3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/96e31b5051b2405bb92901718ab6e78db42ac27f/ghc >--------------------------------------------------------------- commit 96e31b5051b2405bb92901718ab6e78db42ac27f Author: Simon Peyton Jones Date: Thu Jan 10 12:07:57 2019 +0000 Comments about data constructor wrappers >--------------------------------------------------------------- 96e31b5051b2405bb92901718ab6e78db42ac27f compiler/basicTypes/DataCon.hs | 70 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs index de4fd12..5f72b51 100644 --- a/compiler/basicTypes/DataCon.hs +++ b/compiler/basicTypes/DataCon.hs @@ -172,9 +172,38 @@ The "wrapper Id", \$WC, goes as follows nothing for the wrapper to do. That is, if its defn would be \$wC = C +Note [Data constructor workers and wrappers] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Algebraic data types + - Always have a worker, with no unfolding + - May or may not have a wrapper; see Note [The need for a wrapper] + +* Newtypes + - Always have a worker, which has a compulsory unfolding (just a cast) + - May or may not have a wrapper; see Note [The need for a wrapper] + +* INVARIANT: the dictionary constructor for a class + never has a wrapper. + +* Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments + +* The wrapper (if it exists) takes dcOrigArgTys as its arguments + The worker takes dataConRepArgTys as its arguments + If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys + +* The 'NoDataConRep' case of DataConRep is important. Not only is it + efficient, but it also ensures that the wrapper is replaced by the + worker (because it *is* the worker) even when there are no + args. E.g. in + f (:) x + the (:) *is* the worker. This is really important in rule matching, + (We could match on the wrappers, but that makes it less likely that + rules will match when we bring bits of unfoldings together.) + Note [The need for a wrapper] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Why might the wrapper have anything to do? Two reasons: +Why might the wrapper have anything to do? The full story is +in wrapper_reqd in MkId.mkDataConRep. * Unboxing strict fields (with -funbox-strict-fields) data T = MkT !(Int,Int) @@ -197,12 +226,14 @@ Why might the wrapper have anything to do? Two reasons: The third argument is a coercion [a] :: [a]~[a] -INVARIANT: the dictionary constructor for a class - never has a wrapper. +* Data family instances may do a cast on the result +* Type variables may be permuted; see MkId + Note [Data con wrappers and GADT syntax] -A note about the stupid context -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note [The stupid context] +~~~~~~~~~~~~~~~~~~~~~~~~~ Data types can have a context: data (Eq a, Ord b) => T a b = T1 a b | T2 a @@ -566,9 +597,12 @@ perspective. -} -- | Data Constructor Representation +-- See Note [Data constructor workers and wrappers] data DataConRep - = NoDataConRep -- No wrapper + = -- NoDataConRep means that the data con has no wrapper + NoDataConRep + -- DCR means that the data con has a wrapper | DCR { dcr_wrap_id :: Id -- Takes src args, unboxes/flattens, -- and constructs the representation @@ -586,30 +620,6 @@ data DataConRep -- See Note [Bangs on data constructor arguments] } --- Algebraic data types always have a worker, and --- may or may not have a wrapper, depending on whether --- the wrapper does anything. --- --- Data types have a worker with no unfolding --- Newtypes just have a worker, which has a compulsory unfolding (just a cast) - --- _Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments - --- The wrapper (if it exists) takes dcOrigArgTys as its arguments --- The worker takes dataConRepArgTys as its arguments --- If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys - --- The 'NoDataConRep' case is important --- Not only is this efficient, --- but it also ensures that the wrapper is replaced --- by the worker (because it *is* the worker) --- even when there are no args. E.g. in --- f (:) x --- the (:) *is* the worker. --- This is really important in rule matching, --- (We could match on the wrappers, --- but that makes it less likely that rules will match --- when we bring bits of unfoldings together.) ------------------------- From git at git.haskell.org Fri Jan 18 01:42:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:22 +0000 (UTC) Subject: [commit: ghc] master: Remove export of checkValidFamPats, never used (7b7b338) Message-ID: <20190118014222.D57C63ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7b7b338b9a18cccaf2692556da868e45164938b7/ghc >--------------------------------------------------------------- commit 7b7b338b9a18cccaf2692556da868e45164938b7 Author: Simon Peyton Jones Date: Thu Jan 10 12:08:15 2019 +0000 Remove export of checkValidFamPats, never used >--------------------------------------------------------------- 7b7b338b9a18cccaf2692556da868e45164938b7 compiler/typecheck/TcValidity.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 74c1279..3b88fe1 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -7,7 +7,7 @@ module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, - checkValidTheta, checkValidFamPats, + checkValidTheta, checkValidInstance, checkValidInstHead, validDerivPred, checkTySynRhs, checkValidCoAxiom, checkValidCoAxBranch, From git at git.haskell.org Fri Jan 18 01:42:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:25 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Register definitions for all 64-bit systems (341aa59) Message-ID: <20190118014225.CE6333ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/341aa59120dcc2fb712c94d12b65c886f0d5ae97/ghc >--------------------------------------------------------------- commit 341aa59120dcc2fb712c94d12b65c886f0d5ae97 Author: Peter Trommler Date: Sat Dec 29 10:14:12 2018 +0100 PPC NCG: Register definitions for all 64-bit systems >--------------------------------------------------------------- 341aa59120dcc2fb712c94d12b65c886f0d5ae97 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 Fri Jan 18 01:42:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:28 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: GOT declaration for all 64-bit ELF systems (9477bf5) Message-ID: <20190118014228.C934F3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9477bf594a990d47c1452531d441c31536fcca9c/ghc >--------------------------------------------------------------- commit 9477bf594a990d47c1452531d441c31536fcca9c Author: Peter Trommler Date: Sat Dec 29 10:12:48 2018 +0100 PPC NCG: GOT declaration for all 64-bit ELF systems >--------------------------------------------------------------- 9477bf594a990d47c1452531d441c31536fcca9c 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 Fri Jan 18 01:42:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:31 +0000 (UTC) Subject: [commit: ghc] master: Fix tab and improve whitespace (2d75174) Message-ID: <20190118014231.C7FA33ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/2d75174bb430ebf2d2e3919b9b525b503c8d3fa0/ghc >--------------------------------------------------------------- commit 2d75174bb430ebf2d2e3919b9b525b503c8d3fa0 Author: Peter Trommler Date: Sat Dec 29 11:29:02 2018 +0100 Fix tab and improve whitespace >--------------------------------------------------------------- 2d75174bb430ebf2d2e3919b9b525b503c8d3fa0 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 Fri Jan 18 01:42:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:34 +0000 (UTC) Subject: [commit: ghc] master: RTS: Use ELF v1 convention on all powerpc64 systems (b684675) Message-ID: <20190118014234.CDDF53ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b684675ae14dfacc1dbd845bfff6333adfeee0bb/ghc >--------------------------------------------------------------- commit b684675ae14dfacc1dbd845bfff6333adfeee0bb Author: Peter Trommler Date: Fri Dec 28 22:30:34 2018 +0100 RTS: Use ELF v1 convention on all powerpc64 systems >--------------------------------------------------------------- b684675ae14dfacc1dbd845bfff6333adfeee0bb 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 Fri Jan 18 01:42:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:37 +0000 (UTC) Subject: [commit: ghc] master: Small refactor (56c26f5) Message-ID: <20190118014237.E0A093ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/56c26f5e523f4441019f707cc08d6778e1a739bb/ghc >--------------------------------------------------------------- commit 56c26f5e523f4441019f707cc08d6778e1a739bb Author: Simon Peyton Jones Date: Thu Jan 10 12:08:47 2019 +0000 Small refactor ...to use the same error message rather than duplicating it >--------------------------------------------------------------- 56c26f5e523f4441019f707cc08d6778e1a739bb compiler/typecheck/TcInstDcls.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index ba33fe2..fccf8b7 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -21,7 +21,7 @@ import TcBinds import TcTyClsDecls import TcTyDecls ( addTyConsToGblEnv ) import TcClassDcl( tcClassDecl2, tcATDefault, - HsSigFun, mkHsSigFun, + HsSigFun, mkHsSigFun, badMethodErr, findMethodBind, instantiateMethod ) import TcSigs import TcRnMonad @@ -1539,13 +1539,11 @@ tcMethods dfun_id clas tyvars dfun_ev_vars inst_tys -- Check if any method bindings do not correspond to the class. -- See Note [Mismatched class methods and associated type families]. checkMethBindMembership - = let bind_nms = map unLoc $ collectMethodBinders binds - cls_meth_nms = map (idName . fst) op_items - mismatched_meths = bind_nms `minusList` cls_meth_nms - in forM_ mismatched_meths $ \mismatched_meth -> - addErrTc $ hsep - [ text "Class", quotes (ppr (className clas)) - , text "does not have a method", quotes (ppr mismatched_meth)] + = mapM_ (addErrTc . badMethodErr clas) mismatched_meths + where + bind_nms = map unLoc $ collectMethodBinders binds + cls_meth_nms = map (idName . fst) op_items + mismatched_meths = bind_nms `minusList` cls_meth_nms {- Note [Mismatched class methods and associated type families] From git at git.haskell.org Fri Jan 18 01:42:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:40 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Make calling convention more general (64020fe) Message-ID: <20190118014240.E2C183ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/64020feaee79aa27716aa9cb0cd457d8c8394682/ghc >--------------------------------------------------------------- commit 64020feaee79aa27716aa9cb0cd457d8c8394682 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. >--------------------------------------------------------------- 64020feaee79aa27716aa9cb0cd457d8c8394682 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 Fri Jan 18 01:42:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:43 +0000 (UTC) Subject: [commit: ghc] master: PPC NCG: Rename constructors (d512b33) Message-ID: <20190118014243.E6AFA3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d512b330f74d947ceb4d2d7c446a4e753532251b/ghc >--------------------------------------------------------------- commit d512b330f74d947ceb4d2d7c446a4e753532251b 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. >--------------------------------------------------------------- d512b330f74d947ceb4d2d7c446a4e753532251b 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 d512b330f74d947ceb4d2d7c446a4e753532251b From git at git.haskell.org Fri Jan 18 01:42:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 01:42:46 +0000 (UTC) Subject: [commit: ghc] master: 'DynFlag'-free version of 'mkParserFlags' (469fe61) Message-ID: <20190118014246.EE0AF3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/469fe6133646df5568c9486de2202124cb734242/ghc >--------------------------------------------------------------- commit 469fe6133646df5568c9486de2202124cb734242 Author: Alec Theriault Date: Tue Jan 8 12:07:07 2019 -0800 'DynFlag'-free version of 'mkParserFlags' Summary: This is a fixed version of the reverted d2fbc33c4ff3074126ab71654af8bbf8a46e4e11 and 5aa29231ab7603537284eff5e4caff3a73dba6d2. Obtaining a `DynFlags` is difficult, making using the lexer/parser for pure parsing/lexing unreasonably difficult, even with `mkPStatePure`. This is despite the fact that we only really need * language extension flags * warning flags * a handful of boolean options The new `mkParserFlags'` function makes is easier to directly construct a `ParserFlags`. Furthermore, since `pExtsBitmap` is just a footgun, I've gone ahead and made `ParserFlags` an abstract type. Also, we now export `ExtBits` and `getBit` instead of defining/exporting a bunch of boilerplate functions that test for a particular 'ExtBits'. In the process, I also * cleaned up an unneeded special case for `ITstatic` * made `UsePosPrags` another variant of `ExtBits` * made the logic in `reservedSymsFM` match that of `reservedWordsFM` Test Plan: make test Reviewers: bgamari, alanz, tdammers Subscribers: sjakobi, tdammers, rwbarton, mpickering, carter GHC Trac Issues: #11301 Differential Revision: https://phabricator.haskell.org/D5405 >--------------------------------------------------------------- 469fe6133646df5568c9486de2202124cb734242 compiler/parser/Lexer.x | 566 +++++++++++++++++++++----------------------- compiler/parser/Parser.y | 18 +- compiler/parser/RdrHsSyn.hs | 42 ++-- 3 files changed, 296 insertions(+), 330 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 469fe6133646df5568c9486de2202124cb734242 From git at git.haskell.org Fri Jan 18 02:10:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 02:10:29 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16199' created Message-ID: <20190118021029.52D573ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16199 Referencing: b927417984187d09602c78b49d8d08debfc208d4 From git at git.haskell.org Fri Jan 18 02:10:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 02:10:32 +0000 (UTC) Subject: [commit: ghc] wip/T16199: Adds a veriy-packages script to ensure ghc and hackage agree on package source and version (b927417) Message-ID: <20190118021032.C7EB73ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16199 Link : http://ghc.haskell.org/trac/ghc/changeset/b927417984187d09602c78b49d8d08debfc208d4/ghc >--------------------------------------------------------------- commit b927417984187d09602c78b49d8d08debfc208d4 Author: Moritz Angermann Date: Fri Jan 18 10:05:41 2019 +0800 Adds a veriy-packages script to ensure ghc and hackage agree on package source and version >--------------------------------------------------------------- b927417984187d09602c78b49d8d08debfc208d4 utils/verify-release/verify-packages.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/utils/verify-release/verify-packages.sh b/utils/verify-release/verify-packages.sh new file mode 100755 index 0000000..4d3a385 --- /dev/null +++ b/utils/verify-release/verify-packages.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# This script will veriy that the packages in ghc, +# correspond to packages on hackage. +rm -fR ghc-packages hackage-packages package-diffs +mkdir -p ghc-packages hackage-packages package-diffs +# We'll skip Cabal and tarballs, while looking only at packages in libraries +# the we reference as gitmodules. +for lib in $(git submodule status|grep libraries|grep -v tarballs|grep -v Cabal|awk -F\ '{ print $2 }'); do + (cd $lib && cabal new-sdist -o ../../ghc-packages); +done + +for pkg in $(cd ghc-packages && ls *.tar.gz); do + PKG=${pkg%%.tar.gz} + (cd hackage-packages && cabal get --pristine ${PKG}) + (cd ghc-packages && tar xzf $pkg) + diff -ur hackage-packages/${PKG} ghc-packages/${PKG} \ + | sed "s/hackage-packages\/${PKG}/hackage-package-${PKG}/"g \ + | sed "s/ghc-packages\/${PKG}/ghc-package-${PKG}/"g \ + > package-diffs/${PKG}.patch +done +ls -lah package-diffs From git at git.haskell.org Fri Jan 18 12:31:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 12:31:44 +0000 (UTC) Subject: [commit: ghc] master: Comments in stranal test declarations (8c3133a) Message-ID: <20190118123144.DC1783ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8c3133a6e513c6f311df489deb3ae89938b27b08/ghc >--------------------------------------------------------------- commit 8c3133a6e513c6f311df489deb3ae89938b27b08 Author: Ömer Sinan Ağacan Date: Fri Jan 18 11:51:59 2019 +0300 Comments in stranal test declarations >--------------------------------------------------------------- 8c3133a6e513c6f311df489deb3ae89938b27b08 testsuite/tests/stranal/should_run/all.T | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/stranal/should_run/all.T b/testsuite/tests/stranal/should_run/all.T index 51b1e41..4599c9e 100644 --- a/testsuite/tests/stranal/should_run/all.T +++ b/testsuite/tests/stranal/should_run/all.T @@ -1,7 +1,9 @@ -# Run this always +# Run this always as we compile the test with -O0 and -O1 and check that the +# output is correct and the same in both cases. test('T16197', normal, run_command, ['$MAKE -s --no-print-directory T16197']) -# Run the rest only in optasm way, we're testing the strictness analyser here +# Run the rest only in optasm way (which implies -O), we're testing the +# strictness analyser here setTestOpts( only_ways(['optasm']) ) test('strun001', normal, compile_and_run, ['']) From git at git.haskell.org Fri Jan 18 13:35:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 13:35:19 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ds-expr-typo' created Message-ID: <20190118133519.147A43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ds-expr-typo Referencing: b14f54041eacf8c0f85e756148042d2dca8333f9 From git at git.haskell.org Fri Jan 18 13:35:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 13:35:22 +0000 (UTC) Subject: [commit: ghc] wip/ds-expr-typo: Fix typo in DsExpr (b14f540) Message-ID: <20190118133522.129A43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ds-expr-typo Link : http://ghc.haskell.org/trac/ghc/changeset/b14f54041eacf8c0f85e756148042d2dca8333f9/ghc >--------------------------------------------------------------- commit b14f54041eacf8c0f85e756148042d2dca8333f9 Author: Matthew Pickering Date: Fri Jan 18 08:35:08 2019 -0500 Fix typo in DsExpr >--------------------------------------------------------------- b14f54041eacf8c0f85e756148042d2dca8333f9 compiler/deSugar/DsExpr.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs index 7306352..d9af622 100644 --- a/compiler/deSugar/DsExpr.hs +++ b/compiler/deSugar/DsExpr.hs @@ -3,7 +3,7 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -Desugaring exporessions. +Desugaring expressions. -} {-# LANGUAGE CPP, MultiWayIf #-} From git at git.haskell.org Fri Jan 18 15:25:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 15:25:33 +0000 (UTC) Subject: [commit: ghc] wip/T16185: Improvements to the AnonArgFlag stuff (391f3cc) Message-ID: <20190118152533.241573ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16185 Link : http://ghc.haskell.org/trac/ghc/changeset/391f3ccea45fe6f72a1d041a306fed7ee3a96db9/ghc >--------------------------------------------------------------- commit 391f3ccea45fe6f72a1d041a306fed7ee3a96db9 Author: Simon Peyton Jones Date: Fri Jan 18 15:24:21 2019 +0000 Improvements to the AnonArgFlag stuff One step forward is using CPP for FunTy See Note [Function types] in TyCoRep >--------------------------------------------------------------- 391f3ccea45fe6f72a1d041a306fed7ee3a96db9 compiler/HsVersions.h | 8 +++++++ compiler/codeGen/StgCmmClosure.hs | 2 +- compiler/coreSyn/CoreMap.hs | 10 ++++----- compiler/typecheck/TcCanonical.hs | 14 ++++--------- compiler/typecheck/TcErrors.hs | 5 +---- compiler/typecheck/TcMType.hs | 2 +- compiler/typecheck/TcTyDecls.hs | 3 +-- compiler/typecheck/TcType.hs | 27 +++--------------------- compiler/typecheck/TcTypeable.hs | 7 +++++-- compiler/typecheck/TcUnify.hs | 3 --- compiler/typecheck/TcValidity.hs | 5 +---- compiler/types/OptCoercion.hs | 8 ------- compiler/types/TyCoRep.hs | 32 +++++++++++++++++++++++----- compiler/types/Type.hs | 44 +++++++++++++-------------------------- compiler/types/Unify.hs | 5 ----- 15 files changed, 72 insertions(+), 103 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 391f3ccea45fe6f72a1d041a306fed7ee3a96db9 From git at git.haskell.org Fri Jan 18 16:36:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 16:36:23 +0000 (UTC) Subject: [commit: ghc] branch 'wip/hs-expr-todo' created Message-ID: <20190118163623.1DE423ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/hs-expr-todo Referencing: 7efe4135f3ba04531fb2871937b9a2cff70100df From git at git.haskell.org Fri Jan 18 16:36:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 16:36:26 +0000 (UTC) Subject: [commit: ghc] wip/hs-expr-todo: Remove TODO in HsExpr (7efe413) Message-ID: <20190118163626.22E6F3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hs-expr-todo Link : http://ghc.haskell.org/trac/ghc/changeset/7efe4135f3ba04531fb2871937b9a2cff70100df/ghc >--------------------------------------------------------------- commit 7efe4135f3ba04531fb2871937b9a2cff70100df Author: Matthew Pickering Date: Fri Jan 18 11:36:12 2019 -0500 Remove TODO in HsExpr It is correct to be `GhcTc` as the data type is for expressions which are inside splices so they can be delayed until desugaring. >--------------------------------------------------------------- 7efe4135f3ba04531fb2871937b9a2cff70100df compiler/hsSyn/HsExpr.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs index 41bbdb2..bae29b0 100644 --- a/compiler/hsSyn/HsExpr.hs +++ b/compiler/hsSyn/HsExpr.hs @@ -2486,7 +2486,6 @@ data UntypedSpliceFlavour -- | Pending Type-checker Splice data PendingTcSplice - -- AZ:TODO: The hard-coded GhcTc feels wrong. = PendingTcSplice SplicePointName (LHsExpr GhcTc) {- From git at git.haskell.org Fri Jan 18 20:12:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Fri, 18 Jan 2019 20:12:39 +0000 (UTC) Subject: [commit: ghc] master's head updated: Fix typo in DsExpr (b14f540) Message-ID: <20190118201239.286B53ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: b14f540 Fix typo in DsExpr From git at git.haskell.org Sat Jan 19 18:52:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 18:52:55 +0000 (UTC) Subject: [commit: ghc] master: Prepare source-tree for base-4.13 MFP bump (c9756db) Message-ID: <20190119185255.F30D93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c9756dbf1ee58b117ea5c4ded45dea88030efd65/ghc >--------------------------------------------------------------- commit c9756dbf1ee58b117ea5c4ded45dea88030efd65 Author: Herbert Valerio Riedel Date: Tue Dec 18 23:36:29 2018 +0100 Prepare source-tree for base-4.13 MFP bump >--------------------------------------------------------------- c9756dbf1ee58b117ea5c4ded45dea88030efd65 compiler/basicTypes/UniqSupply.hs | 4 ++-- compiler/cmm/CmmMonad.hs | 4 ++++ compiler/coreSyn/CoreLint.hs | 2 ++ compiler/coreSyn/MkCore.hs | 4 ++-- compiler/ghc.cabal.in | 2 +- compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 4 ++-- compiler/main/GHC.hs | 2 +- compiler/parser/Lexer.x | 5 ++++- compiler/prelude/PrelRules.hs | 2 ++ compiler/specialise/Specialise.hs | 4 +++- compiler/typecheck/TcRnTypes.hs | 2 ++ compiler/typecheck/TcSMonad.hs | 2 ++ compiler/types/Unify.hs | 2 ++ compiler/utils/IOEnv.hs | 3 +++ compiler/utils/ListT.hs | 5 ++++- libraries/ghc-boot-th/ghc-boot-th.cabal.in | 2 +- libraries/ghc-boot/ghc-boot.cabal.in | 2 +- libraries/ghc-compact/ghc-compact.cabal | 2 +- libraries/ghci/GHCi/TH.hs | 4 +++- libraries/ghci/ghci.cabal.in | 2 +- libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 4 +++- libraries/template-haskell/template-haskell.cabal | 2 +- 22 files changed, 47 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 c9756dbf1ee58b117ea5c4ded45dea88030efd65 From git at git.haskell.org Sat Jan 19 19:04:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 19:04:12 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16104' created Message-ID: <20190119190412.9B7623ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16104 Referencing: 68be64ee57d522e6f5b2df027cdc0c729126787b From git at git.haskell.org Sat Jan 19 19:04:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 19:04:16 +0000 (UTC) Subject: [commit: ghc] wip/T16104: testsuite: Add test for #16104 (a002641) Message-ID: <20190119190416.65B4C3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/a002641b75cd791b6f4c8ed3979519bf12d75e8f/ghc >--------------------------------------------------------------- commit a002641b75cd791b6f4c8ed3979519bf12d75e8f Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- a002641b75cd791b6f4c8ed3979519bf12d75e8f testsuite/tests/plugins/T16104.hs | 4 ++++ testsuite/tests/plugins/T16104_Plugin.hs | 20 ++++++++++++++++++++ testsuite/tests/plugins/all.T | 2 ++ 3 files changed, 26 insertions(+) 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_Plugin.hs b/testsuite/tests/plugins/T16104_Plugin.hs new file mode 100644 index 0000000..cad54f6 --- /dev/null +++ b/testsuite/tests/plugins/T16104_Plugin.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TestPlugin (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/all.T b/testsuite/tests/plugins/all.T index da6294e..2e3be77 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -208,3 +208,5 @@ test('T15858', extra_hc_opts("-package-db plugin-recomp/pkg.plugins01/local.package.conf ") ], ghci_script, ['T15858.script']) + +test('T16104', default, compile, ['']) From git at git.haskell.org Sat Jan 19 19:04:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 19:04:19 +0000 (UTC) Subject: [commit: ghc] wip/T16104: GhcPlugins: Fix lookup of TH names (68be64e) Message-ID: <20190119190419.5E8F43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16104 Link : http://ghc.haskell.org/trac/ghc/changeset/68be64ee57d522e6f5b2df027cdc0c729126787b/ghc >--------------------------------------------------------------- commit 68be64ee57d522e6f5b2df027cdc0c729126787b 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. The solution is simple: use the nicely packaged `lookupOrigIO` instead. >--------------------------------------------------------------- 68be64ee57d522e6f5b2df027cdc0c729126787b compiler/main/GhcPlugins.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main/GhcPlugins.hs b/compiler/main/GhcPlugins.hs index 3e0facf..993b13b 100644 --- a/compiler/main/GhcPlugins.hs +++ b/compiler/main/GhcPlugins.hs @@ -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 Sat Jan 19 20:48:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 20:48:28 +0000 (UTC) Subject: [commit: ghc] branch 'wip/mr-template' created Message-ID: <20190119204828.05C9A3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/mr-template Referencing: e1d7ef7f4977f0f68d4bc2516a70fdaf6d5b980f From git at git.haskell.org Sat Jan 19 20:48:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 20:48:31 +0000 (UTC) Subject: [commit: ghc] wip/mr-template: GhcPlugins: Fix lookup of TH names (9dc883f) Message-ID: <20190119204831.06C4C3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mr-template Link : http://ghc.haskell.org/trac/ghc/changeset/9dc883fafaa35e80c49c95e36414ee62172fe08c/ghc >--------------------------------------------------------------- commit 9dc883fafaa35e80c49c95e36414ee62172fe08c 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. >--------------------------------------------------------------- 9dc883fafaa35e80c49c95e36414ee62172fe08c compiler/main/GhcPlugins.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main/GhcPlugins.hs b/compiler/main/GhcPlugins.hs index 3e0facf..993b13b 100644 --- a/compiler/main/GhcPlugins.hs +++ b/compiler/main/GhcPlugins.hs @@ -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 Sat Jan 19 20:48:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 20:48:34 +0000 (UTC) Subject: [commit: ghc] wip/mr-template: testsuite: Add test for #16104 (c71f7a4) Message-ID: <20190119204834.C03A43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mr-template Link : http://ghc.haskell.org/trac/ghc/changeset/c71f7a41ceadae560b0e797136dfa99a5f912344/ghc >--------------------------------------------------------------- commit c71f7a41ceadae560b0e797136dfa99a5f912344 Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- c71f7a41ceadae560b0e797136dfa99a5f912344 testsuite/tests/plugins/T16104.hs | 4 ++++ testsuite/tests/plugins/T16104_Plugin.hs | 20 ++++++++++++++++++++ testsuite/tests/plugins/all.T | 2 ++ 3 files changed, 26 insertions(+) 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_Plugin.hs b/testsuite/tests/plugins/T16104_Plugin.hs new file mode 100644 index 0000000..cad54f6 --- /dev/null +++ b/testsuite/tests/plugins/T16104_Plugin.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TestPlugin (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/all.T b/testsuite/tests/plugins/all.T index da6294e..2e3be77 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -208,3 +208,5 @@ test('T15858', extra_hc_opts("-package-db plugin-recomp/pkg.plugins01/local.package.conf ") ], ghci_script, ['T15858.script']) + +test('T16104', default, compile, ['']) From git at git.haskell.org Sat Jan 19 20:48:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 19 Jan 2019 20:48:38 +0000 (UTC) Subject: [commit: ghc] wip/mr-template: gitlab: Add merge request template (e1d7ef7) Message-ID: <20190119204838.3399B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/mr-template Link : http://ghc.haskell.org/trac/ghc/changeset/e1d7ef7f4977f0f68d4bc2516a70fdaf6d5b980f/ghc >--------------------------------------------------------------- commit e1d7ef7f4977f0f68d4bc2516a70fdaf6d5b980f Author: Ben Gamari Date: Sat Jan 19 15:47:33 2019 -0500 gitlab: Add merge request template >--------------------------------------------------------------- e1d7ef7f4977f0f68d4bc2516a70fdaf6d5b980f .gitlab/merge_request_templates/merge-request.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab/merge_request_templates/merge-request.md b/.gitlab/merge_request_templates/merge-request.md new file mode 100644 index 0000000..f20e29d --- /dev/null +++ b/.gitlab/merge_request_templates/merge-request.md @@ -0,0 +1,18 @@ +Thanks for your contribution to GHC! + +Please take a few moments to verify that your commits + + * [ ] are either individually buildable or squashed + * [ ] have commit messages which describe *what they do* + (referring to [Notes][notes] and tickets (using `#NNNN` syntax) when + appropriate + * [ ] have added source comments describing your change. For larger changes you + likely should add a [Note][notes] and cross-reference it from the relevant + places. + * [ ] add a [testcase to the + testsuite](https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding). + +If you have questions don't hesitate to open your merge request and inquire in a comment. +If your patch isn't quite done yet please do add prefix your MR title with `WIP:`. + +[notes]: https://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Commentsinthesourcecode From git at git.haskell.org Sun Jan 20 10:24:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 20 Jan 2019 10:24:42 +0000 (UTC) Subject: [commit: ghc] master: [T16199] Adds a verify-packages script (b137ab7) Message-ID: <20190120102442.B1F1B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b137ab75ab269e043e0783e41ac704d1be5570c6/ghc >--------------------------------------------------------------- commit b137ab75ab269e043e0783e41ac704d1be5570c6 Author: Moritz Angermann Date: Sun Jan 20 05:24:21 2019 -0500 [T16199] Adds a verify-packages script >--------------------------------------------------------------- b137ab75ab269e043e0783e41ac704d1be5570c6 utils/verify-release/verify-packages.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/utils/verify-release/verify-packages.sh b/utils/verify-release/verify-packages.sh new file mode 100755 index 0000000..d5c6bf1 --- /dev/null +++ b/utils/verify-release/verify-packages.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# This script will verify that the packages in ghc, +# correspond to packages on hackage. +rm -fR ghc-packages hackage-packages package-diffs +mkdir -p ghc-packages hackage-packages package-diffs +# We'll skip Cabal and tarballs, while looking only at packages in libraries +# that we reference as gitmodules. +for lib in $(git submodule status|grep libraries|grep -v tarballs|grep -v Cabal|awk -F\ '{ print $2 }'); do + (cd $lib && cabal new-sdist -o ../../ghc-packages); +done + +for pkg in $(cd ghc-packages && ls *.tar.gz); do + PKG=${pkg%%.tar.gz} + (cd hackage-packages && cabal get --pristine ${PKG}) + (cd hackage-packages/${PKG} && git init && git add . && git commit -q -m "hackage packages" && rm -fR *) + (cd hackage-packages && tar xzf ../ghc-packages/$pkg) + (cd hackage-packages/${PKG} && git -c core.fileMode=false diff > ../$PKG.patch) +done +find hackage-packages -name "*.patch" -not -empty -type f -print -exec false {} + From git at git.haskell.org Sun Jan 20 14:19:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 20 Jan 2019 14:19:27 +0000 (UTC) Subject: [commit: ghc] master: Mention DerivingStrategies in the warning when DAC and GND are both enabled (800d77e) Message-ID: <20190120141927.CAD4A3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/800d77e882f24066a7f6d818b2606ad8a0e79e02/ghc >--------------------------------------------------------------- commit 800d77e882f24066a7f6d818b2606ad8a0e79e02 Author: Chaitanya Koparkar Date: Mon Jan 14 14:36:29 2019 -0500 Mention DerivingStrategies in the warning when DAC and GND are both enabled Summary: When DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled, GHC prints out a warning that specifies the strategy it used to derive a class. This patch updates the warning to mention that users may pick a particular strategy by using DerivingStrategies. Test plan: make test TEST=T16179 >--------------------------------------------------------------- 800d77e882f24066a7f6d818b2606ad8a0e79e02 compiler/typecheck/TcDeriv.hs | 5 ++++- testsuite/tests/deriving/should_compile/T16179.hs | 7 +++++++ testsuite/tests/deriving/should_compile/T16179.stderr | 5 +++++ testsuite/tests/deriving/should_compile/all.T | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs index 90b230a..6078a7a 100644 --- a/compiler/typecheck/TcDeriv.hs +++ b/compiler/typecheck/TcDeriv.hs @@ -1640,7 +1640,10 @@ mkNewTypeEqn [ text "Both DeriveAnyClass and" <+> text "GeneralizedNewtypeDeriving are enabled" , text "Defaulting to the DeriveAnyClass strategy" - <+> text "for instantiating" <+> ppr cls ] + <+> text "for instantiating" <+> ppr cls + , text "Use DerivingStrategies to pick" + <+> text "a different strategy" + ] mk_originative_eqn DerivSpecAnyClass -- CanDeriveStock CanDeriveStock gen_fn -> mk_originative_eqn $ diff --git a/testsuite/tests/deriving/should_compile/T16179.hs b/testsuite/tests/deriving/should_compile/T16179.hs new file mode 100644 index 0000000..5873f89 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T16179.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +module T16179 where + +class C a +newtype T a = MkT a deriving C diff --git a/testsuite/tests/deriving/should_compile/T16179.stderr b/testsuite/tests/deriving/should_compile/T16179.stderr new file mode 100644 index 0000000..c3815d1 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T16179.stderr @@ -0,0 +1,5 @@ +T16179.hs:7:30: warning: + Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled + Defaulting to the DeriveAnyClass strategy for instantiating C + Use DerivingStrategies to pick a different strategy + In the newtype declaration for ‘T’ diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index 8c84bcc..ef6259d 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -114,3 +114,4 @@ test('T15290c', normal, compile, ['']) test('T15290d', normal, compile, ['']) test('T15398', normal, compile, ['']) test('T15637', normal, compile, ['']) +test('T16179', normal, compile, ['']) From git at git.haskell.org Sun Jan 20 17:25:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 20 Jan 2019 17:25:33 +0000 (UTC) Subject: [commit: ghc] master: Remove TODO in HsExpr (6e7aa5e) Message-ID: <20190120172533.803C03ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6e7aa5e937b18a45ee39c8c67b7a2f7350b89a66/ghc >--------------------------------------------------------------- commit 6e7aa5e937b18a45ee39c8c67b7a2f7350b89a66 Author: Matthew Pickering Date: Fri Jan 18 11:36:12 2019 -0500 Remove TODO in HsExpr It is correct to be `GhcTc` as the data type is for expressions which are inside splices so they can be delayed until desugaring. >--------------------------------------------------------------- 6e7aa5e937b18a45ee39c8c67b7a2f7350b89a66 compiler/hsSyn/HsExpr.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs index 41bbdb2..bae29b0 100644 --- a/compiler/hsSyn/HsExpr.hs +++ b/compiler/hsSyn/HsExpr.hs @@ -2486,7 +2486,6 @@ data UntypedSpliceFlavour -- | Pending Type-checker Splice data PendingTcSplice - -- AZ:TODO: The hard-coded GhcTc feels wrong. = PendingTcSplice SplicePointName (LHsExpr GhcTc) {- From git at git.haskell.org Mon Jan 21 00:23:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:23:43 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5082' created Message-ID: <20190121002343.25CF43ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5082 Referencing: b019949e02b3ed449f0524f5703392d1b49e3f4b From git at git.haskell.org Mon Jan 21 00:23:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:23:46 +0000 (UTC) Subject: [commit: ghc] wip/D5082: Make tablesNextToCode a proper dynamic flag (#15548) (a0dcf76) Message-ID: <20190121002346.1265D3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5082 Link : http://ghc.haskell.org/trac/ghc/changeset/a0dcf76fa7b23cf1cacababadaa1b54d90453f9a/ghc >--------------------------------------------------------------- commit a0dcf76fa7b23cf1cacababadaa1b54d90453f9a Author: Joachim Breitner Date: Sun Jan 20 19:18:25 2019 -0500 Make tablesNextToCode a proper dynamic flag (#15548) Summary: There is no more use of the TABLES_NEXT_TO_CODE CPP macro in `compiler/`. The default value of `tablesNextToCode` is calculated as before, but now users of the GHCI API can modify this flag. Reviewers: hvr, bgamari Subscribers: TerrorJack, rwbarton, carter GHC Trac Issues: #15548 Differential Revision: https://phabricator.haskell.org/D5082 >--------------------------------------------------------------- a0dcf76fa7b23cf1cacababadaa1b54d90453f9a compiler/ghc.mk | 8 ----- compiler/ghci/ByteCodeItbls.hs | 4 ++- compiler/main/DynFlags.hs | 8 ++--- compiler/main/SysTools.hs | 8 +---- compiler/utils/Util.hs | 8 ----- libraries/ghci/GHCi/InfoTable.hsc | 66 +++++++++++++++++---------------------- libraries/ghci/GHCi/Message.hs | 7 +++-- libraries/ghci/GHCi/Run.hs | 4 +-- 8 files changed, 42 insertions(+), 71 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 a0dcf76fa7b23cf1cacababadaa1b54d90453f9a From git at git.haskell.org Mon Jan 21 00:23:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:23:48 +0000 (UTC) Subject: [commit: ghc] wip/D5082: rts: Specialize hashing at call site rather than in struct. (b019949) Message-ID: <20190121002348.F14443ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5082 Link : http://ghc.haskell.org/trac/ghc/changeset/b019949e02b3ed449f0524f5703392d1b49e3f4b/ghc >--------------------------------------------------------------- commit b019949e02b3ed449f0524f5703392d1b49e3f4b Author: Crazycolorz5 Date: Sun Jan 20 19:22:55 2019 -0500 rts: Specialize hashing at call site rather than in struct. Separate word and string hash tables on the type level, and do not store the hashing function. Thus when a different hash function is desire it is provided upon accessing the table. This is worst case the same as before the change, and in the majority of cases is better. Also mark the functions for aggressive inlining to improve performance. {F1686506} Reviewers: bgamari, erikd, simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #13165 Differential Revision: https://phabricator.haskell.org/D4889 >--------------------------------------------------------------- b019949e02b3ed449f0524f5703392d1b49e3f4b rts/FileLock.c | 12 ++--- rts/Hash.c | 124 +++++++++++++++++++++++++++++++++++--------------- rts/Hash.h | 46 +++++++++++++------ rts/Hpc.c | 12 ++--- rts/Linker.c | 12 ++--- rts/LinkerInternals.h | 8 ++-- rts/RtsSymbolInfo.c | 6 +-- rts/StaticPtrTable.c | 14 +++--- 8 files changed, 152 insertions(+), 82 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 b019949e02b3ed449f0524f5703392d1b49e3f4b From git at git.haskell.org Mon Jan 21 00:35:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:35:14 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D4896' created Message-ID: <20190121003514.4CA793ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D4896 Referencing: 16fff90ef3a95cd5962592aa52df27e2b31449a1 From git at git.haskell.org Mon Jan 21 00:35:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:35:17 +0000 (UTC) Subject: [commit: ghc] wip/D4896: Use an IORef for QSemN (16fff90) Message-ID: <20190121003517.4A3BB3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4896 Link : http://ghc.haskell.org/trac/ghc/changeset/16fff90ef3a95cd5962592aa52df27e2b31449a1/ghc >--------------------------------------------------------------- commit 16fff90ef3a95cd5962592aa52df27e2b31449a1 Author: David Feuer Date: Sun Jan 20 19:32:49 2019 -0500 Use an IORef for QSemN Replace the outer `MVar` in `QSemN` with an `IORef`. This should probably be lighter, and it removes the need for `uninterruptibleMask`. Previously Differential Revision https://phabricator.haskell.org/D4896 >--------------------------------------------------------------- 16fff90ef3a95cd5962592aa52df27e2b31449a1 libraries/base/Control/Concurrent/QSemN.hs | 90 +++++++++++++++++------------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/libraries/base/Control/Concurrent/QSemN.hs b/libraries/base/Control/Concurrent/QSemN.hs index 8b3ce55..41d2b0a 100644 --- a/libraries/base/Control/Concurrent/QSemN.hs +++ b/libraries/base/Control/Concurrent/QSemN.hs @@ -1,4 +1,6 @@ -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE BangPatterns #-} +{-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | @@ -23,11 +25,12 @@ module Control.Concurrent.QSemN signalQSemN -- :: QSemN -> Int -> IO () ) where -import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar, tryTakeMVar - , putMVar, newMVar +import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar , tryPutMVar, isEmptyMVar) import Control.Exception -import Data.Maybe +import Control.Monad (when) +import Data.IORef (IORef, newIORef, atomicModifyIORef) +import System.IO.Unsafe (unsafePerformIO) -- | 'QSemN' is a quantity semaphore in which the resource is acquired -- and released in units of one. It provides guaranteed FIFO ordering @@ -39,7 +42,7 @@ import Data.Maybe -- -- is safe; it never loses any of the resource. -- -newtype QSemN = QSemN (MVar (Int, [(Int, MVar ())], [(Int, MVar ())])) +data QSemN = QSemN !(IORef (Int, [(Int, MVar ())], [(Int, MVar ())])) -- The semaphore state (i, xs, ys): -- @@ -55,9 +58,7 @@ newtype QSemN = QSemN (MVar (Int, [(Int, MVar ())], [(Int, MVar ())])) -- A thread can dequeue itself by also putting () into the MVar, which -- it must do if it receives an exception while blocked in waitQSemN. -- This means that when unblocking a thread in signalQSemN we must --- first check whether the MVar is already full; the MVar lock on the --- semaphore itself resolves race conditions between signalQSemN and a --- thread attempting to dequeue itself. +-- first check whether the MVar is already full. -- |Build a new 'QSemN' with a supplied initial quantity. -- The initial quantity must be at least 0. @@ -65,54 +66,65 @@ newQSemN :: Int -> IO QSemN newQSemN initial | initial < 0 = fail "newQSemN: Initial quantity must be non-negative" | otherwise = do - sem <- newMVar (initial, [], []) + sem <- newIORef (initial, [], []) return (QSemN sem) +-- An unboxed version of Maybe (MVar a) +data MaybeMV a = JustMV !(MVar a) | NothingMV + -- |Wait for the specified quantity to become available waitQSemN :: QSemN -> Int -> IO () -waitQSemN (QSemN m) sz = - mask_ $ do - (i,b1,b2) <- takeMVar m +-- We need to mask here. Once we've enqueued our MVar, we need +-- to be sure to wait for it. Otherwise, we could lose our +-- allocated resource. +waitQSemN qs@(QSemN m) sz = mask_ $ do + -- unsafePerformIO and not unsafeDupablePerformIO. We must + -- be sure to wait on the same MVar that gets enqueued. + mmvar <- atomicModifyIORef m $ \ (i,b1,b2) -> unsafePerformIO $ do let z = i-sz if z < 0 - then do - b <- newEmptyMVar - putMVar m (i, b1, (sz,b):b2) - wait b - else do - putMVar m (z, b1, b2) - return () + then do + b <- newEmptyMVar + return ((i, b1, (sz,b):b2), JustMV b) + else return ((z, b1, b2), NothingMV) + + -- Note: this case match actually allocates the MVar if necessary. + case mmvar of + NothingMV -> return () + JustMV b -> wait b where + wait :: MVar () -> IO () wait b = do - takeMVar b `onException` - (uninterruptibleMask_ $ do -- Note [signal uninterruptible] - (i,b1,b2) <- takeMVar m - r <- tryTakeMVar b - r' <- if isJust r - then signal sz (i,b1,b2) - else do putMVar b (); return (i,b1,b2) - putMVar m r') + takeMVar b `onException` do + already_filled <- not <$> tryPutMVar b () + when already_filled $ signalQSemN qs sz -- |Signal that a given quantity is now available from the 'QSemN'. signalQSemN :: QSemN -> Int -> IO () -signalQSemN (QSemN m) sz = uninterruptibleMask_ $ do - r <- takeMVar m - r' <- signal sz r - putMVar m r' - -signal :: Int - -> (Int,[(Int,MVar ())],[(Int,MVar ())]) - -> IO (Int,[(Int,MVar ())],[(Int,MVar ())]) +-- We don't need to mask here because we should *already* be masked +-- here (e.g., by bracket). Indeed, if we're not already masked, +-- it's too late to do so. +-- +-- What if the unsafePerformIO thunk is forced in another thread, +-- and receives an asynchronous exception? That shouldn't be a +-- problem: when we force it ourselves, presumably masked, we +-- will resume its execution. +signalQSemN (QSemN m) sz0 = do + -- unsafePerformIO and not unsafeDupablePerformIO. We must not + -- wake up more threads than we're supposed to. + unit <- atomicModifyIORef m $ \(i,a1,a2) -> + unsafePerformIO (loop (sz0 + i) a1 a2) -signal sz0 (i,a1,a2) = loop (sz0 + i) a1 a2 + -- Forcing this will actually wake the necessary threads. + evaluate unit where - loop 0 bs b2 = return (0, bs, b2) - loop sz [] [] = return (sz, [], []) + loop 0 bs b2 = return ((0, bs, b2), ()) + loop sz [] [] = return ((sz, [], []), ()) loop sz [] b2 = loop sz (reverse b2) [] loop sz ((j,b):bs) b2 | j > sz = do r <- isEmptyMVar b - if r then return (sz, (j,b):bs, b2) + if r then return ((sz, (j,b):bs, b2), ()) else loop sz bs b2 | otherwise = do r <- tryPutMVar b () From git at git.haskell.org Mon Jan 21 00:49:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:49:47 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5373' created Message-ID: <20190121004947.7F9E83ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5373 Referencing: 28909a1a3ac54209a70c673ed1ceda1a2ba268e5 From git at git.haskell.org Mon Jan 21 00:49:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:49:50 +0000 (UTC) Subject: [commit: ghc] wip/D5373: Add HoleFitPlugins and RawHoleFits (28909a1) Message-ID: <20190121004950.861BF3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5373 Link : http://ghc.haskell.org/trac/ghc/changeset/28909a1a3ac54209a70c673ed1ceda1a2ba268e5/ghc >--------------------------------------------------------------- commit 28909a1a3ac54209a70c673ed1ceda1a2ba268e5 Author: Matthías Páll Gissurarson Date: Sun Jan 20 19:44:15 2019 -0500 Add HoleFitPlugins and RawHoleFits This patch adds a new kind of plugin, Hole Fit Plugins. These plugins can change what candidates are considered when looking for valid hole fits, and add hole fits of their own. The type of a plugin is relatively simple, ``` type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit] type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate] data HoleFitPlugin = HoleFitPlugin { candPlugin :: CandPlugin , fitPlugin :: FitPlugin } data TypedHole = TyH { relevantCts :: Cts -- ^ Any relevant Cts to the hole , implics :: [Implication] -- ^ The nested implications of the hole with the -- innermost implication first. , holeCt :: Maybe Ct -- ^ The hole constraint itself, if available. } ``` This allows users and plugin writers to interact with the candidates and fits as they wish, even going as far as to allow them to reimplement the current functionality (since `TypedHole` contains all the relevant information). As an example, consider the following plugin: ``` module HolePlugin where import GhcPlugins import TcHoleErrors import Data.List (intersect, stripPrefix) import RdrName (importSpecModule) import TcRnTypes import System.Process plugin :: Plugin plugin = defaultPlugin { holeFitPlugin = hfp, pluginRecompile = purePlugin } hfp :: [CommandLineOption] -> Maybe HoleFitPlugin hfp opts = Just (HoleFitPlugin (candP opts) (fp opts)) toFilter :: Maybe String -> Maybe String toFilter = flip (>>=) (stripPrefix "_module_") replace :: Eq a => a -> a -> [a] -> [a] replace match repl str = replace' [] str where replace' sofar (x:xs) | x == match = replace' (repl:sofar) xs replace' sofar (x:xs) = replace' (x:sofar) xs replace' sofar [] = reverse sofar -- | This candidate plugin filters the candidates by module, -- using the name of the hole as module to search in candP :: [CommandLineOption] -> CandPlugin candP _ hole cands = do let he = case holeCt hole of Just (CHoleCan _ h) -> Just (occNameString $ holeOcc h) _ -> Nothing case toFilter he of Just undscModName -> do let replaced = replace '_' '.' undscModName let res = filter (greNotInOpts [replaced]) cands return $ res _ -> return cands where greNotInOpts opts (GreHFCand gre) = not $ null $ intersect (inScopeVia gre) opts greNotInOpts _ _ = True inScopeVia = map (moduleNameString . importSpecModule) . gre_imp -- Yes, it's pretty hacky, but it is just an example :) searchHoogle :: String -> IO [String] searchHoogle ty = lines <$> (readProcess "hoogle" [(show ty)] []) fp :: [CommandLineOption] -> FitPlugin fp ("hoogle":[]) hole hfs = do dflags <- getDynFlags let tyString = showSDoc dflags . ppr . ctPred <$> holeCt hole res <- case tyString of Just ty -> liftIO $ searchHoogle ty _ -> return [] return $ (take 2 $ map (RawHoleFit . text .("Hoogle says: " ++)) res) ++ hfs fp _ _ hfs = return hfs ``` with this plugin available, you can compile the following file ``` {-# OPTIONS -fplugin=HolePlugin -fplugin-opt=HolePlugin:hoogle #-} module Main where import Prelude hiding (head, last) import Data.List (head, last) t :: [Int] -> Int t = _module_Prelude g :: [Int] -> Int g = _module_Data_List main :: IO () main = print $ t [1,2,3] ``` and get the following output: ``` Main.hs:14:5: error: • Found hole: _module_Prelude :: [Int] -> Int Or perhaps ‘_module_Prelude’ is mis-spelled, or not in scope • In the expression: _module_Prelude In an equation for ‘t’: t = _module_Prelude • Relevant bindings include t :: [Int] -> Int (bound at Main.hs:14:1) Valid hole fits include Hoogle says: GHC.List length :: [a] -> Int Hoogle says: GHC.OldList length :: [a] -> Int t :: [Int] -> Int (bound at Main.hs:14:1) g :: [Int] -> Int (bound at Main.hs:17:1) length :: forall (t :: * -> *) a. Foldable t => t a -> Int with length @[] @Int (imported from ‘Prelude’ at Main.hs:5:1-34 (and originally defined in ‘Data.Foldable’)) maximum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a with maximum @[] @Int (imported from ‘Prelude’ at Main.hs:5:1-34 (and originally defined in ‘Data.Foldable’)) (Some hole fits suppressed; use -fmax-valid-hole-fits=N or -fno-max-valid-hole-fits) | 14 | t = _module_Prelude | ^^^^^^^^^^^^^^^ Main.hs:17:5: error: • Found hole: _module_Data_List :: [Int] -> Int Or perhaps ‘_module_Data_List’ is mis-spelled, or not in scope • In the expression: _module_Data_List In an equation for ‘g’: g = _module_Data_List • Relevant bindings include g :: [Int] -> Int (bound at Main.hs:17:1) Valid hole fits include Hoogle says: GHC.List length :: [a] -> Int Hoogle says: GHC.OldList length :: [a] -> Int g :: [Int] -> Int (bound at Main.hs:17:1) head :: forall a. [a] -> a with head @Int (imported from ‘Data.List’ at Main.hs:7:19-22 (and originally defined in ‘GHC.List’)) last :: forall a. [a] -> a with last @Int (imported from ‘Data.List’ at Main.hs:7:25-28 (and originally defined in ‘GHC.List’)) | 17 | g = _module_Data_List ``` This relatively simple plugin has two functions, as an example of what is possible to do with hole fit plugins. The candidate plugin starts by filtering the candidates considered by module, indicated by the name of the hole (`_module_Data_List`). The second function is in the fit plugin, where the plugin invokes a local hoogle instance to search by the type of the hole. By adding the `RawHoleFit` type, we can also allow these completely free suggestions, used in the plugin above to display fits found by Hoogle. Of course, the syntax here is up for debate, but hole fit plugins allow us to experiment relatively easily with ways to interact with typed-holes without having to dig deep into GHC. Reviewers: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5373 >--------------------------------------------------------------- 28909a1a3ac54209a70c673ed1ceda1a2ba268e5 compiler/main/Plugins.hs | 9 +- compiler/typecheck/TcHoleErrors.hs | 218 +++++++++++++++++++------------- compiler/typecheck/TcHoleErrors.hs-boot | 2 + 3 files changed, 141 insertions(+), 88 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 28909a1a3ac54209a70c673ed1ceda1a2ba268e5 From git at git.haskell.org Mon Jan 21 00:51:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:51:42 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5285' created Message-ID: <20190121005142.79C193ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5285 Referencing: 7f0250f50c4e697fc481f325abccde3332ade02a From git at git.haskell.org Mon Jan 21 00:51:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 00:51:46 +0000 (UTC) Subject: [commit: ghc] wip/D5285: Warn about unused packages (7f0250f) Message-ID: <20190121005146.4A0393ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5285 Link : http://ghc.haskell.org/trac/ghc/changeset/7f0250f50c4e697fc481f325abccde3332ade02a/ghc >--------------------------------------------------------------- commit 7f0250f50c4e697fc481f325abccde3332ade02a 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 >--------------------------------------------------------------- 7f0250f50c4e697fc481f325abccde3332ade02a 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 Mon Jan 21 01:05:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:05:18 +0000 (UTC) Subject: [commit: ghc] branch 'wip/rts-srt-closure-type' created Message-ID: <20190121010518.AB9003ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/rts-srt-closure-type Referencing: 00cf32d076f6e949e5e0dc38d10c37dd3fbc0df5 From git at git.haskell.org Mon Jan 21 01:05:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:05:21 +0000 (UTC) Subject: [commit: ghc] wip/rts-srt-closure-type: rts: Make SRTs a distinct closure type (00cf32d) Message-ID: <20190121010521.BE3C03ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/rts-srt-closure-type Link : http://ghc.haskell.org/trac/ghc/changeset/00cf32d076f6e949e5e0dc38d10c37dd3fbc0df5/ghc >--------------------------------------------------------------- commit 00cf32d076f6e949e5e0dc38d10c37dd3fbc0df5 Author: Ben Gamari Date: Sun Jan 20 19:57:12 2019 -0500 rts: Make SRTs a distinct closure type This will make it easier to count closure traversals during scavenging. Previously Differential Revision https://phabricator.haskell.org/D5098 >--------------------------------------------------------------- 00cf32d076f6e949e5e0dc38d10c37dd3fbc0df5 includes/rts/storage/ClosureTypes.h | 3 ++- libraries/Cabal | 2 +- libraries/binary | 2 +- libraries/bytestring | 2 +- libraries/containers | 2 +- libraries/deepseq | 2 +- libraries/directory | 2 +- libraries/hpc | 2 +- libraries/stm | 2 +- libraries/text | 2 +- libraries/time | 2 +- libraries/unix | 2 +- nofib | 2 +- rts/ClosureFlags.c | 3 ++- rts/Printer.c | 5 +++-- rts/StgMiscClosures.cmm | 32 ++++++++++++++++---------------- rts/sm/Evac.c | 4 ++++ rts/sm/Scav.c | 1 + utils/haddock | 2 +- utils/hsc2hs | 2 +- 20 files changed, 42 insertions(+), 34 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 00cf32d076f6e949e5e0dc38d10c37dd3fbc0df5 From git at git.haskell.org Mon Jan 21 01:33:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:33:53 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D4333' created Message-ID: <20190121013353.1E1343ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D4333 Referencing: 16af77ff4052f7c5018bfa68fe1972674266ce89 From git at git.haskell.org Mon Jan 21 01:33:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:33:56 +0000 (UTC) Subject: [commit: ghc] wip/D4333: [WIP] Hi Haddock: Enable haddock to generate docs from .hi-files (5a6ea93) Message-ID: <20190121013356.5F9C53ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4333 Link : http://ghc.haskell.org/trac/ghc/changeset/5a6ea938949d01e35b280c3bf06c83f0d690922c/ghc >--------------------------------------------------------------- commit 5a6ea938949d01e35b280c3bf06c83f0d690922c Author: Simon Jakobi Date: Sun Jan 20 20:24:32 2019 -0500 [WIP] Hi Haddock: Enable haddock to generate docs from .hi-files Summary: This extends my work from D4758 and enables haddock to generate docs from information enclosed in the `.hi` interface files. ## Main changes * `HaddockLex` contains an Alex-based lexer for docstrings that detects identifiers delimited with `'` or backticks. * `HsDoc.Docs` comprises the `DeclDocMap` and `ArcDocMap` structures added in D4758 and other data needed by haddock. * haddock now uses `GhcMake.load'` to load `.hi`-files, hooking into GHC's recompilation avoidance. In order to avoid recompilation when a `.hi`-file already contains documentation we use a new option `Opt_SkipIfaceVersionCheck`. ## TODOs and requests for comment * [ ] Work out a specification for a deterministic module structure (`docs_structure`) and update the existing code to implement it. The `HaddockIssue849` test case is currently flaky because the ordering of constructors in the `Avail` for `Maybe` fluctuates. See [haddock#956](https://github.com/haskell/haddock/issues/956). * [ ] Possibly fuse `mi_exports` and `docs_structure`. Currently both serialize the same `Avails`. Also discussed at [haddock#956](https://github.com/haskell/haddock/issues/956). * [ ] Get the recompilation avoidance right: While some of the checks performed in `checkVersions` are irrelevant for haddock, we may want to keep some of them. We probably also want `-haddock` to cause recompilation if an existing `.hi`-file doesn't contain the `Docs`. * [ ] Fix the tests. `./validate` currently reports failures for `TEST="HaddockIssue849 ImpSafeOnly01 ImpSafeOnly02 ImpSafeOnly03 ImpSafeOnly04 ImpSafeOnly05 ImpSafeOnly06 ImpSafeOnly07 ImpSafeOnly08 ImpSafeOnly09 ImpSafeOnly10 Splices T13168 T14304 T4029 T9881 break006 break011 break013 break024 cabal01 dynamicToo002 dynamicToo005 haddock.base haddock.compiler hist001 hist002 plugins09 plugins11 print026 safePkg01"` * [ ] Serialize instance locations. Discussed at [haddock#921](https://github.com/haskell/haddock/issues/921). Several more (minor) issues are marked `TODO` in the source code. --- The corresponding changes in haddock are [here](https://github.com/haskell/haddock/pull/906). ## Possible further work * Add an option to configure the identifier delimiters the lexer looks for. * Add an option to make the lexer exclude birdtracks. * Make the `:doc` command also pretty-print arg docs. Reviewers: bgamari, alanz, harpocrates, alexbiehl, hvr Subscribers: Tritlo, Fuuzetsu, thomie, rwbarton, mpickering, carter, wz1000, harpocrates, gershomb, hvr, alexbiehl GHC Trac Issues: #15786 Differential Revision: https://phabricator.haskell.org/D5067 >--------------------------------------------------------------- 5a6ea938949d01e35b280c3bf06c83f0d690922c compiler/basicTypes/BasicTypes.hs | 102 +++--- compiler/deSugar/Desugar.hs | 6 +- compiler/deSugar/ExtractDocs.hs | 237 +++++++++--- compiler/ghc.cabal.in | 1 + compiler/hieFile/HieAst.hs | 2 +- compiler/hsSyn/HsDecls.hs | 37 +- compiler/hsSyn/HsDoc.hs | 404 +++++++++++++++++---- compiler/hsSyn/HsImpExp.hs | 12 +- compiler/hsSyn/HsSyn.hs | 6 +- compiler/hsSyn/HsTypes.hs | 4 +- compiler/iface/LoadIface.hs | 25 +- compiler/iface/MkIface.hs | 45 +-- compiler/main/DynFlags.hs | 9 + compiler/main/GHC.hs | 2 +- compiler/main/HeaderInfo.hs | 1 + compiler/main/HscTypes.hs | 84 +++-- compiler/main/InteractiveEval.hs | 29 +- compiler/parser/HaddockLex.x | 146 ++++++++ compiler/parser/HaddockUtils.hs | 10 +- compiler/parser/Parser.y | 62 +++- compiler/parser/RdrHsSyn.hs | 15 +- compiler/rename/RnEnv.hs | 15 +- compiler/rename/RnHsDoc.hs | 51 ++- compiler/rename/RnNames.hs | 22 +- compiler/rename/RnSource.hs | 7 +- compiler/typecheck/TcHoleErrors.hs | 53 ++- compiler/typecheck/TcRnDriver.hs | 18 +- compiler/typecheck/TcRnTypes.hs | 4 +- compiler/utils/Binary.hs | 82 ++++- compiler/utils/Encoding.hs | 61 +++- compiler/utils/EnumSet.hs | 35 ++ compiler/utils/Outputable.hs | 5 + ghc/GHCi/UI.hs | 4 +- libraries/base/Data/Function.hs | 2 + libraries/base/GHC/Exts.hs | 1 + libraries/ghc-prim/GHC/Magic.hs | 1 + libraries/ghc-prim/GHC/Types.hs | 1 + .../tests/ghc-api/annotations/stringSource.hs | 15 +- .../plugins/simple-plugin/Simple/SourcePlugin.hs | 1 + testsuite/tests/showIface/DocsInHiFile.hs | 11 +- testsuite/tests/showIface/DocsInHiFile0.stdout | 5 +- testsuite/tests/showIface/DocsInHiFile1.stdout | 143 ++++++-- testsuite/tests/showIface/HaddockIssue849.hs | 10 + testsuite/tests/showIface/HaddockIssue849.stdout | 32 ++ testsuite/tests/showIface/HaddockOpts.hs | 2 + testsuite/tests/showIface/HaddockOpts.stdout | 24 ++ testsuite/tests/showIface/Inner0.hs | 3 + testsuite/tests/showIface/Inner1.hs | 4 + testsuite/tests/showIface/Inner2.hs | 3 + testsuite/tests/showIface/Inner3.hs | 3 + testsuite/tests/showIface/Inner4.hs | 4 + testsuite/tests/showIface/LanguageExts.hs | 4 + testsuite/tests/showIface/LanguageExts.stdout | 21 ++ testsuite/tests/showIface/MagicHashInHaddocks.hs | 9 + .../tests/showIface/MagicHashInHaddocks.stdout | 33 ++ testsuite/tests/showIface/Makefile | 32 +- testsuite/tests/showIface/NoExportList.hs | 28 ++ testsuite/tests/showIface/NoExportList.stdout | 59 +++ testsuite/tests/showIface/PragmaDocs.hs | 9 + testsuite/tests/showIface/PragmaDocs.stdout | 34 ++ testsuite/tests/showIface/ReExports.hs | 12 + testsuite/tests/showIface/ReExports.stdout | 31 ++ testsuite/tests/showIface/all.T | 28 ++ utils/genprimopcode/Main.hs | 1 + 64 files changed, 1714 insertions(+), 448 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 5a6ea938949d01e35b280c3bf06c83f0d690922c From git at git.haskell.org Mon Jan 21 01:33:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:33:59 +0000 (UTC) Subject: [commit: ghc] wip/D4333: testsuite: Don't disable LLVM ways due to unversioned llc (16af77f) Message-ID: <20190121013359.590FE3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4333 Link : http://ghc.haskell.org/trac/ghc/changeset/16af77ff4052f7c5018bfa68fe1972674266ce89/ghc >--------------------------------------------------------------- commit 16af77ff4052f7c5018bfa68fe1972674266ce89 Author: Ben Gamari Date: Sun Jan 20 20:32:07 2019 -0500 testsuite: Don't disable LLVM ways due to unversioned llc Previously we would silently disable the LLVM testsuite ways when LLC is set to an unversioned llc executable (e.g. `llc` instead of `llc-5.0`). Presumably this was because we were lax in checking the LLVM version in configure. However, this is no longer the case and consequently this confusing behavior is no longer necessary. Test Plan: Validate Reviewers: angerman Reviewed By: angerman Subscribers: michalt, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4333 >--------------------------------------------------------------- 16af77ff4052f7c5018bfa68fe1972674266ce89 libraries/Cabal | 2 +- libraries/array | 2 +- libraries/binary | 2 +- libraries/bytestring | 2 +- libraries/containers | 2 +- libraries/deepseq | 2 +- libraries/directory | 2 +- libraries/filepath | 2 +- libraries/haskeline | 2 +- libraries/hpc | 2 +- libraries/mtl | 2 +- libraries/parallel | 2 +- libraries/parsec | 2 +- libraries/pretty | 2 +- libraries/process | 2 +- libraries/stm | 2 +- libraries/terminfo | 2 +- libraries/text | 2 +- libraries/time | 2 +- libraries/transformers | 2 +- libraries/unix | 2 +- libraries/xhtml | 2 +- nofib | 2 +- testsuite/mk/test.mk | 4 +--- utils/haddock | 2 +- utils/hsc2hs | 2 +- 26 files changed, 26 insertions(+), 28 deletions(-) diff --git a/libraries/Cabal b/libraries/Cabal index 98fcb3a..3f20e1f 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit 98fcb3a964a4deef67920020a4a02d4d8552cc19 +Subproject commit 3f20e1faf9bc86ecb154ccf3e8b913bff14b9264 diff --git a/libraries/array b/libraries/array index 82a29b1..9d63218 160000 --- a/libraries/array +++ b/libraries/array @@ -1 +1 @@ -Subproject commit 82a29b198a67f54de2f72d96ca077800afbfbe4f +Subproject commit 9d63218fd067ff4885c0efa43b388238421a5c89 diff --git a/libraries/binary b/libraries/binary index fb461cf..d4a030a 160000 --- a/libraries/binary +++ b/libraries/binary @@ -1 +1 @@ -Subproject commit fb461cf048460813a7fac8e040c1004a0d123e42 +Subproject commit d4a030ab448191f664fc734bfbee61450a6fa5af diff --git a/libraries/bytestring b/libraries/bytestring index 847563a..ce3c6a0 160000 --- a/libraries/bytestring +++ b/libraries/bytestring @@ -1 +1 @@ -Subproject commit 847563a2e5ce84714688429c4fee8df5c8568cb0 +Subproject commit ce3c6a01cd9e2438358108e3e4b515304b5ce5a6 diff --git a/libraries/containers b/libraries/containers index 03dcb28..c07e484 160000 --- a/libraries/containers +++ b/libraries/containers @@ -1 +1 @@ -Subproject commit 03dcb287c96613ceb1f64d5d5a82f7b94b879268 +Subproject commit c07e4848e1b4458265e30cfb6265f9b6bd2bf053 diff --git a/libraries/deepseq b/libraries/deepseq index 4f03181..18fc08e 160000 --- a/libraries/deepseq +++ b/libraries/deepseq @@ -1 +1 @@ -Subproject commit 4f031810fc0eaf5ba12d805ff8df7f15e561e407 +Subproject commit 18fc08e66d2ad1a72a6f78708acbead007d4a580 diff --git a/libraries/directory b/libraries/directory index 19d6dc0..6f3a182 160000 --- a/libraries/directory +++ b/libraries/directory @@ -1 +1 @@ -Subproject commit 19d6dc0d33366a8920bf8acc7a0fd3ef533d39c3 +Subproject commit 6f3a1823b56f47cc17a9d39897965d47d6b2cbb4 diff --git a/libraries/filepath b/libraries/filepath index b10724b..9c64a63 160000 --- a/libraries/filepath +++ b/libraries/filepath @@ -1 +1 @@ -Subproject commit b10724be8a907e191d153ad6674415be0c1325fd +Subproject commit 9c64a634c144392f36cdad5c8c067824093a64d6 diff --git a/libraries/haskeline b/libraries/haskeline index 84a7b2b..1436a8c 160000 --- a/libraries/haskeline +++ b/libraries/haskeline @@ -1 +1 @@ -Subproject commit 84a7b2b0afb9325cfcedc3ca56603539f0e8af3e +Subproject commit 1436a8c7c8ee5076c99e09fe20943bf6101237af diff --git a/libraries/hpc b/libraries/hpc index 2678098..31d2496 160000 --- a/libraries/hpc +++ b/libraries/hpc @@ -1 +1 @@ -Subproject commit 26780988735bdb8fdbeffb59c4a8d585b9e46c3e +Subproject commit 31d24969c3e3644fb2bad1b85a8f9c7c2cacfbaf diff --git a/libraries/mtl b/libraries/mtl index c7d3967..bf4af11 160000 --- a/libraries/mtl +++ b/libraries/mtl @@ -1 +1 @@ -Subproject commit c7d396732bd45e409478bd4df1d0ca95d6f39356 +Subproject commit bf4af114ba3d35b2937fc74926aa49e128dd6c1f diff --git a/libraries/parallel b/libraries/parallel index 5015bc7..998f55d 160000 --- a/libraries/parallel +++ b/libraries/parallel @@ -1 +1 @@ -Subproject commit 5015bc74127beac29b4d08dcb3beb230149fed25 +Subproject commit 998f55d68b2f9852ce62a48450e1991ef4fce9fb diff --git a/libraries/parsec b/libraries/parsec index 34f9e98..1c56e08 160000 --- a/libraries/parsec +++ b/libraries/parsec @@ -1 +1 @@ -Subproject commit 34f9e98c64cae99abeabbd3d34cec5469f87291a +Subproject commit 1c56e0885173accbd3296aa5591a3e0c18084e7a diff --git a/libraries/pretty b/libraries/pretty index c3a1469..445e92d 160000 --- a/libraries/pretty +++ b/libraries/pretty @@ -1 +1 @@ -Subproject commit c3a1469306b35fa5d023dc570554f97f1a90435d +Subproject commit 445e92dd7508978caba5563c1e79b2758dff4767 diff --git a/libraries/process b/libraries/process index 36a3ad5..2364a36 160000 --- a/libraries/process +++ b/libraries/process @@ -1 +1 @@ -Subproject commit 36a3ad577e31e8c3336c7464b252fc2c9b01a20c +Subproject commit 2364a36549d461adc4886ef33f259638336a87d2 diff --git a/libraries/stm b/libraries/stm index 5f4d7c6..8194700 160000 --- a/libraries/stm +++ b/libraries/stm @@ -1 +1 @@ -Subproject commit 5f4d7c6d07a760d935c9d96e62999f1ad38a5e43 +Subproject commit 819470093eccb81d058408076df8903e781f551c diff --git a/libraries/terminfo b/libraries/terminfo index 27e8275..17a0852 160000 --- a/libraries/terminfo +++ b/libraries/terminfo @@ -1 +1 @@ -Subproject commit 27e82750fac178fc6e049fe44be6de45f24814ae +Subproject commit 17a0852ba15b32f5fa9c56daefc075b6826edc7b diff --git a/libraries/text b/libraries/text index 69d625b..2d88a0a 160000 --- a/libraries/text +++ b/libraries/text @@ -1 +1 @@ -Subproject commit 69d625b9caa34fd8b384a4599ee98f5f53f20fbb +Subproject commit 2d88a0a3e8e3bb79260e5c8f61dd6c447f61c5f5 diff --git a/libraries/time b/libraries/time index 9e96c26..1fcaa07 160000 --- a/libraries/time +++ b/libraries/time @@ -1 +1 @@ -Subproject commit 9e96c26132fef01a3113c8b152b1be96c0eccd86 +Subproject commit 1fcaa07e10d7966356373ed0e946eb078fcdd6e6 diff --git a/libraries/transformers b/libraries/transformers index 8055784..36311d3 160000 --- a/libraries/transformers +++ b/libraries/transformers @@ -1 +1 @@ -Subproject commit 80557845cdc0e72bc05cec19cf7a1bf5495e9e69 +Subproject commit 36311d39bc545261dab85d4a27af562db1868ed6 diff --git a/libraries/unix b/libraries/unix index dbada98..41c5776 160000 --- a/libraries/unix +++ b/libraries/unix @@ -1 +1 @@ -Subproject commit dbada9890c1d58111af7d4ebb2a67d38a3a6a872 +Subproject commit 41c5776162b60e0739a7559ceab03b9c3a444516 diff --git a/libraries/xhtml b/libraries/xhtml index 721779a..c5c623e 160000 --- a/libraries/xhtml +++ b/libraries/xhtml @@ -1 +1 @@ -Subproject commit 721779acc35dccd6a43a292b24099b65d93d390c +Subproject commit c5c623e497f13ec187e0d228e0e8a3d9ee39a715 diff --git a/nofib b/nofib index f87d446..ef4f8dc 160000 --- a/nofib +++ b/nofib @@ -1 +1 @@ -Subproject commit f87d446b4e361cc82f219cf78917db9681af69b3 +Subproject commit ef4f8dc8ef51ce3353b76a0761c1a09e5ff30b67 diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index a517698..4bfb162 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -178,11 +178,9 @@ ifeq "$(LLC)" "" RUNTEST_OPTS += -e ghc_with_llvm=False else ifeq "$(TargetARCH_CPP)" "powerpc" RUNTEST_OPTS += -e ghc_with_llvm=False -else ifneq "$(LLC)" "llc" +else # If we have a real detected value for LLVM, then it really ought to work RUNTEST_OPTS += -e ghc_with_llvm=True -else -RUNTEST_OPTS += -e ghc_with_llvm=False endif ifeq "$(WINDOWS)" "YES" diff --git a/utils/haddock b/utils/haddock index 21e4f3f..2484138 160000 --- a/utils/haddock +++ b/utils/haddock @@ -1 +1 @@ -Subproject commit 21e4f3fa6f73a9b25f3deed80da0e56024238ea5 +Subproject commit 24841386cff6fdccc11accf9daa815c2c7444d65 diff --git a/utils/hsc2hs b/utils/hsc2hs index a816333..738f366 160000 --- a/utils/hsc2hs +++ b/utils/hsc2hs @@ -1 +1 @@ -Subproject commit a816333ae67c54b98cce4ed22621242714967b3e +Subproject commit 738f3666c878ee9e79c3d5e819ef8b3460288edf From git at git.haskell.org Mon Jan 21 01:36:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:36:24 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D4759' created Message-ID: <20190121013624.D026E3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D4759 Referencing: b86afeb8d30a9dac8919619486c940345d89941c From git at git.haskell.org Mon Jan 21 01:36:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:36:27 +0000 (UTC) Subject: [commit: ghc] wip/D4759: rts: Make LOOKS_LIKE_INFO_PTR a bit more strict (b86afeb) Message-ID: <20190121013627.CDE453ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4759 Link : http://ghc.haskell.org/trac/ghc/changeset/b86afeb8d30a9dac8919619486c940345d89941c/ghc >--------------------------------------------------------------- commit b86afeb8d30a9dac8919619486c940345d89941c 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 >--------------------------------------------------------------- b86afeb8d30a9dac8919619486c940345d89941c includes/Cmm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Cmm.h b/includes/Cmm.h index 7334eab..21093eb 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 Mon Jan 21 01:52:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:52:03 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5056' created Message-ID: <20190121015203.BE3C13ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5056 Referencing: 913d0c8b4d61395678c0b9353f85b516f52f1cae From git at git.haskell.org Mon Jan 21 01:52:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:52:06 +0000 (UTC) Subject: [commit: ghc] wip/D5056: testsuite: Ensure that config.{msys, cygwin} are initialized (926ee8f) Message-ID: <20190121015206.BF9E93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5056 Link : http://ghc.haskell.org/trac/ghc/changeset/926ee8f3d0ca430b53345bb6dcc0c4b06c3f5eab/ghc >--------------------------------------------------------------- commit 926ee8f3d0ca430b53345bb6dcc0c4b06c3f5eab 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 >--------------------------------------------------------------- 926ee8f3d0ca430b53345bb6dcc0c4b06c3f5eab 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 Mon Jan 21 01:52:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:52:10 +0000 (UTC) Subject: [commit: ghc] wip/D5056: Add a -fprint-axiom-incomps option (#15546) (913d0c8) Message-ID: <20190121015210.E42DD3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5056 Link : http://ghc.haskell.org/trac/ghc/changeset/913d0c8b4d61395678c0b9353f85b516f52f1cae/ghc >--------------------------------------------------------------- commit 913d0c8b4d61395678c0b9353f85b516f52f1cae Author: mniip Date: Sun Jan 20 20:48:13 2019 -0500 Add a -fprint-axiom-incomps option (#15546) Supply branch incomps when building an IfaceClosedSynFamilyTyCon `pprTyThing` now has access to incomps. This also causes them to be written out to .hi files, but that doesn't pose an issue other than a more faithful bijection between `tyThingToIfaceDecl` and `tcIfaceDecl`. The machinery for displaying axiom incomps was already present but not in use. Since this is now a thing that pops up in ghci's :info the format was modified to look like a haskell comment. Documentation and a test for the new feature included. Test Plan: T15546 Reviewers: simonpj, bgamari, goldfire Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15546 Differential Revision: https://phabricator.haskell.org/D5097 >--------------------------------------------------------------- 913d0c8b4d61395678c0b9353f85b516f52f1cae compiler/iface/IfaceSyn.hs | 34 ++++++++++++++++++++--- compiler/iface/MkIface.hs | 43 +++++++++++++++--------------- compiler/main/DynFlags.hs | 2 ++ docs/users_guide/glasgow_exts.rst | 3 +++ docs/users_guide/using.rst | 31 +++++++++++++++++++++ libraries/Cabal | 2 +- libraries/binary | 2 +- libraries/bytestring | 2 +- libraries/containers | 2 +- libraries/deepseq | 2 +- libraries/directory | 2 +- libraries/hpc | 2 +- libraries/stm | 2 +- libraries/text | 2 +- libraries/time | 2 +- libraries/unix | 2 +- nofib | 2 +- testsuite/tests/ghci/scripts/T15546.script | 5 ++++ testsuite/tests/ghci/scripts/T15546.stdout | 11 ++++++++ testsuite/tests/ghci/scripts/all.T | 1 + utils/haddock | 2 +- utils/hsc2hs | 2 +- 22 files changed, 119 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 913d0c8b4d61395678c0b9353f85b516f52f1cae From git at git.haskell.org Mon Jan 21 01:53:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:53:44 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D5097' created Message-ID: <20190121015344.8E0633ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D5097 Referencing: 257f9155e6be58b5a7f7660dc625cdfa57749e6d From git at git.haskell.org Mon Jan 21 01:53:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:53:48 +0000 (UTC) Subject: [commit: ghc] wip/D5097: Add a -fprint-axiom-incomps option (#15546) (257f915) Message-ID: <20190121015348.B15183ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D5097 Link : http://ghc.haskell.org/trac/ghc/changeset/257f9155e6be58b5a7f7660dc625cdfa57749e6d/ghc >--------------------------------------------------------------- commit 257f9155e6be58b5a7f7660dc625cdfa57749e6d Author: mniip Date: Sun Jan 20 20:48:13 2019 -0500 Add a -fprint-axiom-incomps option (#15546) Supply branch incomps when building an IfaceClosedSynFamilyTyCon `pprTyThing` now has access to incomps. This also causes them to be written out to .hi files, but that doesn't pose an issue other than a more faithful bijection between `tyThingToIfaceDecl` and `tcIfaceDecl`. The machinery for displaying axiom incomps was already present but not in use. Since this is now a thing that pops up in ghci's :info the format was modified to look like a haskell comment. Documentation and a test for the new feature included. Test Plan: T15546 Reviewers: simonpj, bgamari, goldfire Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15546 Differential Revision: https://phabricator.haskell.org/D5097 >--------------------------------------------------------------- 257f9155e6be58b5a7f7660dc625cdfa57749e6d compiler/iface/IfaceSyn.hs | 34 ++++++++++++++++++++--- compiler/iface/MkIface.hs | 43 +++++++++++++++--------------- compiler/main/DynFlags.hs | 2 ++ docs/users_guide/glasgow_exts.rst | 3 +++ docs/users_guide/using.rst | 31 +++++++++++++++++++++ libraries/Cabal | 2 +- libraries/binary | 2 +- libraries/bytestring | 2 +- libraries/containers | 2 +- libraries/deepseq | 2 +- libraries/directory | 2 +- libraries/hpc | 2 +- libraries/stm | 2 +- libraries/text | 2 +- libraries/time | 2 +- libraries/unix | 2 +- nofib | 2 +- testsuite/tests/ghci/scripts/T15546.script | 5 ++++ testsuite/tests/ghci/scripts/T15546.stdout | 11 ++++++++ testsuite/tests/ghci/scripts/all.T | 1 + utils/haddock | 2 +- utils/hsc2hs | 2 +- 22 files changed, 119 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 257f9155e6be58b5a7f7660dc625cdfa57749e6d From git at git.haskell.org Mon Jan 21 01:57:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:57:39 +0000 (UTC) Subject: [commit: ghc] branch 'wip/kill-obj-splitter' created Message-ID: <20190121015739.338703ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/kill-obj-splitter Referencing: 730ac880c5dc23e0f32a2f08d89d4e5d2a583512 From git at git.haskell.org Mon Jan 21 01:57:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:57:42 +0000 (UTC) Subject: [commit: ghc] wip/kill-obj-splitter: Rip out object splitting (730ac88) Message-ID: <20190121015742.4BCC93ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/kill-obj-splitter Link : http://ghc.haskell.org/trac/ghc/changeset/730ac880c5dc23e0f32a2f08d89d4e5d2a583512/ghc >--------------------------------------------------------------- commit 730ac880c5dc23e0f32a2f08d89d4e5d2a583512 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 >--------------------------------------------------------------- 730ac880c5dc23e0f32a2f08d89d4e5d2a583512 .gitignore | 1 - aclocal.m4 | 20 --- compiler/cmm/CLabel.hs | 4 +- compiler/codeGen/StgCmm.hs | 35 +--- compiler/codeGen/StgCmmExpr.hs | 11 +- compiler/codeGen/StgCmmMonad.hs | 10 -- compiler/ghc.mk | 7 - compiler/main/DriverPhases.hs | 9 -- compiler/main/DriverPipeline.hs | 164 ++----------------- compiler/main/DynFlags.hs | 22 +-- 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/cfg/system.config.in | 1 - hadrian/src/Rules/Generate.hs | 3 - hadrian/src/Rules/Library.hs | 9 +- 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 - 59 files changed, 70 insertions(+), 887 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 730ac880c5dc23e0f32a2f08d89d4e5d2a583512 From git at git.haskell.org Mon Jan 21 01:59:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:59:51 +0000 (UTC) Subject: [commit: ghc] branch 'wip/D4533' created Message-ID: <20190121015951.63E733ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/D4533 Referencing: bc26799166d65ead7bbd7303454314c07e750b22 From git at git.haskell.org Mon Jan 21 01:59:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 01:59:54 +0000 (UTC) Subject: [commit: ghc] wip/D4533: Don't overwrite the set log_action when using --interactive (bc26799) Message-ID: <20190121015954.6C8263ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/D4533 Link : http://ghc.haskell.org/trac/ghc/changeset/bc26799166d65ead7bbd7303454314c07e750b22/ghc >--------------------------------------------------------------- commit bc26799166d65ead7bbd7303454314c07e750b22 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 >--------------------------------------------------------------- bc26799166d65ead7bbd7303454314c07e750b22 ghc/GHCi/UI.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 10ca511..8d20134 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -445,7 +445,8 @@ interactiveUI config srcs maybe_exprs = do lastErrLocationsRef <- liftIO $ newIORef [] progDynFlags <- GHC.getProgramDynFlags _ <- GHC.setProgramDynFlags $ - progDynFlags { log_action = ghciLogAction lastErrLocationsRef } + progDynFlags { log_action = ghciLogAction (log_action progDynFlags) + lastErrLocationsRef } when (isNothing maybe_exprs) $ do -- Only for GHCi (not runghc and ghc -e): @@ -536,9 +537,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 From git at git.haskell.org Mon Jan 21 03:55:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:55:48 +0000 (UTC) Subject: [commit: ghc] branch 'wip/makefile-test' created Message-ID: <20190121035548.6ECD63ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/makefile-test Referencing: 6ef670b99f96b2eadabaca39f595b2e88b1eb58e From git at git.haskell.org Mon Jan 21 03:55:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:55:52 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: testsuite: Add test for #16104 (0a005b6) Message-ID: <20190121035552.8EC633ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/0a005b63ba2216f8d910675d64f68917ef261d56/ghc >--------------------------------------------------------------- commit 0a005b63ba2216f8d910675d64f68917ef261d56 Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- 0a005b63ba2216f8d910675d64f68917ef261d56 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 Mon Jan 21 03:55:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:55:55 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: GhcPlugins: Fix lookup of TH names (a6d614e) Message-ID: <20190121035555.88A883ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/a6d614ea496fdc7d845d24ce7609c255b993f361/ghc >--------------------------------------------------------------- commit a6d614ea496fdc7d845d24ce7609c255b993f361 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. >--------------------------------------------------------------- a6d614ea496fdc7d845d24ce7609c255b993f361 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 Mon Jan 21 03:55:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:55:58 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: testsuite: Normalise style (97ca0fb) Message-ID: <20190121035558.8231B3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/97ca0fb19b8df767960d17e556333de9235ffd8e/ghc >--------------------------------------------------------------- commit 97ca0fb19b8df767960d17e556333de9235ffd8e Author: Ben Gamari Date: Sun Jan 20 22:32:09 2019 -0500 testsuite: Normalise style >--------------------------------------------------------------- 97ca0fb19b8df767960d17e556333de9235ffd8e 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 Mon Jan 21 03:56:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:56:01 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: testsuite: Remove directories that already exist when seeding extra_files (7844332) Message-ID: <20190121035601.8350E3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/7844332710c961e8df88693b854a2de4875988b3/ghc >--------------------------------------------------------------- commit 7844332710c961e8df88693b854a2de4875988b3 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. >--------------------------------------------------------------- 7844332710c961e8df88693b854a2de4875988b3 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 Mon Jan 21 03:56:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 03:56:04 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: testsuite: Introduce makefile_test (6ef670b) Message-ID: <20190121035604.893353ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/6ef670b99f96b2eadabaca39f595b2e88b1eb58e/ghc >--------------------------------------------------------------- commit 6ef670b99f96b2eadabaca39f595b2e88b1eb58e Author: Ben Gamari Date: Sun Jan 20 22:54:48 2019 -0500 testsuite: Introduce makefile_test >--------------------------------------------------------------- 6ef670b99f96b2eadabaca39f595b2e88b1eb58e testsuite/driver/testlib.py | 7 +++++++ testsuite/tests/plugins/all.T | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index d1ab41d..b09e452 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1001,6 +1001,13 @@ def badResult(result): def run_command( name, way, cmd ): return simple_run( name, '', override_options(cmd), '' ) +def makefile_test( name, way, target=None ): + if target is None: + target = name + + cmd = '$MAKE -s --no-print-directory {target}'.format(target=target) + return run_command(name, way, cmd) + # ----------------------------------------------------------------------------- # GHCi tests diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 30b8fd6..7a5be65 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -214,4 +214,4 @@ 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']) + makefile_test, []) From git at git.haskell.org Mon Jan 21 04:53:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 04:53:00 +0000 (UTC) Subject: [commit: ghc] wip/makefile-test: testsuite: Use makefile_test (7bb3130) Message-ID: <20190121045300.1D5613ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/makefile-test Link : http://ghc.haskell.org/trac/ghc/changeset/7bb3130595bc9b0f7775a3a6d7e2c51fbe3dda22/ghc >--------------------------------------------------------------- commit 7bb3130595bc9b0f7775a3a6d7e2c51fbe3dda22 Author: Ben Gamari Date: Sun Jan 20 23:46:13 2019 -0500 testsuite: Use makefile_test This eliminates most uses of run_command in the testsuite in favor of the more structured makefile_test. >--------------------------------------------------------------- 7bb3130595bc9b0f7775a3a6d7e2c51fbe3dda22 libraries/base/tests/IO/T12010/test.T | 3 +- libraries/base/tests/IO/all.T | 9 +- .../tests/annotations/should_compile/th/all.T | 4 +- testsuite/tests/cabal/T12485/all.T | 2 +- testsuite/tests/cabal/all.T | 33 ++-- testsuite/tests/cmm/opt/all.T | 2 +- testsuite/tests/codeGen/should_compile/all.T | 10 +- testsuite/tests/codeGen/should_run/T15038/all.T | 3 +- testsuite/tests/deSugar/should_compile/all.T | 7 +- testsuite/tests/dependent/should_compile/all.T | 3 +- testsuite/tests/deriving/should_compile/all.T | 5 +- testsuite/tests/deriving/should_fail/all.T | 5 +- testsuite/tests/determinism/T13807/all.T | 2 +- testsuite/tests/determinism/determ002/all.T | 2 +- testsuite/tests/determinism/determ003/all.T | 2 +- testsuite/tests/determinism/determ005/all.T | 2 +- testsuite/tests/determinism/determ006/all.T | 2 +- testsuite/tests/determinism/determ007/all.T | 2 +- testsuite/tests/determinism/determ008/all.T | 2 +- testsuite/tests/determinism/determ009/all.T | 2 +- testsuite/tests/determinism/determ010/all.T | 2 +- testsuite/tests/determinism/determ011/all.T | 2 +- testsuite/tests/determinism/determ012/all.T | 2 +- testsuite/tests/determinism/determ013/all.T | 2 +- testsuite/tests/determinism/determ014/all.T | 2 +- testsuite/tests/determinism/determ015/all.T | 2 +- testsuite/tests/determinism/determ016/all.T | 2 +- testsuite/tests/determinism/determ017/all.T | 2 +- testsuite/tests/determinism/determ018/all.T | 2 +- testsuite/tests/determinism/determ019/all.T | 2 +- testsuite/tests/determinism/determ021/all.T | 3 +- testsuite/tests/determinism/determ022/all.T | 2 +- testsuite/tests/driver/T13392/all.T | 2 +- testsuite/tests/driver/T13710/all.T | 3 +- testsuite/tests/driver/T1372/all.T | 2 +- testsuite/tests/driver/T13803/all.T | 3 +- testsuite/tests/driver/T13914/all.T | 3 +- testsuite/tests/driver/T14075/all.T | 3 +- testsuite/tests/driver/T15970/all.T | 2 +- testsuite/tests/driver/T1959/test.T | 2 +- testsuite/tests/driver/T3007/all.T | 3 +- testsuite/tests/driver/T437/all.T | 2 +- testsuite/tests/driver/T5147/all.T | 2 +- testsuite/tests/driver/T7373/all.T | 4 +- testsuite/tests/driver/T7835/all.T | 2 +- testsuite/tests/driver/T8184/all.T | 3 +- testsuite/tests/driver/T9562/all.T | 4 +- testsuite/tests/driver/all.T | 189 ++++++++++----------- testsuite/tests/driver/bug1677/all.T | 2 +- testsuite/tests/driver/conflicting_flags/test.T | 3 +- testsuite/tests/driver/dynamicToo/all.T | 4 +- .../tests/driver/dynamicToo/dynamicToo001/test.T | 2 +- .../tests/driver/dynamicToo/dynamicToo002/test.T | 4 +- .../tests/driver/dynamicToo/dynamicToo004/test.T | 3 +- .../tests/driver/dynamicToo/dynamicToo005/test.T | 4 +- testsuite/tests/driver/dynamic_flags_001/all.T | 4 +- testsuite/tests/driver/linkwhole/all.T | 2 +- testsuite/tests/driver/recomp001/all.T | 4 +- testsuite/tests/driver/recomp002/all.T | 4 +- testsuite/tests/driver/recomp003/all.T | 3 +- testsuite/tests/driver/recomp004/all.T | 3 +- testsuite/tests/driver/recomp005/all.T | 7 +- testsuite/tests/driver/recomp006/all.T | 4 +- testsuite/tests/driver/recomp007/all.T | 4 +- testsuite/tests/driver/recomp008/all.T | 7 +- testsuite/tests/driver/recomp009/all.T | 2 +- testsuite/tests/driver/recomp010/all.T | 2 +- testsuite/tests/driver/recomp011/all.T | 2 +- testsuite/tests/driver/recomp012/all.T | 2 +- testsuite/tests/driver/recomp013/all.T | 2 +- testsuite/tests/driver/recomp015/all.T | 3 +- testsuite/tests/driver/recomp016/all.T | 4 +- testsuite/tests/driver/recomp017/all.T | 2 +- testsuite/tests/driver/recomp018/all.T | 2 +- testsuite/tests/driver/retc001/all.T | 3 +- testsuite/tests/driver/retc002/all.T | 4 +- testsuite/tests/driver/retc003/all.T | 2 +- testsuite/tests/dynlibs/all.T | 12 +- testsuite/tests/ffi/should_run/all.T | 8 +- testsuite/tests/gadt/all.T | 6 +- testsuite/tests/generics/all.T | 3 +- testsuite/tests/ghc-api/T10052/all.T | 2 +- testsuite/tests/ghc-api/T4891/all.T | 2 +- testsuite/tests/ghc-api/T7478/all.T | 4 +- testsuite/tests/ghc-api/all.T | 10 +- testsuite/tests/ghc-api/annotations-literals/all.T | 4 +- testsuite/tests/ghc-api/annotations/all.T | 62 +++---- testsuite/tests/ghc-api/apirecomp001/all.T | 3 +- testsuite/tests/ghc-api/show-srcspan/all.T | 2 +- testsuite/tests/ghc-e/should_fail/all.T | 21 +-- testsuite/tests/ghc-e/should_run/all.T | 29 ++-- testsuite/tests/ghci/linking/all.T | 23 +-- testsuite/tests/ghci/linking/dyn/all.T | 20 +-- testsuite/tests/ghci/prog004/prog004.T | 3 +- testsuite/tests/ghci/scripts/all.T | 16 +- testsuite/tests/ghci/should_run/all.T | 3 +- testsuite/tests/hp2ps/all.T | 2 +- testsuite/tests/hpc/all.T | 2 +- testsuite/tests/hsc2hs/all.T | 19 +-- .../indexed-types/should_compile/T13092b/all.T | 3 +- testsuite/tests/indexed-types/should_compile/all.T | 28 +-- .../tests/indexed-types/should_fail/T13092/all.T | 2 +- .../tests/indexed-types/should_fail/T13092c/all.T | 2 +- .../tests/indexed-types/should_fail/T13102/all.T | 2 +- testsuite/tests/indexed-types/should_fail/all.T | 9 +- testsuite/tests/layout/all.T | 19 +-- testsuite/tests/lib/integer/all.T | 9 +- .../llvm/should_run/subsections_via_symbols/all.T | 3 +- testsuite/tests/module/all.T | 18 +- testsuite/tests/module/base01/all.T | 4 +- testsuite/tests/module/mod175/all.T | 2 +- testsuite/tests/numeric/should_compile/all.T | 6 +- testsuite/tests/numeric/should_run/all.T | 2 +- testsuite/tests/parser/should_compile/T7476/all.T | 2 +- testsuite/tests/patsyn/should_compile/T13350/all.T | 3 +- testsuite/tests/perf/compiler/all.T | 5 +- testsuite/tests/perf/should_run/all.T | 7 +- testsuite/tests/plugins/all.T | 42 ++--- testsuite/tests/polykinds/all.T | 14 +- testsuite/tests/printer/all.T | 112 ++++++------ testsuite/tests/profiling/should_compile/all.T | 2 +- testsuite/tests/profiling/should_run/all.T | 8 +- testsuite/tests/quasiquotation/all.T | 6 +- testsuite/tests/rename/prog006/all.T | 3 +- testsuite/tests/rename/should_compile/all.T | 19 +-- testsuite/tests/rename/should_fail/all.T | 3 +- testsuite/tests/roles/should_fail/all.T | 4 +- testsuite/tests/rts/T10672/all.T | 4 +- testsuite/tests/rts/T11223/all.T | 45 ++--- testsuite/tests/rts/T12031/all.T | 2 +- testsuite/tests/rts/T12771/all.T | 2 +- testsuite/tests/rts/T13082/all.T | 4 +- testsuite/tests/rts/T14611/all.T | 2 +- testsuite/tests/rts/T15261/all.T | 4 +- testsuite/tests/rts/T15894/all.T | 2 +- testsuite/tests/rts/T8308/all.T | 3 +- testsuite/tests/rts/all.T | 61 +++---- testsuite/tests/runghc/all.T | 12 +- testsuite/tests/safeHaskell/safeLanguage/all.T | 4 +- testsuite/tests/showIface/all.T | 8 +- .../tests/simplCore/should_compile/T16038/test.T | 3 +- testsuite/tests/simplCore/should_compile/all.T | 122 +++++-------- testsuite/tests/stranal/should_compile/all.T | 5 +- testsuite/tests/stranal/should_run/all.T | 2 +- testsuite/tests/th/T2014/all.T | 4 +- testsuite/tests/th/TH_linker/all.T | 3 +- testsuite/tests/th/all.T | 20 +-- testsuite/tests/typecheck/T13168/all.T | 3 +- testsuite/tests/typecheck/bug1465/all.T | 2 +- testsuite/tests/typecheck/should_compile/all.T | 29 ++-- testsuite/tests/typecheck/should_fail/all.T | 2 +- testsuite/tests/unboxedsums/all.T | 3 +- testsuite/tests/utils/should_run/all.T | 2 +- 153 files changed, 612 insertions(+), 786 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 7bb3130595bc9b0f7775a3a6d7e2c51fbe3dda22 From git at git.haskell.org Mon Jan 21 12:06:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 12:06:38 +0000 (UTC) Subject: [commit: ghc] master: Add support for ASM foreign files (.s) in TH (#16180) (f035504) Message-ID: <20190121120638.0909A3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f035504b573b9684d53a6d035f8726672c1b0190/ghc >--------------------------------------------------------------- commit f035504b573b9684d53a6d035f8726672c1b0190 Author: Sylvain Henry Date: Tue Jan 15 13:14:45 2019 +0100 Add support for ASM foreign files (.s) in TH (#16180) >--------------------------------------------------------------- f035504b573b9684d53a6d035f8726672c1b0190 compiler/main/DriverPipeline.hs | 9 ++++---- libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs | 8 ++++++- .../template-haskell/Language/Haskell/TH/Syntax.hs | 9 ++++---- testsuite/tests/th/T16180.hs | 25 ++++++++++++++++++++++ .../objc/objcpp-hi.stdout => th/T16180.stdout} | 1 + testsuite/tests/th/all.T | 1 + 6 files changed, 44 insertions(+), 9 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f1a5cb4..5fe2362 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -306,11 +306,12 @@ compileForeign :: HscEnv -> ForeignSrcLang -> FilePath -> IO FilePath compileForeign _ RawObject object_file = return object_file compileForeign hsc_env lang stub_c = do let phase = case lang of - LangC -> Cc - LangCxx -> Ccxx - LangObjc -> Cobjc + LangC -> Cc + LangCxx -> Ccxx + LangObjc -> Cobjc LangObjcxx -> Cobjcxx - RawObject -> panic "compileForeign: should be unreachable" + LangAsm -> As True -- allow CPP + RawObject -> panic "compileForeign: should be unreachable" (_, stub_o) <- runPipeline StopLn hsc_env (stub_c, Just (RealPhase phase)) Nothing (Temporary TFL_GhcSession) diff --git a/libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs b/libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs index 3106141..c40f6f9 100644 --- a/libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs +++ b/libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs @@ -6,6 +6,12 @@ module GHC.ForeignSrcLang.Type import Prelude -- See note [Why do we import Prelude here?] import GHC.Generics (Generic) +-- | Foreign formats supported by GHC via TH data ForeignSrcLang - = LangC | LangCxx | LangObjc | LangObjcxx | RawObject + = LangC -- ^ C + | LangCxx -- ^ C++ + | LangObjc -- ^ Objective C + | LangObjcxx -- ^ Objective C++ + | LangAsm -- ^ Assembly language (.s) + | RawObject -- ^ Object (.o) deriving (Eq, Show, Generic) diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs index 705222a..3ff6393 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs @@ -503,11 +503,12 @@ addForeignFile = addForeignSource addForeignSource :: ForeignSrcLang -> String -> Q () addForeignSource lang src = do let suffix = case lang of - LangC -> "c" - LangCxx -> "cpp" - LangObjc -> "m" + LangC -> "c" + LangCxx -> "cpp" + LangObjc -> "m" LangObjcxx -> "mm" - RawObject -> "a" + LangAsm -> "s" + RawObject -> "a" path <- addTempFile suffix runIO $ writeFile path src addForeignFilePath lang path diff --git a/testsuite/tests/th/T16180.hs b/testsuite/tests/th/T16180.hs new file mode 100644 index 0000000..2a4b80c --- /dev/null +++ b/testsuite/tests/th/T16180.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE TemplateHaskell #-} + +module Main where + +import Language.Haskell.TH.Syntax +import Foreign.C.String + +$(do + -- some architectures require a "_" symbol prefix... + -- GHC defines a LEADING_UNDERSCORE CPP constant to indicate this. + addForeignSource LangAsm + "#if defined(LEADING_UNDERSCORE)\n\ + \.global \"_mydata\"\n\ + \_mydata:\n\ + \#else\n\ + \.global \"mydata\"\n\ + \mydata:\n\ + \#endif\n\ + \.ascii \"Hello world\\0\"\n" + return []) + +foreign import ccall "&mydata" mystring :: CString + +main :: IO () +main = putStrLn =<< peekCString mystring diff --git a/testsuite/tests/driver/objc/objcpp-hi.stdout b/testsuite/tests/th/T16180.stdout similarity index 92% copy from testsuite/tests/driver/objc/objcpp-hi.stdout copy to testsuite/tests/th/T16180.stdout index 802992c..a378710 100644 --- a/testsuite/tests/driver/objc/objcpp-hi.stdout +++ b/testsuite/tests/th/T16180.stdout @@ -1 +1,2 @@ Hello world + diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 6783bb6..9ddf283 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -467,3 +467,4 @@ test('T15437', expect_broken(15437), multimod_compile, test('T15985', normal, compile, ['']) test('T16133', normal, compile_fail, ['']) test('T15471', normal, multimod_compile, ['T15471.hs', '-v0']) +test('T16180', normal, compile_and_run, ['']) From git at git.haskell.org Mon Jan 21 15:56:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 15:56:57 +0000 (UTC) Subject: [commit: ghc] branch 'wip/cleanup-darwin' created Message-ID: <20190121155657.61AC23ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/cleanup-darwin Referencing: 26f9681dba0de127d0da8318af6486ed1c78e6d3 From git at git.haskell.org Mon Jan 21 15:57:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 15:57:00 +0000 (UTC) Subject: [commit: ghc] wip/cleanup-darwin: gitlab-ci: Use build cleanup logic on Darwin as well (26f9681) Message-ID: <20190121155700.5FECD3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/cleanup-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/26f9681dba0de127d0da8318af6486ed1c78e6d3/ghc >--------------------------------------------------------------- commit 26f9681dba0de127d0da8318af6486ed1c78e6d3 Author: Ben Gamari Date: Mon Jan 21 10:55:48 2019 -0500 gitlab-ci: Use build cleanup logic on Darwin as well We use the shell executor on Darwin as well as Windows. See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856. >--------------------------------------------------------------- 26f9681dba0de127d0da8318af6486ed1c78e6d3 .gitlab-ci.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..28c5a7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -369,8 +369,8 @@ validate-x86_64-windows: tags: - x86_64-windows -# Note [Cleanup on Windows] -# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# Note [Cleaning up after shell executor] +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # As noted in [1], gitlab-runner's shell executor doesn't clean up its working # directory after builds. Unfortunately, we are forced to use the shell executor @@ -380,7 +380,7 @@ validate-x86_64-windows: # # [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856 -# See Note [Cleanup on Windows] +# See Note [Cleanup after shell executor] cleanup-windows: stage: cleanup tags: @@ -398,6 +398,23 @@ cleanup-windows: - rmdir /S /Q %BUILD_DIR%/* - exit /b 0 +# See Note [Cleanup after shell executor] +cleanup-darwin: + stage: cleanup + tags: + - x86_64-darwin + when: always + before_script: + - echo "Time to clean up" + script: + - echo "Let's go" + after_script: + - BUILD_DIR=$CI_PROJECT_DIR + - echo "Cleaning $BUILD_DIR" + - cd $HOME + - rm -Rf $BUILD_DIR + - exit 0 + ############################################################ # Validation via CircleCI ############################################################ From git at git.haskell.org Mon Jan 21 17:22:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 17:22:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/tc-rn-types-typo' created Message-ID: <20190121172232.97EA83ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/tc-rn-types-typo Referencing: 38d837a46ea8f34da6eed4e83e72ad699317a74b From git at git.haskell.org Mon Jan 21 17:22:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 17:22:35 +0000 (UTC) Subject: [commit: ghc] wip/tc-rn-types-typo: Fix typo in TcRnTypes.hs [skip ci] (38d837a) Message-ID: <20190121172235.EA6CB3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/tc-rn-types-typo Link : http://ghc.haskell.org/trac/ghc/changeset/38d837a46ea8f34da6eed4e83e72ad699317a74b/ghc >--------------------------------------------------------------- commit 38d837a46ea8f34da6eed4e83e72ad699317a74b Author: Matthew Pickering Date: Mon Jan 21 12:17:20 2019 -0500 Fix typo in TcRnTypes.hs [skip ci] >--------------------------------------------------------------- 38d837a46ea8f34da6eed4e83e72ad699317a74b compiler/typecheck/TcRnTypes.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index b9e5b6c..7c9d70e 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -1020,8 +1020,8 @@ splice. In particular it is not set when the splice is renamed or typechecked. 'RunSplice' is needed to provide a reference where 'addModFinalizer' can insert the finalizer (see Note [Delaying modFinalizers in untyped splices]), and 'addModFinalizer' runs when doing Q things. Therefore, It doesn't make sense to -set 'RunSplice' when renaming or typechecking the splice, where 'Splice', 'Brak' -or 'Comp' are used instead. +set 'RunSplice' when renaming or typechecking the splice, where 'Splice', +'Brack' or 'Comp' are used instead. -} From git at git.haskell.org Mon Jan 21 17:32:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 17:32:18 +0000 (UTC) Subject: [commit: ghc] master's head updated: Fix typo in TcRnTypes.hs [skip ci] (38d837a) Message-ID: <20190121173218.50A6F3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'master' now includes: 38d837a Fix typo in TcRnTypes.hs [skip ci] From git at git.haskell.org Mon Jan 21 19:35:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 19:35:11 +0000 (UTC) Subject: [commit: ghc] branch 'wip/hadrian-disable-lib-prof' created Message-ID: <20190121193511.42D043ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/hadrian-disable-lib-prof Referencing: 33b2e92a074a4a9f857de27365fee846c0faf94b From git at git.haskell.org Mon Jan 21 19:35:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 19:35:14 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-disable-lib-prof: Avoid compiling Hadrian dependencies with profiling on Cabal/Linux (33b2e92) Message-ID: <20190121193514.4D0333ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-disable-lib-prof Link : http://ghc.haskell.org/trac/ghc/changeset/33b2e92a074a4a9f857de27365fee846c0faf94b/ghc >--------------------------------------------------------------- commit 33b2e92a074a4a9f857de27365fee846c0faf94b Author: Neil Mitchell Date: Wed Jan 16 11:21:00 2019 -0500 Avoid compiling Hadrian dependencies with profiling on Cabal/Linux >--------------------------------------------------------------- 33b2e92a074a4a9f857de27365fee846c0faf94b 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 8c7b594..2d3138b 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" +CABFLAGS="--disable-documentation --disable-profiling --disable-library-profiling" # 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 Mon Jan 21 19:35:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 19:35:17 +0000 (UTC) Subject: [commit: ghc] wip/hadrian-disable-lib-prof: Avoid compiling Hadrian dependencies with profiling on Cabal/Windows (cdf6d7d) Message-ID: <20190121193517.3CDE13ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/hadrian-disable-lib-prof Link : http://ghc.haskell.org/trac/ghc/changeset/cdf6d7dfe08e4234154252c6e9665507ed7e519f/ghc >--------------------------------------------------------------- commit cdf6d7dfe08e4234154252c6e9665507ed7e519f Author: Neil Mitchell Date: Wed Jan 16 11:20:27 2019 -0500 Avoid compiling Hadrian dependencies with profiling on Cabal/Windows >--------------------------------------------------------------- cdf6d7dfe08e4234154252c6e9665507ed7e519f hadrian/build.cabal.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/build.cabal.bat b/hadrian/build.cabal.bat index 96f2725..9daacbc 100644 --- a/hadrian/build.cabal.bat +++ b/hadrian/build.cabal.bat @@ -1,6 +1,6 @@ @echo off set CABAL=cabal -set CABFLAGS=--disable-documentation --disable-profiling +set CABFLAGS=--disable-documentation --disable-profiling --disable-library-profiling rem It is currently more robust to pass Cabal an absolute path to the project file. set PROJ="%CD%/hadrian/cabal.project" From git at git.haskell.org Mon Jan 21 19:45:47 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 19:45:47 +0000 (UTC) Subject: [commit: ghc] branch 'wip/add-codeowners' created Message-ID: <20190121194547.8D7873ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/add-codeowners Referencing: 43f5430c06a5bbdeebd5a7a0ee28009b47a5cf53 From git at git.haskell.org Mon Jan 21 19:45:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 19:45:51 +0000 (UTC) Subject: [commit: ghc] wip/add-codeowners: Add CODEOWNERS (43f5430) Message-ID: <20190121194551.08B603ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/add-codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/43f5430c06a5bbdeebd5a7a0ee28009b47a5cf53/ghc >--------------------------------------------------------------- commit 43f5430c06a5bbdeebd5a7a0ee28009b47a5cf53 Author: Ben Gamari Date: Mon Jan 21 14:42:13 2019 -0500 Add CODEOWNERS GitLab uses this file to suggest reviewers based upon the files that a Merge Request touches. [skip-ci] >--------------------------------------------------------------- 43f5430c06a5bbdeebd5a7a0ee28009b47a5cf53 CODEOWNERS | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..c18323b --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,22 @@ +# Confused about what this is? See +# https://gitlab.haskell.org/help/user/project/code_owners + +# Catch-all +* @bgamari + +# Build system +/hadrian @snowleopard @alp @DavidEichmann + +# RTS-like things +/rts @bgamari @simonmar @osa1 @Phyx +/includes @bgamari @simonmar @osa1 + +# The compiler +/compiler/typecheck @simonpj @goldfire +/compiler/rename @simonpj @goldfire +/compiler/rename @simonpj @goldfire +/compiler/typecheck/TcDeriv* @RyanGlScott +/compiler/nativeGen @simonmar @bgamari @AndreasK + +# Core libraries +/libraries/base @hvr From git at git.haskell.org Mon Jan 21 20:56:12 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 20:56:12 +0000 (UTC) Subject: [commit: ghc] branch 'wip/enable-windows-hadrian-ci' created Message-ID: <20190121205612.E3D923ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/enable-windows-hadrian-ci Referencing: 44395fcfa8c634cef193c5da7367a5dba85eab31 From git at git.haskell.org Mon Jan 21 20:56:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 20:56:16 +0000 (UTC) Subject: [commit: ghc] wip/enable-windows-hadrian-ci: gitlab-ci: Reenable Hadrian build on Windows (44395fc) Message-ID: <20190121205616.105313ABC8@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/44395fcfa8c634cef193c5da7367a5dba85eab31/ghc >--------------------------------------------------------------- commit 44395fcfa8c634cef193c5da7367a5dba85eab31 Author: Ben Gamari Date: Mon Jan 21 15:55:05 2019 -0500 gitlab-ci: Reenable Hadrian build on Windows >--------------------------------------------------------------- 44395fcfa8c634cef193c5da7367a5dba85eab31 .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..a5c64a6 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" @@ -341,8 +339,10 @@ validate-x86_64-windows-hadrian: 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' + # 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 Mon Jan 21 23:06:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 23:06:49 +0000 (UTC) Subject: [commit: ghc] master: gitlab: Add merge request template (5ebcfc0) Message-ID: <20190121230649.1BCF73ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5ebcfc0407e6c74abcb259f1482a63c3203ca9e1/ghc >--------------------------------------------------------------- commit 5ebcfc0407e6c74abcb259f1482a63c3203ca9e1 Author: Ben Gamari Date: Sat Jan 19 15:47:33 2019 -0500 gitlab: Add merge request template This begins to define our expectations of contributions. [skip-ci] >--------------------------------------------------------------- 5ebcfc0407e6c74abcb259f1482a63c3203ca9e1 .gitlab/merge_request_templates/merge-request.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitlab/merge_request_templates/merge-request.md b/.gitlab/merge_request_templates/merge-request.md new file mode 100644 index 0000000..7216cb2 --- /dev/null +++ b/.gitlab/merge_request_templates/merge-request.md @@ -0,0 +1,19 @@ +Thank you for your contribution to GHC! + +Please take a few moments to verify that your commits fulfill the following: + + * [ ] are either individually buildable or squashed + * [ ] have commit messages which describe *what they do* + (referring to [Notes][notes] and tickets using `#NNNN` syntax when + appropriate) + * [ ] have added source comments describing your change. For larger changes you + likely should add a [Note][notes] and cross-reference it from the relevant + places. + * [ ] add a [testcase to the + testsuite](https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding). + +If you have any questions don't hesitate to open your merge request and inquire +in a comment. If your patch isn't quite done yet please do add prefix your MR +title with `WIP:`. + +[notes]: https://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Commentsinthesourcecode From git at git.haskell.org Mon Jan 21 23:07:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 21 Jan 2019 23:07:40 +0000 (UTC) Subject: [commit: ghc] master: Add CODEOWNERS (7262a81) Message-ID: <20190121230740.A33BE3ABC8@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/7262a81585a52e019a7d85bc66fc906a629413ec/ghc >--------------------------------------------------------------- commit 7262a81585a52e019a7d85bc66fc906a629413ec Author: Ben Gamari Date: Mon Jan 21 14:42:13 2019 -0500 Add CODEOWNERS GitLab uses this file to suggest reviewers based upon the files that a Merge Request touches. [skip-ci] >--------------------------------------------------------------- 7262a81585a52e019a7d85bc66fc906a629413ec CODEOWNERS | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..6ad914b --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,22 @@ +# Confused about what this is? See +# https://gitlab.haskell.org/help/user/project/code_owners + +# Catch-all +* @bgamari + +# Build system +/hadrian @snowleopard @alp @DavidEichmann + +# RTS-like things +/rts @bgamari @simonmar @osa1 @Phyx +/includes @bgamari @simonmar @osa1 + +# The compiler +/compiler/typecheck @simonpj @goldfire +/compiler/rename @simonpj @goldfire +/compiler/typecheck/TcDeriv* @RyanGlScott +/compiler/nativeGen @simonmar @bgamari @AndreasK + +# Core libraries +/libraries/base @hvr +/libraries/template-haskell @goldfire From git at git.haskell.org Tue Jan 22 06:33:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 06:33:24 +0000 (UTC) Subject: [commit: ghc] master: Extend linker-script workaround to work with musl libc (64ce6af) Message-ID: <20190122063324.5507B3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/64ce6afa21fadd751e1700af145ab77059abadc6/ghc >--------------------------------------------------------------- commit 64ce6afa21fadd751e1700af145ab77059abadc6 Author: Samuel Holland Date: Sun Jan 20 20:20:16 2019 -0600 Extend linker-script workaround to work with musl libc GHC has code to handle unsuffixed .so files that are linker scripts pointing to the real shared library. The detection is done by parsing the result of `dlerror()` after calling `dlopen()` and looking for certain error strings. On musl libc, the error message is "Exec format error", which happens to be `strerror(ENOEXEC)`: ``` $ cat tmp.c #include #include int main(void) { dlopen("libz.so", RTLD_NOW | RTLD_GLOBAL); puts(dlerror()); return 0; } $ gcc -o tmp tmp.c $ ./tmp Error loading shared library libz.so: Exec format error $ ``` This change fixes the workaround to also work on musl libc. Link: https://phabricator.haskell.org/D5474 >--------------------------------------------------------------- 64ce6afa21fadd751e1700af145ab77059abadc6 rts/Linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/Linker.c b/rts/Linker.c index 5b10b79..ac030af 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -483,7 +483,7 @@ initLinker_ (int retain_cafs) # endif /* RTLD_DEFAULT */ compileResult = regcomp(&re_invalid, - "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)", + "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format|Exec format error)", REG_EXTENDED); if (compileResult != 0) { barf("Compiling re_invalid failed"); From git at git.haskell.org Tue Jan 22 10:01:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 10:01:16 +0000 (UTC) Subject: [commit: ghc] branch 'wip/joachim/codeowners' created Message-ID: <20190122100116.4B5393ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/joachim/codeowners Referencing: 4c4bf09aafb3572e39827349b4809933f689cbb9 From git at git.haskell.org Tue Jan 22 10:01:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 10:01:19 +0000 (UTC) Subject: [commit: ghc] wip/joachim/codeowners: Add myself to CODEOWNERS for a few files (4c4bf09) Message-ID: <20190122100119.5A3333ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/joachim/codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/4c4bf09aafb3572e39827349b4809933f689cbb9/ghc >--------------------------------------------------------------- commit 4c4bf09aafb3572e39827349b4809933f689cbb9 Author: Joachim Breitner Date: Tue Jan 22 10:57:52 2019 +0100 Add myself to CODEOWNERS for a few files >--------------------------------------------------------------- 4c4bf09aafb3572e39827349b4809933f689cbb9 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 Tue Jan 22 10:18:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 10:18:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/joachim/proxy-typo' created Message-ID: <20190122101832.B215F3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/joachim/proxy-typo Referencing: 1856c1a24209d8aebf4484abef302410ea6c3877 From git at git.haskell.org Tue Jan 22 10:18:35 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 10:18:35 +0000 (UTC) Subject: [commit: ghc] wip/joachim/proxy-typo: Minor typo in docs for KProxy (1856c1a) Message-ID: <20190122101835.B58AB3ABCD@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/1856c1a24209d8aebf4484abef302410ea6c3877/ghc >--------------------------------------------------------------- commit 1856c1a24209d8aebf4484abef302410ea6c3877 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 :-) >--------------------------------------------------------------- 1856c1a24209d8aebf4484abef302410ea6c3877 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 Tue Jan 22 11:09:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 11:09:30 +0000 (UTC) Subject: [commit: ghc] branch 'wip/typos' created Message-ID: <20190122110930.0BAEC3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/typos Referencing: ec0ff178d230c530bf6521786555183087046420 From git at git.haskell.org Tue Jan 22 11:09:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 11:09:33 +0000 (UTC) Subject: [commit: ghc] wip/typos: A few typofixes (ec0ff17) Message-ID: <20190122110933.1F8AE3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/typos Link : http://ghc.haskell.org/trac/ghc/changeset/ec0ff178d230c530bf6521786555183087046420/ghc >--------------------------------------------------------------- commit ec0ff178d230c530bf6521786555183087046420 Author: Gabor Greif Date: Tue Jan 22 12:07:47 2019 +0100 A few typofixes >--------------------------------------------------------------- ec0ff178d230c530bf6521786555183087046420 compiler/basicTypes/BasicTypes.hs | 2 +- compiler/coreSyn/CoreArity.hs | 2 +- compiler/coreSyn/CoreSyn.hs | 2 +- compiler/coreSyn/CoreUnfold.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/typecheck/FamInst.hs | 2 +- rts/posix/Signals.c | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc ec0ff178d230c530bf6521786555183087046420 From git at git.haskell.org Tue Jan 22 11:18:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 11:18:55 +0000 (UTC) Subject: [commit: ghc] wip/typos: Minor refactor [ci skip] (e4e920f) Message-ID: <20190122111855.ED4E03ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/typos Link : http://ghc.haskell.org/trac/ghc/changeset/e4e920f296ea2e1de851c7c5a7d9a7517d5c66b1/ghc >--------------------------------------------------------------- commit e4e920f296ea2e1de851c7c5a7d9a7517d5c66b1 Author: Gabor Greif Date: Tue Jan 22 12:13:28 2019 +0100 Minor refactor [ci skip] >--------------------------------------------------------------- e4e920f296ea2e1de851c7c5a7d9a7517d5c66b1 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 Tue Jan 22 14:05:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 14:05:09 +0000 (UTC) Subject: [commit: ghc] master: Fix bogus worker for newtypes (a5373c1) Message-ID: <20190122140509.11B073ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/a5373c1fe172dee31e07bcb7c7f6caff1035e6ba/ghc >--------------------------------------------------------------- commit a5373c1fe172dee31e07bcb7c7f6caff1035e6ba Author: Simon Peyton Jones Date: Wed Jan 16 16:34:24 2019 +0000 Fix bogus worker for newtypes The "worker" for a newtype is actually a function with a small (compulsory) unfolding, namely a cast. But the construction of this function was plain wrong for newtype /instances/; it cast the arguemnt to the family type rather than the representation type. This never actually bit us because, in the case of a family instance, we immediately cast the result to the family type. So we get \x. (x |> co1) |> co2 where the compositio of co1 and co2 is ill-kinded. However the optimiser (even the simple optimiser) just collapsed those casts, ignoring the mis-match in the middle, so we never saw the problem. Trac #16191 is indeed a dup of #16141; but the resaon these tickets produce Lint errors is not the unnecessary forcing; it's because of the ill-typed casts. This patch fixes the ill-typed casts, properly. I can't see a way to trigger an actual failure prior to this patch, but it's still wrong wrong wrong to have ill-typed casts, so better to get rid of them. >--------------------------------------------------------------- a5373c1fe172dee31e07bcb7c7f6caff1035e6ba compiler/basicTypes/MkId.hs | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index 17916cf..3e70fdb 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -425,26 +425,26 @@ dictSelRule val_index n_ty_args _ id_unf _ args mkDataConWorkId :: Name -> DataCon -> Id mkDataConWorkId wkr_name data_con | isNewTyCon tycon - = mkGlobalId (DataConWrapId data_con) wkr_name nt_wrap_ty nt_work_info + = mkGlobalId (DataConWrapId data_con) wkr_name wkr_ty nt_work_info | otherwise - = mkGlobalId (DataConWorkId data_con) wkr_name alg_wkr_ty wkr_info + = mkGlobalId (DataConWorkId data_con) wkr_name wkr_ty alg_wkr_info where - tycon = dataConTyCon data_con + tycon = dataConTyCon data_con -- The representation TyCon + wkr_ty = dataConRepType data_con ----------- Workers for data types -------------- - alg_wkr_ty = dataConRepType data_con + alg_wkr_info = noCafIdInfo + `setArityInfo` wkr_arity + `setStrictnessInfo` wkr_sig + `setUnfoldingInfo` evaldUnfolding -- Record that it's evaluated, + -- even if arity = 0 + `setLevityInfoWithType` wkr_ty + -- NB: unboxed tuples have workers, so we can't use + -- setNeverLevPoly + wkr_arity = dataConRepArity data_con - wkr_info = noCafIdInfo - `setArityInfo` wkr_arity - `setStrictnessInfo` wkr_sig - `setUnfoldingInfo` evaldUnfolding -- Record that it's evaluated, - -- even if arity = 0 - `setLevityInfoWithType` alg_wkr_ty - -- NB: unboxed tuples have workers, so we can't use - -- setNeverLevPoly - - wkr_sig = mkClosedStrictSig (replicate wkr_arity topDmd) (dataConCPR data_con) + wkr_sig = mkClosedStrictSig (replicate wkr_arity topDmd) (dataConCPR data_con) -- Note [Data-con worker strictness] -- Notice that we do *not* say the worker Id is strict -- even if the data constructor is declared strict @@ -465,20 +465,21 @@ mkDataConWorkId wkr_name data_con -- not from the worker Id. ----------- Workers for newtypes -------------- - (nt_tvs, _, nt_arg_tys, _) = dataConSig data_con - res_ty_args = mkTyCoVarTys nt_tvs - nt_wrap_ty = dataConUserType data_con + univ_tvs = dataConUnivTyVars data_con + arg_tys = dataConRepArgTys data_con -- Should be same as dataConOrigArgTys nt_work_info = noCafIdInfo -- The NoCaf-ness is set by noCafIdInfo `setArityInfo` 1 -- Arity 1 `setInlinePragInfo` alwaysInlinePragma `setUnfoldingInfo` newtype_unf - `setLevityInfoWithType` nt_wrap_ty - id_arg1 = mkTemplateLocal 1 (head nt_arg_tys) + `setLevityInfoWithType` wkr_ty + id_arg1 = mkTemplateLocal 1 (head arg_tys) + res_ty_args = mkTyCoVarTys univ_tvs newtype_unf = ASSERT2( isVanillaDataCon data_con && - isSingleton nt_arg_tys, ppr data_con ) + isSingleton arg_tys + , ppr data_con ) -- Note [Newtype datacons] mkCompulsoryUnfolding $ - mkLams nt_tvs $ Lam id_arg1 $ + mkLams univ_tvs $ Lam id_arg1 $ wrapNewTypeBody tycon res_ty_args (Var id_arg1) dataConCPR :: DataCon -> DmdResult From git at git.haskell.org Tue Jan 22 15:52:01 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 15:52:01 +0000 (UTC) Subject: [commit: ghc] branch 'wip/patch-1' created Message-ID: <20190122155201.693E63ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/patch-1 Referencing: d01baf0a3e2a3d87ba66602c19928da4f4a2dde4 From git at git.haskell.org Tue Jan 22 15:52:04 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 15:52:04 +0000 (UTC) Subject: [commit: ghc] wip/patch-1: Update CODEOWNERS (d01baf0) Message-ID: <20190122155204.67E473ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/patch-1 Link : http://ghc.haskell.org/trac/ghc/changeset/d01baf0a3e2a3d87ba66602c19928da4f4a2dde4/ghc >--------------------------------------------------------------- commit d01baf0a3e2a3d87ba66602c19928da4f4a2dde4 Author: Moritz Angermann Date: Tue Jan 22 10:51:46 2019 -0500 Update CODEOWNERS >--------------------------------------------------------------- d01baf0a3e2a3d87ba66602c19928da4f4a2dde4 CODEOWNERS | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 6ad914b..34a4dfa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,10 +5,14 @@ * @bgamari # Build system -/hadrian @snowleopard @alp @DavidEichmann +/hadrian @snowleopard @alp @DavidEichmann @angerman +/configure.ac @angerman @hvr +/aclocal.m4 @angerman @hvr +/config.sub @angerman @hvr # RTS-like things -/rts @bgamari @simonmar @osa1 @Phyx +/rts @bgamari @simonmar @osa1 @Phyx @angerman +/rts/linker @angerman @Phyx /includes @bgamari @simonmar @osa1 # The compiler @@ -16,6 +20,11 @@ /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK +/compiler/llvmGen @angerman + +/libraries/libiserv @angerman @simonmar +/utils/iserv-proxy @angerman @simonmar +/utils/iserv @angerman @simonmar # Core libraries /libraries/base @hvr From git at git.haskell.org Tue Jan 22 16:23:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 16:23:21 +0000 (UTC) Subject: [commit: ghc] branch 'wip/simonmar-codeowners' created Message-ID: <20190122162321.B92CB3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/simonmar-codeowners Referencing: c1abb46c1a3e67ed469ee20d304744d98349b072 From git at git.haskell.org Tue Jan 22 16:23:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 16:23:24 +0000 (UTC) Subject: [commit: ghc] wip/simonmar-codeowners: Add @simonmar to various things in CODEOWNERS (c1abb46) Message-ID: <20190122162324.B835C3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/simonmar-codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/c1abb46c1a3e67ed469ee20d304744d98349b072/ghc >--------------------------------------------------------------- commit c1abb46c1a3e67ed469ee20d304744d98349b072 Author: Simon Marlow Date: Tue Jan 22 11:23:08 2019 -0500 Add @simonmar to various things in CODEOWNERS >--------------------------------------------------------------- c1abb46c1a3e67ed469ee20d304744d98349b072 CODEOWNERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 6ad914b..e4e6da8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -15,8 +15,15 @@ /compiler/typecheck @simonpj @goldfire /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott +/compiler/cmm @simonmar +/compiler/codeGen @simonmar /compiler/nativeGen @simonmar @bgamari @AndreasK +/compiler/ghci @simonmar # Core libraries /libraries/base @hvr +/libraries/ghci @simonmar /libraries/template-haskell @goldfire + +# Tools +/utils/iserv @simonmar \ No newline at end of file From git at git.haskell.org Tue Jan 22 16:35:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 16:35:06 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T11982-test' created Message-ID: <20190122163506.31C213ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T11982-test Referencing: 0d789ad0acedb542917672be4b368b194c787b15 From git at git.haskell.org Tue Jan 22 16:35:10 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 16:35:10 +0000 (UTC) Subject: [commit: ghc] wip/T11982-test: testsuite: Add tests from #11982 (0d789ad) Message-ID: <20190122163510.292B83ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T11982-test Link : http://ghc.haskell.org/trac/ghc/changeset/0d789ad0acedb542917672be4b368b194c787b15/ghc >--------------------------------------------------------------- commit 0d789ad0acedb542917672be4b368b194c787b15 Author: Ben Gamari Date: Tue Jan 22 11:27:30 2019 -0500 testsuite: Add tests from #11982 >--------------------------------------------------------------- 0d789ad0acedb542917672be4b368b194c787b15 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 Tue Jan 22 17:15:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 17:15:11 +0000 (UTC) Subject: [commit: ghc] wip/T16085: testsuite: Skip T1288_ghci in unregisterised (a3448ae) Message-ID: <20190122171511.4C7293ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16085 Link : http://ghc.haskell.org/trac/ghc/changeset/a3448ae202e441234bc11d5842c9e2756468099c/ghc >--------------------------------------------------------------- commit a3448ae202e441234bc11d5842c9e2756468099c Author: Ben Gamari Date: Tue Jan 22 12:13:28 2019 -0500 testsuite: Skip T1288_ghci in unregisterised As pointed out in #16085, these ghci tests are fragile in the unregisterised way. >--------------------------------------------------------------- a3448ae202e441234bc11d5842c9e2756468099c testsuite/tests/ffi/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index 3a3dfd7..5bc1ab2 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -100,6 +100,8 @@ 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), pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')], compile_and_run, ['T1288_ghci_c.o']) From git at git.haskell.org Tue Jan 22 17:15:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 17:15:14 +0000 (UTC) Subject: [commit: ghc] wip/T16085's head updated: testsuite: Skip T1288_ghci in unregisterised (a3448ae) Message-ID: <20190122171514.D651C3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc Branch 'wip/T16085' now includes: 9b65ae6 rts: Turn ASSERT in LDV_recordDead into a normal if 5569eef gitlab-ci: Require that integer-simple configuration passes bb06c6b gitlab-ci: Allow Windows to fail for now 942b501 gitlab-ci: Try only building Windows in the quick flavour 29ecb52 aclocal.m4: drop obsolete -fno-stack-protector bbea972 Division fails fast for `divMod` \w integer-simple 3748284 arith011 is no longer broken with integer-simple 0702229 Skip test when external interpreter missing fdf11c9 rebindable-clash-warning-fix : correct warning logic 9bce364 testsuite: Disable more tests in unregisterised build 1638350 rts: fix build failure on OpenBSD (_DYNAMIC symbol collision) ef57272 PPC NCG: Simple 64-bit condition code on 32-bit ae4f103 Introduce NCG config flag and add helper 374e447 PPC NCG: Remove Darwin support 7fcc07c configure: introduce HAPPY and ALEX vars and deprecate --with-ghc in favour of the GHC var 9c0e3e4 core-spec: Modify `.lhs` to `.hs` (source files) 58da9c7 core-spec: Modify `.lhs` to `.hs` (generated PDF) 05cd231 stg-spec: Modify `.lhs` to `.hs` 6e4e637 Minor refactoring and documentation in profiling RTS code 17bd163 Visible kind application 7fcd680 Fix some typos, etc., in comments. 5387483 Mark GHC.Maybe as not-home for haddock 2880cb9 Dump Cmm with -ddump-cmm when building .cmm files b565d41 Fix broken links (#16125) 08b8ea2 Respect prompt in GhciSettings c121e33 Add -Wmissing-deriving-strategies 01b60b0 Fix precedence handling for Data.Fixed's Show instance (#16031) 0ff42f3 Add entry for #16031 to base/changelog.md 66b88dd gitlab-ci: Try reenabling PDF documentation on Darwin 24b39ce Remove OPTIONS_HADDOCK hide in favour for not-home 3a509d2 make: Silence some xelatex output 3fb726d Fix bindist for ghci library bbd58fb Fix #16133 by checking for TypeApplications in rnExpr 9ea8dce Hadrian: merge sections in profiling _p.a to .p_o for ghci c0448c1 gitlab-ci: Clone haddock from its upstream repository 1c9dab2 fix-submodules: Rip out typing 6b5ec08 Check that libs found by GCC aren't folders 6b70cf6 Be pickier about unsaturated synonyms in :kind 6486c6e Hadrian: Add support for building stage3 82d1a88 Implement a sanity check for CCS fields in profiling builds c2455e6 Run typed splices in the zonker 92b684d More minor comment improvements cb2349a Documentation and refactoring in CCS related code 74cd4ec Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime 19670bc Fix negative mutator time in GC stats in prof builds 076f586 Don't invoke dataConSrcToImplBang on newtypes 448f0e7 Fix checkPtrInArena a34ee61 Refactor GHCi UI to fix #11606, #12091, #15721, #16096 4ad9ffd PPC NCG: Reduce memory consumption emitting string literals 7b12b3f itimer: Don't free condvar until we know ticker is stopped ce11f6f rts: Use always-available locking operations in pthread Itimer implementation cb31b23 Update `Cabal` submodule 0f3c04e testsuite: Show both test name and way in JUnit output ec752c4 Hadrian: Update README.md ef8fedc Clarify when to follow the instructions in doc/windows.md. 2f07a97 Document the Shake Lint feature. 69947d5 gitlab-ci: Cleanup Windows builds 83a2206 Fix #16114 by adding a validity check to rnClsInstDecl e63518f Fix #16116 by removing badAssocRhs 9dc56b6 Control validity-checking of type synonym applications more carefully 3429ec8 Bump Cabal submodule 36e3e74 @simonpj's suggested refactor ce2f77d hWaitForInput-accurate-socket test 9fb744b GHCi ignores cmd line flags XMonomorphismRestr.. XNoExtendedDef..#10857 f78048f Change comments as requested by code review. #10857 da2d9cf Hadrian: configure packages with right 'htmldir' 3f46cff PPC NCG: Refactor stack allocation code ea79978 Fix reference to stack code in comment c155ac9 Fix filename in comment again 6a7a6b8 Introduce ghci command wrapper 2f65025 Hadrian: support extra libraries + OSX rpath 9fb2702 Create folder if missing for .hie files 582a96f Support printing `integer-simple` Integers in GHCi 6e320c2 Match `integer-simple`'s API with `integer-gmp` f7def74 Remove from `base` obsolete CPP for `integer-gmp` d2eb344 Fix tests for `integer-simple` a303695 try to fix CI 236abdb rts: Allow heap prof by closure type in prof way 61f178b doc: reorder heap profiling information in +RTS -? 6acb36d doc: behaviour of +RTS -h depends on profiling ad5075d crosslink hadrian/README.md and hadrian/doc/make.md 78ae2d5 typo 7218270 Switch to the untracked version of getDirectoryFiles when scanning for GMP objects bfb3e30 Disable Shake Lint by default. 8d594be Hadrian: Use the Cabal build script on Windows by default 4204ed5 Fix typo in maybeToList documentation fe1f97c Revert "Fix typo in maybeToList documentation" 46d46ed Improve clarity of documentation for maybeToList 2e05912 Hadrian: handle Haddock's resource directory 8765c1e Make sure 'haddock' package also copies resources 6aaa065 Documentation for StgRetFun a1e9cd6 Add test for #16197 b684675 RTS: Use ELF v1 convention on all powerpc64 systems 64020fe PPC NCG: Make calling convention more general 539a8f0 PPC NCG: Make `stackHeaderSize` more general 9477bf5 PPC NCG: GOT declaration for all 64-bit ELF systems 341aa59 PPC NCG: Register definitions for all 64-bit systems 2d75174 Fix tab and improve whitespace d512b33 PPC NCG: Rename constructors 469fe61 'DynFlag'-free version of 'mkParserFlags' 96e31b5 Comments about data constructor wrappers 7b7b338 Remove export of checkValidFamPats, never used 56c26f5 Small refactor 8c3133a Comments in stranal test declarations b14f540 Fix typo in DsExpr c9756db Prepare source-tree for base-4.13 MFP bump b137ab7 [T16199] Adds a verify-packages script 800d77e Mention DerivingStrategies in the warning when DAC and GND are both enabled 6e7aa5e Remove TODO in HsExpr f035504 Add support for ASM foreign files (.s) in TH (#16180) 38d837a Fix typo in TcRnTypes.hs [skip ci] 5ebcfc0 gitlab: Add merge request template 7262a81 Add CODEOWNERS 64ce6af Extend linker-script workaround to work with musl libc a5373c1 Fix bogus worker for newtypes a3448ae testsuite: Skip T1288_ghci in unregisterised From git at git.haskell.org Tue Jan 22 18:36:56 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 18:36:56 +0000 (UTC) Subject: [commit: ghc] branch 'wip/s3-costs' created Message-ID: <20190122183656.E79F13ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/s3-costs Referencing: e51c6019f04dcfd0437312bc2d480ff1db1689cf From git at git.haskell.org Tue Jan 22 18:36:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 18:36:59 +0000 (UTC) Subject: [commit: ghc] wip/s3-costs: gitlab-ci: Only keep binary distribution artifacts for master commits (e51c601) Message-ID: <20190122183659.EAA103ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/s3-costs Link : http://ghc.haskell.org/trac/ghc/changeset/e51c6019f04dcfd0437312bc2d480ff1db1689cf/ghc >--------------------------------------------------------------- commit e51c6019f04dcfd0437312bc2d480ff1db1689cf Author: Ben Gamari Date: Tue Jan 22 13:24:57 2019 -0500 gitlab-ci: Only keep binary distribution artifacts for master commits We previously kept binary distributions for all builds; this has produced nearly 500 GB of data in less than a month. Here we pare down our production, instead only preserving artifacts from builds of the master branch. >--------------------------------------------------------------- e51c6019f04dcfd0437312bc2d480ff1db1689cf .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..a95e24a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,8 +93,15 @@ validate-x86_64-linux-deb8-hadrian: THREADS=`mk/detect-cpu-count.sh` make V=0 -j$THREADS - | - make binary-dist TAR_COMP_OPTS="-1" - mv ghc-*.tar.xz ghc.tar.xz + # Use gzip compression in bindist test for speed + make binary-dist-prep TAR_COMP=gzip + make test_bindist TAR_COMP=gzip + - | + # Only keep bindist artifacts for master commits + if [ $CI_COMMIT_REF_NAME == "master" ]; then + make binary-dist TAR_COMP_OPTS="-1" + mv ghc-*.tar.xz ghc.tar.xz + fi - | THREADS=`mk/detect-cpu-count.sh` make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml From git at git.haskell.org Tue Jan 22 19:26:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 19:26:49 +0000 (UTC) Subject: [commit: ghc] branch 'wip/drop-circleci' created Message-ID: <20190122192649.C85683ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/drop-circleci Referencing: b870656ad695c9e58c937fa1b67a2c8a68081d04 From git at git.haskell.org Tue Jan 22 19:26:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 19:26:52 +0000 (UTC) Subject: [commit: ghc] wip/drop-circleci: gitlab-ci: Drop CircleCI jobs (b870656) Message-ID: <20190122192652.C96403ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/drop-circleci Link : http://ghc.haskell.org/trac/ghc/changeset/b870656ad695c9e58c937fa1b67a2c8a68081d04/ghc >--------------------------------------------------------------- commit b870656ad695c9e58c937fa1b67a2c8a68081d04 Author: Ben Gamari Date: Tue Jan 22 14:25:05 2019 -0500 gitlab-ci: Drop CircleCI jobs It's pretty unlikely we will be going back to circleci at this point [skip-ci] >--------------------------------------------------------------- b870656ad695c9e58c937fa1b67a2c8a68081d04 .gitlab-ci.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..62aae00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -397,33 +397,3 @@ cleanup-windows: - cd \GitLabRunner - rmdir /S /Q %BUILD_DIR%/* - exit /b 0 - -############################################################ -# 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 Tue Jan 22 19:28:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 19:28:39 +0000 (UTC) Subject: [commit: ghc] branch 'wip/drop-ci-dependencies' created Message-ID: <20190122192839.F15B83ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/drop-ci-dependencies Referencing: 829a623f4718ae910b6ad2074de12daeb7bbe451 From git at git.haskell.org Tue Jan 22 19:28:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 19:28:42 +0000 (UTC) Subject: [commit: ghc] wip/drop-ci-dependencies: gitlab-ci: Explicitly clear dependencies of all jobs (829a623) Message-ID: <20190122192842.EEB923ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/drop-ci-dependencies Link : http://ghc.haskell.org/trac/ghc/changeset/829a623f4718ae910b6ad2074de12daeb7bbe451/ghc >--------------------------------------------------------------- commit 829a623f4718ae910b6ad2074de12daeb7bbe451 Author: Ben Gamari Date: Tue Jan 22 14:21:31 2019 -0500 gitlab-ci: Explicitly clear dependencies of all jobs Apparently GitLab CI defaults to declaring all jobs of the previous stage as dependencies of a job. This meant that we would end up downloading all of our binary distributions during the `cleanup` stage, eating up a truly remarkable amount of S3 tranfers. >--------------------------------------------------------------- 829a623f4718ae910b6ad2074de12daeb7bbe451 .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..e8d416c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,7 @@ ghc-linters: .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA fi + dependencies: [] tags: - lint @@ -98,6 +99,7 @@ validate-x86_64-linux-deb8-hadrian: - | THREADS=`mk/detect-cpu-count.sh` make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml + dependencies: [] artifacts: reports: junit: junit.xml @@ -318,6 +320,7 @@ validate-x86_64-linux-deb9-unreg: - rd /s /q tmp - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache - bash -c 'make clean || true' + dependencies: [] cache: paths: - cabal-cache @@ -386,6 +389,7 @@ cleanup-windows: tags: - x86_64-windows when: always + dependencies: [] before_script: - echo "Time to clean up" script: From git at git.haskell.org Tue Jan 22 21:40:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:40:20 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16217' created Message-ID: <20190122214020.4B4DE3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16217 Referencing: 45d1f3ac653da24d2eb3d2fc99481898e4dbc8a0 From git at git.haskell.org Tue Jan 22 21:40:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:40:24 +0000 (UTC) Subject: [commit: ghc] wip/T16217: check-api-annotations checks for annotation preceding its span (45d1f3a) Message-ID: <20190122214024.803053ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16217 Link : http://ghc.haskell.org/trac/ghc/changeset/45d1f3ac653da24d2eb3d2fc99481898e4dbc8a0/ghc >--------------------------------------------------------------- commit 45d1f3ac653da24d2eb3d2fc99481898e4dbc8a0 Author: Alan Zimmerman Date: Tue Jan 22 23:29:25 2019 +0200 check-api-annotations checks for annotation preceding its span For an API annotation to be useful, it must not occur before the span it is enclosed in. So, for check-api-annotation output, a line such as ((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]), should be flagged as an error, as the AnnOpenP location of 3:21 precedes its enclosing span of 3:22-26. This patch does this. Closes #16217 >--------------------------------------------------------------- 45d1f3ac653da24d2eb3d2fc99481898e4dbc8a0 testsuite/tests/ghc-api/annotations/Makefile | 4 ++ testsuite/tests/ghc-api/annotations/T10255.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10268.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10269.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10276.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10278.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10280.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10307.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10309.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10312.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10354.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10357.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10358.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10396.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10399.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10598.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T11018.stdout | 8 +++- testsuite/tests/ghc-api/annotations/T11321.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T11332.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T12417.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T13163.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T15303.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T16212.stdout | 49 ++++++++++++++++++++++ testsuite/tests/ghc-api/annotations/Test16212.hs | 11 +++++ testsuite/tests/ghc-api/annotations/all.T | 6 ++- .../tests/ghc-api/annotations/boolFormula.stdout | 7 +++- .../tests/ghc-api/annotations/bundle-export.stdout | 7 +++- .../tests/ghc-api/annotations/exampleTest.stdout | 7 +++- .../tests/ghc-api/annotations/load-main.stdout | 7 +++- utils/check-api-annotations/Main.hs | 22 +++++++--- 30 files changed, 237 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 45d1f3ac653da24d2eb3d2fc99481898e4dbc8a0 From git at git.haskell.org Tue Jan 22 21:49:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:49:15 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16120' created Message-ID: <20190122214915.6AF1F3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16120 Referencing: da9233887ee4c919a895d83b01221011981a47de From git at git.haskell.org Tue Jan 22 21:49:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:49:18 +0000 (UTC) Subject: [commit: ghc] wip/T16120: hadrian: use new-exec to make sure alex & happy are in PATH (#16120) (da92338) Message-ID: <20190122214918.683B93ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16120 Link : http://ghc.haskell.org/trac/ghc/changeset/da9233887ee4c919a895d83b01221011981a47de/ghc >--------------------------------------------------------------- commit da9233887ee4c919a895d83b01221011981a47de Author: Adam Sandberg Eriksson Date: Wed Jan 2 22:08:49 2019 +0100 hadrian: use new-exec to make sure alex & happy are in PATH (#16120) >--------------------------------------------------------------- da9233887ee4c919a895d83b01221011981a47de hadrian/build.cabal.bat | 3 ++- hadrian/build.cabal.sh | 3 ++- hadrian/src/Environment.hs | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadrian/build.cabal.bat b/hadrian/build.cabal.bat index 96f2725..3344791 100644 --- a/hadrian/build.cabal.bat +++ b/hadrian/build.cabal.bat @@ -31,7 +31,8 @@ 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 -- ^ + rem use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH + "%CABAL%" --project-file=%PROJ% new-exec %CABFLAGS% hadrian -- ^ --directory "%CD%" ^ %* ) else ( diff --git a/hadrian/build.cabal.sh b/hadrian/build.cabal.sh index 8c7b594..f28c3e0 100755 --- a/hadrian/build.cabal.sh +++ b/hadrian/build.cabal.sh @@ -24,7 +24,8 @@ CABVER=( ${CABVERSTR//./ } ) 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 -- \ + # use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH + "$CABAL" --project-file="$PROJ" new-exec $CABFLAGS hadrian -- \ --directory "$PWD" \ "$@" else diff --git a/hadrian/src/Environment.hs b/hadrian/src/Environment.hs index 1666c68..ef98bb1 100644 --- a/hadrian/src/Environment.hs +++ b/hadrian/src/Environment.hs @@ -10,6 +10,10 @@ setupEnvironment = do -- Cabal refuses to work when GHC_PACKAGE_PATH is set (e.g. by Stack) unsetEnv "GHC_PACKAGE_PATH" + -- cabal new-exec sets GHC_ENVIRONMENT, it needs to be unset for GHC + -- invocations to work properly + unsetEnv "GHC_ENVIRONMENT" + -- in MinGW if PWD is set to a Windows "C:\\" style path then configure -- `pwd` will return the Windows path, and then modifying $PATH will fail. -- See https://github.com/snowleopard/hadrian/issues/189 for details. From git at git.haskell.org Tue Jan 22 21:58:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:58:34 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T14828-tests' created Message-ID: <20190122215834.2912A3ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T14828-tests Referencing: e88ff20c964cf43c1b70f691cdcec08d66510eb6 From git at git.haskell.org Tue Jan 22 21:58:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 21:58:37 +0000 (UTC) Subject: [commit: ghc] wip/T14828-tests: testsuite: Add test for #14828 (e88ff20) Message-ID: <20190122215837.B3AD53ABCD@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T14828-tests Link : http://ghc.haskell.org/trac/ghc/changeset/e88ff20c964cf43c1b70f691cdcec08d66510eb6/ghc >--------------------------------------------------------------- commit e88ff20c964cf43c1b70f691cdcec08d66510eb6 Author: Ben Gamari Date: Tue Jan 22 16:58:04 2019 -0500 testsuite: Add test for #14828 >--------------------------------------------------------------- e88ff20c964cf43c1b70f691cdcec08d66510eb6 testsuite/tests/ghci/scripts/T14828.script | 18 ++++++++++++++++++ testsuite/tests/ghci/scripts/all.T | 1 + 2 files changed, 19 insertions(+) diff --git a/testsuite/tests/ghci/scripts/T14828.script b/testsuite/tests/ghci/scripts/T14828.script new file mode 100644 index 0000000..bb0650f --- /dev/null +++ b/testsuite/tests/ghci/scripts/T14828.script @@ -0,0 +1,18 @@ +:t foldl +:print foldl + +:t fmap +:print fmap + +:t return +:print return + +:t pure +:print pure + +:m + Data.Monoid +:p mempty +:p mappend + +:m + Data.List +:p foldl' \ No newline at end of file diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index a27ab32..d07f173 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -295,3 +295,4 @@ 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']) From git at git.haskell.org Tue Jan 22 23:41:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 23:41:38 +0000 (UTC) Subject: [commit: ghc] branch 'wip/skip-ghcilink002' created Message-ID: <20190122234138.F2A703A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/skip-ghcilink002 Referencing: 549876456b70adbaa8392b53fd0a25a0bd6efabe From git at git.haskell.org Tue Jan 22 23:41:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Tue, 22 Jan 2019 23:41:41 +0000 (UTC) Subject: [commit: ghc] wip/skip-ghcilink002: testsuite: Skip ghcilink002 when unregisterised (5498764) Message-ID: <20190122234142.005E43A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/skip-ghcilink002 Link : http://ghc.haskell.org/trac/ghc/changeset/549876456b70adbaa8392b53fd0a25a0bd6efabe/ghc >--------------------------------------------------------------- commit 549876456b70adbaa8392b53fd0a25a0bd6efabe Author: Ben Gamari Date: Tue Jan 22 18:40:36 2019 -0500 testsuite: Skip ghcilink002 when unregisterised See #16085. >--------------------------------------------------------------- 549876456b70adbaa8392b53fd0a25a0bd6efabe testsuite/tests/ghci/linking/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T index 4f12d27..d5ee2ff 100644 --- a/testsuite/tests/ghci/linking/all.T +++ b/testsuite/tests/ghci/linking/all.T @@ -7,6 +7,8 @@ test('ghcilink001', ['$MAKE -s --no-print-directory ghcilink001']) test('ghcilink002', [extra_files(['TestLink.hs', 'f.c']), + # Fragile when unregisterised; see #16085 + when(unregisterised(), skip), unless(doing_ghci, skip)], run_command, ['$MAKE -s --no-print-directory ghcilink002']) From git at git.haskell.org Wed Jan 23 00:09:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 00:09:20 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-T16180-on-darwin' created Message-ID: <20190123000920.58EA13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-T16180-on-darwin Referencing: f7dd8463f8b853524f8b32f1fae2df102979d382 From git at git.haskell.org Wed Jan 23 00:09:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 00:09:23 +0000 (UTC) Subject: [commit: ghc] wip/fix-T16180-on-darwin: testsuite: Mark ghci063 as broken on Darwin (05e8a5e) Message-ID: <20190123000923.6133C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-T16180-on-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/05e8a5e000d20129e5454f020c0c4197280ee2c8/ghc >--------------------------------------------------------------- commit 05e8a5e000d20129e5454f020c0c4197280ee2c8 Author: Ben Gamari Date: Thu Jan 17 13:55:00 2019 -0500 testsuite: Mark ghci063 as broken on Darwin This is the last failing test on Darwin preventing us from disallowing CI failures. See #16201. >--------------------------------------------------------------- 05e8a5e000d20129e5454f020c0c4197280ee2c8 testsuite/tests/ghci/scripts/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index a27ab32..1394a9a 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -106,7 +106,7 @@ test('ghci061', normal, ghci_script, ['ghci061.script']) test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']), when(config.have_ext_interp, extra_ways(['ghci-ext']))], ghci_script, ['ghci062.script']) -test('ghci063', normal, ghci_script, ['ghci063.script']) +test('ghci063', when(opsys('darwin'), expect_broken(16201)), ghci_script, ['ghci063.script']) test('T2452', [extra_hc_opts("-fno-implicit-import-qualified")], ghci_script, ['T2452.script']) From git at git.haskell.org Wed Jan 23 00:09:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 00:09:26 +0000 (UTC) Subject: [commit: ghc] wip/fix-T16180-on-darwin: testsuite: Mark T16180 as broken on Darwin (80f51c6) Message-ID: <20190123000926.5B2B73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-T16180-on-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/80f51c6c77d8aa14a97f7187a638e6a8fa99454b/ghc >--------------------------------------------------------------- commit 80f51c6c77d8aa14a97f7187a638e6a8fa99454b Author: Ben Gamari Date: Tue Jan 22 19:08:07 2019 -0500 testsuite: Mark T16180 as broken on Darwin See #16218. >--------------------------------------------------------------- 80f51c6c77d8aa14a97f7187a638e6a8fa99454b testsuite/tests/th/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 9ddf283..4062cf2 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -467,4 +467,4 @@ test('T15437', expect_broken(15437), multimod_compile, test('T15985', normal, compile, ['']) test('T16133', normal, compile_fail, ['']) test('T15471', normal, multimod_compile, ['T15471.hs', '-v0']) -test('T16180', normal, compile_and_run, ['']) +test('T16180', when(opsys('darwin'), expect_broken(16218)), compile_and_run, ['']) From git at git.haskell.org Wed Jan 23 00:09:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 00:09:29 +0000 (UTC) Subject: [commit: ghc] wip/fix-T16180-on-darwin: gitlab-ci: Disallow failure (75d2630) Message-ID: <20190123000929.595353A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-T16180-on-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/75d26302be04c1cc713856c96079823068736e19/ghc >--------------------------------------------------------------- commit 75d26302be04c1cc713856c96079823068736e19 Author: Ben Gamari Date: Thu Jan 17 13:56:00 2019 -0500 gitlab-ci: Disallow failure >--------------------------------------------------------------- 75d26302be04c1cc713856c96079823068736e19 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162c19c..73b736b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,6 @@ validate-x86_64-linux-deb8-hadrian: validate-x86_64-darwin: extends: .validate stage: full-build - allow_failure: true tags: - x86_64-darwin variables: From git at git.haskell.org Wed Jan 23 00:09:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 00:09:32 +0000 (UTC) Subject: [commit: ghc] wip/fix-T16180-on-darwin: testsuite: Fix T16180 on Darwin (f7dd846) Message-ID: <20190123000932.590D83A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-T16180-on-darwin Link : http://ghc.haskell.org/trac/ghc/changeset/f7dd8463f8b853524f8b32f1fae2df102979d382/ghc >--------------------------------------------------------------- commit f7dd8463f8b853524f8b32f1fae2df102979d382 Author: Ben Gamari Date: Tue Jan 22 19:05:45 2019 -0500 testsuite: Fix T16180 on Darwin As mentioned in #16218, the CPP macro likely isn't defined when we run the assembler. >--------------------------------------------------------------- f7dd8463f8b853524f8b32f1fae2df102979d382 testsuite/tests/th/T16180.hs | 7 ++++--- testsuite/tests/th/all.T | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/testsuite/tests/th/T16180.hs b/testsuite/tests/th/T16180.hs index 2a4b80c..5c99f16 100644 --- a/testsuite/tests/th/T16180.hs +++ b/testsuite/tests/th/T16180.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE CPP #-} module Main where @@ -9,13 +10,13 @@ $(do -- some architectures require a "_" symbol prefix... -- GHC defines a LEADING_UNDERSCORE CPP constant to indicate this. addForeignSource LangAsm - "#if defined(LEADING_UNDERSCORE)\n\ +#if LEADING_UNDERSCORE \.global \"_mydata\"\n\ \_mydata:\n\ - \#else\n\ +#else \.global \"mydata\"\n\ \mydata:\n\ - \#endif\n\ +#endif \.ascii \"Hello world\\0\"\n" return []) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 4062cf2..9ddf283 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -467,4 +467,4 @@ test('T15437', expect_broken(15437), multimod_compile, test('T15985', normal, compile, ['']) test('T16133', normal, compile_fail, ['']) test('T15471', normal, multimod_compile, ['T15471.hs', '-v0']) -test('T16180', when(opsys('darwin'), expect_broken(16218)), compile_and_run, ['']) +test('T16180', normal, compile_and_run, ['']) From git at git.haskell.org Wed Jan 23 02:40:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 02:40:25 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-pkg-shut-up' created Message-ID: <20190123024025.920383A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-pkg-shut-up Referencing: 41f0f6c2f571ea05c49f9f6ed64beebdc5a9f9fc From git at git.haskell.org Wed Jan 23 14:55:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 14:55:40 +0000 (UTC) Subject: [commit: ghc] branch 'wip/bump-T15397-timeout' created Message-ID: <20190123145540.6B2203A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/bump-T15397-timeout Referencing: 3d9b672a0327fa8b43fbe52b3a9f4e2b88cda5fb From git at git.haskell.org Wed Jan 23 14:55:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 14:55:43 +0000 (UTC) Subject: [commit: ghc] wip/bump-T15397-timeout: testsuite: Bump timeout multiplier for T18597 (3d9b672) Message-ID: <20190123145543.6AD103A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/bump-T15397-timeout Link : http://ghc.haskell.org/trac/ghc/changeset/3d9b672a0327fa8b43fbe52b3a9f4e2b88cda5fb/ghc >--------------------------------------------------------------- commit 3d9b672a0327fa8b43fbe52b3a9f4e2b88cda5fb Author: Ben Gamari Date: Wed Jan 23 09:46:16 2019 -0500 testsuite: Bump timeout multiplier for T18597 I've seen this fail due to timeout. [skip-ci] >--------------------------------------------------------------- 3d9b672a0327fa8b43fbe52b3a9f4e2b88cda5fb 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 9bca86b..6ce7d79 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -147,6 +147,6 @@ test('T12962', [], compile_and_run, ['']) test('T14257', [], run_command, ['$MAKE -s --no-print-directory T14257']) test('T15897', - [extra_ways(['profasm']), only_ways(['profasm']), run_timeout_multiplier(2)], + [extra_ways(['profasm']), only_ways(['profasm']), run_timeout_multiplier(4)], run_command, ['$MAKE -s --no-print-directory T15897']) From git at git.haskell.org Wed Jan 23 18:08:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 18:08:33 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16223' created Message-ID: <20190123180833.A2FFA3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16223 Referencing: 95b5792ed0925a7fccc050ed928817339d98b04a From git at git.haskell.org Wed Jan 23 18:08:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 18:08:36 +0000 (UTC) Subject: [commit: ghc] wip/T16223: testsuite: Mark hWaitForInput-accurate-socket as requiring unix (95b5792) Message-ID: <20190123180836.A57553A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16223 Link : http://ghc.haskell.org/trac/ghc/changeset/95b5792ed0925a7fccc050ed928817339d98b04a/ghc >--------------------------------------------------------------- commit 95b5792ed0925a7fccc050ed928817339d98b04a Author: Ben Gamari Date: Wed Jan 23 13:06:45 2019 -0500 testsuite: Mark hWaitForInput-accurate-socket as requiring unix It imports System.Posix.IO. >--------------------------------------------------------------- 95b5792ed0925a7fccc050ed928817339d98b04a libraries/base/tests/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index 457d9f4..a6cb96d 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -200,7 +200,7 @@ test('T9681', normal, compile_fail, ['']) test('T8089', [exit_code(99), run_timeout_multiplier(0.01)], compile_and_run, ['']) -test('hWaitForInput-accurate-socket', normal, compile_and_run, ['']) +test('hWaitForInput-accurate-socket', reqlib('unix'), compile_and_run, ['']) test('T8684', expect_broken(8684), compile_and_run, ['']) test('T9826',normal, compile_and_run,['']) test('T9848', From git at git.haskell.org Wed Jan 23 18:26:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 18:26:37 +0000 (UTC) Subject: [commit: ghc] branch 'wip/unnamed-addr' created Message-ID: <20190123182637.70AA73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/unnamed-addr Referencing: 4b3ed04c7b4f323c0e1b6555f6a7b09dafc21a2d From git at git.haskell.org Wed Jan 23 18:26:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 18:26:40 +0000 (UTC) Subject: [commit: ghc] wip/unnamed-addr: Update transformers module (c9fe14c) Message-ID: <20190123182640.84BF53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/unnamed-addr Link : http://ghc.haskell.org/trac/ghc/changeset/c9fe14cc0a1fb808763c9d1bcd5451443f684cdf/ghc >--------------------------------------------------------------- commit c9fe14cc0a1fb808763c9d1bcd5451443f684cdf Author: Herbert Valerio Riedel Date: Tue Jan 22 01:00:10 2019 +0100 Update transformers module >--------------------------------------------------------------- c9fe14cc0a1fb808763c9d1bcd5451443f684cdf libraries/transformers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/transformers b/libraries/transformers index 8055784..4965519 160000 --- a/libraries/transformers +++ b/libraries/transformers @@ -1 +1 @@ -Subproject commit 80557845cdc0e72bc05cec19cf7a1bf5495e9e69 +Subproject commit 49655191d33912815a9389b764e2d89e92140938 From git at git.haskell.org Wed Jan 23 18:26:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 23 Jan 2019 18:26:43 +0000 (UTC) Subject: [commit: ghc] wip/unnamed-addr: Make LLVM functions mergeable (4b3ed04) Message-ID: <20190123182643.7DE7B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/unnamed-addr Link : http://ghc.haskell.org/trac/ghc/changeset/4b3ed04c7b4f323c0e1b6555f6a7b09dafc21a2d/ghc >--------------------------------------------------------------- commit 4b3ed04c7b4f323c0e1b6555f6a7b09dafc21a2d Author: Gabor Greif Date: Wed Jan 23 19:25:17 2019 +0100 Make LLVM functions mergeable >--------------------------------------------------------------- 4b3ed04c7b4f323c0e1b6555f6a7b09dafc21a2d compiler/llvmGen/Llvm/PpLlvm.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs index b534276..7ef5f6e 100644 --- a/compiler/llvmGen/Llvm/PpLlvm.hs +++ b/compiler/llvmGen/Llvm/PpLlvm.hs @@ -153,7 +153,8 @@ ppLlvmFunctionHeader (LlvmFunctionDecl n l c r varg p a) args <> ftext n) (zip p args) in ppr l <+> ppr c <+> ppr r <+> char '@' <> ftext n <> lparen <> - (hsep $ punctuate comma args') <> ptext varg' <> rparen <> align + (hsep $ punctuate comma args') <> ptext varg' <> rparen <> + text "unnamed_addr" <+> align -- | Print out a list of function declaration. ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc From git at git.haskell.org Thu Jan 24 02:34:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 02:34:32 +0000 (UTC) Subject: [commit: ghc] wip/T16085: testsuite: Skip foreignInterruptible in unregisterised way (d50eff5) Message-ID: <20190124023432.417523A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16085 Link : http://ghc.haskell.org/trac/ghc/changeset/d50eff5d279505e3ad2d2b78735a01b60cac5bda/ghc >--------------------------------------------------------------- commit d50eff5d279505e3ad2d2b78735a01b60cac5bda Author: Ben Gamari Date: Wed Jan 23 21:32:47 2019 -0500 testsuite: Skip foreignInterruptible in unregisterised way See #15467. >--------------------------------------------------------------- d50eff5d279505e3ad2d2b78735a01b60cac5bda testsuite/tests/concurrent/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 99f9b6e..5ba0657 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -196,6 +196,8 @@ 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), # I don't think we support interrupting Sleep() # on Windows. --SDM only_threaded_ways, From git at git.haskell.org Thu Jan 24 07:21:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 07:21:24 +0000 (UTC) Subject: [commit: ghc] wip/unnamed-addr: decorate declarations too (81b60ec) Message-ID: <20190124072124.57B723A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/unnamed-addr Link : http://ghc.haskell.org/trac/ghc/changeset/81b60ec752b4559ecf7438974d1e92e25e13e6d2/ghc >--------------------------------------------------------------- commit 81b60ec752b4559ecf7438974d1e92e25e13e6d2 Author: Gabor Greif Date: Thu Jan 24 08:20:53 2019 +0100 decorate declarations too >--------------------------------------------------------------- 81b60ec752b4559ecf7438974d1e92e25e13e6d2 compiler/llvmGen/Llvm/PpLlvm.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs index 7ef5f6e..602bbff 100644 --- a/compiler/llvmGen/Llvm/PpLlvm.hs +++ b/compiler/llvmGen/Llvm/PpLlvm.hs @@ -175,7 +175,8 @@ ppLlvmFunctionDecl (LlvmFunctionDecl n l c r varg p a) args = hcat $ intersperse (comma <> space) $ map (\(t,a) -> ppr t <+> ppSpaceJoin a) p in text "declare" <+> ppr l <+> ppr c <+> ppr r <+> char '@' <> - ftext n <> lparen <> args <> ptext varg' <> rparen <> align $+$ newLine + ftext n <> lparen <> args <> ptext varg' <> rparen <> + text "unnamed_addr" <+> align $+$ newLine -- | Print out a list of LLVM blocks. From git at git.haskell.org Thu Jan 24 08:17:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 08:17:21 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16212' created Message-ID: <20190124081721.82F0E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16212 Referencing: 72786048afa76885652e3a434a4a2882e9f826dc From git at git.haskell.org Thu Jan 24 08:17:24 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 08:17:24 +0000 (UTC) Subject: [commit: ghc] wip/T16212: API Annotations: Parens not attached correctly for ClassDecl (7278604) Message-ID: <20190124081724.9EEA73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16212 Link : http://ghc.haskell.org/trac/ghc/changeset/72786048afa76885652e3a434a4a2882e9f826dc/ghc >--------------------------------------------------------------- commit 72786048afa76885652e3a434a4a2882e9f826dc Author: Alan Zimmerman Date: Thu Jan 24 10:14:55 2019 +0200 API Annotations: Parens not attached correctly for ClassDecl The parens around the kinded tyvars should be attached to the class declaration as a whole, they are attached to the tyvar instead, outside the span. An annotation must always be within or after the span it is contained in. Closes #16212 >--------------------------------------------------------------- 72786048afa76885652e3a434a4a2882e9f826dc compiler/parser/RdrHsSyn.hs | 41 ++++++++++++----------- testsuite/tests/ghc-api/annotations/T11018.stdout | 11 +++--- testsuite/tests/ghc-api/annotations/T16212.stdout | 35 ++++++++++++++----- testsuite/tests/ghc-api/annotations/Test16212.hs | 2 ++ testsuite/tests/ghc-api/annotations/all.T | 6 ++-- 5 files changed, 57 insertions(+), 38 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 72786048afa76885652e3a434a4a2882e9f826dc From git at git.haskell.org Thu Jan 24 09:27:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 09:27:43 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15606' created Message-ID: <20190124092743.BAA4E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15606 Referencing: d6fccbd7036d4bdbb6defbce20419ecb1b57046d From git at git.haskell.org Thu Jan 24 09:27:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 09:27:46 +0000 (UTC) Subject: [commit: ghc] wip/T15606: WIP: don't float out lets between lambdas (d6fccbd) Message-ID: <20190124092746.BB5763A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15606 Link : http://ghc.haskell.org/trac/ghc/changeset/d6fccbd7036d4bdbb6defbce20419ecb1b57046d/ghc >--------------------------------------------------------------- commit d6fccbd7036d4bdbb6defbce20419ecb1b57046d Author: Simon Peyton Jones Date: Thu Jan 24 09:24:57 2019 +0000 WIP: don't float out lets between lambdas This is incomplete work in prograss on Trac #T15606 >--------------------------------------------------------------- d6fccbd7036d4bdbb6defbce20419ecb1b57046d compiler/main/DynFlags.hs | 2 ++ compiler/simplCore/CoreMonad.hs | 8 ++++++- compiler/simplCore/SetLevels.hs | 46 ++++++++++++++++++++++++++++++----------- compiler/simplCore/SimplCore.hs | 8 +++++-- 4 files changed, 49 insertions(+), 15 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d6fccbd7036d4bdbb6defbce20419ecb1b57046d From git at git.haskell.org Thu Jan 24 11:54:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:54:54 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T15952-2' created Message-ID: <20190124115454.C2F7D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T15952-2 Referencing: 5917d0ad24c27f0086db6692e486704b0d110540 From git at git.haskell.org Thu Jan 24 11:54:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:54:57 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Minor refactor [ci skip] (b397e97) Message-ID: <20190124115457.C3AF93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/b397e979768cce0acdb3597db50527566ac7b42d/ghc >--------------------------------------------------------------- commit b397e979768cce0acdb3597db50527566ac7b42d Author: Gabor Greif Date: Tue Jan 22 12:13:28 2019 +0100 Minor refactor [ci skip] >--------------------------------------------------------------- b397e979768cce0acdb3597db50527566ac7b42d 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 3e70fdb..38af092 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -1265,7 +1265,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 Thu Jan 24 11:55:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:00 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: users guide: fix typesetting of pragmas (395c8ea) Message-ID: <20190124115500.E7A0B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/395c8eaaf88608aad7cf255402d60eb12a33d11c/ghc >--------------------------------------------------------------- commit 395c8eaaf88608aad7cf255402d60eb12a33d11c Author: Ben Price Date: Tue Jan 22 00:16:14 2019 +0000 users guide: fix typesetting of pragmas >--------------------------------------------------------------- 395c8eaaf88608aad7cf255402d60eb12a33d11c docs/users_guide/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/users_guide/conf.py b/docs/users_guide/conf.py index c64e0a3..e48992d 100644 --- a/docs/users_guide/conf.py +++ b/docs/users_guide/conf.py @@ -147,9 +147,10 @@ def parse_ghci_cmd(env, sig, signode): return name def parse_pragma(env, sig, signode): - name = sig.split(' ')[0] - signode += addnodes.desc_name('{-# '+name, sig + ' #-}') - return name + idx = sig.split(' ')[0] + name = '{-# ' + sig + ' #-}' + signode += addnodes.desc_name(name, name) + return idx def parse_flag(env, sig, signode): From git at git.haskell.org Thu Jan 24 11:55:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:03 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: gitlab: Collect artifacts on Windows (a90a2ae) Message-ID: <20190124115503.E7F303A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/a90a2aea94b306cf557e74c4c3ed65959d05c20c/ghc >--------------------------------------------------------------- commit a90a2aea94b306cf557e74c4c3ed65959d05c20c Author: Ben Gamari Date: Tue Jan 15 23:21:39 2019 -0500 gitlab: Collect artifacts on Windows >--------------------------------------------------------------- a90a2aea94b306cf557e74c4c3ed65959d05c20c .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f426f3..9512380 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -361,11 +361,21 @@ 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 '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 + reports: + junit: junit.xml + paths: + - ghc.tar.xz + - junit.xml # Note [Cleanup on Windows] # ~~~~~~~~~~~~~~~~~~~~~~~~~ From git at git.haskell.org Thu Jan 24 11:55:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:06 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: gitlab-ci: Reenable Hadrian build on Windows (54a50a6) Message-ID: <20190124115506.E849F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/54a50a6e0c1254579cf22a08bde0f28f9bd9d8ce/ghc >--------------------------------------------------------------- commit 54a50a6e0c1254579cf22a08bde0f28f9bd9d8ce Author: Ben Gamari Date: Mon Jan 21 15:55:05 2019 -0500 gitlab-ci: Reenable Hadrian build on Windows >--------------------------------------------------------------- 54a50a6e0c1254579cf22a08bde0f28f9bd9d8ce .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 Thu Jan 24 11:55:09 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:09 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Fix hadrian prof flavour so that it builds a profiled version of GHC (cfe6401) Message-ID: <20190124115509.E9C7E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/cfe64019a70acc1bae76f2fa580d6654f8eb5bc4/ghc >--------------------------------------------------------------- commit cfe64019a70acc1bae76f2fa580d6654f8eb5bc4 Author: Matthew Pickering Date: Tue Jan 22 11:33:18 2019 +0000 Fix hadrian prof flavour so that it builds a profiled version of GHC In Alp's refactoring of `getProgramContexts` he removed a call to `getProgramContext` which was where the logic for this used to be implemented. Fixes #16214 >--------------------------------------------------------------- cfe64019a70acc1bae76f2fa580d6654f8eb5bc4 hadrian/src/Rules/Program.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs index c9df6f5..d7bcb48 100644 --- a/hadrian/src/Rules/Program.hs +++ b/hadrian/src/Rules/Program.hs @@ -13,6 +13,7 @@ import Settings import Settings.Default import Target import Utilities +import Flavour -- | TODO: Drop code duplication buildProgramRules :: [(Resource, Int)] -> Rules () @@ -44,12 +45,18 @@ getProgramContexts stage = do -- make sure that we cover these -- "prof-build-under-other-name" cases. -- iserv gets its names from Packages.hs:programName - let allCtxs = [ vanillaContext stage pkg + -- + profiled <- ghcProfiled <$> flavour + let allCtxs = + if pkg == ghc && profiled && stage > Stage0 + then [ Context stage pkg profiling ] + else [ vanillaContext stage pkg , Context stage pkg profiling -- TODO Dynamic way has been reverted as the dynamic build is -- broken. See #15837. -- , Context stage pkg dynamic - ] + ] + forM allCtxs $ \ctx -> do name <- programName ctx return (name <.> exe, ctx) From git at git.haskell.org Thu Jan 24 11:55:13 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:13 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: A few typofixes (bb2acfe) Message-ID: <20190124115513.0569E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/bb2acfe0ec4c196a87218709ee28327845d62dc4/ghc >--------------------------------------------------------------- commit bb2acfe0ec4c196a87218709ee28327845d62dc4 Author: Gabor Greif Date: Tue Jan 22 12:07:47 2019 +0100 A few typofixes >--------------------------------------------------------------- bb2acfe0ec4c196a87218709ee28327845d62dc4 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 bb2acfe0ec4c196a87218709ee28327845d62dc4 From git at git.haskell.org Thu Jan 24 11:55:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:16 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: users guide: consistent spelling of inlinable (5fcee8a) Message-ID: <20190124115516.0976F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/5fcee8aa7666fb5a843c275b49c77f9ed678fb81/ghc >--------------------------------------------------------------- commit 5fcee8aa7666fb5a843c275b49c77f9ed678fb81 Author: Ben Price Date: Tue Jan 22 00:15:05 2019 +0000 users guide: consistent spelling of inlinable >--------------------------------------------------------------- 5fcee8aa7666fb5a843c275b49c77f9ed678fb81 docs/users_guide/glasgow_exts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index b1e9bc6..b46196e 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -14638,7 +14638,7 @@ See also the ``NOINLINE`` (:ref:`noinline-pragma`) and ``INLINABLE`` ``INLINABLE`` pragma ~~~~~~~~~~~~~~~~~~~~ -.. pragma:: INLINEABLE ⟨name⟩ +.. pragma:: INLINABLE ⟨name⟩ :where: top-level From git at git.haskell.org Thu Jan 24 11:55:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:19 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: testsuite: Mark ghci063 as broken on Darwin (0b705fa) Message-ID: <20190124115519.052A63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/0b705fadf936eaf48aaca26d2f7c8c9ae9158c66/ghc >--------------------------------------------------------------- commit 0b705fadf936eaf48aaca26d2f7c8c9ae9158c66 Author: Ben Gamari Date: Thu Jan 17 13:55:00 2019 -0500 testsuite: Mark ghci063 as broken on Darwin This is the last failing test on Darwin preventing us from disallowing CI failures. See #16201. >--------------------------------------------------------------- 0b705fadf936eaf48aaca26d2f7c8c9ae9158c66 testsuite/tests/ghci/scripts/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index a27ab32..1394a9a 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -106,7 +106,7 @@ test('ghci061', normal, ghci_script, ['ghci061.script']) test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']), when(config.have_ext_interp, extra_ways(['ghci-ext']))], ghci_script, ['ghci062.script']) -test('ghci063', normal, ghci_script, ['ghci063.script']) +test('ghci063', when(opsys('darwin'), expect_broken(16201)), ghci_script, ['ghci063.script']) test('T2452', [extra_hc_opts("-fno-implicit-import-qualified")], ghci_script, ['T2452.script']) From git at git.haskell.org Thu Jan 24 11:55:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:22 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Add myself to CODEOWNERS for a few files (b19ee0e) Message-ID: <20190124115522.0720C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/b19ee0e900a468992e00a586616a3c7a993ade21/ghc >--------------------------------------------------------------- commit b19ee0e900a468992e00a586616a3c7a993ade21 Author: Joachim Breitner Date: Tue Jan 22 10:57:52 2019 +0100 Add myself to CODEOWNERS for a few files >--------------------------------------------------------------- b19ee0e900a468992e00a586616a3c7a993ade21 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 Thu Jan 24 11:55:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:25 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Hadrian: install patches 'haddock-{html, interface}' (d26869a) Message-ID: <20190124115525.031EE3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/d26869ac83935432e0dcea1ff591268232daef32/ghc >--------------------------------------------------------------- commit d26869ac83935432e0dcea1ff591268232daef32 Author: Alec Theriault Date: Sat Jan 19 01:06:00 2019 -0800 Hadrian: install patches 'haddock-{html,interface}' Since the `$(docdir)` can be picked independently from the `$(libdir)`, we need to make sure that that the `haddock-html` and `haddock-interface` fields in the package DB (which is in the `$(libdir)`) get updated to point to the appropriate places in the `$(docdir)`. NB: in the make system, `ghc-cabal` would cover this sort of thing by re-running `configure` on installation, but here we get away with a couple lines of `sed` and a call to `ghc-pkg recache`. Fixes #16202. >--------------------------------------------------------------- d26869ac83935432e0dcea1ff591268232daef32 hadrian/src/Rules/BinaryDist.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index f847af9..03740cd 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -239,12 +239,25 @@ bindistMakefile = unlines , "\t$(EXECUTABLE_FILE) $2 ;" , "endef" , "" + , "# Hacky function to patch up the 'haddock-interfaces' and 'haddock-html'" + , "# fields in the package .conf files" + , "define patchpackageconf" + , "# $1 = package name (ex: 'bytestring')" + , "# $2 = path to .conf file" + , "# $3 = Docs Directory" + , "\tcat $2 | sed 's|haddock-interfaces.*|haddock-interfaces: $3/html/libraries/$1/$1.haddock|' \\" + , "\t | sed 's|haddock-html.*|haddock-html: $3/html/libraries/$1|' \\" + , "\t > $2.copy" + , "\tmv $2.copy $2" + , "endef" + , "" , "# QUESTION : should we use shell commands?" , "" , "" , ".PHONY: install" , "install: install_lib install_bin install_includes" , "install: install_docs install_wrappers install_ghci" + , "install: update_package_db" , "" , "ActualBinsDir=${ghclibdir}/bin" , "WrapperBinsDir=${bindir}" @@ -298,6 +311,15 @@ bindistMakefile = unlines "$(WrapperBinsDir),$(ActualBinsDir),$(ActualBinsDir)/$p," ++ "$(libdir),$(docdir),$(includedir)))" , "" + , "PKG_CONFS = $(wildcard $(libdir)/package.conf.d/*)" + , "update_package_db:" + , "\t at echo \"Updating the package DB\"" + , "\t$(foreach p, $(PKG_CONFS),\\" + , "\t\t$(call patchpackageconf," ++ + "$(shell echo $(notdir $p) | sed 's/-\\([0-9]*[0-9]\\.\\)*conf//g')," ++ + "$p,$(docdir)))" + , "\t$(WrapperBinsDir)/ghc-pkg recache" + , "" , "# END INSTALL" , "# ----------------------------------------------------------------------" ] From git at git.haskell.org Thu Jan 24 11:55:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:27 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: testsuite: Skip ghcilink002 when unregisterised (35c58c3) Message-ID: <20190124115527.F34BC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/35c58c33344b17469466e0e85324c9b02ac1af46/ghc >--------------------------------------------------------------- commit 35c58c33344b17469466e0e85324c9b02ac1af46 Author: Ben Gamari Date: Tue Jan 22 18:40:36 2019 -0500 testsuite: Skip ghcilink002 when unregisterised See #16085. >--------------------------------------------------------------- 35c58c33344b17469466e0e85324c9b02ac1af46 testsuite/tests/ghci/linking/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T index 4f12d27..d5ee2ff 100644 --- a/testsuite/tests/ghci/linking/all.T +++ b/testsuite/tests/ghci/linking/all.T @@ -7,6 +7,8 @@ test('ghcilink001', ['$MAKE -s --no-print-directory ghcilink001']) test('ghcilink002', [extra_files(['TestLink.hs', 'f.c']), + # Fragile when unregisterised; see #16085 + when(unregisterised(), skip), unless(doing_ghci, skip)], run_command, ['$MAKE -s --no-print-directory ghcilink002']) From git at git.haskell.org Thu Jan 24 11:55:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:31 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Error out of invalid Int/Word bit shifts (5341edf) Message-ID: <20190124115531.106E13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/5341edf3635f2875271acc469570481c52000374/ghc >--------------------------------------------------------------- commit 5341edf3635f2875271acc469570481c52000374 Author: Alec Theriault Date: Thu Jan 10 23:44:04 2019 -0800 Error out of invalid Int/Word bit shifts Although the Haddock's for `shiftL` and `shiftR` do require the number of bits to be non-negative, we should still check this before calling out to primitives (which also have undefined behaviour for negative bit shifts). If a user _really_ wants to bypass checks that the number of bits is sensible, they already have the aptly-named `unsafeShiftL`/`unsafeShiftR` at their disposal. See #16111. >--------------------------------------------------------------- 5341edf3635f2875271acc469570481c52000374 compiler/prelude/PrelRules.hs | 5 ++--- libraries/base/Data/Bits.hs | 22 ++++++++++++++++------ libraries/base/GHC/Int.hs | 40 ++++++++++++++++++++++++++++++---------- libraries/base/GHC/Word.hs | 40 ++++++++++++++++++++++++++++++---------- libraries/base/changelog.md | 4 ++++ 5 files changed, 82 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 5341edf3635f2875271acc469570481c52000374 From git at git.haskell.org Thu Jan 24 11:55:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:34 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: testsuite: Mark T16180 as broken on Darwin (57142eb) Message-ID: <20190124115534.142B13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/57142eb92bf74d4b5daf316b73b9c2fc39ce0b16/ghc >--------------------------------------------------------------- commit 57142eb92bf74d4b5daf316b73b9c2fc39ce0b16 Author: Ben Gamari Date: Tue Jan 22 19:08:07 2019 -0500 testsuite: Mark T16180 as broken on Darwin See #16218. >--------------------------------------------------------------- 57142eb92bf74d4b5daf316b73b9c2fc39ce0b16 testsuite/tests/th/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 9ddf283..4062cf2 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -467,4 +467,4 @@ test('T15437', expect_broken(15437), multimod_compile, test('T15985', normal, compile, ['']) test('T16133', normal, compile_fail, ['']) test('T15471', normal, multimod_compile, ['T15471.hs', '-v0']) -test('T16180', normal, compile_and_run, ['']) +test('T16180', when(opsys('darwin'), expect_broken(16218)), compile_and_run, ['']) From git at git.haskell.org Thu Jan 24 11:55:37 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:37 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Minor typo in docs for KProxy (33aba19) Message-ID: <20190124115537.16F9D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/33aba19158518eb767f23dbc9ef6084ec3c8c52f/ghc >--------------------------------------------------------------- commit 33aba19158518eb767f23dbc9ef6084ec3c8c52f 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 :-) >--------------------------------------------------------------- 33aba19158518eb767f23dbc9ef6084ec3c8c52f 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 Thu Jan 24 11:55:40 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:40 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Hadrian: support in-tree GMP (efc9584) Message-ID: <20190124115540.1D5AC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/efc95841503a78504c0aa00925fb22c4ec4627af/ghc >--------------------------------------------------------------- commit efc95841503a78504c0aa00925fb22c4ec4627af Author: Alec Theriault Date: Wed Dec 5 20:46:21 2018 -0800 Hadrian: support in-tree GMP Summary: This adds top-level configure flags '--with-intree-gmp' and '--with-framework-preferred', both of which are especially relevant on MacOS. Besides gaining two new flags, Hadrian also had to be taught what to do with the 'framework' in .cabal files. Test Plan: ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari Subscribers: rwbarton, erikd GHC Trac Issues: #16001 Differential Revision: https://phabricator.haskell.org/D5417 >--------------------------------------------------------------- efc95841503a78504c0aa00925fb22c4ec4627af aclocal.m4 | 14 ++++++++++++++ hadrian/cfg/system.config.in | 6 ++++-- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 3 ++- hadrian/src/Hadrian/Haskell/Cabal/Type.hs | 1 + hadrian/src/Oracles/Flag.hs | 4 ++++ hadrian/src/Settings/Builders/Ghc.hs | 2 ++ hadrian/src/Settings/Packages.hs | 12 ++++-------- libraries/integer-gmp/config.mk.in | 2 ++ libraries/integer-gmp/configure.ac | 4 ++-- mk/config.mk.in | 2 ++ rules/build-package-data.mk | 8 ++++++++ 11 files changed, 45 insertions(+), 13 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc efc95841503a78504c0aa00925fb22c4ec4627af From git at git.haskell.org Thu Jan 24 11:55:43 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:43 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: testsuite: Ensure that config.{msys, cygwin} are initialized (512a5f3) Message-ID: <20190124115543.175593A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/512a5f365b774a999c81ff45b951edb7a56262e4/ghc >--------------------------------------------------------------- commit 512a5f365b774a999c81ff45b951edb7a56262e4 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 >--------------------------------------------------------------- 512a5f365b774a999c81ff45b951edb7a56262e4 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 Thu Jan 24 11:55:46 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:46 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: gitlab-ci: Explicitly clear dependencies of all jobs (886ddb2) Message-ID: <20190124115546.1421C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/886ddb27bfbbb52c41690cd29e2ab3ed80bf5450/ghc >--------------------------------------------------------------- commit 886ddb27bfbbb52c41690cd29e2ab3ed80bf5450 Author: Ben Gamari Date: Tue Jan 22 14:21:31 2019 -0500 gitlab-ci: Explicitly clear dependencies of all jobs Apparently GitLab CI defaults to declaring all jobs of the previous stage as dependencies of a job. This meant that we would end up downloading all of our binary distributions during the `cleanup` stage, eating up a truly remarkable amount of S3 tranfers. >--------------------------------------------------------------- 886ddb27bfbbb52c41690cd29e2ab3ed80bf5450 .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 218bd78..d739eff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,7 @@ ghc-linters: .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA fi + dependencies: [] tags: - lint @@ -98,6 +99,7 @@ validate-x86_64-linux-deb8-hadrian: - | THREADS=`mk/detect-cpu-count.sh` make $TEST_TYPE THREADS=$THREADS JUNIT_FILE=../../junit.xml + dependencies: [] artifacts: reports: junit: junit.xml @@ -317,6 +319,7 @@ validate-x86_64-linux-deb9-unreg: - rd /s /q tmp - robocopy /np /nfl /ndl /e "%APPDATA%\cabal" cabal-cache - bash -c 'make clean || true' + dependencies: [] cache: paths: - cabal-cache @@ -394,6 +397,7 @@ cleanup-windows: tags: - x86_64-windows when: always + dependencies: [] before_script: - echo "Time to clean up" script: From git at git.haskell.org Thu Jan 24 11:55:49 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:49 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: gitlab-ci: Drop CircleCI jobs (c9a02df) Message-ID: <20190124115549.0E6653A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/c9a02dfc32ea4304c1c0d02bd8091fd5d045741f/ghc >--------------------------------------------------------------- commit c9a02dfc32ea4304c1c0d02bd8091fd5d045741f Author: Ben Gamari Date: Tue Jan 22 14:25:05 2019 -0500 gitlab-ci: Drop CircleCI jobs It's pretty unlikely we will be going back to circleci at this point [skip-ci] >--------------------------------------------------------------- c9a02dfc32ea4304c1c0d02bd8091fd5d045741f .gitlab-ci.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9512380..218bd78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -405,33 +405,3 @@ cleanup-windows: - cd \GitLabRunner - rmdir /S /Q %BUILD_DIR%/* - exit /b 0 - -############################################################ -# 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 Thu Jan 24 11:55:52 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:52 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: Update Darwin CI to use new toplevel --with-intree-gmp configure flag (cd45f8c) Message-ID: <20190124115552.189173A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/cd45f8c471bb6901ac89babe98fca8e81f430d26/ghc >--------------------------------------------------------------- commit cd45f8c471bb6901ac89babe98fca8e81f430d26 Author: Alec Theriault Date: Mon Jan 21 19:25:29 2019 -0800 Update Darwin CI to use new toplevel --with-intree-gmp configure flag >--------------------------------------------------------------- cd45f8c471bb6901ac89babe98fca8e81f430d26 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 158e740..4f426f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,6 +117,7 @@ validate-x86_64-darwin: # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" + CONFIGURE_ARGS: --with-intree-gmp before_script: - git clean -xdf && git submodule foreach git clean -xdf - python3 .gitlab/fix-submodules.py @@ -126,7 +127,6 @@ validate-x86_64-darwin: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" - - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache artifacts: From git at git.haskell.org Thu Jan 24 11:55:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:55 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: gitlab-ci: Disallow failure (daff24b) Message-ID: <20190124115555.3D0303A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/daff24bc74c1fed7efb1acde2d8f90dc9621a308/ghc >--------------------------------------------------------------- commit daff24bc74c1fed7efb1acde2d8f90dc9621a308 Author: Ben Gamari Date: Thu Jan 17 13:56:00 2019 -0500 gitlab-ci: Disallow failure >--------------------------------------------------------------- daff24bc74c1fed7efb1acde2d8f90dc9621a308 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6354d72..158e740 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,6 @@ validate-x86_64-linux-deb8-hadrian: validate-x86_64-darwin: extends: .validate stage: full-build - allow_failure: true tags: - x86_64-darwin variables: From git at git.haskell.org Thu Jan 24 11:55:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 11:55:58 +0000 (UTC) Subject: [commit: ghc] wip/T15952-2: WIP: make a smart mkAppTyM (5917d0a) Message-ID: <20190124115558.649263A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T15952-2 Link : http://ghc.haskell.org/trac/ghc/changeset/5917d0ad24c27f0086db6692e486704b0d110540/ghc >--------------------------------------------------------------- commit 5917d0ad24c27f0086db6692e486704b0d110540 Author: Simon Peyton Jones Date: Thu Jan 24 11:53:03 2019 +0000 WIP: make a smart mkAppTyM This branch, wip/T15952-2, is WIP on the idea of making a monadic mkAppTyM that ensures the Purely Kinded Invariant. Needs comments etc. But it validates all but one test! >--------------------------------------------------------------- 5917d0ad24c27f0086db6692e486704b0d110540 compiler/typecheck/TcHsSyn.hs | 1 + compiler/typecheck/TcHsType.hs | 67 ++++++++++++++++++++++++++++++++------- compiler/typecheck/TcMType.hs | 5 ++- compiler/typecheck/TcType.hs | 18 ++++++++++- compiler/types/TyCon.hs | 11 ++++++- compiler/types/Type.hs | 34 ++++++++++++++------ compiler/types/Type.hs-boot | 2 +- compiler/utils/Outputable.hs | 6 ++-- compiler/utils/Outputable.hs-boot | 3 +- 9 files changed, 119 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 5917d0ad24c27f0086db6692e486704b0d110540 From git at git.haskell.org Thu Jan 24 12:04:15 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 12:04:15 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16222' created Message-ID: <20190124120415.6B0953A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16222 Referencing: d5d9b12ddb2617ee25ffbe7609d44e6f105f6e1e From git at git.haskell.org Thu Jan 24 12:04:18 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 12:04:18 +0000 (UTC) Subject: [commit: ghc] wip/T16222: PPC NCG: Promote integers to word size in C calls (d5d9b12) Message-ID: <20190124120418.723E13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16222 Link : http://ghc.haskell.org/trac/ghc/changeset/d5d9b12ddb2617ee25ffbe7609d44e6f105f6e1e/ghc >--------------------------------------------------------------- commit d5d9b12ddb2617ee25ffbe7609d44e6f105f6e1e Author: Peter Trommler Date: Wed Jan 23 23:13:57 2019 +0100 PPC NCG: Promote integers to word size in C calls Fixes #16222 >--------------------------------------------------------------- d5d9b12ddb2617ee25ffbe7609d44e6f105f6e1e compiler/cmm/CmmType.hs | 8 ++++++-- compiler/nativeGen/PPC/CodeGen.hs | 36 +++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/compiler/cmm/CmmType.hs b/compiler/cmm/CmmType.hs index 77d894b..0d6e770 100644 --- a/compiler/cmm/CmmType.hs +++ b/compiler/cmm/CmmType.hs @@ -4,7 +4,8 @@ module CmmType , cInt , cmmBits, cmmFloat , typeWidth, cmmEqType, cmmEqType_ignoring_ptrhood - , isFloatType, isGcPtrType, isWord32, isWord64, isFloat64, isFloat32 + , isFloatType, isGcPtrType, isBitsType + , isWord32, isWord64, isFloat64, isFloat32 , Width(..) , widthInBits, widthInBytes, widthInLog, widthFromBytes @@ -132,13 +133,16 @@ cInt :: DynFlags -> CmmType cInt dflags = cmmBits (cIntWidth dflags) ------------ Predicates ---------------- -isFloatType, isGcPtrType :: CmmType -> Bool +isFloatType, isGcPtrType, isBitsType :: CmmType -> Bool isFloatType (CmmType FloatCat _) = True isFloatType _other = False isGcPtrType (CmmType GcPtrCat _) = True isGcPtrType _other = False +isBitsType (CmmType BitsCat _) = True +isBitsType _ = False + isWord32, isWord64, isFloat32, isFloat64 :: CmmType -> Bool -- isWord64 is true of 64-bit non-floats (both gc-ptrs and otherwise) -- isFloat32 and 64 are obvious diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index c6e5304..035a2aa 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -1634,15 +1634,13 @@ genCCall' genCCall' dflags gcp target dest_regs args - = ASSERT(not $ any (`elem` [II16]) $ map cmmTypeFormat argReps) - -- we rely on argument promotion in the codeGen - do + = do (finalStack,passArgumentsCode,usedRegs) <- passArguments - (zip args argReps) - allArgRegs - (allFPArgRegs platform) - initialStackOffset - (toOL []) [] + (zip3 args argReps argHints) + allArgRegs + (allFPArgRegs platform) + initialStackOffset + (toOL []) [] (labelOrExpr, reduceToFF32) <- case target of ForeignTarget (CmmLit (CmmLabel lbl)) _ -> do @@ -1733,6 +1731,7 @@ genCCall' dflags gcp target dest_regs args _ -> panic "genCall': unknown calling conv." argReps = map (cmmExprType dflags) args + (argHints, _) = foreignTargetHints target roundTo a x | x `mod` a == 0 = x | otherwise = x + a - (x `mod` a) @@ -1769,7 +1768,7 @@ genCCall' dflags gcp target dest_regs args _ -> panic "maybeNOP: Unknown PowerPC 64-bit ABI" passArguments [] _ _ stackOffset accumCode accumUsed = return (stackOffset, accumCode, accumUsed) - passArguments ((arg,arg_ty):args) gprs fprs stackOffset + passArguments ((arg,arg_ty,_):args) gprs fprs stackOffset accumCode accumUsed | isWord64 arg_ty && target32Bit (targetPlatform dflags) = do @@ -1811,9 +1810,9 @@ genCCall' dflags gcp target dest_regs args stackCode accumUsed GCP64ELF _ -> panic "passArguments: 32 bit code" - passArguments ((arg,rep):args) gprs fprs stackOffset accumCode accumUsed + passArguments ((arg,rep,hint):args) gprs fprs stackOffset accumCode accumUsed | reg : _ <- regs = do - register <- getRegister arg + register <- getRegister arg_pro let code = case register of Fixed _ freg fcode -> fcode `snocOL` MR reg freg Any _ acode -> acode reg @@ -1833,14 +1832,25 @@ genCCall' dflags gcp target dest_regs args (accumCode `appOL` code) (reg : accumUsed) | otherwise = do - (vr, code) <- getSomeReg arg + (vr, code) <- getSomeReg arg_pro passArguments args (drop nGprs gprs) (drop nFprs fprs) (stackOffset' + stackBytes) - (accumCode `appOL` code `snocOL` ST (cmmTypeFormat rep) vr stackSlot) + (accumCode `appOL` code + `snocOL` ST format_pro vr stackSlot) accumUsed where + arg_pro + | isBitsType rep = CmmMachOp (conv_op (typeWidth rep) (wordWidth dflags)) [arg] + | otherwise = arg + format_pro + | isBitsType rep = intFormat (wordWidth dflags) + | otherwise = cmmTypeFormat rep + conv_op = case hint of + SignedHint -> MO_SS_Conv + _ -> MO_UU_Conv + stackOffset' = case gcp of GCPAIX -> -- The 32bit PowerOPEN ABI is happy with From git at git.haskell.org Thu Jan 24 19:34:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 19:34:27 +0000 (UTC) Subject: [commit: ghc] branch 'wip/testsuite-stdout' created Message-ID: <20190124193427.9CAA53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/testsuite-stdout Referencing: 2e3118f54d0e54a7d8ecd3d20f4c8f7f628ad463 From git at git.haskell.org Thu Jan 24 19:34:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 19:34:30 +0000 (UTC) Subject: [commit: ghc] wip/testsuite-stdout: testsuite: Introduce TestResult (df0c396) Message-ID: <20190124193430.9DE4B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/testsuite-stdout Link : http://ghc.haskell.org/trac/ghc/changeset/df0c3966f2e16278fd6fc29360a729a199cefd73/ghc >--------------------------------------------------------------- commit df0c3966f2e16278fd6fc29360a729a199cefd73 Author: Ben Gamari Date: Thu Jan 24 14:20:11 2019 -0500 testsuite: Introduce TestResult Previously we were simply passing around tuples, making things the implementation rather difficult to follow and harder to extend. >--------------------------------------------------------------- df0c3966f2e16278fd6fc29360a729a199cefd73 testsuite/driver/testglobals.py | 14 ++++++++++++++ testsuite/driver/testlib.py | 31 +++++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index 0e0240d..b5cee1d 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -151,6 +151,19 @@ ghc_env = os.environ.copy() # ----------------------------------------------------------------------------- # Information about the current test run +class TestResult: + """ + A result from the execution of a test. These live in the expected_passes, + framework_failures, framework_warnings, unexpected_passes, + unexpected_failures, unexpected_stat_failures lists of TestRun. + """ + __slots__ = 'directory', 'testname', 'reason', 'way' + def __init__(self, directory, testname, reason, way): + self.directory = directory + self.testname = testname + self.reason = reason + self.way = way + class TestRun: def __init__(self): self.start_time = None @@ -161,6 +174,7 @@ class TestRun: self.n_expected_passes = 0 self.n_expected_failures = 0 + # type: List[TestResult] self.missing_libs = [] self.framework_failures = [] self.framework_warnings = [] diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c09d02a..8f76378 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -18,7 +18,7 @@ from pathlib import PurePath import collections import subprocess -from testglobals import config, ghc_env, default_testopts, brokens, t +from testglobals import config, ghc_env, default_testopts, brokens, t, TestResult from testutil import strip_quotes, lndir, link_or_copy_file, passed, failBecause, str_fail, str_pass import perf_notes as Perf from perf_notes import MetricChange @@ -928,24 +928,24 @@ def do_test(name, way, func, args, files): if passFail == 'pass': if _expect_pass(way): - t.expected_passes.append((directory, name, way)) + t.expected_passes.append(TestResult(directory, name, way)) t.n_expected_passes += 1 else: if_verbose(1, '*** unexpected pass for %s' % full_name) - t.unexpected_passes.append((directory, name, 'unexpected', way)) + t.unexpected_passes.append(TestResult(directory, name, 'unexpected', way)) elif passFail == 'fail': if _expect_pass(way): reason = result['reason'] tag = result.get('tag') if tag == 'stat': if_verbose(1, '*** unexpected stat test failure for %s' % full_name) - t.unexpected_stat_failures.append((directory, name, reason, way)) + t.unexpected_stat_failures.append(TestResult(directory, name, reason, way)) else: if_verbose(1, '*** unexpected failure for %s' % full_name) - t.unexpected_failures.append((directory, name, reason, way)) + t.unexpected_failures.append(TestResult(directory, name, reason, way)) else: if opts.expect == 'missing-lib': - t.missing_libs.append((directory, name, 'missing-lib', way)) + t.missing_libs.append(TestResult(directory, name, 'missing-lib', way)) else: t.n_expected_failures += 1 else: @@ -968,14 +968,14 @@ def framework_fail(name, way, reason): directory = re.sub('^\\.[/\\\\]', '', opts.testdir) full_name = name + '(' + way + ')' if_verbose(1, '*** framework failure for %s %s ' % (full_name, reason)) - t.framework_failures.append((directory, name, way, reason)) + t.framework_failures.append(TestResult(directory, name, way, reason)) def framework_warn(name, way, reason): opts = getTestOpts() directory = re.sub('^\\.[/\\\\]', '', opts.testdir) full_name = name + '(' + way + ')' if_verbose(1, '*** framework warning for %s %s ' % (full_name, reason)) - t.framework_warnings.append((directory, name, way, reason)) + t.framework_warnings.append(TestResult(directory, name, way, reason)) def badResult(result): try: @@ -2135,9 +2135,10 @@ def summary(t, file, short=False, color=False): file.write('WARNING: Testsuite run was terminated early\n') def printUnexpectedTests(file, testInfoss): - unexpected = set(name for testInfos in testInfoss - for (_, name, _, _) in testInfos - if not name.endswith('.T')) + unexpected = set(result.name + for testInfos in testInfoss + for result in testInfos + if not result.name.endswith('.T')) if unexpected: file.write('Unexpected results from:\n') file.write('TEST="' + ' '.join(sorted(unexpected)) + '"\n') @@ -2145,9 +2146,11 @@ def printUnexpectedTests(file, testInfoss): def printTestInfosSummary(file, testInfos): maxDirLen = max(len(directory) for (directory, _, _, _) in testInfos) - for (directory, name, reason, way) in testInfos: - directory = directory.ljust(maxDirLen) - file.write(' {directory} {name} [{reason}] ({way})\n'.format(**locals())) + for result in testInfos: + directory = result.directory.ljust(maxDirLen) + file.write(' {directory} {r.name} [{r.reason}] ({r.way})\n'.format( + r = result, + directory = directory)) file.write('\n') def modify_lines(s, f): From git at git.haskell.org Thu Jan 24 19:34:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 19:34:33 +0000 (UTC) Subject: [commit: ghc] wip/testsuite-stdout: WIP: testsuite: Report stdout and stderr (2e3118f) Message-ID: <20190124193433.9B89E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/testsuite-stdout Link : http://ghc.haskell.org/trac/ghc/changeset/2e3118f54d0e54a7d8ecd3d20f4c8f7f628ad463/ghc >--------------------------------------------------------------- commit 2e3118f54d0e54a7d8ecd3d20f4c8f7f628ad463 Author: Ben Gamari Date: Thu Jan 24 14:33:26 2019 -0500 WIP: testsuite: Report stdout and stderr I'm having second thoughts about the semantics here; perhaps we actually want a diff. >--------------------------------------------------------------- 2e3118f54d0e54a7d8ecd3d20f4c8f7f628ad463 testsuite/driver/testlib.py | 9 +++++++-- testsuite/driver/testutil.py | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 8f76378..431232c 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -942,7 +942,12 @@ def do_test(name, way, func, args, files): t.unexpected_stat_failures.append(TestResult(directory, name, reason, way)) else: if_verbose(1, '*** unexpected failure for %s' % full_name) - t.unexpected_failures.append(TestResult(directory, name, reason, way)) + other = { + 'stdout': result.get('stdout'), + 'stderr': result.get('stderr') + } + result = TestResult(directory, name, reason, way, **other) + t.unexpected_failures.append(result) else: if opts.expect == 'missing-lib': t.missing_libs.append(TestResult(directory, name, 'missing-lib', way)) @@ -1078,7 +1083,7 @@ def do_compile(name, way, should_fail, top_mod, extra_mods, extra_hc_opts, **kwa whitespace_normaliser=getattr(getTestOpts(), "whitespace_normaliser", normalise_whitespace)): - return failBecause('stderr mismatch') + return failBecause('stderr mismatch', stderr=open(actual_stderr_file, 'rb').read()) # no problems found, this test passed return passed() diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py index 6e0c268..888e77b 100644 --- a/testsuite/driver/testutil.py +++ b/testsuite/driver/testutil.py @@ -8,8 +8,8 @@ import threading def passed(): return {'passFail': 'pass'} -def failBecause(reason, tag=None): - return {'passFail': 'fail', 'reason': reason, 'tag': tag} +def failBecause(reason, tag=None, **kwargs): + return kwargs.update({'passFail': 'fail', 'reason': reason, 'tag': tag}) def strip_quotes(s): # Don't wrap commands to subprocess.call/Popen in quotes. From git at git.haskell.org Thu Jan 24 21:29:32 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 21:29:32 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16230' created Message-ID: <20190124212932.E57703A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16230 Referencing: 72a93759fd916513f61feb52ed3452cbbf3d0cc7 From git at git.haskell.org Thu Jan 24 21:29:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 24 Jan 2019 21:29:36 +0000 (UTC) Subject: [commit: ghc] wip/T16230: API Annotations: more explicit foralls fixup (72a9375) Message-ID: <20190124212936.64E283A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16230 Link : http://ghc.haskell.org/trac/ghc/changeset/72a93759fd916513f61feb52ed3452cbbf3d0cc7/ghc >--------------------------------------------------------------- commit 72a93759fd916513f61feb52ed3452cbbf3d0cc7 Author: Alan Zimmerman Date: Thu Jan 24 23:22:59 2019 +0200 API Annotations: more explicit foralls fixup The AnnForall annotations introduced via ​Phab:D4894 are not always attached to the correct SourceSpan. Closes #16230 >--------------------------------------------------------------- 72a93759fd916513f61feb52ed3452cbbf3d0cc7 compiler/parser/Parser.y | 43 +++++++------- compiler/parser/RdrHsSyn.hs | 6 +- testsuite/tests/ghc-api/annotations/Makefile | 4 ++ testsuite/tests/ghc-api/annotations/T16230.stdout | 66 ++++++++++++++++++++++ .../hie010.hs => ghc-api/annotations/Test16230.hs} | 0 testsuite/tests/ghc-api/annotations/all.T | 2 + 6 files changed, 97 insertions(+), 24 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 72a93759fd916513f61feb52ed3452cbbf3d0cc7 From git at git.haskell.org Sat Jan 26 12:24:59 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 26 Jan 2019 12:24:59 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16236' created Message-ID: <20190126122459.7A36B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16236 Referencing: 812338c26ac0327938663bf805d7f25f2c365275 From git at git.haskell.org Sat Jan 26 12:25:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 26 Jan 2019 12:25:03 +0000 (UTC) Subject: [commit: ghc] wip/T16236: API Annotations: AnnAt disconnected for TYPEAPP (812338c) Message-ID: <20190126122503.AE9123A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16236 Link : http://ghc.haskell.org/trac/ghc/changeset/812338c26ac0327938663bf805d7f25f2c365275/ghc >--------------------------------------------------------------- commit 812338c26ac0327938663bf805d7f25f2c365275 Author: Alan Zimmerman Date: Sat Jan 26 13:53:59 2019 +0200 API Annotations: AnnAt disconnected for TYPEAPP For the code type family F1 (a :: k) (f :: k -> Type) :: Type where F1 @Peano a f = T @Peano f a the API annotation for the first @ is not attached to a SourceSpan in the ParsedSource Closes #16236 >--------------------------------------------------------------- 812338c26ac0327938663bf805d7f25f2c365275 compiler/parser/Parser.y | 3 +- compiler/parser/RdrHsSyn.hs | 50 +++++++++------ testsuite/tests/ghc-api/annotations/Makefile | 4 ++ testsuite/tests/ghc-api/annotations/T16236.stdout | 73 ++++++++++++++++++++++ .../annotations/Test16236.hs} | 2 - testsuite/tests/ghc-api/annotations/all.T | 2 + .../parser/should_compile/DumpParsedAst.stderr | 4 +- .../parser/should_compile/DumpRenamedAst.stderr | 4 +- .../tests/typecheck/should_fail/T15807.stderr | 2 +- 9 files changed, 117 insertions(+), 27 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 812338c26ac0327938663bf805d7f25f2c365275 From git at git.haskell.org Sat Jan 26 17:33:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 26 Jan 2019 17:33:20 +0000 (UTC) Subject: [commit: nofib] branch 'codeowners' created Message-ID: <20190126173320.579FF3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib New branch : codeowners Referencing: 7a702cc1f4c0cd0a360953d31aaf54ca56c40a3d From git at git.haskell.org Sat Jan 26 17:33:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 26 Jan 2019 17:33:22 +0000 (UTC) Subject: [commit: nofib] codeowners: Add sgraf812 and bgamari as CODEOWNERS (7a702cc) Message-ID: <20190126173322.68A453A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib On branch : codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/7a702cc1f4c0cd0a360953d31aaf54ca56c40a3d/nofib >--------------------------------------------------------------- commit 7a702cc1f4c0cd0a360953d31aaf54ca56c40a3d Author: Sebastian Graf Date: Sat Jan 26 18:31:57 2019 +0100 Add sgraf812 and bgamari as CODEOWNERS [skip ci] >--------------------------------------------------------------- 7a702cc1f4c0cd0a360953d31aaf54ca56c40a3d CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..7904088 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +# Syntax: https://docs.gitlab.com/ee/user/project/code_owners.html + +* @sgraf812 @bgamari \ No newline at end of file From git at git.haskell.org Sat Jan 26 22:35:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sat, 26 Jan 2019 22:35:50 +0000 (UTC) Subject: [commit: nofib] master's head updated: Add sgraf812 and bgamari as CODEOWNERS (7a702cc) Message-ID: <20190126223550.D79433A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/nofib Branch 'master' now includes: 7a702cc Add sgraf812 and bgamari as CODEOWNERS From git at git.haskell.org Sun Jan 27 13:33:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:20 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ppc64-testsuite' created Message-ID: <20190127133320.959FB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ppc64-testsuite Referencing: dc79462dc60e9103b64f8c407cfdbb79266926ab From git at git.haskell.org Sun Jan 27 13:33:22 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:22 +0000 (UTC) Subject: [commit: ghc] branch 'wip/revert-intree-gmp-flag' created Message-ID: <20190127133322.93F843A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/revert-intree-gmp-flag Referencing: 85a1c25f6c47cc2453108b37e5ca6be6a2369969 From git at git.haskell.org Sun Jan 27 13:33:25 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:25 +0000 (UTC) Subject: [commit: ghc] wip/ppc64-testsuite, wip/revert-intree-gmp-flag: Add Simon and Richard as more CODEOWNERS (571e45d) Message-ID: <20190127133325.976D93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/ppc64-testsuite,wip/revert-intree-gmp-flag Link : http://ghc.haskell.org/trac/ghc/changeset/571e45d6b5e13222133e52b3c3ca0ff8dfd6747a/ghc >--------------------------------------------------------------- commit 571e45d6b5e13222133e52b3c3ca0ff8dfd6747a Author: Richard Eisenberg Date: Thu Jan 24 22:27:00 2019 -0500 Add Simon and Richard as more CODEOWNERS [skip ci] >--------------------------------------------------------------- 571e45d6b5e13222133e52b3c3ca0ff8dfd6747a CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 2a6f508..30d05f5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -21,6 +21,9 @@ /compiler/simplCore/Exitify.hs @nomeata /compiler/simplStg/StgCse.hs @nomeata /compiler/cmm/CmmSwitch.hs @nomeata +/compiler/types @simonpj @goldfire +/compiler/deSugar @simonpj @goldfire +/compiler/hsSyn/Convert.hs @goldfire # Core libraries /libraries/base @hvr From git at git.haskell.org Sun Jan 27 13:33:28 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:28 +0000 (UTC) Subject: [commit: ghc] wip/ppc64-testsuite: testsuite: Mark tests broken on powerpc64 (dc79462) Message-ID: <20190127133328.99AE13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ppc64-testsuite Link : http://ghc.haskell.org/trac/ghc/changeset/dc79462dc60e9103b64f8c407cfdbb79266926ab/ghc >--------------------------------------------------------------- commit dc79462dc60e9103b64f8c407cfdbb79266926ab Author: Peter Trommler Date: Sat Jan 26 15:04:45 2019 +0100 testsuite: Mark tests broken on powerpc64 >--------------------------------------------------------------- dc79462dc60e9103b64f8c407cfdbb79266926ab testsuite/tests/rts/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index ca8177c..54d78ad 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -457,6 +457,7 @@ test('keep-cafs-fail', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), when(platform('powerpc64le-unknown-linux'), expect_broken(11261)), + when(platform('powerpc64-unknown-linux'), expect_broken(11261)), when(opsys('freebsd'), expect_broken(16035)), filter_stdout_lines('Evaluated a CAF|exit.*'), ignore_stderr, # on OS X the shell emits an "Abort trap" message to stderr @@ -470,6 +471,7 @@ test('keep-cafs', 'KeepCafs2.hs', 'KeepCafsMain.hs']), when(opsys('mingw32'), expect_broken (5987)), when(platform('powerpc64le-unknown-linux'), expect_broken(11261)), + when(platform('powerpc64-unknown-linux'), expect_broken(11261)), when(opsys('freebsd'), expect_broken(16035)), ], run_command, From git at git.haskell.org Sun Jan 27 13:33:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:31 +0000 (UTC) Subject: [commit: ghc] wip/revert-intree-gmp-flag: Revert "Update Darwin CI to use new toplevel --with-intree-gmp configure flag" (e1fb612) Message-ID: <20190127133331.97C633A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-intree-gmp-flag Link : http://ghc.haskell.org/trac/ghc/changeset/e1fb612827d7cb405c72d9c63f4259b00e943840/ghc >--------------------------------------------------------------- commit e1fb612827d7cb405c72d9c63f4259b00e943840 Author: Ben Gamari Date: Sat Jan 26 20:33:38 2019 -0500 Revert "Update Darwin CI to use new toplevel --with-intree-gmp configure flag" This reverts commit cd45f8c471bb6901ac89babe98fca8e81f430d26. >--------------------------------------------------------------- e1fb612827d7cb405c72d9c63f4259b00e943840 .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d739eff..2d5a9d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,6 @@ validate-x86_64-darwin: # Only Sierra and onwards supports clock_gettime. See #12858 ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" - CONFIGURE_ARGS: --with-intree-gmp before_script: - git clean -xdf && git submodule foreach git clean -xdf - python3 .gitlab/fix-submodules.py @@ -129,6 +128,7 @@ validate-x86_64-darwin: - bash .gitlab/darwin-init.sh - PATH="`pwd`/toolchain/bin:$PATH" + - echo "libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp" >> mk/build.mk after_script: - cp -Rf $HOME/.cabal cabal-cache artifacts: From git at git.haskell.org Sun Jan 27 13:33:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 13:33:34 +0000 (UTC) Subject: [commit: ghc] wip/revert-intree-gmp-flag: Revert "Hadrian: support in-tree GMP" (85a1c25) Message-ID: <20190127133334.A22A23A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/revert-intree-gmp-flag Link : http://ghc.haskell.org/trac/ghc/changeset/85a1c25f6c47cc2453108b37e5ca6be6a2369969/ghc >--------------------------------------------------------------- commit 85a1c25f6c47cc2453108b37e5ca6be6a2369969 Author: Ben Gamari Date: Sat Jan 26 20:33:40 2019 -0500 Revert "Hadrian: support in-tree GMP" This reverts commit efc95841503a78504c0aa00925fb22c4ec4627af. >--------------------------------------------------------------- 85a1c25f6c47cc2453108b37e5ca6be6a2369969 aclocal.m4 | 14 -------------- hadrian/cfg/system.config.in | 6 ++---- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 3 +-- hadrian/src/Hadrian/Haskell/Cabal/Type.hs | 1 - hadrian/src/Oracles/Flag.hs | 4 ---- hadrian/src/Settings/Builders/Ghc.hs | 2 -- hadrian/src/Settings/Packages.hs | 12 ++++++++---- libraries/integer-gmp/config.mk.in | 2 -- libraries/integer-gmp/configure.ac | 4 ++-- mk/config.mk.in | 2 -- rules/build-package-data.mk | 8 -------- 11 files changed, 13 insertions(+), 45 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 85a1c25f6c47cc2453108b37e5ca6be6a2369969 From git at git.haskell.org Sun Jan 27 22:39:50 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:39:50 +0000 (UTC) Subject: [commit: ghc] branch 'wip/andrey/windows-doc' created Message-ID: <20190127223950.EAF363A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/andrey/windows-doc Referencing: 0896bbf66723c31313f929e3563b25184d09fc8e From git at git.haskell.org Sun Jan 27 22:39:53 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:39:53 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Add @sgraf to CODEOWNERS (3cbee25) Message-ID: <20190127223953.EAF683A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/3cbee255cd550e49e3265257fd2955ce8e6a351a/ghc >--------------------------------------------------------------- commit 3cbee255cd550e49e3265257fd2955ce8e6a351a Author: Sebastian Graf Date: Sat Jan 26 12:44:23 2019 -0500 Add @sgraf to CODEOWNERS [skip ci] >--------------------------------------------------------------- 3cbee255cd550e49e3265257fd2955ce8e6a351a CODEOWNERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 30d05f5..97ec69d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,11 +16,13 @@ /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK -/compiler/simplCore/CallArity.hs @nomeata +/compiler/simplCore/CallArity.hs @nomeata @sgraf /compiler/utils/UnVarGraph.hs @nomeata /compiler/simplCore/Exitify.hs @nomeata /compiler/simplStg/StgCse.hs @nomeata +/compiler/simplStg/StgLiftLams.hs @sgraf /compiler/cmm/CmmSwitch.hs @nomeata +/compiler/stranal/DmdAnal.hs @simonpj @sgraf /compiler/types @simonpj @goldfire /compiler/deSugar @simonpj @goldfire /compiler/hsSyn/Convert.hs @goldfire From git at git.haskell.org Sun Jan 27 22:39:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:39:57 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Remove directories that already exist when seeding extra_files (236beac) Message-ID: <20190127223957.054123A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/236beacaeddd19d03af61cfbb3d8a3850e97b3e7/ghc >--------------------------------------------------------------- commit 236beacaeddd19d03af61cfbb3d8a3850e97b3e7 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. >--------------------------------------------------------------- 236beacaeddd19d03af61cfbb3d8a3850e97b3e7 testsuite/driver/testlib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index ba4f6a5..4a87f0a 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -882,6 +882,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 Jan 27 22:40:00 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:00 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Add tests from #11982 (def84a1) Message-ID: <20190127224000.DE5743A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/def84a10dd9db34d86284cb0b8358261034eecc4/ghc >--------------------------------------------------------------- commit def84a10dd9db34d86284cb0b8358261034eecc4 Author: Ben Gamari Date: Tue Jan 22 11:27:30 2019 -0500 testsuite: Add tests from #11982 >--------------------------------------------------------------- def84a10dd9db34d86284cb0b8358261034eecc4 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 Jan 27 22:40:03 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:03 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Mark hWaitForInput-accurate-socket as requiring unix (55bbe9c) Message-ID: <20190127224003.DEDDD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/55bbe9cca2ef4bb0b6fa7eafd00e7aa20a667849/ghc >--------------------------------------------------------------- commit 55bbe9cca2ef4bb0b6fa7eafd00e7aa20a667849 Author: Ben Gamari Date: Wed Jan 23 13:06:45 2019 -0500 testsuite: Mark hWaitForInput-accurate-socket as requiring unix It imports System.Posix.IO. >--------------------------------------------------------------- 55bbe9cca2ef4bb0b6fa7eafd00e7aa20a667849 libraries/base/tests/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index 457d9f4..a6cb96d 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -200,7 +200,7 @@ test('T9681', normal, compile_fail, ['']) test('T8089', [exit_code(99), run_timeout_multiplier(0.01)], compile_and_run, ['']) -test('hWaitForInput-accurate-socket', normal, compile_and_run, ['']) +test('hWaitForInput-accurate-socket', reqlib('unix'), compile_and_run, ['']) test('T8684', expect_broken(8684), compile_and_run, ['']) test('T9826',normal, compile_and_run,['']) test('T9848', From git at git.haskell.org Sun Jan 27 22:40:06 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:06 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Normalise style (fc44e0b) Message-ID: <20190127224006.E45873A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/fc44e0b205c71abe3ac615ad3b2a292b37d7fc34/ghc >--------------------------------------------------------------- commit fc44e0b205c71abe3ac615ad3b2a292b37d7fc34 Author: Ben Gamari Date: Sun Jan 20 22:32:09 2019 -0500 testsuite: Normalise style >--------------------------------------------------------------- fc44e0b205c71abe3ac615ad3b2a292b37d7fc34 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 Jan 27 22:40:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:11 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: check-api-annotations checks for annotation preceding its span (3cf12e6) Message-ID: <20190127224011.1459C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/3cf12e6081e7a9f0c3d515de52ffd079186816a5/ghc >--------------------------------------------------------------- commit 3cf12e6081e7a9f0c3d515de52ffd079186816a5 Author: Alan Zimmerman Date: Tue Jan 22 23:29:25 2019 +0200 check-api-annotations checks for annotation preceding its span For an API annotation to be useful, it must not occur before the span it is enclosed in. So, for check-api-annotation output, a line such as ((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]), should be flagged as an error, as the AnnOpenP location of 3:21 precedes its enclosing span of 3:22-26. This patch does this. Closes #16217 >--------------------------------------------------------------- 3cf12e6081e7a9f0c3d515de52ffd079186816a5 testsuite/tests/ghc-api/annotations/Makefile | 4 ++ testsuite/tests/ghc-api/annotations/T10255.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10268.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10269.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10276.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10278.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10280.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10307.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10309.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10312.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10354.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10357.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10358.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10396.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10399.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T10598.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T11018.stdout | 8 +++- testsuite/tests/ghc-api/annotations/T11321.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T11332.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T12417.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T13163.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T15303.stdout | 7 +++- testsuite/tests/ghc-api/annotations/T16212.stdout | 49 ++++++++++++++++++++++ testsuite/tests/ghc-api/annotations/Test16212.hs | 11 +++++ testsuite/tests/ghc-api/annotations/all.T | 6 ++- .../tests/ghc-api/annotations/boolFormula.stdout | 7 +++- .../tests/ghc-api/annotations/bundle-export.stdout | 7 +++- .../tests/ghc-api/annotations/exampleTest.stdout | 7 +++- .../tests/ghc-api/annotations/load-main.stdout | 7 +++- utils/check-api-annotations/Main.hs | 22 +++++++--- 30 files changed, 237 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 3cf12e6081e7a9f0c3d515de52ffd079186816a5 From git at git.haskell.org Sun Jan 27 22:40:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:14 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Update Cabal submodule to latest master branch tip (d0b8a16) Message-ID: <20190127224014.101D73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/d0b8a16e388480306c5a07f8bd5172cff84138d4/ghc >--------------------------------------------------------------- commit d0b8a16e388480306c5a07f8bd5172cff84138d4 Author: Herbert Valerio Riedel Date: Wed Jan 23 01:01:15 2019 +0100 Update Cabal submodule to latest master branch tip >--------------------------------------------------------------- d0b8a16e388480306c5a07f8bd5172cff84138d4 libraries/Cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Cabal b/libraries/Cabal index 98fcb3a..97484d8 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit 98fcb3a964a4deef67920020a4a02d4d8552cc19 +Subproject commit 97484d8e46f3c542523ef5daf5470540a4d66cb6 From git at git.haskell.org Sun Jan 27 22:40:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:17 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: GhcPlugins: Fix lookup of TH names (0d9f105) Message-ID: <20190127224017.0CBE13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/0d9f105ba423af4f2ca215a18d04d4c8e2c372a8/ghc >--------------------------------------------------------------- commit 0d9f105ba423af4f2ca215a18d04d4c8e2c372a8 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. >--------------------------------------------------------------- 0d9f105ba423af4f2ca215a18d04d4c8e2c372a8 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 Jan 27 22:40:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:20 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Update binary submodule to latest master branch tip (f75c86a) Message-ID: <20190127224020.07F1D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/f75c86ab6687278547e2924fddda0192c65bb512/ghc >--------------------------------------------------------------- commit f75c86ab6687278547e2924fddda0192c65bb512 Author: Herbert Valerio Riedel Date: Wed Jan 23 23:26:49 2019 +0100 Update binary submodule to latest master branch tip >--------------------------------------------------------------- f75c86ab6687278547e2924fddda0192c65bb512 libraries/binary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/binary b/libraries/binary index fb461cf..9485581 160000 --- a/libraries/binary +++ b/libraries/binary @@ -1 +1 @@ -Subproject commit fb461cf048460813a7fac8e040c1004a0d123e42 +Subproject commit 94855814e2e4f7a0f191ffa5b4c98ee0147e3174 From git at git.haskell.org Sun Jan 27 22:40:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:23 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Skip T1288_ghci in unregisterised (022a717) Message-ID: <20190127224023.06C5A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/022a71761a84aec2a2e62e18bd481ac057b5b8a0/ghc >--------------------------------------------------------------- commit 022a71761a84aec2a2e62e18bd481ac057b5b8a0 Author: Ben Gamari Date: Tue Jan 22 12:13:28 2019 -0500 testsuite: Skip T1288_ghci in unregisterised As pointed out in #16085, these ghci tests are fragile in the unregisterised way. >--------------------------------------------------------------- 022a71761a84aec2a2e62e18bd481ac057b5b8a0 testsuite/tests/ffi/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index 3a3dfd7..5bc1ab2 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -100,6 +100,8 @@ 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), pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')], compile_and_run, ['T1288_ghci_c.o']) From git at git.haskell.org Sun Jan 27 22:40:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:27 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Add test for #16104 (372b5d1) Message-ID: <20190127224027.2DF1C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/372b5d1b4543334d9b446dc897227b838e40cf4e/ghc >--------------------------------------------------------------- commit 372b5d1b4543334d9b446dc897227b838e40cf4e Author: Ben Gamari Date: Tue Jan 15 11:48:59 2019 -0500 testsuite: Add test for #16104 >--------------------------------------------------------------- 372b5d1b4543334d9b446dc897227b838e40cf4e 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 Jan 27 22:40:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:30 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: hadrian: use new-exec to make sure alex & happy are in PATH (#16120) (5cb071a) Message-ID: <20190127224030.3874C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/5cb071af5b02b7433b2bb4d06062ac8b6fb387e8/ghc >--------------------------------------------------------------- commit 5cb071af5b02b7433b2bb4d06062ac8b6fb387e8 Author: Adam Sandberg Eriksson Date: Wed Jan 2 22:08:49 2019 +0100 hadrian: use new-exec to make sure alex & happy are in PATH (#16120) >--------------------------------------------------------------- 5cb071af5b02b7433b2bb4d06062ac8b6fb387e8 hadrian/build.cabal.bat | 3 ++- hadrian/build.cabal.sh | 3 ++- hadrian/src/Environment.hs | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadrian/build.cabal.bat b/hadrian/build.cabal.bat index 96f2725..3344791 100644 --- a/hadrian/build.cabal.bat +++ b/hadrian/build.cabal.bat @@ -31,7 +31,8 @@ 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 -- ^ + rem use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH + "%CABAL%" --project-file=%PROJ% new-exec %CABFLAGS% hadrian -- ^ --directory "%CD%" ^ %* ) else ( diff --git a/hadrian/build.cabal.sh b/hadrian/build.cabal.sh index 8c7b594..f28c3e0 100755 --- a/hadrian/build.cabal.sh +++ b/hadrian/build.cabal.sh @@ -24,7 +24,8 @@ CABVER=( ${CABVERSTR//./ } ) 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 -- \ + # use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH + "$CABAL" --project-file="$PROJ" new-exec $CABFLAGS hadrian -- \ --directory "$PWD" \ "$@" else diff --git a/hadrian/src/Environment.hs b/hadrian/src/Environment.hs index 1666c68..ef98bb1 100644 --- a/hadrian/src/Environment.hs +++ b/hadrian/src/Environment.hs @@ -10,6 +10,10 @@ setupEnvironment = do -- Cabal refuses to work when GHC_PACKAGE_PATH is set (e.g. by Stack) unsetEnv "GHC_PACKAGE_PATH" + -- cabal new-exec sets GHC_ENVIRONMENT, it needs to be unset for GHC + -- invocations to work properly + unsetEnv "GHC_ENVIRONMENT" + -- in MinGW if PWD is set to a Windows "C:\\" style path then configure -- `pwd` will return the Windows path, and then modifying $PATH will fail. -- See https://github.com/snowleopard/hadrian/issues/189 for details. From git at git.haskell.org Sun Jan 27 22:40:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:33 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Add predicate for CPU feature availability (1dd251b) Message-ID: <20190127224033.8FCF33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/1dd251b861c98c7b42a117b820afef5020745585/ghc >--------------------------------------------------------------- commit 1dd251b861c98c7b42a117b820afef5020745585 Author: Ben Gamari Date: Thu Dec 27 14:41:01 2018 -0500 testsuite: Add predicate for CPU feature availability Previously testing code-generation for ISA extensions was nearly impossible since we had no ability to determine whether the host supports the needed extension. Here we fix this by introducing a simple /proc/cpuinfo-based testsuite predicate. We really ought to >--------------------------------------------------------------- 1dd251b861c98c7b42a117b820afef5020745585 testsuite/driver/cpu_features.py | 71 ++++++++++++++++++++++++++++++++++++++++ testsuite/driver/runtests.py | 7 ++++ testsuite/driver/testlib.py | 1 + 3 files changed, 79 insertions(+) diff --git a/testsuite/driver/cpu_features.py b/testsuite/driver/cpu_features.py new file mode 100644 index 0000000..7716306 --- /dev/null +++ b/testsuite/driver/cpu_features.py @@ -0,0 +1,71 @@ +import os +from testglobals import config +import subprocess +import re + +# Feature names generally follow the naming used by Linux's /proc/cpuinfo. +SUPPORTED_CPU_FEATURES = { + # These aren't comprehensive; they are only CPU features that we care about + + # x86: + 'sse', 'sse2', 'sse3', 'ssse3', 'sse4_1', 'sse4_2', + 'avx1', 'avx2', + 'popcnt', 'bmi1', 'bmi2' +} + +cpu_feature_cache = None + +def get_cpu_features(): + if config.os in ['mingw32', 'linux'] and os.path.exists('/proc/cpuinfo'): + f = open('/proc/cpuinfo').read() + flags = re.search(r'flags\s*:\s*.*$', f, re.M) + if flags is None: + print('get_cpu_features: failed to find cpu features') + return {} + flags = set(flags.group(0).split()) + if 'pni' in flags: + flags.add('sse3') + flags.remove('pni') + return flags + + elif config.os == 'darwin': + out = subprocess.check_output(['sysctl', 'hw']).decode('UTF-8') + features = set() + def check_feature(darwin_name, our_name=None): + if re.search(r'hw\.optional.%s:\s*1' % darwin_name, out) is not None: + features.add(darwin_name if our_name is None else our_name) + + for feature in SUPPORTED_CPU_FEATURES: + check_feature(feature) + + # A few annoying cases + check_feature('avx1_0', 'avx1') + check_feature('avx2_0', 'avx2') + return features + + else: + # TODO: Add {Open,Free}BSD support + print('get_cpu_features: Lacking support for your platform') + + return {} + +def have_cpu_feature(feature): + """ + A testsuite predicate for testing the availability of CPU features. + """ + assert feature in SUPPORTED_CPU_FEATURES + if cpu_feature_cache is None: + cpu_feature_cache = get_cpu_features() + print('Found CPU features:', ' '.join(cpu_feature_cache)) + # Sanity checking + assert all(feat in SUPPORTED_CPU_FEATURES + for feat in cpu_feature_cache) + + return feature in cpu_feature_cache + + +if __name__ == '__main__': + import sys + config.os = sys.argv[1] + print(get_cpu_features()) + diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 55b13df..247a5cc 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -27,6 +27,7 @@ from testutil import getStdout, Watcher, str_warn, str_info from testglobals import getConfig, ghc_env, getTestRun, TestOptions, brokens from perf_notes import MetricChange, inside_git_repo, is_worktree_dirty from junit import junit +import cpu_features # Readline sometimes spews out ANSI escapes for some values of TERM, # which result in test failures. Thus set TERM to a nice, simple, safe @@ -274,6 +275,12 @@ t.start_time = time.localtime() print('Beginning test run at', time.strftime("%c %Z",t.start_time)) +# For reference +try: + print('Detected CPU features: ', cpu_features.get_cpu_features()) +except Exception as e: + print('Failed to detect CPU features: ', e) + sys.stdout.flush() # we output text, which cannot be unbuffered sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w") diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c09d02a..ba4f6a5 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -20,6 +20,7 @@ import subprocess from testglobals import config, ghc_env, default_testopts, brokens, t from testutil import strip_quotes, lndir, link_or_copy_file, passed, failBecause, str_fail, str_pass +from cpu_features import have_cpu_feature import perf_notes as Perf from perf_notes import MetricChange extra_src_files = {'T4198': ['exitminus1.c']} # TODO: See #12223 From git at git.haskell.org Sun Jan 27 22:40:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:36 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: testsuite: Skip foreignInterruptible in unregisterised way (dc6fd39) Message-ID: <20190127224036.8E1AF3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/dc6fd390c64a2ee7c3df1da116504a5faf0afea5/ghc >--------------------------------------------------------------- commit dc6fd390c64a2ee7c3df1da116504a5faf0afea5 Author: Ben Gamari Date: Wed Jan 23 21:32:47 2019 -0500 testsuite: Skip foreignInterruptible in unregisterised way See #15467. >--------------------------------------------------------------- dc6fd390c64a2ee7c3df1da116504a5faf0afea5 testsuite/tests/concurrent/should_run/all.T | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 99f9b6e..5ba0657 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -196,6 +196,8 @@ 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), # I don't think we support interrupting Sleep() # on Windows. --SDM only_threaded_ways, From git at git.haskell.org Sun Jan 27 22:40:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:39 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Update CODEOWNERS (019127b) Message-ID: <20190127224039.906683A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/019127b887d89a686dac162348d16da88c0d2d1b/ghc >--------------------------------------------------------------- commit 019127b887d89a686dac162348d16da88c0d2d1b Author: Moritz Angermann Date: Tue Jan 22 10:51:46 2019 -0500 Update CODEOWNERS >--------------------------------------------------------------- 019127b887d89a686dac162348d16da88c0d2d1b CODEOWNERS | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index e71563d..8533117 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,10 +5,14 @@ * @bgamari # Build system -/hadrian @snowleopard @alp @DavidEichmann +/hadrian @snowleopard @alp @DavidEichmann @angerman +/configure.ac @angerman @hvr +/aclocal.m4 @angerman @hvr +/config.sub @angerman @hvr # RTS-like things -/rts @bgamari @simonmar @osa1 @Phyx +/rts @bgamari @simonmar @osa1 @Phyx @angerman +/rts/linker @angerman @Phyx /includes @bgamari @simonmar @osa1 # The compiler @@ -16,6 +20,7 @@ /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK +/compiler/llvmGen @angerman /compiler/codeGen @osa1 /compiler/cmm @osa1 /compiler/simplCore/CallArity.hs @nomeata @sgraf @@ -32,3 +37,9 @@ # Core libraries /libraries/base @hvr /libraries/template-haskell @goldfire + +# Internal utilities and libraries +/libraries/libiserv @angerman @simonmar +/utils/iserv-proxy @angerman @simonmar +/utils/iserv @angerman @simonmar + From git at git.haskell.org Sun Jan 27 22:40:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:42 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Add myself to a few more places (18bd272) Message-ID: <20190127224042.98F0E3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/18bd27243a1bac10701fde8f3a01e83d571958ac/ghc >--------------------------------------------------------------- commit 18bd27243a1bac10701fde8f3a01e83d571958ac Author: Ömer Sinan Ağacan Date: Tue Jan 22 18:48:37 2019 +0300 Add myself to a few more places >--------------------------------------------------------------- 18bd27243a1bac10701fde8f3a01e83d571958ac CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 97ec69d..e71563d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,6 +16,8 @@ /compiler/rename @simonpj @goldfire /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK +/compiler/codeGen @osa1 +/compiler/cmm @osa1 /compiler/simplCore/CallArity.hs @nomeata @sgraf /compiler/utils/UnVarGraph.hs @nomeata /compiler/simplCore/Exitify.hs @nomeata From git at git.haskell.org Sun Jan 27 22:40:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:45 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Add @simonmar to various things in CODEOWNERS (e716438) Message-ID: <20190127224045.945C93A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/e7164384c26e9d177304ab77fdf6c16431832d7f/ghc >--------------------------------------------------------------- commit e7164384c26e9d177304ab77fdf6c16431832d7f Author: Simon Marlow Date: Tue Jan 22 11:23:08 2019 -0500 Add @simonmar to various things in CODEOWNERS >--------------------------------------------------------------- e7164384c26e9d177304ab77fdf6c16431832d7f CODEOWNERS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 8533117..3badb09 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -21,9 +21,10 @@ /compiler/typecheck/TcDeriv* @RyanGlScott /compiler/nativeGen @simonmar @bgamari @AndreasK /compiler/llvmGen @angerman -/compiler/codeGen @osa1 -/compiler/cmm @osa1 -/compiler/simplCore/CallArity.hs @nomeata @sgraf +/compiler/codeGen @simonmar @osa1 +/compiler/cmm @simonmar @osa1 +/compiler/ghci @simonmar +/compiler/simplCore/CallArity.hs @nomeata /compiler/utils/UnVarGraph.hs @nomeata /compiler/simplCore/Exitify.hs @nomeata /compiler/simplStg/StgCse.hs @nomeata From git at git.haskell.org Sun Jan 27 22:40:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:48 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Don't overwrite the set log_action when using --interactive (10faf44) Message-ID: <20190127224048.90EC33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/10faf44d97095b2f8516b6d449d266f6889dcd70/ghc >--------------------------------------------------------------- commit 10faf44d97095b2f8516b6d449d266f6889dcd70 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 >--------------------------------------------------------------- 10faf44d97095b2f8516b6d449d266f6889dcd70 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 From git at git.haskell.org Sun Jan 27 22:40:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 27 Jan 2019 22:40:51 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Hadrian: Update instructions for building on Windows (0896bbf) Message-ID: <20190127224051.8EF373A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/0896bbf66723c31313f929e3563b25184d09fc8e/ghc >--------------------------------------------------------------- commit 0896bbf66723c31313f929e3563b25184d09fc8e Author: Andrey Mokhov Date: Sun Jan 27 22:34:30 2019 +0000 Hadrian: Update instructions for building on Windows The `hadrian/doc/windows.md` file has falled out of date. In particular it still points to the old GitHub repository, and uses incorrect path to GHC. This patch fixes it. >--------------------------------------------------------------- 0896bbf66723c31313f929e3563b25184d09fc8e hadrian/README.md | 2 +- hadrian/doc/windows.md | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/hadrian/README.md b/hadrian/README.md index a3b8a1b..7b6646d 100644 --- a/hadrian/README.md +++ b/hadrian/README.md @@ -262,7 +262,7 @@ projects), as well as Well-Typed. [issues]: https://github.com/snowleopard/hadrian/issues [ghc-preparation]: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation [ghc-windows-quick-build]: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows#AQuickBuild -[windows-build]: https://github.com/snowleopard/hadrian/blob/master/doc/windows.md +[windows-build]: https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md [ghc-split-objs-bug]: https://ghc.haskell.org/trac/ghc/ticket/11315 [test-issue]: https://github.com/snowleopard/hadrian/issues/197 [validation-issue]: https://github.com/snowleopard/hadrian/issues/187 diff --git a/hadrian/doc/windows.md b/hadrian/doc/windows.md index 0ad2086..aa59bc5 100644 --- a/hadrian/doc/windows.md +++ b/hadrian/doc/windows.md @@ -1,15 +1,13 @@ # Building GHC on Windows -[![Windows status](https://img.shields.io/appveyor/ci/snowleopard/hadrian/master.svg?label=Windows)](https://ci.appveyor.com/project/snowleopard/hadrian) +Here is how you can build GHC, from source, on Windows with minimal requirements. +We only assume that `git` and `stack` are installed (see +[prerequisites](https://github.com/snowleopard/hadrian/blob/master/doc/windows.md#prerequisites)). -Here is how you can build GHC, from source, on Windows. We assume that `git` and `stack` are installed -(see [prerequisites](https://github.com/snowleopard/hadrian/blob/master/doc/windows.md#prerequisites)). - -```sh -# Get GHC and Hadrian sources; git core.autocrlf should be set to false (see Prerequisites section) +``` +# Get GHC sources; git core.autocrlf should be set to false (see Prerequisites section) git clone --recursive git://git.haskell.org/ghc.git cd ghc -git clone git://github.com/snowleopard/hadrian # Download and install the bootstrapping GHC and MSYS2 cd hadrian @@ -27,30 +25,33 @@ stack exec hadrian -- --directory ".." -j --flavour=quickest --configure # Test GHC cd .. -inplace\bin\ghc-stage2 -e 1+2 +_build\stage1\bin\ghc -e 1+2 ``` -The entire process should take about 20 minutes. Note, this will build GHC without -optimisations. If you need an optimised GHC, drop the `--flavour=quickest` flag from -the build command line (this will slow down the build to about an hour). +The entire process should take about 20 minutes. Note, this will build GHC +without optimisations. If you need an optimised GHC, drop the `--flavour=quickest` +flag from the build command line (this will slow down the build to about an hour). These are currently not the [official GHC building instructions](https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows), but are much simpler and may also be more robust. -The `stack build` and `stack exec hadrian` commands can be replaced by an invocation -of Hadrian's Stack-based build script: `build.stack.bat -j --flavour=quickest`. Use this -script if you plan to work on Hadrian and/or rebuild GHC often. +The `stack build` and `stack exec hadrian` commands can be replaced by an +invocation of Hadrian's Stack-based build script: +`build.stack.bat -j --flavour=quickest`. Use this script if you plan to work on +Hadrian and/or rebuild GHC often. ## Prerequisites -The above works on a clean machine with `git` and `stack` installed (tested with default -installation settings), which you can get from https://git-scm.com/download/win and +The above works on a clean machine with `git` and `stack` installed (tested with +default installation settings), which you can get from +https://git-scm.com/download/win and https://www.stackage.org/stack/windows-x86_64-installer. -Note that `git` should be configured to check out Unix-style line endings. The default behaviour -of `git` on Windows is to check out Windows-style line endings which can cause issues during the -build. This can be changed using the following command: +Note that `git` should be configured to check out Unix-style line endings. The +default behaviour of `git` on Windows is to check out Windows-style line endings +which can cause issues during the build. This can be changed using the following +command: git config --global core.autocrlf false @@ -61,10 +62,10 @@ If you would like to restore the default behaviour later run: ## Testing These instructions have been tested on a clean Windows 10 machine using the -[free VirtualBox image](https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/), -and are also routinely tested on -[Hadrian's AppVeyor CI instance](https://ci.appveyor.com/project/snowleopard/hadrian/history). +[free VirtualBox image](https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/). + +**TODO:** It would be useful to test the instructions routinely on CI. ## Notes -Beware of the [current limitations of Hadrian](https://github.com/snowleopard/hadrian#current-limitations). +Beware of the [current limitations of Hadrian](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md#current-limitations). From git at git.haskell.org Mon Jan 28 18:39:16 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Mon, 28 Jan 2019 18:39:16 +0000 (UTC) Subject: [commit: ghc] wip/andrey/windows-doc: Hadrian: Fix outdated link. (1eb08cd) Message-ID: <20190128183916.2B1913A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/andrey/windows-doc Link : http://ghc.haskell.org/trac/ghc/changeset/1eb08cda92c18e57f739dd2188499842c4a18efc/ghc >--------------------------------------------------------------- commit 1eb08cda92c18e57f739dd2188499842c4a18efc Author: Andrey Mokhov Date: Sun Jan 27 22:42:23 2019 +0000 Hadrian: Fix outdated link. >--------------------------------------------------------------- 1eb08cda92c18e57f739dd2188499842c4a18efc hadrian/doc/windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/doc/windows.md b/hadrian/doc/windows.md index aa59bc5..bf7707c 100644 --- a/hadrian/doc/windows.md +++ b/hadrian/doc/windows.md @@ -2,7 +2,7 @@ Here is how you can build GHC, from source, on Windows with minimal requirements. We only assume that `git` and `stack` are installed (see -[prerequisites](https://github.com/snowleopard/hadrian/blob/master/doc/windows.md#prerequisites)). +[prerequisites](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md#prerequisites)). ``` # Get GHC sources; git core.autocrlf should be set to false (see Prerequisites section) From git at git.haskell.org Wed Jan 30 00:25:27 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:27 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16087' created Message-ID: <20190130002527.F23E53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16087 Referencing: 29b4282d1d6e815899788840d078ae61593d1ca1 From git at git.haskell.org Wed Jan 30 00:25:29 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:29 +0000 (UTC) Subject: [commit: ghc] branch 'wip/ghc-8.6-fix-submodules' created Message-ID: <20190130002529.F24203A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/ghc-8.6-fix-submodules Referencing: 21ffb7b2e167f911afd902a7fdbe57c8656263f2 From git at git.haskell.org Wed Jan 30 00:25:31 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:31 +0000 (UTC) Subject: [commit: ghc] branch 'wip/T16254' created Message-ID: <20190130002532.0022A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/T16254 Referencing: aa00bdb2122991f07415e1f5f4850d929dad96a3 From git at git.haskell.org Wed Jan 30 00:25:34 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:34 +0000 (UTC) Subject: [commit: ghc] branch 'wip/junit-unexpected-passes' created Message-ID: <20190130002534.014783A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/junit-unexpected-passes Referencing: 55e938e3a11af87377ff3a0f06dcb13783e448e7 From git at git.haskell.org Wed Jan 30 00:25:36 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:36 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-fix-submodules: gitlab: Collect artifacts on Windows (3ad6c60) Message-ID: <20190130002536.E9AB03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-fix-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/3ad6c60e13d0335fe2097ee529d9886d6989df89/ghc >--------------------------------------------------------------- commit 3ad6c60e13d0335fe2097ee529d9886d6989df89 Author: Ben Gamari Date: Tue Jan 15 23:21:39 2019 -0500 gitlab: Collect artifacts on Windows >--------------------------------------------------------------- 3ad6c60e13d0335fe2097ee529d9886d6989df89 .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5538bb9..35aee09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -367,11 +367,21 @@ validate-x86_64-windows: bash -c './configure --with-ghc=`pwd`/toolchain/bin/ghc --enable-tarballs-autodownload HappyCmd=`pwd`/toolchain/bin/happy AlexCmd=`pwd`/toolchain/bin/alex' - bash -c "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 '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 + reports: + junit: junit.xml + paths: + - ghc.tar.xz + - junit.xml ############################################################ # Validation via CircleCI From git at git.haskell.org Wed Jan 30 00:25:39 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:39 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-fix-submodules: PPC NCG: Implement simple 64-Bit compare on 32-bit (c25a9d8e) Message-ID: <20190130002539.E57A63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-fix-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/c25a9d8ea680fd6a2b2ed2bdf2e623c3fb728e14/ghc >--------------------------------------------------------------- commit c25a9d8ea680fd6a2b2ed2bdf2e623c3fb728e14 Author: Peter Trommler Date: Thu Jan 17 13:38:21 2019 -0500 PPC NCG: Implement simple 64-Bit compare on 32-bit >--------------------------------------------------------------- c25a9d8ea680fd6a2b2ed2bdf2e623c3fb728e14 compiler/nativeGen/PPC/CodeGen.hs | 342 ++++++++++++++++++++------------------ 1 file changed, 181 insertions(+), 161 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc c25a9d8ea680fd6a2b2ed2bdf2e623c3fb728e14 From git at git.haskell.org Wed Jan 30 00:25:42 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:42 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Fix incorrectly named configure options (b89b6e7) Message-ID: <20190130002542.E46853A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/b89b6e71c798996724ba99f273f88d8a3637fb8d/ghc >--------------------------------------------------------------- commit b89b6e71c798996724ba99f273f88d8a3637fb8d Author: Alec Theriault Date: Sat Jan 26 18:07:48 2019 -0800 Fix incorrectly named configure options Although we should use 'AC_ARG_ENABLE' for boolean flags, it also means options get named '--enable-*', not '--with-*'. This should unbreak the --with-intree-gmp option. >--------------------------------------------------------------- b89b6e71c798996724ba99f273f88d8a3637fb8d aclocal.m4 | 4 ++-- libraries/integer-gmp/configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 62825c3..9d2390e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1780,13 +1780,13 @@ AC_DEFUN([FP_GMP], [directory containing gmp library])], [GMP_LIB_DIRS=$withval]) - AC_ARG_ENABLE([intree-gmp], + AC_ARG_WITH([intree-gmp], [AC_HELP_STRING([--with-intree-gmp], [force using the in-tree GMP])], [GMP_FORCE_INTREE=YES], [GMP_FORCE_INTREE=NO]) - AC_ARG_ENABLE([gmp-framework-preferred], + AC_ARG_WITH([gmp-framework-preferred], [AC_HELP_STRING([--with-gmp-framework-preferred], [on OSX, prefer the GMP framework to the gmp lib])], [GMP_PREFER_FRAMEWORK=YES], diff --git a/libraries/integer-gmp/configure.ac b/libraries/integer-gmp/configure.ac index d189375..1ccd48e 100644 --- a/libraries/integer-gmp/configure.ac +++ b/libraries/integer-gmp/configure.ac @@ -27,13 +27,13 @@ AC_ARG_WITH([gmp-libraries], [GMP_LIB_DIRS=$withval; LDFLAGS="-L$withval"], [GMP_LIB_DIRS=]) -AC_ARG_ENABLE([gmp-framework-preferred], +AC_ARG_WITH([gmp-framework-preferred], [AC_HELP_STRING([--with-gmp-framework-preferred], [on OSX, prefer the GMP framework to the gmp lib])], [GMP_PREFER_FRAMEWORK=YES], [GMP_PREFER_FRAMEWORK=NO]) -AC_ARG_ENABLE([intree-gmp], +AC_ARG_WITH([intree-gmp], [AC_HELP_STRING([--with-intree-gmp], [force using the in-tree GMP])], [GMP_FORCE_INTREE=YES], From git at git.haskell.org Wed Jan 30 00:25:45 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:45 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Fix regDotColor for amd64. (7223b44) Message-ID: <20190130002545.E36B33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/7223b44df3212984c6f013e129afcdc2ab170ff3/ghc >--------------------------------------------------------------- commit 7223b44df3212984c6f013e129afcdc2ab170ff3 Author: klebinger.andreas at gmx.at Date: Fri Jan 25 23:05:05 2019 +0100 Fix regDotColor for amd64. Add missing color mappings to regDotColor for amd64. Also set fakeRegs to red instead of xmm regs. >--------------------------------------------------------------- 7223b44df3212984c6f013e129afcdc2ab170ff3 compiler/nativeGen/X86/RegInfo.hs | 77 +++++++++++++++++++++++---------------- compiler/nativeGen/X86/Regs.hs | 2 + 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 226441b..7ca0c0c 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -21,6 +21,9 @@ import Unique import UniqFM import X86.Regs +import Debug.Trace +import Numeric (showHex) + mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format @@ -32,38 +35,50 @@ mkVirtualReg u format regDotColor :: Platform -> RealReg -> SDoc regDotColor platform reg - = let Just str = lookupUFM (regColors platform) reg - in text str + = case (lookupUFM (regColors platform) reg) of + Just str -> text str + _ -> panic "Register not assigned a color" regColors :: Platform -> UniqFM [Char] -regColors platform = listToUFM (normalRegColors platform ++ fpRegColors) +regColors platform = listToUFM (normalRegColors platform ++ fpRegColors platform) normalRegColors :: Platform -> [(Reg,String)] -normalRegColors platform - | target32Bit platform = [ (eax, "#00ff00") - , (ebx, "#0000ff") - , (ecx, "#00ffff") - , (edx, "#0080ff") ] - | otherwise = [ (rax, "#00ff00"), (eax, "#00ff00") - , (rbx, "#0000ff"), (ebx, "#0000ff") - , (rcx, "#00ffff"), (ecx, "#00ffff") - , (rdx, "#0080ff"), (edx, "#00ffff") - , (r8, "#00ff80") - , (r9, "#008080") - , (r10, "#0040ff") - , (r11, "#00ff40") - , (r12, "#008040") - , (r13, "#004080") - , (r14, "#004040") - , (r15, "#002080") ] - -fpRegColors :: [(Reg,String)] -fpRegColors = - [ (fake0, "#ff00ff") - , (fake1, "#ff00aa") - , (fake2, "#aa00ff") - , (fake3, "#aa00aa") - , (fake4, "#ff0055") - , (fake5, "#5500ff") ] - - ++ zip (map regSingle [24..39]) (repeat "red") +normalRegColors platform = + zip (map regSingle [0..lastint platform]) colors + where + -- 16 colors - enough for amd64 gp regs + colors = ["#800000","#ff0000","#808000","#ffff00","#008000" + ,"#00ff00","#008080","#00ffff","#000080","#0000ff" + ,"#800080","#ff00ff","#87005f","#875f00","#87af00" + ,"#ff00af"] + +fpRegColors :: Platform -> [(Reg,String)] +fpRegColors platform = + [ (fake0, "red") + , (fake1, "red") + , (fake2, "red") + , (fake3, "red") + , (fake4, "red") + , (fake5, "red") ] + + ++ zip (map regSingle [firstxmm..lastxmm platform]) greys + where + -- 16 shades of grey, enough for the currently supported + -- SSE extensions. + greys = ["#0e0e0e","#1c1c1c","#2a2a2a","#383838","#464646" + ,"#545454","#626262","#707070","#7e7e7e","#8c8c8c" + ,"#9a9a9a","#a8a8a8","#b6b6b6","#c4c4c4","#d2d2d2" + ,"#e0e0e0"] + + + +-- 32 shades of grey - use for avx 512 if we ever need it +-- greys = ["#070707","#0e0e0e","#151515","#1c1c1c" +-- ,"#232323","#2a2a2a","#313131","#383838","#3f3f3f" +-- ,"#464646","#4d4d4d","#545454","#5b5b5b","#626262" +-- ,"#696969","#707070","#777777","#7e7e7e","#858585" +-- ,"#8c8c8c","#939393","#9a9a9a","#a1a1a1","#a8a8a8" +-- ,"#afafaf","#b6b6b6","#bdbdbd","#c4c4c4","#cbcbcb" +-- ,"#d2d2d2","#d9d9d9","#e0e0e0"] + + diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs index fcb0847..b718118 100644 --- a/compiler/nativeGen/X86/Regs.hs +++ b/compiler/nativeGen/X86/Regs.hs @@ -33,9 +33,11 @@ module X86.Regs ( rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp, r8, r9, r10, r11, r12, r13, r14, r15, + lastint, xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15, xmm, + firstxmm, lastxmm, ripRel, allFPArgRegs, From git at git.haskell.org Wed Jan 30 00:25:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:48 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Update CODEOWNERS files with utils (f8605fa) Message-ID: <20190130002548.E16D33A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/f8605fa2b36bb7ff462ce9b12d1dbf23c9503f00/ghc >--------------------------------------------------------------- commit f8605fa2b36bb7ff462ce9b12d1dbf23c9503f00 Author: Tamar Christina Date: Sun Jan 27 22:20:38 2019 +0000 Update CODEOWNERS files with utils >--------------------------------------------------------------- f8605fa2b36bb7ff462ce9b12d1dbf23c9503f00 CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 3badb09..26b9608 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -43,4 +43,6 @@ /libraries/libiserv @angerman @simonmar /utils/iserv-proxy @angerman @simonmar /utils/iserv @angerman @simonmar +/utils/gen-dll @Phyx +/utils/fs @Phyx From git at git.haskell.org Wed Jan 30 00:25:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:51 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: gitlab-ci: Fix Windows cleanup command line (6da9f4c) Message-ID: <20190130002551.E03BD3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/6da9f4c8df7a216234ef50104e400cdcbfbc1bd4/ghc >--------------------------------------------------------------- commit 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4 Author: Ben Gamari Date: Wed Jan 23 10:09:49 2019 -0500 gitlab-ci: Fix Windows cleanup command line Why is it so hard to delete a directory's contents without deleting the directory itself in Windows? This will forever remain a mystery. >--------------------------------------------------------------- 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4 .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d739eff..2478d0d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -407,5 +407,8 @@ cleanup-windows: - set "BUILD_DIR=%BUILD_DIR:/=\%" - echo "Cleaning %BUILD_DIR%" - cd \GitLabRunner - - rmdir /S /Q %BUILD_DIR%/* + # This is way more complicated than it should be: + # See https://stackoverflow.com/questions/1965787 + - del %BUILD_DIR%\* /F /Q + - for /d %%p in (%BUILD_DIR%\*) do rd /Q /S "%%p" - exit /b 0 From git at git.haskell.org Wed Jan 30 00:25:55 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:55 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Test that hsc2hs works with promoted data constructors (79a5afb) Message-ID: <20190130002555.801643A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/79a5afb613235e93bc2c580987595b9c1324db15/ghc >--------------------------------------------------------------- commit 79a5afb613235e93bc2c580987595b9c1324db15 Author: Andrew Martin Date: Mon Jan 21 16:04:30 2019 -0500 Test that hsc2hs works with promoted data constructors >--------------------------------------------------------------- 79a5afb613235e93bc2c580987595b9c1324db15 testsuite/tests/hsc2hs/Makefile | 5 +++++ testsuite/tests/hsc2hs/T11004.hsc | 13 +++++++++++++ testsuite/tests/hsc2hs/all.T | 2 ++ utils/hsc2hs | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile index b0751f1..9291e4b 100644 --- a/testsuite/tests/hsc2hs/Makefile +++ b/testsuite/tests/hsc2hs/Makefile @@ -41,6 +41,11 @@ T10272: '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make $@ ./$@ +.PHONY: T11004 +T11004: + LANG=C '$(HSC2HS)' $@.hsc + '$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs + .PHONY: T12504 T12504: '$(HSC2HS)' T12504/path/to/$@.hsc diff --git a/testsuite/tests/hsc2hs/T11004.hsc b/testsuite/tests/hsc2hs/T11004.hsc new file mode 100644 index 0000000..796d35a --- /dev/null +++ b/testsuite/tests/hsc2hs/T11004.hsc @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} + +module T11004 where + +import Data.Kind (Type) + +data Foo = Foo' | Bar + +data Indexed :: Foo -> Type where + IndexedA :: Indexed ' Foo' + IndexedB :: Indexed 'Bar diff --git a/testsuite/tests/hsc2hs/all.T b/testsuite/tests/hsc2hs/all.T index f237d9a..d42f385 100644 --- a/testsuite/tests/hsc2hs/all.T +++ b/testsuite/tests/hsc2hs/all.T @@ -14,6 +14,8 @@ test('T4340', [], run_command, ['$MAKE -s --no-print-directory T4340']) test('T10272', [], run_command, ['$MAKE -s --no-print-directory T10272']) +test('T11004', [], run_command, ['$MAKE -s --no-print-directory T11004']) + test('T12504', [extra_files(['T12504']), ignore_stdout], run_command, ['$MAKE -s --no-print-directory T12504']) diff --git a/utils/hsc2hs b/utils/hsc2hs index a816333..fac8b62 160000 --- a/utils/hsc2hs +++ b/utils/hsc2hs @@ -1 +1 @@ -Subproject commit a816333ae67c54b98cce4ed22621242714967b3e +Subproject commit fac8b62e48f4c99cfe8f3efff63c8fcd94b2a1d6 From git at git.haskell.org Wed Jan 30 00:25:58 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:25:58 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Some refactoring in tcInferApps (7797492) Message-ID: <20190130002558.8B5C03A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/77974922eb4390899cb151de840308c5fe87949b/ghc >--------------------------------------------------------------- commit 77974922eb4390899cb151de840308c5fe87949b Author: Richard Eisenberg Date: Fri Jan 11 17:38:01 2019 -0500 Some refactoring in tcInferApps Should be no change in behavior, but this makes the control flow a little more apparent. >--------------------------------------------------------------- 77974922eb4390899cb151de840308c5fe87949b compiler/typecheck/TcHsType.hs | 188 +++++++++++++++++++++-------------------- compiler/types/TyCoRep.hs | 3 + 2 files changed, 99 insertions(+), 92 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 77974922eb4390899cb151de840308c5fe87949b From git at git.haskell.org Wed Jan 30 00:26:02 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:02 +0000 (UTC) Subject: [commit: ghc] wip/T16087, wip/T16254, wip/junit-unexpected-passes: Use sigPrec in more places in Convert and HsUtils (b1e569a) Message-ID: <20190130002602.8936B3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/T16087,wip/T16254,wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/b1e569a54085bf1093b4f858f8c7c739e3be769b/ghc >--------------------------------------------------------------- commit b1e569a54085bf1093b4f858f8c7c739e3be769b Author: Ryan Scott Date: Mon Jan 14 21:45:17 2019 -0500 Use sigPrec in more places in Convert and HsUtils Trac #16183 was caused by TH conversion (in `Convert`) not properly inserting parentheses around occurrences of explicit signatures where appropriate, such as in applications, function types, and type family equations. Solution: use `parenthesizeHsType sigPrec` in these places. While I was in town, I also updated `nlHsFunTy` to do the same thing. >--------------------------------------------------------------- b1e569a54085bf1093b4f858f8c7c739e3be769b compiler/hsSyn/Convert.hs | 67 +++++++++++++++++++------------------ compiler/hsSyn/HsUtils.hs | 8 +---- testsuite/tests/th/T12045TH1.stderr | 4 +-- testsuite/tests/th/T16183.hs | 11 ++++++ testsuite/tests/th/T16183.stderr | 12 +++++++ testsuite/tests/th/all.T | 1 + 6 files changed, 62 insertions(+), 41 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b1e569a54085bf1093b4f858f8c7c739e3be769b From git at git.haskell.org Wed Jan 30 00:26:05 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:05 +0000 (UTC) Subject: [commit: ghc] wip/T16254: Fix #12509: ghci -XSafe fails in an inscrutable way (7cdcd3e) Message-ID: <20190130002605.882663A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16254 Link : http://ghc.haskell.org/trac/ghc/changeset/7cdcd3e12a5c3a337e36fa80c64bd72e5ef79b24/ghc >--------------------------------------------------------------- commit 7cdcd3e12a5c3a337e36fa80c64bd72e5ef79b24 Author: Roland Senn Date: Mon Jan 28 10:53:50 2019 +0100 Fix #12509: ghci -XSafe fails in an inscrutable way >--------------------------------------------------------------- 7cdcd3e12a5c3a337e36fa80c64bd72e5ef79b24 ghc/GHCi/UI/Monad.hs | 13 +++++++++---- .../tests/safeHaskell/ghci/T12509.script | 0 testsuite/tests/safeHaskell/ghci/all.T | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 8f60dfb..dddbe82 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -511,10 +511,15 @@ compileGHCiExpr expr = withTempSession mkTempSession $ GHC.compileExprRemote expr where mkTempSession hsc_env = hsc_env - { hsc_dflags = (hsc_dflags hsc_env) - -- RebindableSyntax can wreak havoc with GHCi in several ways - -- (see #13385 and #14342 for examples), so we take care to disable it - -- for the duration of running expressions that are internal to GHCi. + { hsc_dflags = (hsc_dflags hsc_env) { + -- Running GHCi's internal expression is incompatible with -XSafe. + -- We temporarily disable any Safe Haskell settings while running + -- GHCi internal expressions. (see #12509) + safeHaskell = Sf_None + } + -- RebindableSyntax can wreak havoc with GHCi in several ways + -- (see #13385 and #14342 for examples), so we temporarily + -- disable it too. `xopt_unset` LangExt.RebindableSyntax -- We heavily depend on -fimplicit-import-qualified to compile expr -- with fully qualified names without imports. diff --git a/libraries/ghc-compact/tests/compact_serialize.stderr b/testsuite/tests/safeHaskell/ghci/T12509.script similarity index 100% copy from libraries/ghc-compact/tests/compact_serialize.stderr copy to testsuite/tests/safeHaskell/ghci/T12509.script diff --git a/testsuite/tests/safeHaskell/ghci/all.T b/testsuite/tests/safeHaskell/ghci/all.T index 787cb7e..040cc28 100644 --- a/testsuite/tests/safeHaskell/ghci/all.T +++ b/testsuite/tests/safeHaskell/ghci/all.T @@ -18,4 +18,5 @@ test('p16', normal, ghci_script, ['p16.script']) test('p17', normalise_version("bytestring"), ghci_script, ['p17.script']) # 7172 test('p18', normalise_version("bytestring"), ghci_script, ['p18.script']) +test('T12509', [extra_hc_opts('-XSafe')], ghci_script, ['T12509.script']) From git at git.haskell.org Wed Jan 30 00:26:08 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:08 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-fix-submodules: Bump transformers back to 0.5.5.0 (848edd8) Message-ID: <20190130002608.74DB83A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-fix-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/848edd879241c300ed9fad2e14042fdfa9d288c6/ghc >--------------------------------------------------------------- commit 848edd879241c300ed9fad2e14042fdfa9d288c6 Author: Ben Gamari Date: Thu Jan 17 09:53:23 2019 -0500 Bump transformers back to 0.5.5.0 See #16199. >--------------------------------------------------------------- 848edd879241c300ed9fad2e14042fdfa9d288c6 libraries/transformers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/transformers b/libraries/transformers index 8055784..33b3c8a 160000 --- a/libraries/transformers +++ b/libraries/transformers @@ -1 +1 @@ -Subproject commit 80557845cdc0e72bc05cec19cf7a1bf5495e9e69 +Subproject commit 33b3c8a71778ae37040088dfe022c648373777a8 From git at git.haskell.org Wed Jan 30 00:26:11 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:11 +0000 (UTC) Subject: [commit: ghc] wip/ghc-8.6-fix-submodules: Bump process submodule to 1.6.4.0 (21ffb7b) Message-ID: <20190130002611.651623A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/ghc-8.6-fix-submodules Link : http://ghc.haskell.org/trac/ghc/changeset/21ffb7b2e167f911afd902a7fdbe57c8656263f2/ghc >--------------------------------------------------------------- commit 21ffb7b2e167f911afd902a7fdbe57c8656263f2 Author: Ben Gamari Date: Thu Jan 17 09:50:47 2019 -0500 Bump process submodule to 1.6.4.0 See #16199 >--------------------------------------------------------------- 21ffb7b2e167f911afd902a7fdbe57c8656263f2 libraries/process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/process b/libraries/process index 36a3ad5..7a2dfa0 160000 --- a/libraries/process +++ b/libraries/process @@ -1 +1 @@ -Subproject commit 36a3ad577e31e8c3336c7464b252fc2c9b01a20c +Subproject commit 7a2dfa0b48bbb48a22174cb4c2281d4000191cb0 From git at git.haskell.org Wed Jan 30 00:26:14 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:14 +0000 (UTC) Subject: [commit: ghc] wip/junit-unexpected-passes: testsuite: Report unexpected passes in junit output (55e938e) Message-ID: <20190130002614.617AB3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/junit-unexpected-passes Link : http://ghc.haskell.org/trac/ghc/changeset/55e938e3a11af87377ff3a0f06dcb13783e448e7/ghc >--------------------------------------------------------------- commit 55e938e3a11af87377ff3a0f06dcb13783e448e7 Author: Ben Gamari Date: Mon Jan 28 20:40:18 2019 -0500 testsuite: Report unexpected passes in junit output >--------------------------------------------------------------- 55e938e3a11af87377ff3a0f06dcb13783e448e7 testsuite/driver/junit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/driver/junit.py b/testsuite/driver/junit.py index f5daec1..104660e 100644 --- a/testsuite/driver/junit.py +++ b/testsuite/driver/junit.py @@ -12,7 +12,8 @@ def junit(t): timestamp = datetime.now().isoformat()) for res_type, group in [('stat failure', t.unexpected_stat_failures), - ('unexpected failure', t.unexpected_failures)]: + ('unexpected failure', t.unexpected_failures), + ('unexpected_passes', t.unexpected_passes)]: for (directory, testname, reason, way) in group: testcase = ET.SubElement(testsuite, 'testcase', classname = way, From git at git.haskell.org Wed Jan 30 00:26:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:17 +0000 (UTC) Subject: [commit: ghc] wip/T16087: gitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail (29b4282) Message-ID: <20190130002617.5FE9A3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16087 Link : http://ghc.haskell.org/trac/ghc/changeset/29b4282d1d6e815899788840d078ae61593d1ca1/ghc >--------------------------------------------------------------- commit 29b4282d1d6e815899788840d078ae61593d1ca1 Author: Ben Gamari Date: Mon Jan 28 19:26:57 2019 -0500 gitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail >--------------------------------------------------------------- 29b4282d1d6e815899788840d078ae61593d1ca1 .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2478d0d..a309ea2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -237,7 +237,6 @@ nightly-x86_64-linux-deb9: validate-x86_64-linux-deb9-llvm: extends: .validate-linux stage: full-build - allow_failure: true image: ghcci/x86_64-linux-deb9:0.2 variables: BUILD_FLAVOUR: perf-llvm From git at git.haskell.org Wed Jan 30 00:26:20 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:20 +0000 (UTC) Subject: [commit: ghc] wip/T16087: testsuite: Mark print037 as broken when GHC is built with LLVM (838134f) Message-ID: <20190130002620.5CDAE3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16087 Link : http://ghc.haskell.org/trac/ghc/changeset/838134f629839cc604aaef2411e18e9e1623472a/ghc >--------------------------------------------------------------- commit 838134f629839cc604aaef2411e18e9e1623472a Author: Ben Gamari Date: Mon Jan 28 19:26:10 2019 -0500 testsuite: Mark print037 as broken when GHC is built with LLVM As noted in #16205 this configuration reliably segfaults. >--------------------------------------------------------------- 838134f629839cc604aaef2411e18e9e1623472a testsuite/tests/ghci.debugger/scripts/all.T | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index 4095cf2..f857910 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -45,7 +45,7 @@ test('print033', normal, ghci_script, ['print033.script']) test('print034', extra_files(['../GADT.hs', '../Test.hs']), ghci_script, ['print034.script']) test('print035', extra_files(['../Unboxed.hs']), ghci_script, ['print035.script']) test('print036', expect_broken(9046), ghci_script, ['print036.script']) -test('print037', normal, ghci_script, ['print037.script']) +test('print037', when(config.ghc_built_by_llvm, expect_broken(16205)), ghci_script, ['print037.script']) test('break001', extra_files(['../Test2.hs']), ghci_script, ['break001.script']) test('break002', extra_files(['../Test2.hs']), ghci_script, ['break002.script']) From git at git.haskell.org Wed Jan 30 00:26:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:23 +0000 (UTC) Subject: [commit: ghc] wip/T16087: testsuite: Unmark th tests as broken with LLVM (b99a58f) Message-ID: <20190130002623.61C6C3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16087 Link : http://ghc.haskell.org/trac/ghc/changeset/b99a58ff59864b0de271bde0a6a41af31d6af4e5/ghc >--------------------------------------------------------------- commit b99a58ff59864b0de271bde0a6a41af31d6af4e5 Author: Ben Gamari Date: Mon Jan 28 19:23:16 2019 -0500 testsuite: Unmark th tests as broken with LLVM In December I observed (#16087) that these reliably failed. However, now they seem to be reliably working. The only remaining issue is an unexpected failure of print037 due to a segfault. >--------------------------------------------------------------- b99a58ff59864b0de271bde0a6a41af31d6af4e5 testsuite/tests/th/all.T | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index b93673c..adb5e92 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -12,8 +12,6 @@ setTestOpts(req_interp) if config.have_ext_interp : setTestOpts(extra_ways(['ext-interp'])) setTestOpts(only_ways(['normal','ghci','ext-interp'])) - if config.ghc_built_by_llvm: - setTestOpts(expect_broken_for(16087, ['ext-interp'])) test('TH_mkName', normal, compile, ['-v0']) test('TH_overloadedlabels', normal, compile, ['-v0']) From git at git.haskell.org Wed Jan 30 00:26:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Wed, 30 Jan 2019 00:26:26 +0000 (UTC) Subject: [commit: ghc] wip/T16254: Look through newtype wrappers (Trac #16254) (aa00bdb) Message-ID: <20190130002626.EA2A53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/T16254 Link : http://ghc.haskell.org/trac/ghc/changeset/aa00bdb2122991f07415e1f5f4850d929dad96a3/ghc >--------------------------------------------------------------- commit aa00bdb2122991f07415e1f5f4850d929dad96a3 Author: Krzysztof Gogolewski Date: Tue Jan 29 16:37:19 2019 +0100 Look through newtype wrappers (Trac #16254) This allows exprIsConApp_maybe to detect that Size (I# 10) is a constructor application when Size has a wrapper. >--------------------------------------------------------------- aa00bdb2122991f07415e1f5f4850d929dad96a3 compiler/basicTypes/Id.hs | 6 +++++ compiler/coreSyn/CoreOpt.hs | 26 +++++++++++++++++++++- compiler/coreSyn/CoreUtils.hs | 1 + testsuite/tests/simplCore/should_compile/Makefile | 5 +++++ .../should_compile/{T5327.hs => T16254.hs} | 8 ++++--- .../should_compile/T16254.stdout} | 0 testsuite/tests/simplCore/should_compile/all.T | 1 + 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/compiler/basicTypes/Id.hs b/compiler/basicTypes/Id.hs index 5e91d26..390e547 100644 --- a/compiler/basicTypes/Id.hs +++ b/compiler/basicTypes/Id.hs @@ -67,6 +67,7 @@ module Id ( isPrimOpId, isPrimOpId_maybe, isFCallId, isFCallId_maybe, isDataConWorkId, isDataConWorkId_maybe, isDataConId_maybe, idDataCon, + isDataConWrapId_maybe, isConLikeId, isBottomingId, idIsFrom, hasNoBinding, @@ -425,6 +426,7 @@ isClassOpId_maybe :: Id -> Maybe Class isPrimOpId_maybe :: Id -> Maybe PrimOp isFCallId_maybe :: Id -> Maybe ForeignCall isDataConWorkId_maybe :: Id -> Maybe DataCon +isDataConWrapId_maybe :: Id -> Maybe DataCon isRecordSelector id = case Var.idDetails id of RecSelId {} -> True @@ -474,6 +476,10 @@ isDataConWorkId_maybe id = case Var.idDetails id of DataConWorkId con -> Just con _ -> Nothing +isDataConWrapId_maybe id = case Var.idDetails id of + DataConWrapId con -> Just con + _ -> Nothing + isDataConId_maybe :: Id -> Maybe DataCon isDataConId_maybe id = case Var.idDetails id of DataConWorkId con -> Just con diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs index f4fc94d..5ec1931 100644 --- a/compiler/coreSyn/CoreOpt.hs +++ b/compiler/coreSyn/CoreOpt.hs @@ -41,7 +41,7 @@ import OptCoercion ( optCoercion ) import Type hiding ( substTy, extendTvSubst, extendCvSubst, extendTvSubstList , isInScope, substTyVarBndr, cloneTyVarBndr ) import Coercion hiding ( substCo, substCoVarBndr ) -import TyCon ( tyConArity ) +import TyCon ( tyConArity, isNewTyCon ) import TysWiredIn import PrelNames import BasicTypes @@ -803,6 +803,12 @@ exprIsConApp_maybe (in_scope, id_unf) expr , let subst = mkOpenSubst in_scope (bndrs `zip` args) = pushCoDataCon con (map (substExpr (text "exprIsConApp1") subst) dfun_args) co + -- See Note [Looking through newtype wrappers] + | Just a <- isDataConWrapId_maybe fun + , isNewTyCon (dataConTyCon a) + , let rhs = uf_tmpl (realIdUnfolding fun) + = dealWithNewtypeWrapper (Left in_scope) rhs cont + -- Look through unfoldings, but only arity-zero one; -- if arity > 0 we are effectively inlining a function call, -- and that is the business of callSiteInline. @@ -824,6 +830,24 @@ exprIsConApp_maybe (in_scope, id_unf) expr go _ _ _ = Nothing + {- + Note [Looking through newtype wrappers] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + exprIsConApp_maybe should look through newtypes; for example, + Size (I# 10) is an application of constructor I# to argument 10 + via some coercion c. + + For newtypes without a wrapper, this becomes I# 10 `cast` c, + and we check for casts. See Trac #5327. + For newtypes with a wrapper, we must simplify (\x -> x `cast` c) (I# 10), + which is done by dealWithNewtypeWrapper. See Trac #16254 and T16254. + + dealWithNewtypeWrapper is recursive since newtypes can have + multiple type arguments. + -} + dealWithNewtypeWrapper scope (Lam v body) (CC (arg:args) co) = + dealWithNewtypeWrapper (extend scope v arg) body (CC args co) + dealWithNewtypeWrapper scope expr args = go scope expr args ---------------------------- -- Operations on the (Either InScopeSet CoreSubst) -- The Left case is wildly dominant diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index 9c425e7..49a89b2 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -1360,6 +1360,7 @@ isExpandableApp fn n_val_args | otherwise = case idDetails fn of DataConWorkId {} -> True -- Actually handled by isWorkFreeApp + DataConWrapId {} -> True RecSelId {} -> n_val_args == 1 -- See Note [Record selection] ClassOpId {} -> n_val_args == 1 PrimOpId {} -> False diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile index 277a5a6..8577dea 100644 --- a/testsuite/tests/simplCore/should_compile/Makefile +++ b/testsuite/tests/simplCore/should_compile/Makefile @@ -139,6 +139,11 @@ T5327: $(RM) -f T5327.hi T5327.o '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c '># 34# ' +.PHONY: T16254 +T16254: + $(RM) -f T16254.hi T16254.o + '$(TEST_HC)' $(TEST_HC_OPTS) -c T16254.hs -O -ddump-simpl | grep -c '># 34# ' + .PHONY: T5623 T5623: $(RM) -f T5623.hi T5623.o diff --git a/testsuite/tests/simplCore/should_compile/T5327.hs b/testsuite/tests/simplCore/should_compile/T16254.hs similarity index 58% copy from testsuite/tests/simplCore/should_compile/T5327.hs copy to testsuite/tests/simplCore/should_compile/T16254.hs index a2d9c01..3c1490c 100644 --- a/testsuite/tests/simplCore/should_compile/T5327.hs +++ b/testsuite/tests/simplCore/should_compile/T16254.hs @@ -1,6 +1,9 @@ -module T5327 where +-- variant of T5327, where we force the newtype to have a wrapper +{-# LANGUAGE GADTs, ExplicitForAll #-} +module T16254 where -newtype Size = Size Int +newtype Size a b where + Size :: forall b a. Int -> Size a b {-# INLINABLE val2 #-} val2 = Size 17 @@ -9,4 +12,3 @@ val2 = Size 17 -- folding should have happened. We actually see it twice: Once in f's -- definition, and once in its unfolding. f n = case val2 of Size s -> s + s > n - diff --git a/testsuite/tests/codeGen/should_run/T9533c.stdout b/testsuite/tests/simplCore/should_compile/T16254.stdout similarity index 100% copy from testsuite/tests/codeGen/should_run/T9533c.stdout copy to testsuite/tests/simplCore/should_compile/T16254.stdout diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 1f6ef00..e9ada8e 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -120,6 +120,7 @@ test('T5359b', normal, compile, ['']) # Lint error with -O (OccurAnal) test('T5458', normal, compile, ['']) test('simpl021', [extra_files(['Simpl021A.hs', 'Simpl021B.hs'])], run_command, ['$MAKE -s --no-print-directory simpl021']) test('T5327', normal, run_command, ['$MAKE -s --no-print-directory T5327']) +test('T16254', normal, run_command, ['$MAKE -s --no-print-directory T16254']) test('T5615', normal, run_command, ['$MAKE -s --no-print-directory T5615']) test('T5623', normal, run_command, ['$MAKE -s --no-print-directory T5623']) test('T13155', normal, run_command, ['$MAKE -s --no-print-directory T13155']) From git at git.haskell.org Thu Jan 31 04:24:17 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:17 +0000 (UTC) Subject: [commit: ghc] branch 'wip/angerman/iserv-proxy-cleanup' created Message-ID: <20190131042417.0324F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/angerman/iserv-proxy-cleanup Referencing: 23cc7440ad1c78c5c3c2510a43807bd138dd3322 From git at git.haskell.org Thu Jan 31 04:24:19 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:19 +0000 (UTC) Subject: [commit: ghc] branch 'wip/fix-codeowners' created Message-ID: <20190131042419.040EF3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/fix-codeowners Referencing: 05369fd16920ad0a150202dbff1ca60fba40d6d5 From git at git.haskell.org Thu Jan 31 04:24:21 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:21 +0000 (UTC) Subject: [commit: ghc] branch 'wip/werror' created Message-ID: <20190131042421.04FB63A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/werror Referencing: 6327851dabd202c5f71b9a5d443a8d7fcef41f47 From git at git.haskell.org Thu Jan 31 04:24:23 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:23 +0000 (UTC) Subject: [commit: ghc] branch 'wip/sgraf-unused-imports' created Message-ID: <20190131042423.061833A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc New branch : wip/sgraf-unused-imports Referencing: 6b921a89728a2479d068f40384fd5d1717107642 From git at git.haskell.org Thu Jan 31 04:24:26 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:26 +0000 (UTC) Subject: [commit: ghc] wip/angerman/iserv-proxy-cleanup: Cleanup iserv/iserv-proxy (0426789) Message-ID: <20190131042426.2F3153A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/iserv-proxy-cleanup Link : http://ghc.haskell.org/trac/ghc/changeset/04267890ee9a9c6b8ed9bfe3ed4cbb3de2b3c013/ghc >--------------------------------------------------------------- commit 04267890ee9a9c6b8ed9bfe3ed4cbb3de2b3c013 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) >--------------------------------------------------------------- 04267890ee9a9c6b8ed9bfe3ed4cbb3de2b3c013 libraries/libiserv/src/Lib.hs | 47 +++++++++++++------- libraries/libiserv/src/Remote/Slave.hs | 24 +++++++--- utils/iserv-proxy/src/Main.hs | 81 ++++++++++++++++++++++++++-------- 3 files changed, 111 insertions(+), 41 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 04267890ee9a9c6b8ed9bfe3ed4cbb3de2b3c013 From git at git.haskell.org Thu Jan 31 04:24:30 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:30 +0000 (UTC) Subject: [commit: ghc] wip/angerman/iserv-proxy-cleanup: Adds remote-iserv; cabal.in files (8dcf855) Message-ID: <20190131042430.CA97F3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/iserv-proxy-cleanup Link : http://ghc.haskell.org/trac/ghc/changeset/8dcf8558090d7c0889c5974af75503665baafa6b/ghc >--------------------------------------------------------------- commit 8dcf8558090d7c0889c5974af75503665baafa6b Author: Moritz Angermann Date: Wed Jan 30 10:17:17 2019 +0800 Adds remote-iserv; cabal.in files >--------------------------------------------------------------- 8dcf8558090d7c0889c5974af75503665baafa6b configure.ac | 2 +- utils/iserv-proxy/Makefile | 4 +- utils/{hp2ps => remote-iserv}/Makefile | 2 +- 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 ++++++++ 7 files changed, 176 insertions(+), 4 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 8dcf8558090d7c0889c5974af75503665baafa6b From git at git.haskell.org Thu Jan 31 04:24:33 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:33 +0000 (UTC) Subject: [commit: ghc] wip/angerman/iserv-proxy-cleanup: Adds some documentation. (23cc744) Message-ID: <20190131042433.DA0E53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/angerman/iserv-proxy-cleanup Link : http://ghc.haskell.org/trac/ghc/changeset/23cc7440ad1c78c5c3c2510a43807bd138dd3322/ghc >--------------------------------------------------------------- commit 23cc7440ad1c78c5c3c2510a43807bd138dd3322 Author: Moritz Angermann Date: Wed Jan 30 10:17:40 2019 +0800 Adds some documentation. >--------------------------------------------------------------- 23cc7440ad1c78c5c3c2510a43807bd138dd3322 docs/users_guide/ghci.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index f468e80..7eab38d 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -3287,6 +3287,38 @@ dynamically-linked) from GHC itself. So for example: This feature is experimental in GHC 8.0.x, but it may become the default in future releases. +.. _external-interpreter-proxy: + +Running the interpreter on a different host +------------------------------------------- + +When using the flag :ghc-flag:`-fexternal-interpreter` GHC will +spawn and communicate with the separate process using pipes. There +are scenarios (e.g. when cross compiling) where it is favourable to +have the communication happen over the network. GHC provides two +utilities for this, which can be found in the ``utils`` directory. + +- ``remote-iserv`` needs to be built with the cross compiler to be + executed on the remote host. Or in the case of using it on the + same host the stage2 compiler will do as well. + +- ``iserv-proxy`` needs to be built on the build machine by the + build compiler. + +After starting ``remote-iserv ⟨tmp_dir⟩ ⟨port⟩`` on the target and +providing it with a temporary folder (where it will copy the +necessary libraries to load to) and port it will listen for +the proxy to connect. + +Providing :ghc-flag:`-pgmi /path/to/iserv-proxy`, :ghc-flag:`-pgmo ⟨option⟩` +and :ghc-flag:`-pgmo ⟨port⟩` in addition to :ghc-flag:`-fexternal-interpreter` +will then make ghc go through the proxy instead. + +There are some limitations when using this. File and process IO +will be executed on the target. As such packages like git-embed, +file-embed and others might not behave as expected if the target +and host do not share the same filesystem. + .. _ghci-faq: FAQ and Things To Watch Out For From git at git.haskell.org Thu Jan 31 04:24:38 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:38 +0000 (UTC) Subject: [commit: ghc] wip/fix-codeowners, wip/sgraf-unused-imports, wip/werror: Batch merge (76c8fd6) Message-ID: <20190131042438.BFFFC3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branches: wip/fix-codeowners,wip/sgraf-unused-imports,wip/werror Link : http://ghc.haskell.org/trac/ghc/changeset/76c8fd674435a652c75a96c85abbf26f1f221876/ghc >--------------------------------------------------------------- commit 76c8fd674435a652c75a96c85abbf26f1f221876 Author: Ben Gamari Date: Wed Jan 30 01:06:12 2019 -0500 Batch merge >--------------------------------------------------------------- 76c8fd674435a652c75a96c85abbf26f1f221876 .gitlab-ci.yml | 54 +++++- .gitlab/push-test-metrics.sh | 65 +++++++ compiler/hieFile/HieAst.hs | 84 +++++++-- compiler/nativeGen/X86/CodeGen.hs | 83 ++++++--- compiler/nativeGen/X86/Instr.hs | 6 + compiler/nativeGen/X86/Ppr.hs | 2 + compiler/parser/RdrHsSyn.hs | 41 +++-- docs/users_guide/8.8.1-notes.rst | 4 + docs/users_guide/runtime_control.rst | 28 ++- docs/users_guide/separate_compilation.rst | 5 + docs/users_guide/using.rst | 10 ++ hadrian/build.cabal.bat | 2 +- hadrian/build.cabal.sh | 2 +- hadrian/src/Settings/Flavours/Development.hs | 5 +- includes/rts/Flags.h | 12 ++ libraries/base/Data/Bits.hs | 8 + libraries/base/GHC/Int.hs | 13 ++ libraries/base/GHC/RTS/Flags.hsc | 3 + libraries/base/GHC/Word.hs | 13 ++ libraries/base/tests/IO/T12010/test.T | 3 +- libraries/base/tests/IO/all.T | 9 +- rts/Linker.c | 90 +++++----- rts/LinkerInternals.h | 4 + rts/RtsFlags.c | 11 ++ rts/linker/Elf.c | 112 ++++++------ rts/linker/Elf.h | 2 +- rts/linker/MachO.c | 40 +++-- rts/linker/MachO.h | 2 +- rts/linker/PEi386.c | 2 +- rts/linker/PEi386.h | 2 +- rts/linker/SymbolExtras.c | 84 +++++---- rts/linker/SymbolExtras.h | 2 +- rts/sm/OSMem.h | 10 +- testsuite/driver/perf_notes.py | 200 ++++++++++++++++++++- testsuite/driver/runtests.py | 36 +++- testsuite/driver/testglobals.py | 12 +- testsuite/driver/testlib.py | 78 ++++---- testsuite/driver/testutil.py | 2 +- .../tests/annotations/should_compile/th/all.T | 4 +- testsuite/tests/cabal/T12485/all.T | 2 +- testsuite/tests/cabal/all.T | 33 ++-- testsuite/tests/cmm/opt/all.T | 2 +- testsuite/tests/codeGen/should_compile/all.T | 10 +- testsuite/tests/codeGen/should_run/T15038/all.T | 3 +- testsuite/tests/deSugar/should_compile/all.T | 7 +- testsuite/tests/dependent/should_compile/all.T | 3 +- testsuite/tests/deriving/should_compile/all.T | 5 +- testsuite/tests/deriving/should_fail/all.T | 5 +- testsuite/tests/determinism/T13807/all.T | 2 +- testsuite/tests/determinism/determ002/all.T | 2 +- testsuite/tests/determinism/determ003/all.T | 2 +- testsuite/tests/determinism/determ005/all.T | 2 +- testsuite/tests/determinism/determ006/all.T | 2 +- testsuite/tests/determinism/determ007/all.T | 2 +- testsuite/tests/determinism/determ008/all.T | 2 +- testsuite/tests/determinism/determ009/all.T | 2 +- testsuite/tests/determinism/determ010/all.T | 2 +- testsuite/tests/determinism/determ011/all.T | 2 +- testsuite/tests/determinism/determ012/all.T | 2 +- testsuite/tests/determinism/determ013/all.T | 2 +- testsuite/tests/determinism/determ014/all.T | 2 +- testsuite/tests/determinism/determ015/all.T | 2 +- testsuite/tests/determinism/determ016/all.T | 2 +- testsuite/tests/determinism/determ017/all.T | 2 +- testsuite/tests/determinism/determ018/all.T | 2 +- testsuite/tests/determinism/determ019/all.T | 2 +- testsuite/tests/determinism/determ021/all.T | 3 +- testsuite/tests/determinism/determ022/all.T | 2 +- testsuite/tests/driver/T13392/all.T | 2 +- testsuite/tests/driver/T13710/all.T | 3 +- testsuite/tests/driver/T1372/all.T | 2 +- testsuite/tests/driver/T13803/all.T | 3 +- testsuite/tests/driver/T13914/all.T | 3 +- testsuite/tests/driver/T14075/all.T | 3 +- testsuite/tests/driver/T15970/all.T | 2 +- testsuite/tests/driver/T1959/test.T | 2 +- testsuite/tests/driver/T3007/all.T | 3 +- testsuite/tests/driver/T437/all.T | 2 +- testsuite/tests/driver/T5147/all.T | 2 +- testsuite/tests/driver/T7373/all.T | 4 +- testsuite/tests/driver/T7835/all.T | 2 +- testsuite/tests/driver/T8184/all.T | 3 +- testsuite/tests/driver/T9562/all.T | 4 +- testsuite/tests/driver/all.T | 189 +++++++++---------- testsuite/tests/driver/bug1677/all.T | 2 +- testsuite/tests/driver/conflicting_flags/test.T | 3 +- testsuite/tests/driver/dynamicToo/all.T | 4 +- .../tests/driver/dynamicToo/dynamicToo001/test.T | 2 +- .../tests/driver/dynamicToo/dynamicToo002/test.T | 4 +- .../tests/driver/dynamicToo/dynamicToo004/test.T | 3 +- .../tests/driver/dynamicToo/dynamicToo005/test.T | 4 +- testsuite/tests/driver/dynamic_flags_001/all.T | 4 +- testsuite/tests/driver/linkwhole/all.T | 2 +- testsuite/tests/driver/recomp001/all.T | 4 +- testsuite/tests/driver/recomp002/all.T | 4 +- testsuite/tests/driver/recomp003/all.T | 3 +- testsuite/tests/driver/recomp004/all.T | 3 +- testsuite/tests/driver/recomp005/all.T | 7 +- testsuite/tests/driver/recomp006/all.T | 4 +- testsuite/tests/driver/recomp007/all.T | 4 +- testsuite/tests/driver/recomp008/all.T | 7 +- testsuite/tests/driver/recomp009/all.T | 2 +- testsuite/tests/driver/recomp010/all.T | 2 +- testsuite/tests/driver/recomp011/all.T | 2 +- testsuite/tests/driver/recomp012/all.T | 2 +- testsuite/tests/driver/recomp013/all.T | 2 +- testsuite/tests/driver/recomp015/all.T | 3 +- testsuite/tests/driver/recomp016/all.T | 4 +- testsuite/tests/driver/recomp017/all.T | 2 +- testsuite/tests/driver/recomp018/all.T | 2 +- testsuite/tests/driver/retc001/all.T | 3 +- testsuite/tests/driver/retc002/all.T | 4 +- testsuite/tests/driver/retc003/all.T | 2 +- testsuite/tests/dynlibs/all.T | 12 +- testsuite/tests/ffi/should_run/all.T | 8 +- testsuite/tests/gadt/all.T | 6 +- testsuite/tests/generics/all.T | 3 +- testsuite/tests/ghc-api/T10052/all.T | 2 +- testsuite/tests/ghc-api/T4891/all.T | 2 +- testsuite/tests/ghc-api/T7478/all.T | 4 +- testsuite/tests/ghc-api/all.T | 10 +- testsuite/tests/ghc-api/annotations-literals/all.T | 4 +- testsuite/tests/ghc-api/annotations/T11018.stdout | 11 +- testsuite/tests/ghc-api/annotations/T16212.stdout | 35 +++- testsuite/tests/ghc-api/annotations/Test16212.hs | 2 + testsuite/tests/ghc-api/annotations/all.T | 65 ++++--- testsuite/tests/ghc-api/apirecomp001/all.T | 3 +- testsuite/tests/ghc-api/show-srcspan/all.T | 2 +- testsuite/tests/ghc-e/should_fail/all.T | 21 +-- testsuite/tests/ghc-e/should_run/all.T | 29 ++- testsuite/tests/ghci/linking/Makefile | 5 + testsuite/tests/ghci/linking/T15729.c | 4 + testsuite/tests/ghci/linking/T15729.hs | 14 ++ testsuite/tests/ghci/linking/T15729.stdout | 2 + testsuite/tests/ghci/linking/all.T | 28 +-- testsuite/tests/ghci/linking/dyn/all.T | 20 +-- testsuite/tests/ghci/prog004/prog004.T | 3 +- testsuite/tests/ghci/scripts/all.T | 16 +- testsuite/tests/ghci/should_run/all.T | 3 +- testsuite/tests/hp2ps/all.T | 2 +- testsuite/tests/hpc/all.T | 2 +- testsuite/tests/hsc2hs/all.T | 21 ++- .../indexed-types/should_compile/T13092b/all.T | 3 +- testsuite/tests/indexed-types/should_compile/all.T | 28 +-- .../tests/indexed-types/should_fail/T13092/all.T | 2 +- .../tests/indexed-types/should_fail/T13092c/all.T | 2 +- .../tests/indexed-types/should_fail/T13102/all.T | 2 +- testsuite/tests/indexed-types/should_fail/all.T | 9 +- testsuite/tests/layout/all.T | 19 +- testsuite/tests/lib/integer/all.T | 9 +- .../llvm/should_run/subsections_via_symbols/all.T | 3 +- testsuite/tests/module/all.T | 18 +- testsuite/tests/module/base01/all.T | 4 +- testsuite/tests/module/mod175/all.T | 2 +- testsuite/tests/numeric/should_compile/all.T | 6 +- testsuite/tests/numeric/should_run/all.T | 2 +- testsuite/tests/parser/should_compile/T7476/all.T | 2 +- testsuite/tests/patsyn/should_compile/T13350/all.T | 3 +- testsuite/tests/perf/compiler/all.T | 5 +- testsuite/tests/perf/should_run/all.T | 7 +- testsuite/tests/plugins/all.T | 46 ++--- testsuite/tests/polykinds/all.T | 14 +- testsuite/tests/printer/all.T | 112 ++++++------ testsuite/tests/profiling/should_compile/all.T | 2 +- testsuite/tests/profiling/should_run/all.T | 8 +- testsuite/tests/quasiquotation/all.T | 6 +- testsuite/tests/rename/prog006/all.T | 3 +- testsuite/tests/rename/should_compile/all.T | 19 +- testsuite/tests/rename/should_fail/all.T | 3 +- testsuite/tests/roles/should_fail/all.T | 4 +- testsuite/tests/rts/T10672/all.T | 4 +- testsuite/tests/rts/T11223/all.T | 45 ++--- testsuite/tests/rts/T12031/all.T | 2 +- testsuite/tests/rts/T12771/all.T | 2 +- testsuite/tests/rts/T13082/all.T | 4 +- testsuite/tests/rts/T14611/all.T | 2 +- testsuite/tests/rts/T15261/all.T | 4 +- testsuite/tests/rts/T15894/all.T | 2 +- testsuite/tests/rts/T8308/all.T | 3 +- testsuite/tests/rts/all.T | 61 +++---- testsuite/tests/runghc/all.T | 12 +- testsuite/tests/safeHaskell/safeLanguage/all.T | 4 +- testsuite/tests/showIface/all.T | 8 +- .../tests/simplCore/should_compile/T16038/test.T | 3 +- testsuite/tests/simplCore/should_compile/all.T | 122 +++++-------- testsuite/tests/stranal/should_compile/all.T | 5 +- testsuite/tests/stranal/should_run/all.T | 2 +- testsuite/tests/th/T2014/all.T | 4 +- testsuite/tests/th/TH_linker/all.T | 3 +- testsuite/tests/th/all.T | 20 +-- testsuite/tests/typecheck/T13168/all.T | 3 +- testsuite/tests/typecheck/bug1465/all.T | 2 +- testsuite/tests/typecheck/should_compile/all.T | 29 ++- testsuite/tests/typecheck/should_fail/all.T | 2 +- testsuite/tests/unboxedsums/all.T | 3 +- testsuite/tests/utils/should_run/all.T | 2 +- utils/ghc-pkg/Main.hs | 2 +- utils/hsc2hs | 2 +- 198 files changed, 1521 insertions(+), 1097 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 76c8fd674435a652c75a96c85abbf26f1f221876 From git at git.haskell.org Thu Jan 31 04:24:41 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:41 +0000 (UTC) Subject: [commit: ghc] wip/fix-codeowners: Fix syntax in CODEOWNERS file (05369fd) Message-ID: <20190131042441.E2D0D3A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/fix-codeowners Link : http://ghc.haskell.org/trac/ghc/changeset/05369fd16920ad0a150202dbff1ca60fba40d6d5/ghc >--------------------------------------------------------------- commit 05369fd16920ad0a150202dbff1ca60fba40d6d5 Author: Matthew Pickering Date: Wed Jan 30 07:28:08 2019 -0500 Fix syntax in CODEOWNERS file >--------------------------------------------------------------- 05369fd16920ad0a150202dbff1ca60fba40d6d5 CODEOWNERS | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 26b9608..df18b1f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,44 +5,44 @@ * @bgamari # Build system -/hadrian @snowleopard @alp @DavidEichmann @angerman +/hadrian/ @snowleopard @alp @DavidEichmann @angerman /configure.ac @angerman @hvr /aclocal.m4 @angerman @hvr /config.sub @angerman @hvr # RTS-like things -/rts @bgamari @simonmar @osa1 @Phyx @angerman -/rts/linker @angerman @Phyx -/includes @bgamari @simonmar @osa1 +/rts/ @bgamari @simonmar @osa1 @Phyx @angerman +/rts/linker/ @angerman @Phyx +/includes/ @bgamari @simonmar @osa1 # The compiler -/compiler/typecheck @simonpj @goldfire -/compiler/rename @simonpj @goldfire -/compiler/typecheck/TcDeriv* @RyanGlScott -/compiler/nativeGen @simonmar @bgamari @AndreasK -/compiler/llvmGen @angerman -/compiler/codeGen @simonmar @osa1 -/compiler/cmm @simonmar @osa1 -/compiler/ghci @simonmar -/compiler/simplCore/CallArity.hs @nomeata -/compiler/utils/UnVarGraph.hs @nomeata -/compiler/simplCore/Exitify.hs @nomeata -/compiler/simplStg/StgCse.hs @nomeata +/compiler/typecheck/ @simonpj @goldfire +/compiler/rename/ @simonpj @goldfire +/compiler/types/ @simonpj @goldfire +/compiler/deSugar/ @simonpj @goldfire +/compiler/typecheck/TcDeriv* @RyanGlScott +/compiler/nativeGen/ @simonmar @bgamari @AndreasK +/compiler/llvmGen/ @angerman +/compiler/codeGen/ @simonmar @osa1 +/compiler/cmm/ @simonmar @osa1 +/compiler/ghci/ @simonmar +/compiler/simplCore/CallArity.hs @nomeata +/compiler/utils/UnVarGraph.hs @nomeata +/compiler/simplCore/Exitify.hs @nomeata +/compiler/simplStg/StgCse.hs @nomeata /compiler/simplStg/StgLiftLams.hs @sgraf -/compiler/cmm/CmmSwitch.hs @nomeata -/compiler/stranal/DmdAnal.hs @simonpj @sgraf -/compiler/types @simonpj @goldfire -/compiler/deSugar @simonpj @goldfire -/compiler/hsSyn/Convert.hs @goldfire +/compiler/cmm/CmmSwitch.hs @nomeata +/compiler/stranal/DmdAnal.hs @simonpj @sgraf +/compiler/hsSyn/Convert.hs @goldfire # Core libraries -/libraries/base @hvr -/libraries/template-haskell @goldfire +/libraries/base/ @hvr +/libraries/template-haskell/ @goldfire # Internal utilities and libraries -/libraries/libiserv @angerman @simonmar -/utils/iserv-proxy @angerman @simonmar -/utils/iserv @angerman @simonmar -/utils/gen-dll @Phyx -/utils/fs @Phyx +/libraries/libiserv/ @angerman @simonmar +/utils/iserv-proxy/ @angerman @simonmar +/utils/iserv/ @angerman @simonmar +/utils/gen-dll/ @Phyx +/utils/fs/ @Phyx From git at git.haskell.org Thu Jan 31 04:24:44 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:44 +0000 (UTC) Subject: [commit: ghc] wip/sgraf-unused-imports: Remove unused imports (6e0a2f7) Message-ID: <20190131042444.EE3043A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/sgraf-unused-imports Link : http://ghc.haskell.org/trac/ghc/changeset/6e0a2f7b130e9633438185f93b22d5e9ca43975c/ghc >--------------------------------------------------------------- commit 6e0a2f7b130e9633438185f93b22d5e9ca43975c Author: Sebastian Graf Date: Wed Jan 30 13:59:10 2019 +0100 Remove unused imports >--------------------------------------------------------------- 6e0a2f7b130e9633438185f93b22d5e9ca43975c compiler/nativeGen/X86/RegInfo.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 7ca0c0c..339fdd7 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -21,9 +21,6 @@ import Unique import UniqFM import X86.Regs -import Debug.Trace -import Numeric (showHex) - mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format From git at git.haskell.org Thu Jan 31 04:24:48 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:48 +0000 (UTC) Subject: [commit: ghc] wip/werror: Turn on -Werror when validating (8ff4691) Message-ID: <20190131042448.165F73A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/werror Link : http://ghc.haskell.org/trac/ghc/changeset/8ff469163bfef1bbc19ea76dae37ce425f2726de/ghc >--------------------------------------------------------------- commit 8ff469163bfef1bbc19ea76dae37ce425f2726de Author: Matthew Pickering Date: Wed Jan 30 08:29:26 2019 -0500 Turn on -Werror when validating >--------------------------------------------------------------- 8ff469163bfef1bbc19ea76dae37ce425f2726de .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a8cb62..febcaaf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,6 +94,7 @@ validate-x86_64-linux-deb8-hadrian: - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` + WERROR=-Werror make V=0 -j$THREADS - | make binary-dist TAR_COMP_OPTS="-1" From git at git.haskell.org Thu Jan 31 04:24:51 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:51 +0000 (UTC) Subject: [commit: ghc] wip/sgraf-unused-imports: Remove unused import in ghc/Main.hs (6b921a8) Message-ID: <20190131042451.22EE13A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/sgraf-unused-imports Link : http://ghc.haskell.org/trac/ghc/changeset/6b921a89728a2479d068f40384fd5d1717107642/ghc >--------------------------------------------------------------- commit 6b921a89728a2479d068f40384fd5d1717107642 Author: Sebastian Graf Date: Wed Jan 30 14:29:54 2019 +0100 Remove unused import in ghc/Main.hs >--------------------------------------------------------------- 6b921a89728a2479d068f40384fd5d1717107642 ghc/Main.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ghc/Main.hs b/ghc/Main.hs index 456ff90..2202f71 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -31,7 +31,7 @@ import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) -- Frontend plugins #if defined(GHCI) -import DynamicLoading ( loadFrontendPlugin ) +import DynamicLoading ( loadFrontendPlugin, initializePlugins ) import Plugins #else import DynamicLoading ( pluginError ) @@ -56,7 +56,6 @@ import Util import Panic import UniqSupply import MonadUtils ( liftIO ) -import DynamicLoading ( initializePlugins ) -- Imports for --abi-hash import LoadIface ( loadUserInterface ) From git at git.haskell.org Thu Jan 31 04:24:54 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:54 +0000 (UTC) Subject: [commit: ghc] wip/werror: Remove unused imports (4e9a3b4) Message-ID: <20190131042454.374653A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/werror Link : http://ghc.haskell.org/trac/ghc/changeset/4e9a3b4249103a9ca155c80a0ba20c46e175c6ce/ghc >--------------------------------------------------------------- commit 4e9a3b4249103a9ca155c80a0ba20c46e175c6ce Author: Sebastian Graf Date: Wed Jan 30 13:59:10 2019 +0100 Remove unused imports >--------------------------------------------------------------- 4e9a3b4249103a9ca155c80a0ba20c46e175c6ce compiler/nativeGen/X86/RegInfo.hs | 3 --- ghc/Main.hs | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 7ca0c0c..339fdd7 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -21,9 +21,6 @@ import Unique import UniqFM import X86.Regs -import Debug.Trace -import Numeric (showHex) - mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format diff --git a/ghc/Main.hs b/ghc/Main.hs index 456ff90..2202f71 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -31,7 +31,7 @@ import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) -- Frontend plugins #if defined(GHCI) -import DynamicLoading ( loadFrontendPlugin ) +import DynamicLoading ( loadFrontendPlugin, initializePlugins ) import Plugins #else import DynamicLoading ( pluginError ) @@ -56,7 +56,6 @@ import Util import Panic import UniqSupply import MonadUtils ( liftIO ) -import DynamicLoading ( initializePlugins ) -- Imports for --abi-hash import LoadIface ( loadUserInterface ) From git at git.haskell.org Thu Jan 31 04:24:57 2019 From: git at git.haskell.org (git at git.haskell.org) Date: Thu, 31 Jan 2019 04:24:57 +0000 (UTC) Subject: [commit: ghc] wip/werror: Put Werror in the right place (6327851) Message-ID: <20190131042457.591E53A8E4@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/werror Link : http://ghc.haskell.org/trac/ghc/changeset/6327851dabd202c5f71b9a5d443a8d7fcef41f47/ghc >--------------------------------------------------------------- commit 6327851dabd202c5f71b9a5d443a8d7fcef41f47 Author: Matthew Pickering Date: Wed Jan 30 09:12:19 2019 -0500 Put Werror in the right place >--------------------------------------------------------------- 6327851dabd202c5f71b9a5d443a8d7fcef41f47 .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index febcaaf..2435606 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,8 +94,7 @@ validate-x86_64-linux-deb8-hadrian: - ./configure $CONFIGURE_ARGS - | THREADS=`mk/detect-cpu-count.sh` - WERROR=-Werror - make V=0 -j$THREADS + make V=0 -j$THREADS WERROR=-Werror - | make binary-dist TAR_COMP_OPTS="-1" mv ghc-*.tar.xz ghc.tar.xz