[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: c5d06f56 by Cheng Shao at 2026-01-18T00:19:19-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 2a2450af by Simon Peyton Jones at 2026-01-18T00:19:19-05:00 Make the implicit-parameter class have representational role This MR addresses #26737, by making the built-in class IP have a representational role for its second parameter. See Note [IP: implicit parameter class] in ghc-internal:GHC.Internal.Classes.IP In fact, IP is (unfortunately, currently) exposed by base:GHC.Base, so we ran a quick CLC proposal to agree the change: https://github.com/haskell/core-libraries-committee/issues/385 Some (small) compilations get faster because they only need to load (small) interface file GHC.Internal.Classes.IP.hi, rather than (large) GHC.Internal.Classes.hi. Metric Decrease: T10421 T12150 T12425 T24582 T5837 - - - - - 50a96a82 by Cheng Shao at 2026-01-18T00:19:20-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - 29b8a74d by Cheng Shao at 2026-01-18T00:19:21-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - 27 changed files: - .gitmodules - compiler/GHC/Builtin/Names.hs - docs/users_guide/9.16.1-notes.rst - hadrian/doc/flavours.md - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/src/GHC/Internal/Classes.hs - + libraries/ghc-internal/src/GHC/Internal/Classes/IP.hs - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 - testsuite/tests/th/TH_implicitParams.stdout - + testsuite/tests/typecheck/should_compile/T26737.hs - testsuite/tests/typecheck/should_compile/all.T Changes: ===================================== .gitmodules ===================================== @@ -122,4 +122,4 @@ url = https://gitlab.haskell.org/ghc/template-haskell-quasiquoter.git [submodule "libraries/libffi-clib"] path = libraries/libffi-clib - url = https://github.com/stable-haskell/libffi-clib.git + url = https://gitlab.haskell.org/ghc/libffi-clib.git ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -526,7 +526,7 @@ genericTyConNames = [ gHC_PRIM, gHC_PRIM_PANIC, gHC_TYPES, gHC_INTERNAL_DATA_DATA, gHC_MAGIC, gHC_MAGIC_DICT, - gHC_CLASSES, gHC_PRIMOPWRAPPERS :: Module + gHC_CLASSES, gHC_CLASSES_IP, gHC_PRIMOPWRAPPERS :: Module gHC_PRIM = mkGhcInternalModule (fsLit "GHC.Internal.Prim") -- Primitive types and values gHC_PRIM_PANIC = mkGhcInternalModule (fsLit "GHC.Internal.Prim.Panic") gHC_TYPES = mkGhcInternalModule (fsLit "GHC.Internal.Types") @@ -534,6 +534,7 @@ gHC_MAGIC = mkGhcInternalModule (fsLit "GHC.Internal.Magic") gHC_MAGIC_DICT = mkGhcInternalModule (fsLit "GHC.Internal.Magic.Dict") gHC_CSTRING = mkGhcInternalModule (fsLit "GHC.Internal.CString") gHC_CLASSES = mkGhcInternalModule (fsLit "GHC.Internal.Classes") +gHC_CLASSES_IP = mkGhcInternalModule (fsLit "GHC.Internal.Classes.IP") gHC_PRIMOPWRAPPERS = mkGhcInternalModule (fsLit "GHC.Internal.PrimopWrappers") gHC_INTERNAL_TUPLE = mkGhcInternalModule (fsLit "GHC.Internal.Tuple") @@ -1521,7 +1522,7 @@ fromLabelClassOpName -- Implicit Parameters ipClassName :: Name ipClassName - = clsQual gHC_CLASSES (fsLit "IP") ipClassKey + = clsQual gHC_CLASSES_IP (fsLit "IP") ipClassKey -- Overloaded record fields hasFieldClassName :: Name ===================================== docs/users_guide/9.16.1-notes.rst ===================================== @@ -30,6 +30,18 @@ Language - The extension :extension:`ExplicitNamespaces` now allows namespace-specified wildcards ``type ..`` and ``data ..`` in import and export lists. +- Implicit parameters and ``ImpredicativeTypes``. GHC now knows + that if ``?foo::S`` is coecible to ``?foo::T`` only if ``S`` is coercible to ``T``. + Example (from :ghc-ticket:`#26737`):: + + {-# LANGUAGE ImplicitParams, ImpredicativeTypes #-} + newtype N = MkN Int + test :: ((?foo::N) => Bool) -> ((?foo::Int) => Bool) + test = coerce + + This is achieved by arranging that ``?foo :: T`` has a representational + role for ``T``. + Compiler ~~~~~~~~ ===================================== hadrian/doc/flavours.md ===================================== @@ -37,8 +37,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>default<br></td> <td> </td> - <td>-O<br>-H32m<br></td> - <td>-O2<br>-H32m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br></td> + <td>-O2<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-haddock</td> <td></td> @@ -49,8 +49,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick</td> <td> </td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O</td> <td>-O2</td> @@ -61,8 +61,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick-validate</td> <td></td> - <td>-O0<br>-H64m<br>-Werror</td> - <td>-O0<br>-H64m<br>-Werror</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS<br>-Werror</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS<br>-Werror</td> <td></td> <td>-O</td> <td>-O2</td> @@ -73,8 +73,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick-debug</td> <td></td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O</td> <td>-O2</td> @@ -85,8 +85,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quickest</td> <td></td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td></td> <td>-O</td> @@ -97,8 +97,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>perf</td> <td> Yes (on supported platforms) </td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -109,8 +109,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>release (same as perf with -haddock and +no_self_recomp+hash_unit_ids)</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -121,8 +121,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>bench</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -133,8 +133,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>devel1</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-dcore-lint</td> <td>-O0<br>-DDEBUG</td> @@ -145,8 +145,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>devel2</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-dcore-lint</td> <td>-O2</td> @@ -157,7 +157,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>validate</td> <td></td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td>-fllvm-fill-undef-with-garbage<br>-fcheck-prim-bounds</td> <td></td> <td>-O<br>-dcore-lint<br>-dno-debug-output</td> @@ -169,7 +169,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>slow-validate</td> <td></td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td>-fllvm-fill-undef-with-garbage</td> <td></td> <td>-O<br>-dcore-lint<br>-dno-debug-output</td> @@ -181,8 +181,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>static</td> <td></td> - <td>-O<br>-H64m<br>-fPIC -static</td> - <td>-O<br>-H64m<br>-fPIC -static</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br>-fPIC -static</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br>-fPIC -static</td> <td></td> <td>-O2</td> <td>-O2</td> ===================================== hadrian/src/Settings/Default.hs ===================================== @@ -274,7 +274,7 @@ defaultSourceArgs :: SourceArgs defaultSourceArgs = SourceArgs { hsDefault = mconcat [ stage0 ? arg "-O" , notStage0 ? arg "-O2" - , arg "-H32m" ] + , pure ["+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? arg "-haddock" , hsCompiler = mempty , hsGhc = mempty } ===================================== hadrian/src/Settings/Flavours/Benchmark.hs ===================================== @@ -16,7 +16,7 @@ benchmarkFlavour = defaultFlavour benchmarkArgs :: Args benchmarkArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] + { hsDefault = pure ["-O", "+RTS", "-O64M", "-RTS"] , hsLibrary = pure ["-O2"] -- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't -- really measuring the overhead of a potential new optimisation we want ===================================== hadrian/src/Settings/Flavours/Development.hs ===================================== @@ -26,7 +26,7 @@ developmentFlavour ghcStage = defaultFlavour developmentArgs :: Stage -> Args developmentArgs ghcStage = sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O", "-H64m"], + { hsDefault = mconcat [ pure ["-O", "+RTS", "-O64M", "-RTS"], -- Disable optimization when building Cabal; -- this saves many minutes of build time. package cabal ? pure ["-O0"]] ===================================== hadrian/src/Settings/Flavours/GhcInGhci.hs ===================================== @@ -22,7 +22,7 @@ ghcInGhciFlavour = defaultFlavour ghciArgs :: Args ghciArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = mempty , hsCompiler = mempty ===================================== hadrian/src/Settings/Flavours/Performance.hs ===================================== @@ -12,7 +12,7 @@ performanceFlavour = splitSections $ enableLateCCS $ defaultFlavour performanceArgs :: Args performanceArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] + { hsDefault = pure ["-O", "+RTS", "-O64M", "-RTS"] , hsLibrary = orM [notStage0, cross] ? arg "-O2" , hsCompiler = pure ["-O2"] , hsGhc = mconcat ===================================== hadrian/src/Settings/Flavours/Quick.hs ===================================== @@ -34,7 +34,7 @@ quickFlavour = defaultFlavour quickArgs :: Args quickArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O0", "-H64m"] ] + { hsDefault = mconcat [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? arg "-O" , hsCompiler = stage0 ? arg "-O2" , hsGhc = stage0 ? arg "-O" } ===================================== hadrian/src/Settings/Flavours/QuickCross.hs ===================================== @@ -32,7 +32,7 @@ quickCrossFlavour = defaultFlavour quickCrossArgs :: Args quickCrossArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? mconcat [ arg "-O", arg "-fllvm" ] , hsCompiler = stage0 ? arg "-O2" ===================================== hadrian/src/Settings/Flavours/Quickest.hs ===================================== @@ -19,7 +19,7 @@ quickestFlavour = defaultFlavour quickestArgs :: Args quickestArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = mempty , hsCompiler = stage0 ? arg "-O" ===================================== hadrian/src/Settings/Flavours/Validate.hs ===================================== @@ -16,11 +16,12 @@ validateFlavour = enableLinting $ quickValidateFlavour validateArgs :: Args validateArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"] + { hsDefault = mconcat [ stage0 ? pure ["-O0"] -- See #11487 , notStage0 ? arg "-fllvm-fill-undef-with-garbage" , notStage0 ? arg "-dno-debug-output" , notStage0 ? arg "-fcheck-prim-bounds" + , pure ["+RTS", "-O64M", "-RTS"] ] , hsLibrary = pure ["-O"] , hsCompiler = mconcat [ stage0 ? pure ["-O2"] @@ -37,7 +38,7 @@ slowValidateFlavour = validateFlavour quickValidateArgs :: Args quickValidateArgs = sourceArgs SourceArgs - { hsDefault = mempty + { hsDefault = pure ["+RTS", "-O64M", "-RTS"] , hsLibrary = pure [ "-O" ] , hsCompiler = mconcat [ stage0 ? arg "-O2", notStage0 ? arg "-O"] , hsGhc = pure [ "-O", "-hide-all-packages" ] ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -343,6 +343,7 @@ Library GHC.Internal.CString GHC.Internal.Classes + GHC.Internal.Classes.IP GHC.Internal.Debug GHC.Internal.Magic GHC.Internal.Magic.Dict ===================================== libraries/ghc-internal/src/GHC/Internal/Classes.hs ===================================== @@ -1,10 +1,9 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving, BangPatterns, KindSignatures, DataKinds, ConstraintKinds, - MultiParamTypeClasses, FunctionalDependencies #-} -{-# LANGUAGE UnboxedTuples #-} -{-# LANGUAGE AllowAmbiguousTypes #-} - -- ip :: IP x a => a is strictly speaking ambiguous, but IP is magic + MultiParamTypeClasses, FunctionalDependencies, + UnboxedTuples #-} + {-# LANGUAGE UndecidableSuperClasses #-} -- Because of the type-variable superclasses for tuples @@ -142,6 +141,7 @@ import GHC.Internal.Prim import GHC.Internal.Tuple import GHC.Internal.CString (unpackCString#) import GHC.Internal.Types +import GHC.Internal.Classes.IP infix 4 ==, /=, <, <=, >=, > infixr 3 && @@ -149,12 +149,6 @@ infixr 2 || default () -- Double isn't available yet --- | The syntax @?x :: a@ is desugared into @IP "x" a@ --- IP is declared very early, so that libraries can take --- advantage of the implicit-call-stack feature -class IP (x :: Symbol) a | x -> a where - ip :: a - {- $matching_overloaded_methods_in_rules Matching on class methods (e.g. @(==)@) in rewrite rules tends to be a bit ===================================== libraries/ghc-internal/src/GHC/Internal/Classes/IP.hs ===================================== @@ -0,0 +1,87 @@ +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving, BangPatterns, + KindSignatures, DataKinds, ConstraintKinds, + MultiParamTypeClasses, FunctionalDependencies #-} + +{-# LANGUAGE AllowAmbiguousTypes, RoleAnnotations, IncoherentInstances #-} + -- LANGUAGE pragmas: see Note [IP: implicit parameter class] + +{-# OPTIONS_HADDOCK not-home #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Internal.Classes.IP +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : ghc-devs@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- Basic classes. +-- Do not import this module directly. It is an GHC internal only +-- module. Some of its contents are instead available from @Prelude@ +-- and @GHC.Int@. +-- +----------------------------------------------------------------------------- + +module GHC.Internal.Classes.IP( IP(..)) where + +import GHC.Internal.Types + + +default () -- Double isn't available yet + +-- | The syntax @?x :: a@ is desugared into @IP "x" a@ +-- IP is declared very early, so that libraries can take +-- advantage of the implicit-call-stack feature +type role IP nominal representational -- See (IPRoles) +class IP (x :: Symbol) a | x -> a where + ip :: a + +{- Note [IP: implicit parameter class] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +An implicit parameter constraint (?foo::ty) is just short for + + IP "foo" ty + +where ghc-internal:GHC.Internal.Classes.IP is a special class that +GHC knows about, defined in this module. + +* It is a unary type class, with one method `ip`, so it has no cost. + For example, (?foo::Int) is represented just by an Int. + +* Criticially, it has a functional dependency: + class IP (x :: Symbol) a | x -> a where ... + So if we have + [G] IP "foo" Int + [W] IP "foo" alpha + the fundep wil lgive us alpha ~ Int, as desired. + +* The solver has a number of special cases for implicit parameters, + mainly because a binding (let ?foo::Int = rhs in body) + is like a local instance declaration for IP. Search for uses + of `isIPClass`. + +Wrinkles + +(IPAmbiguity) The single method of IP has an ambiguous type + ip :: forall a. IP s a => a + Hence the LANGUAGE pragama AllowAmbiguousTypes. + The method `ip` is never called by the user, so ambiguity doesn't matter. + +(IPRoles) IP has a role annotation. Why? See #26737. We want + [W] IP "foo" t1 ~R# IP "foo" t2 + to decompose to give [W] IP t1 ~R# t2, using /representational/ + equality for (t1 ~R# t2) not nominal. + + This usually gives a complaint about incoherence, because in general + (t1 ~R# t2) does NOT imply (C t1) ~R# (C t2) for any normal class. + But it does for IP, because instance selection is controlled by the Symbol, + not the type of the payload. Hence LANGUAGE pragma IncoherentInstances. + (It is unfortunate that we need a module-wide IncoherentInstances here; + see #17167.) + + Side note: arguably this treatment could be applied to any class + with a functional dependency; but for now we restrict it to IP. +-} + ===================================== rts/win32/libHSffi.def deleted ===================================== @@ -1,19 +0,0 @@ - -LIBRARY "libHSffi-ghc@ProjectVersion@.dll" - -EXPORTS - - ffi_prep_cif - ffi_call - ffi_type_void - ffi_type_float - ffi_type_double - ffi_type_sint64 - ffi_type_uint64 - ffi_type_sint32 - ffi_type_uint32 - ffi_type_sint16 - ffi_type_uint16 - ffi_type_sint8 - ffi_type_uint8 - ffi_type_pointer ===================================== rts/win32/libHSghc-internal.def deleted ===================================== @@ -1,49 +0,0 @@ - -LIBRARY "libHSghc-internal-@LibVersion@-ghc@ProjectVersion@.dll" - -EXPORTS - ghczminternal_GHCziInternalziInt_I8zh_con_info - ghczminternal_GHCziInternalziInt_I16zh_con_info - ghczminternal_GHCziInternalziInt_I32zh_con_info - ghczminternal_GHCziInternalziInt_I64zh_con_info - - ghczminternal_GHCziInternalziWord_W8zh_con_info - ghczminternal_GHCziInternalziWord_W16zh_con_info - ghczminternal_GHCziInternalziWord_W32zh_con_info - ghczminternal_GHCziInternalziWord_W64zh_con_info - - ghczminternal_GHCziInternalziStable_StablePtr_con_info - - ghczminternal_GHCziInternalziPack_unpackCString_closure - - ghczminternal_GHCziInternalziTopHandler_runIO_closure - ghczminternal_GHCziInternalziTopHandler_runNonIO_closure - - ghczminternal_GHCziInternalziIOziException_stackOverflow_closure - ghczminternal_GHCziInternalziIOziException_heapOverflow_closure - - ghczminternal_GHCziInternalziPtr_Ptr_con_info - ghczminternal_GHCziInternalziPtr_FunPtr_con_info - - ghczminternal_GHCziInternalziConcziIO_ensureIOManagerIsRunning_closure - ghczminternal_GHCziInternalziConcziIO_interruptIOManager_closure - ghczminternal_GHCziInternalziConcziIO_ioManagerCapabilitiesChanged_closure - ghczminternal_GHCziInternalziConcziSync_runSparks_closure - ghczminternal_GHCziInternalziEventziWindows_processRemoteCompletion_closure - - ghczminternal_GHCziInternalziTopHandler_flushStdHandles_closure - - ghczminternal_GHCziInternalziWeakziFinalizze_runFinalizzerBatch_closure - ghczminternal_GHCziInternalziPack_unpackCString_closure - ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnMVar_closure - ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnSTM_closure - ghczminternal_GHCziInternalziIOziException_allocationLimitExceeded_closure - ghczminternal_GHCziInternalziIOziException_stackOverflow_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure - ghczminternal_GHCziInternalziControlziExceptionziBase_nonTermination_closure - ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure - ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure - ghczminternal_GHCziInternalziExceptionziType_underflowException_closure - ghczminternal_GHCziInternalziExceptionziType_overflowException_closure ===================================== rts/win32/libHSghc-prim.def deleted ===================================== @@ -1,14 +0,0 @@ - -LIBRARY "libHSghc-internal-@LibVersion@-ghc@ProjectVersion@.dll" - -EXPORTS - - ghczminternal_GHCziInternalziTypes_True_closure - ghczminternal_GHCziInternalziTypes_False_closure - ghczminternal_GHCziInternalziTypes_Czh_con_info - ghczminternal_GHCziInternalziTypes_Izh_con_info - ghczminternal_GHCziInternalziTypes_Fzh_con_info - ghczminternal_GHCziInternalziTypes_Dzh_con_info - ghczminternal_GHCziInternalziTypes_Wzh_con_info - ghczminternal_GHCziInternalziTypes_Czh_static_info - ghczminternal_GHCziInternalziTypes_Izh_static_info ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -3293,6 +3293,7 @@ module GHC.Base where {-# MINIMAL fmap #-} type IO :: * -> * newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) + type role IP nominal representational type IP :: Symbol -> * -> Constraint class IP x a | x -> a where ip :: a ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -3293,6 +3293,7 @@ module GHC.Base where {-# MINIMAL fmap #-} type IO :: * -> * newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) + type role IP nominal representational type IP :: Symbol -> * -> Constraint class IP x a | x -> a where ip :: a ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -3293,6 +3293,7 @@ module GHC.Base where {-# MINIMAL fmap #-} type IO :: * -> * newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) + type role IP nominal representational type IP :: Symbol -> * -> Constraint class IP x a | x -> a where ip :: a ===================================== testsuite/tests/interface-stability/ghc-prim-exports.stdout ===================================== @@ -1171,6 +1171,7 @@ module GHC.Classes where (==) :: a -> a -> GHC.Internal.Types.Bool (/=) :: a -> a -> GHC.Internal.Types.Bool {-# MINIMAL (==) | (/=) #-} + type role IP nominal representational type IP :: GHC.Internal.Types.Symbol -> * -> Constraint class IP x a | x -> a where ip :: a ===================================== testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 ===================================== @@ -1171,6 +1171,7 @@ module GHC.Classes where (==) :: a -> a -> GHC.Internal.Types.Bool (/=) :: a -> a -> GHC.Internal.Types.Bool {-# MINIMAL (==) | (/=) #-} + type role IP nominal representational type IP :: GHC.Internal.Types.Symbol -> * -> Constraint class IP x a | x -> a where ip :: a ===================================== testsuite/tests/th/TH_implicitParams.stdout ===================================== @@ -1,5 +1,5 @@ -Main.funcToReify :: GHC.Internal.Classes.IP "z" - GHC.Internal.Types.Int => +Main.funcToReify :: GHC.Internal.Classes.IP.IP "z" + GHC.Internal.Types.Int => GHC.Internal.Types.Int 5 1 ===================================== testsuite/tests/typecheck/should_compile/T26737.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE ImpredicativeTypes, ImplicitParams #-} + +module T26737 where + +import Data.Coerce + +newtype Foo = MkFoo Int + +b :: ((?foo :: Foo) => Int) -> ((?foo :: Int) => Int) +b = coerce @(((?foo :: Foo) => Int)) @(((?foo :: Int) => Int)) ===================================== testsuite/tests/typecheck/should_compile/all.T ===================================== @@ -958,3 +958,4 @@ test('T14745', normal, compile, ['']) test('T26451', normal, compile, ['']) test('T26582', normal, compile, ['']) test('T26746', normal, compile, ['']) +test('T26737', normal, compile, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca0b66aebbb0d7c8852bf24854c788d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca0b66aebbb0d7c8852bf24854c788d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)