[Git][ghc/ghc][wip/bump-win32] 10 commits: Remove Proxy# argument in Data.Typeable.Internal
Ben Gamari
gitlab at gitlab.haskell.org
Thu Oct 15 22:37:36 UTC 2020
Ben Gamari pushed to branch wip/bump-win32 at Glasgow Haskell Compiler / GHC
Commits:
51c4b851 by Krzysztof Gogolewski at 2020-10-15T04:30:27-04:00
Remove Proxy# argument in Data.Typeable.Internal
No longer neccessary - TypeRep is now indexed, there is no ambiguity.
Also fix a comment in Evidence.hs, IsLabel no longer takes a Proxy#.
- - - - -
809f09e8 by Sylvain Henry at 2020-10-15T04:31:07-04:00
Fix parsing of PIE flags
-fPIE and -fno-PIE flags were (un)setting Opt_PIC instead of Opt_PIE.
Original commit: 3625728a0e3a9b56c2b85ae7ea8bcabdd83ece6a
- - - - -
3d7db148 by Ben Gamari at 2020-10-15T04:31:42-04:00
testsuite: Add missing #include on <stdlib.h>
This otherwise fails on newer Clangs, which warn
more aggressively on undeclared symbols.
- - - - -
a848d527 by Ben Gamari at 2020-10-15T18:37:17-04:00
mingw: Extract zst toolchain archives
This should have been done when the toolchain was bumped.
- - - - -
247d493c by Ben Gamari at 2020-10-15T18:37:17-04:00
base: Reintroduce necessary LANGUAGE pragmas
These were incorrectly removed in a recent cleanup commit.
- - - - -
bc4897ea by Ben Gamari at 2020-10-15T18:37:17-04:00
testsuite: Sort metrics by metric type
Closes #18838.
- - - - -
d76224c2 by Ben Gamari at 2020-10-15T18:37:17-04:00
testsuite: Account for -Wnoncanonical-monoid-instances changes on Windows
- - - - -
6434c2e3 by Ben Gamari at 2020-10-15T18:37:17-04:00
rts: Add __mingw_vfprintf to RtsSymbols.c
Following the model of the other printf symbols. See Note [Symbols for
MinGW's printf].
- - - - -
399ac08a by Ben Gamari at 2020-10-15T18:37:17-04:00
gitlab-ci: Remove allow_failure from Windows jobs
- - - - -
7d617697 by Ben Gamari at 2020-10-15T18:37:17-04:00
gitlab-ci: Fix Hadrian bindist names
- - - - -
16 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Types/Evidence.hs
- configure.ac
- libraries/base/Data/Typeable/Internal.hs
- libraries/base/GHC/Exception.hs-boot
- libraries/base/GHC/IO/Handle/Lock/Windows.hsc
- rts/RtsSymbols.c
- testsuite/driver/runtests.py
- testsuite/tests/concurrent/should_run/conc059_c.c
- testsuite/tests/ghci/scripts/T9293.stdout-mingw32
- testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
- testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -5,8 +5,8 @@ variables:
DOCKER_REV: 6ceb0cecaeefd4927b26c054e4897724986078c8
# Sequential version number capturing the versions of all tools fetched by
- # .gitlab/ci.sh.
- WINDOWS_TOOLCHAIN_VERSION: 3
+ # .gitlab/ci.sh. Used for invalidation of GitLab CI cache.
+ WINDOWS_TOOLCHAIN_VERSION: 4
# Disable shallow clones; they break our linting rules
GIT_DEPTH: 0
@@ -212,7 +212,7 @@ lint-release-changelogs:
junit: junit.xml
expire_in: 2 week
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.validate-linux-hadrian:
@@ -220,6 +220,7 @@ lint-release-changelogs:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
variables:
TEST_ENV: "x86_64-linux-deb9-hadrian"
+ BIN_DIST_NAME: "ghc-x86_64-deb9-linux"
before_script:
# workaround for docker permissions
- sudo chown ghc:ghc -R .
@@ -399,7 +400,7 @@ release-x86_64-freebsd:
HADRIAN_ARGS: "--docs=no-sphinx"
GHC_VERSION: 8.6.3
CABAL_INSTALL_VERSION: 3.0.0.0
- BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-portbld-freebsd.tar.xz"
+ BIN_DIST_NAME: "ghc-x86_64-portbld-freebsd"
TEST_ENV: "x86_64-freebsd-hadrian"
FLAVOUR: "validate"
after_script:
@@ -464,6 +465,7 @@ validate-x86_64-darwin:
LANG: "en_US.UTF-8"
CONFIGURE_ARGS: --with-intree-gmp
TEST_ENV: "x86_64-darwin-hadrian"
+ BIN_DIST_NAME: "ghc-x86_64-apple-darwin"
FLAVOUR: "validate"
script:
- .gitlab/ci.sh setup
@@ -479,7 +481,7 @@ validate-x86_64-darwin:
reports:
junit: junit.xml
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.validate-linux:
@@ -785,7 +787,7 @@ release-x86_64-linux-deb8:
allow_failure: true
variables:
TEST_ENV: "x86_64-linux-alpine"
- BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-alpine-linux.tar.xz"
+ BIN_DIST_NAME: "ghc-x86_64-alpine-linux"
# Can't use ld.gold due to #13958.
CONFIGURE_ARGS: "--disable-ld-override"
HADRIAN_ARGS: "--docs=no-sphinx"
@@ -856,9 +858,7 @@ validate-x86_64-linux-fedora27:
############################################################
.build-windows:
- # For the reasons given in #17777 this build isn't reliable.
needs: [validate-x86_64-linux-deb9-hadrian]
- allow_failure: true
before_script:
- git clean -xdf
@@ -903,7 +903,7 @@ validate-x86_64-linux-fedora27:
expire_in: 2 week
when: always
paths:
- - ghc.tar.xz
+ - "$BIN_DIST_NAME.tar.xz"
- junit.xml
.build-x86_64-windows-hadrian:
@@ -911,6 +911,7 @@ validate-x86_64-linux-fedora27:
variables:
MSYSTEM: MINGW64
TEST_ENV: "x86_64-windows"
+ BIN_DIST_NAME: "ghc-x86_64-unknown-mingw32"
cache:
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
@@ -970,6 +971,7 @@ release-x86_64-windows-integer-simple:
variables:
BIGNUM_BACKEND: native
BUILD_FLAVOUR: "perf"
+ BIN_DIST_NAME: "ghc-x86_64-mingw32-unknown-nogmp"
############################################################
@@ -987,9 +989,7 @@ doc-tarball:
- validate-x86_64-windows-hadrian
variables:
LINUX_BINDIST: "ghc-x86_64-deb9-linux-debug.tar.xz"
- WINDOWS_BINDIST: "ghc-x86_64-mingw32.tar.xz"
- # Due to Windows allow_failure
- allow_failure: true
+ WINDOWS_BINDIST: "ghc-x86_64-unknown-mingw32.tar.xz"
artifacts:
paths:
- haddock.html.tar.xz
@@ -1155,8 +1155,6 @@ pages:
dependencies:
- doc-tarball
image: ghcci/x86_64-linux-deb9:0.2
- # Due to Windows allow_failure
- allow_failure: true
tags:
- x86_64-linux
script:
=====================================
.gitlab/ci.sh
=====================================
@@ -377,10 +377,13 @@ function build_hadrian() {
if [ -z "$FLAVOUR" ]; then
fail "FLAVOUR not set"
fi
+ if [ -z "$BIN_DIST_NAME" ]; then
+ fail "BIN_DIST_NAME not set"
+ fi
run_hadrian binary-dist
- mv _build/bindist/ghc*.tar.xz ghc.tar.xz
+ mv _build/bindist/ghc*.tar.xz $BIN_DIST_NAME.tar.xz
}
function test_hadrian() {
=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -2977,8 +2977,8 @@ dynamic_flags_deps = [
------ position independent flags ----------------------------------
, make_ord_flag defGhcFlag "fPIC" (NoArg (setGeneralFlag Opt_PIC))
, make_ord_flag defGhcFlag "fno-PIC" (NoArg (unSetGeneralFlag Opt_PIC))
- , make_ord_flag defGhcFlag "fPIE" (NoArg (setGeneralFlag Opt_PIC))
- , make_ord_flag defGhcFlag "fno-PIE" (NoArg (unSetGeneralFlag Opt_PIC))
+ , make_ord_flag defGhcFlag "fPIE" (NoArg (setGeneralFlag Opt_PIE))
+ , make_ord_flag defGhcFlag "fno-PIE" (NoArg (unSetGeneralFlag Opt_PIE))
------ Debugging flags ----------------------------------------------
, make_ord_flag defGhcFlag "g" (OptIntSuffix setDebugLevel)
=====================================
compiler/GHC/HsToCore/Binds.hs
=====================================
@@ -55,7 +55,6 @@ import GHC.Core.Coercion
import GHC.Core.Multiplicity
import GHC.Builtin.Types ( naturalTy, typeSymbolKind )
import GHC.Types.Id
-import GHC.Types.Id.Make(proxyHashId)
import GHC.Types.Name
import GHC.Types.Var.Set
import GHC.Core.Rules
@@ -1219,7 +1218,7 @@ dsEvTerm (EvFun { et_tvs = tvs, et_given = given
dsEvTypeable :: Type -> EvTypeable -> DsM CoreExpr
-- Return a CoreExpr :: Typeable ty
-- This code is tightly coupled to the representation
--- of TypeRep, in base library Data.Typeable.Internals
+-- of TypeRep, in base library Data.Typeable.Internal
dsEvTypeable ty ev
= do { tyCl <- dsLookupTyCon typeableClassName -- Typeable
; let kind = typeKind ty
@@ -1298,14 +1297,13 @@ ds_ev_typeable ty (EvTypeableTyLit ev)
= -- See Note [Typeable for Nat and Symbol] in GHC.Tc.Solver.Interact
do { fun <- dsLookupGlobalId tr_fun
; dict <- dsEvTerm ev -- Of type KnownNat/KnownSymbol
- ; let proxy = mkTyApps (Var proxyHashId) [ty_kind, ty]
- ; return (mkApps (mkTyApps (Var fun) [ty]) [ dict, proxy ]) }
+ ; return (mkApps (mkTyApps (Var fun) [ty]) [ dict ]) }
where
ty_kind = typeKind ty
-- tr_fun is the Name of
- -- typeNatTypeRep :: KnownNat a => Proxy# a -> TypeRep a
- -- of typeSymbolTypeRep :: KnownSymbol a => Proxy# a -> TypeRep a
+ -- typeNatTypeRep :: KnownNat a => TypeRep a
+ -- of typeSymbolTypeRep :: KnownSymbol a => TypeRep a
tr_fun | ty_kind `eqType` naturalTy = typeNatTypeRepName
| ty_kind `eqType` typeSymbolKind = typeSymbolTypeRepName
| otherwise = panic "dsEvTypeable: unknown type lit kind"
=====================================
compiler/GHC/Tc/Instance/Class.hs
=====================================
@@ -548,7 +548,7 @@ have this instance, implemented here by doTyLit:
instance KnownNat n => Typeable (n :: Nat) where
typeRep = typeNatTypeRep @n
where
- Data.Typeable.Internals.typeNatTypeRep :: KnownNat a => TypeRep a
+ Data.Typeable.Internal.typeNatTypeRep :: KnownNat a => TypeRep a
Ultimately typeNatTypeRep uses 'natSing' from KnownNat to get a
runtime value 'n'; it turns it into a string with 'show' and uses
=====================================
compiler/GHC/Tc/Types/Evidence.hs
=====================================
@@ -1022,7 +1022,7 @@ instance Outputable EvTypeable where
-- overloaded-label dictionary to expose the underlying value. We
-- expect the 'Type' to have the form `IP sym ty` or `IsLabel sym ty`,
-- and return a 'Coercion' `co :: IP sym ty ~ ty` or
--- `co :: IsLabel sym ty ~ Proxy# sym -> ty`. See also
+-- `co :: IsLabel sym ty ~ ty`. See also
-- Note [Type-checking overloaded labels] in "GHC.Tc.Gen.Expr".
unwrapIP :: Type -> CoercionR
unwrapIP ty =
=====================================
configure.ac
=====================================
@@ -417,7 +417,8 @@ set_up_tarballs() {
rm -rf inplace/mingw
local base_dir="../ghc-tarballs/${tarball_dest_dir}"
( cd inplace &&
- find "${base_dir}" -name "*.tar.xz" -exec tar xfJ {} \; &&
+ find "${base_dir}" -name "*.tar.xz" -exec tar --xz -xf {} \; &&
+ find "${base_dir}" -name "*.tar.zst" -exec tar --zstd -xf {} \; &&
rm ".MTREE" &&
rm ".PKGINFO" &&
cd .. ) || AC_MSG_ERROR([Could not extract Windows toolchains.])
=====================================
libraries/base/Data/Typeable/Internal.hs
=====================================
@@ -979,12 +979,12 @@ mkTypeLitTyCon name kind_tycon
where kind = KindRepTyConApp kind_tycon []
-- | Used to make `'Typeable' instance for things of kind Nat
-typeNatTypeRep :: KnownNat a => Proxy# a -> TypeRep a
-typeNatTypeRep p = typeLitTypeRep (show (natVal' p)) tcNat
+typeNatTypeRep :: forall a. KnownNat a => TypeRep a
+typeNatTypeRep = typeLitTypeRep (show (natVal' (proxy# @a))) tcNat
-- | Used to make `'Typeable' instance for things of kind Symbol
-typeSymbolTypeRep :: KnownSymbol a => Proxy# a -> TypeRep a
-typeSymbolTypeRep p = typeLitTypeRep (show (symbolVal' p)) tcSymbol
+typeSymbolTypeRep :: forall a. KnownSymbol a => TypeRep a
+typeSymbolTypeRep = typeLitTypeRep (show (symbolVal' (proxy# @a))) tcSymbol
mkTypeLitFromString :: TypeLitSort -> String -> SomeTypeRep
mkTypeLitFromString TypeLitSymbol s =
=====================================
libraries/base/GHC/Exception.hs-boot
=====================================
@@ -14,7 +14,7 @@ More dramatically
GHC.Exception
imports Data.Typeable
-imports Data.Typeable.Internals
+imports Data.Typeable.Internal
imports GHC.Arr (fingerprint representation etc)
imports GHC.Real
imports {-# SOURCE #-} GHC.Exception
=====================================
libraries/base/GHC/IO/Handle/Lock/Windows.hsc
=====================================
@@ -1,6 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE InterruptibleFFI #-}
{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
-- | File locking for Windows.
module GHC.IO.Handle.Lock.Windows where
=====================================
rts/RtsSymbols.c
=====================================
@@ -151,7 +151,9 @@
__imp___acrt_iob_func, __rts_iob_func, true)) \
RTS_WIN32_ONLY(SymI_HasProto_redirect( \
__imp____acrt_iob_func, __rts_iob_func, true)) \
- SymI_HasProto(__mingw_vsnwprintf)
+ SymI_HasProto(__mingw_vsnwprintf) \
+ /* ^^ Need to figure out why this is needed. */ \
+ SymI_HasProto(__mingw_vfprintf) \
/* ^^ Need to figure out why this is needed. */
#define RTS_MINGW_COMPAT_SYMBOLS \
=====================================
testsuite/driver/runtests.py
=====================================
@@ -457,7 +457,21 @@ else:
if config.baseline_commit:
print('Performance baseline: %s\n' % config.baseline_commit)
if any(t.metrics):
- tabulate_metrics(t.metrics)
+ # Group metrics by metric type
+ groups = {} # type: Dict[MetricName, List[PerfMetric]]
+ for m in t.metrics:
+ if m.stat.metric not in groups:
+ groups[m.stat.metric] = []
+
+ groups[m.stat.metric].append(m)
+
+ for metric_name, stats in groups.items():
+ heading = 'Metrics: %s' % metric_name
+ print()
+ print(heading)
+ print('-' * len(heading))
+ print()
+ tabulate_metrics(stats)
else:
print("\nNone collected.")
print("")
=====================================
testsuite/tests/concurrent/should_run/conc059_c.c
=====================================
@@ -1,6 +1,7 @@
#include "HsFFI.h"
#include "conc059_stub.h"
#include <unistd.h>
+#include <stdlib.h>
#include <stdio.h>
#if mingw32_HOST_OS
#include <windows.h>
=====================================
testsuite/tests/ghci/scripts/T9293.stdout-mingw32
=====================================
@@ -13,7 +13,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is not enabled
@@ -35,7 +34,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should work, GADTs is in force from :set
@@ -56,7 +54,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is now disabled
@@ -79,7 +76,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
=====================================
testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
=====================================
@@ -14,7 +14,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
~~~~~~~~~~ Testing :set -a
=====================================
testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
=====================================
@@ -13,7 +13,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is not enabled
@@ -35,7 +34,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should work, GADTs is in force from :set
@@ -56,7 +54,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is now disabled
@@ -79,7 +76,6 @@ other dynamic, non-language, flag settings:
-fshow-warning-groups
warning settings:
-Wsemigroup
- -Wnoncanonical-monoid-instances
-Wstar-is-type
-Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/338c2dfa5adc5ffe0074dc77f854a895a4b2268a...7d617697c31df3cb198e79e95f3121a4323a9a42
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/338c2dfa5adc5ffe0074dc77f854a895a4b2268a...7d617697c31df3cb198e79e95f3121a4323a9a42
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201015/a2394f7d/attachment-0001.html>
More information about the ghc-commits
mailing list