Ben Gamari pushed to branch wip/T23109 at Glasgow Haskell Compiler / GHC
Commits:
3ca40248 by Ben Gamari at 2025-08-05T16:00:11-04:00
Move addImplicitBinds
- - - - -
1 changed file:
- compiler/GHC/Driver/Main.hs
Changes:
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -1925,6 +1925,14 @@ hscGenHardCode hsc_env cgguts mod_loc output_filename = do
dflags = hsc_dflags hsc_env
logger = hsc_logger hsc_env
+ -------------------
+ -- ADD IMPLICIT BINDINGS
+ -- NB: we must feed mkImplicitBinds through corePrep too
+ -- so that they are suitably cloned and eta-expanded
+ let cp_pgm_cfg :: CorePrepPgmConfig
+ cp_pgm_cfg = initCorePrepPgmConfig (hsc_dflags hsc_env)
+ (interactiveInScope $ hsc_IC hsc_env)
+ binds_with_implicits <- addImplicitBinds cp_pgm_cfg mod_loc (cg_tycons cgguts) core_binds
-------------------
-- INSERT LATE COST CENTRES, based on the provided flags.
@@ -1957,7 +1965,7 @@ hscGenHardCode hsc_env cgguts mod_loc output_filename = do
}
(late_cc_binds, late_cc_state) <-
- addLateCostCenters logger late_cc_config core_binds
+ addLateCostCenters logger late_cc_config binds_with_implicits
when (dopt Opt_D_dump_late_cc dflags || dopt Opt_D_verbose_core2core dflags) $
putDumpFileMaybe logger Opt_D_dump_late_cc "LateCC" FormatCore (vcat (map ppr late_cc_binds))
@@ -1972,7 +1980,7 @@ hscGenHardCode hsc_env cgguts mod_loc output_filename = do
cg_foreign_files = foreign_files,
cg_dep_pkgs = dependencies,
cg_spt_entries = spt_entries,
- cg_binds = late_binds,
+ cg_binds = binds_to_prep,
cg_ccs = late_local_ccs
}
, _
@@ -1997,15 +2005,6 @@ hscGenHardCode hsc_env cgguts mod_loc output_filename = do
llvm_config = hsc_llvm_config hsc_env
profile = targetProfile dflags
- -------------------
- -- ADD IMPLICIT BINDINGS
- -- NB: we must feed mkImplicitBinds through corePrep too
- -- so that they are suitably cloned and eta-expanded
- let cp_pgm_cfg :: CorePrepPgmConfig
- cp_pgm_cfg = initCorePrepPgmConfig (hsc_dflags hsc_env)
- (interactiveInScope $ hsc_IC hsc_env)
- binds_to_prep <- addImplicitBinds cp_pgm_cfg mod_loc tycons late_binds
-
-------------------
-- PREPARE FOR CODE GENERATION
-- Do saturation and convert to A-normal form
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ca4024884440b8b03fdcb509c1ea01…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ca4024884440b8b03fdcb509c1ea01…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Revert "base: Expose Backtraces constructor and fields"
by Marge Bot (@marge-bot) 05 Aug '25
by Marge Bot (@marge-bot) 05 Aug '25
05 Aug '25
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
4f6bc9cf by fendor at 2025-08-04T17:50:06-04:00
Revert "base: Expose Backtraces constructor and fields"
This reverts commit 17db44c5b32fff82ea988fa4f1a233d1a27bdf57.
- - - - -
bcdec657 by Zubin Duggal at 2025-08-05T10:37:29+05:30
compiler: Export a version of `newNameCache` that is not prone to footguns.
`newNameCache` must be initialized with both a non-"reserved" unique tag, as well
as a list of known key names. Failing to do so results in hard to debug unique conflicts.
It is difficult for API users to tell which unique tags are safe to use. So instead of leaving
this up to the user to decide, we now export a version of `newNameCache` which uses a guaranteed
non-reserved unique tag. In fact, this is now the way the unique tag is initialized for all invocations
of the compiler.
The original version of `newNameCache` is now exported as `newNameCache'` for advanced users.
We also deprecate `initNameCache` as it is also prone to footguns and is completely subsumed in
functionality by `newNameCache` and `newNameCache'`.
Fixes #26135 and #26055
- - - - -
8429f85c by Andrew Lelechenko at 2025-08-05T12:15:10-04:00
hadrian: bump Stackage snapshot to LTS 24.2 / GHC 9.10.2
In line with #25693 we should use GHC 9.10 as a boot compiler,
while Hadrian stack.yaml was stuck on GHC 9.6.
- - - - -
8b919f58 by Peng Fan at 2025-08-05T12:15:24-04:00
NCG/LA64: implement atomic write with finer-grained DBAR hints
Signed-off-by: Peng Fan <fanpeng(a)loongson.cn>
- - - - -
12 changed files:
- compiler/GHC/CmmToAsm/LA64/CodeGen.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Types/Name/Cache.hs
- hadrian/stack.yaml
- hadrian/stack.yaml.lock
- libraries/base/changelog.md
- libraries/base/src/Control/Exception/Backtrace.hs
- testsuite/tests/hiefile/should_run/TestUtils.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
Changes:
=====================================
compiler/GHC/CmmToAsm/LA64/CodeGen.hs
=====================================
@@ -1972,9 +1972,17 @@ genCCall target dest_regs arg_regs = do
(val, fmt_val, code_val) <- getSomeReg val_reg
let instrs = case ord of
MemOrderRelaxed -> unitOL $ ann moDescr (ST fmt_val (OpReg w val) (OpAddr $ AddrReg p))
- -- implement with AMSWAPDB
- MemOrderRelease -> unitOL $ ann moDescr (AMSWAPDB fmt_val (OpReg w zeroReg) (OpReg w val) (OpReg w p))
- MemOrderSeqCst -> unitOL $ ann moDescr (AMSWAPDB fmt_val (OpReg w zeroReg) (OpReg w val) (OpReg w p))
+ -- AMSWAP_DB* insns implentment a fully functional synchronization barrier, like DBAR 0x0.
+ -- This is terrible. And AMSWAPDB only supports ISA version greater than LA64V1_0. So,
+ -- implement with DBAR
+ MemOrderRelease -> toOL [
+ ann moDescr (DBAR HintRelease),
+ ST fmt_val (OpReg w val) (OpAddr $ AddrReg p)
+ ]
+ MemOrderSeqCst -> toOL [
+ ann moDescr (DBAR HintSeqcst),
+ ST fmt_val (OpReg w val) (OpAddr $ AddrReg p)
+ ]
_ -> panic $ "Unexpected MemOrderAcquire on an AtomicWrite" ++ show mo
moDescr = (text . show) mo
code =
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -245,7 +245,7 @@ import GHC.Types.IPE
import GHC.Types.SourceFile
import GHC.Types.SrcLoc
import GHC.Types.Name
-import GHC.Types.Name.Cache ( newNameCache, knownKeysOrigNameCache )
+import GHC.Types.Name.Cache ( newNameCache )
import GHC.Types.Name.Reader
import GHC.Types.Name.Ppr
import GHC.Types.TyThing
@@ -322,7 +322,7 @@ newHscEnv top_dir dflags = do
newHscEnvWithHUG :: FilePath -> DynFlags -> UnitId -> HomeUnitGraph -> IO HscEnv
newHscEnvWithHUG top_dir top_dynflags cur_unit home_unit_graph = do
- nc_var <- newNameCache 'r' knownKeysOrigNameCache
+ nc_var <- newNameCache
fc_var <- initFinderCache
logger <- initLogger
tmpfs <- initTmpFs
=====================================
compiler/GHC/Types/Name/Cache.hs
=====================================
@@ -4,6 +4,7 @@
module GHC.Types.Name.Cache
( NameCache (..)
, newNameCache
+ , newNameCacheWith
, initNameCache
, takeUniqFromNameCache
, updateNameCache'
@@ -140,11 +141,27 @@ extendOrigNameCache nc mod occ name
where
combine _ occ_env = extendOccEnv occ_env occ name
-newNameCache :: Char -> OrigNameCache -> IO NameCache
-newNameCache c nc = NameCache c <$> newMVar nc
+-- | Initialize a new name cache
+newNameCache :: IO NameCache
+newNameCache = newNameCacheWith 'r' knownKeysOrigNameCache
+-- | This is a version of `newNameCache` that lets you supply your
+-- own unique tag and set of known key names. This can go wrong if the tag
+-- supplied is one reserved by GHC for internal purposes. See #26055 for
+-- an example.
+--
+-- Use `newNameCache` when possible.
+newNameCacheWith :: Char -> OrigNameCache -> IO NameCache
+newNameCacheWith c nc = NameCache c <$> newMVar nc
+
+-- | This takes a tag for uniques to be generated and the list of knownKeyNames
+-- These must be initialized properly to ensure that names generated from this
+-- NameCache do not conflict with known key names.
+--
+-- Use `newNameCache` or `newNameCacheWith` instead
+{-# DEPRECATED initNameCache "Use newNameCache or newNameCacheWith instead" #-}
initNameCache :: Char -> [Name] -> IO NameCache
-initNameCache c names = newNameCache c (initOrigNames names)
+initNameCache c names = newNameCacheWith c (initOrigNames names)
initOrigNames :: [Name] -> OrigNameCache
initOrigNames names = foldl' extendOrigNameCache' emptyModuleEnv names
=====================================
hadrian/stack.yaml
=====================================
@@ -1,6 +1,6 @@
-# GHC's configure script reports that GHC versions 9.6 and greater are required
+# GHC's configure script reports that GHC versions 9.10 and greater are required
# to build GHC from source.
-resolver: lts-22.44 # GHC 9.6.7
+resolver: lts-24.2 # GHC 9.10.2
packages:
- '.'
=====================================
hadrian/stack.yaml.lock
=====================================
@@ -1,7 +1,7 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
-# https://docs.haskellstack.org/en/stable/lock_files
+# https://docs.haskellstack.org/en/stable/topics/lock_files
packages:
- completed:
@@ -40,9 +40,9 @@ packages:
original:
hackage: filepath-1.4.300.2
- completed:
- hackage: process-1.6.25.0@sha256:092ab61596e914d21983aa2e9206a74c4faa38a5a636446b5c954305821cb496,2749
+ hackage: process-1.6.25.0@sha256:9a0b2ef8096517fa0e0c7a5e9a5c2ae5744ed824c3331005f9408245810df345,2640
pantry-tree:
- sha256: bdab416d3c454ad716d4fab1ced490cc75330658c1c7c66a0b6f4b3e5125017b
+ sha256: 9c7927cd4d7f2f4c64251256eb6904800b3922fa5c5424c60f0e08441693e12b
size: 1790
original:
hackage: process-1.6.25.0
@@ -55,7 +55,7 @@ packages:
hackage: unix-2.8.5.1
snapshots:
- completed:
- sha256: 238fa745b64f91184f9aa518fe04bdde6552533d169b0da5256670df83a0f1a9
- size: 721141
- url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/mast…
- original: lts-22.44
+ sha256: cd28bd74375205718f1d5fa221730a9c17a203059708b1eb95f4b20d68bf82d9
+ size: 724943
+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/mast…
+ original: lts-24.2
=====================================
libraries/base/changelog.md
=====================================
@@ -30,7 +30,6 @@
* `GHC.TypeNats.Internal`
* `GHC.ExecutionStack.Internal`.
* Deprecate `GHC.JS.Prim.Internal.Build`, as per [CLC #329](https://github.com/haskell/core-libraries-committee/issues/329)
- * Expose constructor and field of `Backtraces` from `Control.Exception.Backtrace`, as per [CLC #199](https://github.com/haskell/core-libraries-committee/issues/199#issuecomment-1954662391)
* Fix incorrect results of `integerPowMod` when the base is 0 and the exponent is negative, and `integerRecipMod` when the modulus is zero ([#26017](https://gitlab.haskell.org/ghc/ghc/-/issues/26017)).
* Fix the rewrite rule for `scanl'` not being strict in the first element of the output list ([#26143](https://gitlab.haskell.org/ghc/ghc/-/issues/26143)).
=====================================
libraries/base/src/Control/Exception/Backtrace.hs
=====================================
@@ -51,7 +51,7 @@ module Control.Exception.Backtrace
, getBacktraceMechanismState
, setBacktraceMechanismState
-- * Collecting backtraces
- , Backtraces(..)
+ , Backtraces
, displayBacktraces
, collectBacktraces
) where
=====================================
testsuite/tests/hiefile/should_run/TestUtils.hs
=====================================
@@ -25,9 +25,6 @@ import GHC.Iface.Ext.Utils
import GHC.Driver.Session
import GHC.SysTools
-makeNc :: IO NameCache
-makeNc = initNameCache 'z' []
-
dynFlagsForPrinting :: String -> IO DynFlags
dynFlagsForPrinting libdir = do
systemSettings <- initSysTools libdir
@@ -37,7 +34,7 @@ readTestHie :: FilePath -> IO (DynFlags, HieFile)
readTestHie fp = do
libdir:_ <- getArgs
df <- dynFlagsForPrinting libdir
- nc <- makeNc
+ nc <- newNameCache
hfr <- readHieFile nc fp
pure (df, hie_file_result hfr)
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -323,7 +323,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -323,7 +323,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -323,7 +323,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -323,7 +323,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6eb6065c6cf2fc6d329c711f7cb70e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6eb6065c6cf2fc6d329c711f7cb70e…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/rafl/cover-data] Add release notes for 9.16.1 and move description of latest HPC changes there.
by Florian Ragwitz (@rafl) 05 Aug '25
by Florian Ragwitz (@rafl) 05 Aug '25
05 Aug '25
Florian Ragwitz pushed to branch wip/rafl/cover-data at Glasgow Haskell Compiler / GHC
Commits:
3631eb1b by Florian Ragwitz at 2025-08-05T08:17:02-07:00
Add release notes for 9.16.1 and move description of latest HPC changes there.
- - - - -
3 changed files:
- − docs/users_guide/9.14.1-notes.rst
- + docs/users_guide/9.16.1-notes.rst
- docs/users_guide/release-notes.rst
Changes:
=====================================
docs/users_guide/9.14.1-notes.rst deleted
=====================================
@@ -1,296 +0,0 @@
-.. _release-9-14-1:
-
-Version 9.14.1
-==============
-
-The significant changes to the various parts of the compiler are listed in the
-following sections. See the `migration guide
-<https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.14>`_ on the GHC Wiki
-for specific guidance on migrating programs to this release.
-
-Language
-~~~~~~~~
-
-* `GHC proposal 493: allow expressions in SPECIALISE pragmas <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0493-s…>`_
- has been implemented. SPECIALISE pragmas now allow arbitrary expressions such as: ::
-
- {-# SPECIALISE f @Int False :: Int -> Char #-}
-
- The ability to specify multiple specialisations in a single SPECIALISE pragma,
- with syntax of the form (note the comma between the type signatures): ::
-
- {-# SPECIALISE g : Int -> Int, Float -> Float #-}
-
- has been deprecated, and is scheduled to be removed in GHC 9.18.
- This deprecation is controlled by the newly introduced ``-Wdeprecated-pragmas``
- flag in ``-Wdefault``.
-
-* ``-Wincomplete-record-selectors`` is now part of `-Wall`, as specified
- by `GHC Proposal 516: add warning for incomplete record selectors <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0516-i…>`_.
- Hence, if a library is compiled with ``-Werror``, compilation may now fail. Solution: fix the library.
- Workaround: add ``-Werror=no-incomplete-record-selectors``.
-
- Note that this warning is at least
- as serious as a warning about missing patterns from a function definition, perhaps even
- more so, since it is invisible in the source program.
-
-* The combination of :extension:`ScopedTypeVariables` and :extension:`TypeApplications`
- no longer enables type applications in patterns, which now always requires
- :extension:`TypeAbstractions`. The warning flag``deprecated-type-abstractions``
- has also been removed from the compiler.
-
-* :extension:`OverloadedRecordUpdate` now passes the arguments to a ``setField`` function
- in the flipped order, as specified by `GHC Proposal 583: HasField redesign <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0583-h…>`_.
-
- Previously GHC expected ``setField`` to have this type: ::
-
- setField :: forall (fld :: Symbol) a r. r -> a -> r
-
- And that's what GHC expects now: ::
-
- setField :: forall (fld :: Symbol) a r. a -> r -> r
-
- That will break the combination of :extension:`OverloadedRecordUpdate` with :extension:`RebindableSyntax`.
-
-* Multiline strings are now accepted in foreign imports. (#25157)
-
-* GHC now does a better job at inferring types in calls to ``coerce``: instead of
- complaining about ambiguous type variables, GHC will consider that such type
- variables are determined by the ``Coercible`` constraints they appear in.
-
-* With :extension:`LinearTypes` record fields can now be non-linear. This means that
- the following record declaration is now valid:
-
- ::
-
- data Record = Rec { x %'Many :: Int, y :: Char }
-
- This causes the constructor to have type ``Rec :: Int %'Many -> Char %1 -> Record``.
-
-* The :extension:`ExplicitNamespaces` extension now allows the ``data``
- namespace specifier in import and export lists.
-
-* The ``-Wdata-kinds-tc`` warning has been deprecated, and the use of promoted
- data types in kinds is now an error (rather than a warning) unless the
- :extension:`DataKinds` extension is enabled. For example, the following code
- will be rejected unless :extension:`DataKinds` is on:
-
- import Data.Kind (Type)
- import GHC.TypeNats (Nat)
-
- -- Nat shouldn't be allowed here without DataKinds
- data Vec :: Nat -> Type -> Type
-
- (The ``-Wdata-kinds-tc`` warning was introduced in GHC 9.10 as part of a fix
- for an accidental oversight in which programs like the one above were
- mistakenly accepted without the use of :extension:`DataKinds`.)
-
-* The :extension:`MonadComprehensions` extension now implies :extension:`ParallelListComp` as was originally intended (see `Monad Comprehensions <https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/monad_comprehension…>`_).
-
-* In accordance with `GHC Proposal #281 <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0281-v…>`_,
- section 4.7 "Data constructors", the :extension:`RequiredTypeArguments`
- extension now allows visible forall in types of data constructors
- (:ghc-ticket:`25127`). The following declaration is now accepted by GHC:
-
- ::
-
- data T a where
- Typed :: forall a -> a -> T a
-
- See :ref:`visible-forall-in-gadts` for details.
-
-Compiler
-~~~~~~~~
-
-- An improved error message is introduced to refer users to the heap-controlling flags of the RTS when there is a heap overflow during compilation. (#25198)
-
-- The kind checker now does a better job of finding type family instances for
- use in the kinds of other declarations in the same module. This fixes a number
- of tickets:
- :ghc-ticket:`12088`, :ghc-ticket:`12239`, :ghc-ticket:`14668`, :ghc-ticket:`15561`,
- :ghc-ticket:`16410`, :ghc-ticket:`16448`, :ghc-ticket:`16693`, :ghc-ticket:`19611`,
- :ghc-ticket:`20875`, :ghc-ticket:`21172`, :ghc-ticket:`22257`, :ghc-ticket:`25238`,
- :ghc-ticket:`25834`.
-
-- The compiler no longer accepts invalid ``type`` namespace specifiers in
- subordinate import lists (:ghc-ticket:`22581`).
-
-- A new flag, :ghc-flag:`-Wuseless-specialisations`, controls warnings emitted when GHC
- determines that a SPECIALISE pragma would have no effect.
-
-- A new flag, :ghc-flag:`-Wrule-lhs-equalities`, controls warnings emitted for RULES
- whose left-hand side attempts to quantify over equality constraints that
- previous GHC versions accepted quantifying over. GHC will now drop such RULES,
- emitting a warning message controlled by this flag.
-
- This warning is intended to give visibility to the fact that the RULES that
- previous GHC versions generated in such circumstances could never fire.
-
-- A new flag, :ghc-flag:`-Wunusable-unpack-pragmas`, controls warnings emitted
- when GHC is unable to unpack a data constructor field annotated by the
- ``{-# UNPACK #-}`` pragma.
-
- Previous GHC versions issued this warning unconditionally. Now it is possible
- to disable it with ``-Wno-unusable-unpack-pragmas`` or turn it into an error
- with ``-Werror=unusable-unpack-pragmas``.
-
-- Introduce a new warning :ghc-flag:`-Wpattern-namespace-specifier` to detect
- uses of the now deprecated ``pattern`` namespace specifier in import/export
- lists. See `GHC Proposal #581, section 2.3 <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0581-n…>`_.
-
-- Code coverage (:ghc-flag:`-fhpc`) now treats uses of record fields
- (including via :extension:`RecordWildCards` or :extension:`NamedFieldPuns`)
- as if the fields were accessed using the generated record selector functions,
- marking the fields as covered in coverage reports (:ghc-ticket:`17834`,
- :ghc-ticket:`26191`). Note that this currently only works when record fields
- (or values contained within them) are bound to variables, and usage of those
- variables marks the record selectors as covered. That is, a pattern like
- ``Foo{bar = Bar{baz = b}}`` will mark ``bar`` and ``baz`` as covered if ``b``
- is used, but the similar pattern ``Foo{bar = Bar{baz = 42}}`` will mark
- neither as covered.
-
-- SIMD support in the X86 native code generator has been extended with 128-bit
- integer operations. Also, ``shuffleFloatX4#`` and ``shuffleDoubleX2#`` no longer
- require ``-mavx``.
-
-- JSON diagnostics produced with (:ghc-flag:`-fdiagnostics-as-json`) now
- include the `rendered` diagnostics message, in the exact same format as what
- GHC would have produced without -fdiagnostics-as-json (including ANSI escape
- sequences).
-
-GHCi
-~~~~
-
-- :ghci-cmd:`:info` now outputs type declarations with @-binders that are
- considered semantically significant. See the documentation for :ghci-cmd:`:info`
- itself for a more detailed explanation.
-
-- GHCi errors and warnings now have their own numeric error codes that are
- displayed alongside the error.
-
-Runtime system
-~~~~~~~~~~~~~~
-
-- Add new runtime flag :rts-flag:`--optimistic-linking` which instructs the
- runtime linker to continue in the presence of unknown symbols. By default this
- flag is not passed, preserving previous behavior.
-
-Cmm
-~~~
-
-``base`` library
-~~~~~~~~~~~~~~~~
-
-``ghc-prim`` library
-~~~~~~~~~~~~~~~~~~~~
-
-``ghc`` library
-~~~~~~~~~~~~~~~
-
-* The `UnknownDiagnostic` constructor now takes an additional type argument
- for the type of hints corresponding to the diagnostic, and an additional
- value-level argument used for existential wrapping of the hints of the inner
- diagnostic.
-
-* Changes to the HPT and HUG interface:
-
- - `addToHpt` and `addListToHPT` were moved from `GHC.Unit.Home.ModInfo` to `GHC.Unit.Home.PackageTable` and deprecated in favour of `addHomeModInfoToHpt` and `addHomeModInfosToHpt`.
- - `UnitEnvGraph` and operations `unitEnv_lookup_maybe`, `unitEnv_foldWithKey, `unitEnv_singleton`, `unitEnv_adjust`, `unitEnv_insert`, `unitEnv_new` were moved from `GHC.Unit.Env` to `GHC.Unit.Home.Graph`.
- - The HomePackageTable (HPT) is now exported from `GHC.Unit.Home.PackageTable`,
- and is now backed by an IORef to avoid by construction very bad memory leaks.
- This means the API to the HPT now is for the most part in IO. For instance,
- `emptyHomePackageTable` and `addHomeModInfoToHpt` are now in IO.
- - `mkHomeUnitEnv` was moved to `GHC.Unit.Home.PackageTable`, and now takes two
- extra explicit arguments. To restore previous behaviour, pass `emptyUnitState`
- and `Nothing` as the first two arguments additionally.
- - `hugElts` was removed. Users should prefer `allUnits` to get the keys of the
- HUG (the typical use case), or `traverse` or `unitEnv_foldWithKey` in other
- cases.
-
-* Changes to `Language.Haskell.Syntax.Expr`
-
- - The `ParStmtBlock` list argument of the `ParStmt` constructor of `StmtLR` is now `NonEmpty`.
-
-* As part of the implementation of `GHC proposal 493 <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0493-s…>`_,
- the `SpecSig` constructor of `Sig` has been deprecated. It is replaced by
- the constructor `SpecSigE` which supports expressions at the head, rather than
- a lone variable.
-
-``ghc-heap`` library
-~~~~~~~~~~~~~~~~~~~~
-
-* The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`,
- `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow
- reading of the relevant Closure attributes without reliance on incomplete
- selectors.
-
-``ghc-experimental`` library
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-- ``ghc-experimental`` now exposes ``GHC.RTS.Flags`` and ``GHC.Stats`` as
- ``GHC.RTS.Flags.Experimental`` and ``GHC.Stats.Experimental``. These are
- *also* exposed in ``base``, however the ``base`` versions will be deprecated as
- part of the split base project. See `CLC proposal 289
- <https://github.com/haskell/core-libraries-committee/issues/289>`__.
- Downstream consumers of these flags are encouraged to migrate to the
- ``ghc-experimental`` versions.
-
-
-
-``template-haskell`` library
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-- As part of the implementation of `GHC proposal 493 <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0493-s…>`_,
- the ``SpecialiseP`` constructor of the Template Haskell ``Pragma`` type, as
- well as the helpers ``pragSpecD`` and ``pragSpecInlD``, have been deprecated.
-
- They are replaced, respectively, by ``SpecialiseEP``, ``pragSpecED`` and
- ``pragSpecInlED``.
-
-Included libraries
-~~~~~~~~~~~~~~~~~~
-
-The package database provided with this distribution also contains a number of
-packages other than GHC itself. See the changelogs provided with these packages
-for further change information.
-
-.. ghc-package-list::
-
- libraries/array/array.cabal: Dependency of ``ghc`` library
- libraries/base/base.cabal: Core library
- libraries/binary/binary.cabal: Dependency of ``ghc`` library
- libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library
- libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility
- libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility
- libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
- libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
- libraries/directory/directory.cabal: Dependency of ``ghc`` library
- libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library
- libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
- compiler/ghc.cabal: The compiler itself
- libraries/ghci/ghci.cabal: The REPL interface
- libraries/ghc-boot/ghc-boot.cabal: Internal compiler library
- libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
- libraries/ghc-compact/ghc-compact.cabal: Core library
- libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library
- libraries/ghc-prim/ghc-prim.cabal: Core library
- utils/haddock/haddock-api/haddock-api.cabal: Dependency of ``haddock`` executable
- utils/haddock/haddock-library/haddock-library.cabal: Dependency of ``haddock`` executable
- libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable
- libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable
- libraries/integer-gmp/integer-gmp.cabal: Core library
- libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library
- libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library
- libraries/pretty/pretty.cabal: Dependency of ``ghc`` library
- libraries/process/process.cabal: Dependency of ``ghc`` library
- libraries/stm/stm.cabal: Dependency of ``haskeline`` library
- libraries/template-haskell/template-haskell.cabal: Core library
- libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library
- libraries/text/text.cabal: Dependency of ``Cabal`` library
- libraries/time/time.cabal: Dependency of ``ghc`` library
- libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
- libraries/unix/unix.cabal: Dependency of ``ghc`` library
- libraries/Win32/Win32.cabal: Dependency of ``ghc`` library
- libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable
- libraries/os-string/os-string.cabal: Dependency of ``filepath`` library
- libraries/file-io/file-io.cabal: Dependency of ``directory`` library
=====================================
docs/users_guide/9.16.1-notes.rst
=====================================
@@ -0,0 +1,21 @@
+.. _release-9-16-1:
+
+Version 9.16.1
+==============
+
+The significant changes to the various parts of the compiler are listed in the
+following sections. See the `migration guide
+<https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.14>`_ on the GHC Wiki
+for specific guidance on migrating programs to this release.
+
+Compiler
+~~~~~~~~
+
+- Code coverage's (:ghc-flag:`-fhpc`) treatment of record fields now extends
+ beyond record fields accessed via :extension:`RecordWildCards` and
+ :extension:`NamedFieldPuns`, and also handles access to nested record fields.
+ That is, in a pattern such as ``Foo{bar = Bar{baz = b}}`` both ``bar`` and
+ ``baz`` will now be marked as covered if ``b`` is evaluated. Note that this
+ currently only works when record fields (or values contained within them) are
+ bound to variables. The very similar pattern ``Foo{bar = Bar{baz = 42}}``
+ will will not yet mark ``bar`` or ``baz`` as covered.
=====================================
docs/users_guide/release-notes.rst
=====================================
@@ -4,4 +4,4 @@ Release notes
.. toctree::
:maxdepth: 1
- 9.14.1-notes
+ 9.16.1-notes
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3631eb1b02251ca69a0c959930bb4a3…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3631eb1b02251ca69a0c959930bb4a3…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/ccs-index-table] HashTable in IndexTable
by Hannes Siebenhandl (@fendor) 05 Aug '25
by Hannes Siebenhandl (@fendor) 05 Aug '25
05 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/ccs-index-table at Glasgow Haskell Compiler / GHC
Commits:
b328b307 by fendor at 2025-08-05T09:03:05+02:00
HashTable in IndexTable
- - - - -
15 changed files:
- libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/PeekProfInfo_ProfilingEnabled.hsc
- rts/Hash.c
- rts/Hash.h
- + rts/IndexTable.c
- rts/ProfilerReport.c
- rts/ProfilerReportJson.c
- rts/Profiling.c
- rts/Profiling.h
- rts/include/Rts.h
- rts/include/rts/prof/CCS.h
- + rts/include/rts/prof/IndexTable.h
- rts/rts.cabal
- testsuite/tests/perf/should_run/T26147.stdout
- testsuite/tests/perf/should_run/all.T
- testsuite/tests/perf/should_run/genT26147
Changes:
=====================================
libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/PeekProfInfo_ProfilingEnabled.hsc
=====================================
@@ -138,21 +138,21 @@ peekCostCentre costCenterCacheRef ptr = do
peekIndexTable :: AddressSet -> IORef (AddressMap CostCentre) -> Ptr indexTable -> IO (Maybe IndexTable)
peekIndexTable _ _ ptr | ptr == nullPtr = return Nothing
-peekIndexTable loopBreakers costCenterCacheRef ptr = do
- it_cc_ptr <- (#peek struct IndexTable_, cc) ptr
- it_cc' <- peekCostCentre costCenterCacheRef it_cc_ptr
- it_ccs_ptr <- (#peek struct IndexTable_, ccs) ptr
- it_ccs' <- peekCostCentreStack loopBreakers costCenterCacheRef it_ccs_ptr
- it_next_ptr <- (#peek struct IndexTable_, next) ptr
- it_next' <- peekIndexTable loopBreakers costCenterCacheRef it_next_ptr
- it_back_edge' <- (#peek struct IndexTable_, back_edge) ptr
-
- return $ Just IndexTable {
- it_cc = it_cc',
- it_ccs = it_ccs',
- it_next = it_next',
- it_back_edge = it_back_edge'
- }
+peekIndexTable _ _ _ = pure Nothing
+ -- it_cc_ptr <- (#peek struct IndexTable_, cc) ptr
+ -- it_cc' <- peekCostCentre costCenterCacheRef it_cc_ptr
+ -- it_ccs_ptr <- (#peek struct IndexTable_, ccs) ptr
+ -- it_ccs' <- peekCostCentreStack loopBreakers costCenterCacheRef it_ccs_ptr
+ -- it_next_ptr <- (#peek struct IndexTable_, next) ptr
+ -- it_next' <- peekIndexTable loopBreakers costCenterCacheRef it_next_ptr
+ -- it_back_edge' <- (#peek struct IndexTable_, back_edge) ptr
+
+ -- return $ Just IndexTable {
+ -- it_cc = it_cc',
+ -- it_ccs = it_ccs',
+ -- it_next = it_next',
+ -- it_back_edge = it_back_edge'
+ -- }
-- | casts a @Ptr@ to an @Int@
ptrToInt :: Ptr a -> Int
=====================================
rts/Hash.c
=====================================
@@ -515,6 +515,52 @@ mapHashTableKeys(HashTable *table, void *data, MapHashFnKeys fn)
}
}
+void initHashIterator(HashTable *table, struct HashIterator_* iter) {
+ /* The last bucket with something in it is table->max + table->split - 1 */
+ long segment = (table->max + table->split - 1) / HSEGSIZE;
+ long index = (table->max + table->split - 1) % HSEGSIZE;
+ iter->table = table;
+ iter->segment = segment;
+ iter->index = index;
+ iter->data = NULL;
+}
+
+struct HashIterator_* hashTableIterator(HashTable *table) {
+ struct HashIterator_* iter;
+ iter = stgMallocBytes(sizeof(HashIterator),"hashTableIterator");
+ initHashIterator(table, iter);
+ return iter;
+}
+
+const void *hashIteratorItem(struct HashIterator_* iter) {
+ return iter->data;
+}
+
+int hashIteratorNext(struct HashIterator_* iter) {
+ long segment = iter->segment;
+ long index = iter->index;
+
+ while (segment >= 0) {
+ while (index >= 0) {
+ for (HashList *hl = iter->table->dir[segment][index]; hl != NULL; hl = hl->next) {
+ iter->segment = segment;
+ /* make sure we advance the index */
+ iter->index = index - 1;
+ iter->data = hl->data;
+ return 1;
+ }
+ index--;
+ }
+ segment--;
+ index = HSEGSIZE - 1;
+ }
+ return 0;
+}
+
+void freeHashIterator(struct HashIterator_* iter) {
+ stgFree(iter);
+}
+
void
iterHashTable(HashTable *table, void *data, IterHashFn fn)
{
@@ -536,6 +582,7 @@ iterHashTable(HashTable *table, void *data, IterHashFn fn)
}
}
+
/* -----------------------------------------------------------------------------
* When we initialize a hash table, we set up the first segment as well,
* initializing all of the first segment's hash buckets to NULL.
=====================================
rts/Hash.h
=====================================
@@ -42,6 +42,21 @@ void mapHashTable(HashTable *table, void *data, MapHashFn fn);
void mapHashTableKeys(HashTable *table, void *data, MapHashFnKeys fn);
void iterHashTable(HashTable *table, void *data, IterHashFn);
+struct HashIterator_ {
+ HashTable *table;
+ long segment;
+ long index;
+ const void* data;
+};
+typedef struct HashIterator_ HashIterator;
+
+void initHashIterator(HashTable *, struct HashIterator_*);
+struct HashIterator_* hashTableIterator(HashTable *table);
+const void *hashIteratorItem(struct HashIterator_* iter);
+int hashIteratorNext(struct HashIterator_* iter);
+void freeHashIterator(struct HashIterator_* iter);
+
+
/* Hash table access where the keys are C strings (the strings are
* assumed to be allocated by the caller, and mustn't be deallocated
* until the corresponding hash table entry has been removed).
=====================================
rts/IndexTable.c
=====================================
@@ -0,0 +1,116 @@
+#if defined(PROFILING)
+
+#include "Rts.h"
+#include "rts/prof/IndexTable.h"
+#include "RtsFlags.h"
+#include "RtsUtils.h"
+#include "rts/PosixSource.h"
+#include "rts/prof/CCS.h"
+#include "Hash.h"
+#include "assert.h"
+
+#include "Profiling.h"
+#include "Arena.h"
+
+#include <fs_rts.h>
+#include <string.h>
+
+#if defined(DEBUG) || defined(PROFILING)
+#include "Trace.h"
+#endif
+
+
+typedef struct IndexTable_ IndexTable;
+
+void
+freeIndexTable(IndexTable * it) {
+ assert(it != EMPTY_TABLE);
+ if (it != EMPTY_TABLE && it->children != NULL) {
+ freeHashTable(it->children, NULL);
+ it->children = NULL;
+ }
+}
+
+CostCentreStack *
+isInIndexTable(IndexTable *it, CostCentre *cc) {
+ if (EMPTY_TABLE == it) {
+ return EMPTY_TABLE;
+ }
+ if (NULL == it->children) {
+ return EMPTY_TABLE;
+ }
+
+ IndexTableNode * node;
+ node = (IndexTableNode *) lookupHashTable(it->children, (StgWord) cc->ccID);
+ if (node == NULL) {
+ /* Not found */
+ return EMPTY_TABLE;
+ }
+ return node->ccs;
+}
+
+
+IndexTable *
+addToIndexTable(IndexTable *it, CostCentreStack *new_ccs,
+ CostCentre *cc, bool back_edge) {
+ if (it == EMPTY_TABLE) {
+ it = arenaAlloc(prof_arena, sizeof(IndexTable));
+ it->children = NULL;
+ }
+ assert(it != EMPTY_TABLE);
+
+ IndexTableNode *node;
+ node = arenaAlloc(prof_arena, sizeof(IndexTableNode));
+
+ node->cc = cc;
+ node->ccs = new_ccs;
+ node->back_edge = back_edge;
+
+ if (it->children == NULL) {
+ it->children = allocHashTable();
+ }
+
+ insertHashTable(it->children, (StgWord) node->cc->ccID, (const void *) node);
+
+ return it;
+}
+
+struct IndexTableIter_ {
+ struct HashIterator_ *iterator;
+};
+
+IndexTableIter*
+indexTableIterator(IndexTable *it) {
+ IndexTableIter *iter;
+ HashIterator *hashIter = NULL;
+ iter = arenaAlloc(prof_arena, sizeof(IndexTableIter));
+
+ if (it != EMPTY_TABLE && it->children != NULL) {
+ hashIter = arenaAlloc(prof_arena, sizeof(struct HashIterator_));
+ initHashIterator(it->children, hashIter);
+ }
+
+ iter->iterator = hashIter;
+ return iter;
+}
+
+int
+indexTableIterNext (IndexTableIter *iter) {
+ assert(iter != NULL);
+ if (iter->iterator == NULL) {
+ return 0;
+ }
+ return hashIteratorNext(iter->iterator);
+};
+
+
+IndexTableNode*
+indexTableIterItem(IndexTableIter *it) {
+ assert(it != NULL);
+ if (it->iterator == NULL) {
+ return EMPTY_TABLE;
+ }
+ return (IndexTableNode *) hashIteratorItem(it->iterator);
+}
+
+#endif /* PROFILING */
=====================================
rts/ProfilerReport.c
=====================================
@@ -14,6 +14,7 @@
#include "RtsUtils.h"
#include "ProfilerReport.h"
#include "Profiling.h"
+#include "rts/prof/IndexTable.h"
static uint32_t numDigits ( StgInt i );
static void findCCSMaxLens ( CostCentreStack const *ccs,
@@ -189,7 +190,7 @@ static void
findCCSMaxLens(CostCentreStack const *ccs, uint32_t indent, uint32_t *max_label_len,
uint32_t *max_module_len, uint32_t *max_src_len, uint32_t *max_id_len) {
CostCentre *cc;
- IndexTable *i;
+ IndexTableIter *i;
cc = ccs->cc;
@@ -198,14 +199,17 @@ findCCSMaxLens(CostCentreStack const *ccs, uint32_t indent, uint32_t *max_label_
*max_src_len = stg_max(*max_src_len, strlen_utf8(cc->srcloc));
*max_id_len = stg_max(*max_id_len, numDigits(ccs->ccsID));
- for (i = ccs->indexTable; i != 0; i = i->next) {
- if (!i->back_edge) {
- findCCSMaxLens(i->ccs, indent+1,
+ for ( i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (!indexTableIterItem(i)->back_edge) {
+ findCCSMaxLens(indexTableIterItem(i)->ccs, indent+1,
max_label_len, max_module_len, max_src_len, max_id_len);
}
}
}
+
static void
logCCS(FILE *prof_file, CostCentreStack const *ccs, ProfilerTotals totals,
uint32_t indent,
@@ -213,7 +217,7 @@ logCCS(FILE *prof_file, CostCentreStack const *ccs, ProfilerTotals totals,
uint32_t max_src_len, uint32_t max_id_len)
{
CostCentre *cc;
- IndexTable *i;
+ IndexTableIter *i;
cc = ccs->cc;
@@ -248,9 +252,11 @@ logCCS(FILE *prof_file, CostCentreStack const *ccs, ProfilerTotals totals,
fprintf(prof_file, "\n");
}
- for (i = ccs->indexTable; i != 0; i = i->next) {
- if (!i->back_edge) {
- logCCS(prof_file, i->ccs, totals, indent+1,
+ for ( i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (!indexTableIterItem(i)->back_edge) {
+ logCCS(prof_file, indexTableIterItem(i)->ccs, totals, indent+1,
max_label_len, max_module_len, max_src_len, max_id_len);
}
}
=====================================
rts/ProfilerReportJson.c
=====================================
@@ -6,6 +6,7 @@
*
* ---------------------------------------------------------------------------*/
+#include <stdio.h>
#if defined(PROFILING)
#include "rts/PosixSource.h"
@@ -14,6 +15,7 @@
#include "RtsUtils.h"
#include "ProfilerReportJson.h"
#include "Profiling.h"
+#include "rts/prof/IndexTable.h"
#include <string.h>
@@ -232,12 +234,14 @@ logCostCentreStack(FILE *prof_file, CostCentreStack const *ccs)
bool need_comma = false;
fprintf(prof_file, "\"children\": [");
- for (IndexTable *i = ccs->indexTable; i != 0; i = i->next) {
- if (!i->back_edge) {
+ for ( IndexTableIter *i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (!indexTableIterItem(i)->back_edge) {
if (need_comma) {
fprintf(prof_file, ",");
}
- logCostCentreStack(prof_file, i->ccs);
+ logCostCentreStack(prof_file, indexTableIterItem(i)->ccs);
need_comma = true;
}
}
=====================================
rts/Profiling.c
=====================================
@@ -22,6 +22,7 @@
#include "ProfilerReportJson.h"
#include "Printer.h"
#include "Capability.h"
+#include "rts/prof/IndexTable.h"
#include <fs_rts.h>
#include <string.h>
@@ -33,11 +34,11 @@
/*
* Profiling allocation arena.
*/
-#if defined(DEBUG)
+// #if defined(DEBUG)
Arena *prof_arena;
-#else
-static Arena *prof_arena;
-#endif
+// #else
+// static Arena *prof_arena;
+// #endif
/*
* Global variables used to assign unique IDs to cc's, ccs's, and
@@ -119,9 +120,6 @@ static CostCentreStack * checkLoop ( CostCentreStack *ccs,
static void sortCCSTree ( CostCentreStack *ccs );
static CostCentreStack * pruneCCSTree ( CostCentreStack *ccs );
static CostCentreStack * actualPush ( CostCentreStack *, CostCentre * );
-static CostCentreStack * isInIndexTable ( IndexTable *, CostCentre * );
-static IndexTable * addToIndexTable ( IndexTable *, CostCentreStack *,
- CostCentre *, bool );
static void ccsSetSelected ( CostCentreStack *ccs );
static void aggregateCCCosts( CostCentreStack *ccs );
static void registerCC ( CostCentre *cc );
@@ -621,13 +619,13 @@ static CostCentreStack *
actualPush_ (CostCentreStack *ccs, CostCentre *cc, CostCentreStack *new_ccs)
{
/* assign values to each member of the structure */
+ new_ccs->indexTable = 0;
new_ccs->ccsID = CCS_ID++;
new_ccs->cc = cc;
new_ccs->prevStack = ccs;
new_ccs->root = ccs->root;
new_ccs->depth = ccs->depth + 1;
- new_ccs->indexTable = EMPTY_TABLE;
/* Initialise the various _scc_ counters to zero
*/
@@ -652,38 +650,6 @@ actualPush_ (CostCentreStack *ccs, CostCentre *cc, CostCentreStack *new_ccs)
return new_ccs;
}
-
-static CostCentreStack *
-isInIndexTable(IndexTable *it, CostCentre *cc)
-{
- while (it!=EMPTY_TABLE)
- {
- if (it->cc == cc)
- return it->ccs;
- else
- it = it->next;
- }
-
- /* otherwise we never found it so return EMPTY_TABLE */
- return EMPTY_TABLE;
-}
-
-
-static IndexTable *
-addToIndexTable (IndexTable *it, CostCentreStack *new_ccs,
- CostCentre *cc, bool back_edge)
-{
- IndexTable *new_it;
-
- new_it = arenaAlloc(prof_arena, sizeof(IndexTable));
-
- new_it->cc = cc;
- new_it->ccs = new_ccs;
- new_it->next = it;
- new_it->back_edge = back_edge;
- return new_it;
-}
-
/* -----------------------------------------------------------------------------
Generating a time & allocation profiling report.
-------------------------------------------------------------------------- */
@@ -744,9 +710,11 @@ countTickss_(CostCentreStack const *ccs, ProfilerTotals *totals)
totals->total_alloc += ccs->mem_alloc;
totals->total_prof_ticks += ccs->time_ticks;
}
- for (IndexTable *i = ccs->indexTable; i != NULL; i = i->next) {
- if (!i->back_edge) {
- countTickss_(i->ccs, totals);
+ for ( IndexTableIter *i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (!indexTableIterItem(i)->back_edge) {
+ countTickss_(indexTableIterItem(i)->ccs, totals);
}
}
}
@@ -767,18 +735,19 @@ countTickss(CostCentreStack const *ccs)
static void
inheritCosts(CostCentreStack *ccs)
{
- IndexTable *i;
if (ignoreCCS(ccs)) { return; }
ccs->inherited_ticks += ccs->time_ticks;
ccs->inherited_alloc += ccs->mem_alloc;
- for (i = ccs->indexTable; i != NULL; i = i->next)
- if (!i->back_edge) {
- inheritCosts(i->ccs);
- ccs->inherited_ticks += i->ccs->inherited_ticks;
- ccs->inherited_alloc += i->ccs->inherited_alloc;
+ for ( IndexTableIter *i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; )
+ if (!indexTableIterItem(i)->back_edge) {
+ inheritCosts(indexTableIterItem(i)->ccs);
+ ccs->inherited_ticks += indexTableIterItem(i)->ccs->inherited_ticks;
+ ccs->inherited_alloc += indexTableIterItem(i)->ccs->inherited_alloc;
}
return;
@@ -787,14 +756,14 @@ inheritCosts(CostCentreStack *ccs)
static void
aggregateCCCosts( CostCentreStack *ccs )
{
- IndexTable *i;
-
ccs->cc->mem_alloc += ccs->mem_alloc;
ccs->cc->time_ticks += ccs->time_ticks;
- for (i = ccs->indexTable; i != 0; i = i->next) {
- if (!i->back_edge) {
- aggregateCCCosts(i->ccs);
+ for ( IndexTableIter *i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (!indexTableIterItem(i)->back_edge) {
+ aggregateCCCosts(indexTableIterItem(i)->ccs);
}
}
}
@@ -806,19 +775,22 @@ aggregateCCCosts( CostCentreStack *ccs )
static CostCentreStack *
pruneCCSTree (CostCentreStack *ccs)
{
- CostCentreStack *ccs1;
- IndexTable *i, **prev;
+ // CostCentreStack *ccs1;
+ // IndexTable *i, **prev;
- prev = &ccs->indexTable;
- for (i = ccs->indexTable; i != 0; i = i->next) {
- if (i->back_edge) { continue; }
+ // prev = &ccs->indexTable;
+ for ( IndexTableIter *i = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(i) != 0
+ ; ) {
+ if (indexTableIterItem(i)->back_edge) { continue; }
- ccs1 = pruneCCSTree(i->ccs);
- if (ccs1 == NULL) {
- *prev = i->next;
- } else {
- prev = &(i->next);
- }
+ // TODO: @fendor implement pruning
+ // ccs1 = pruneCCSTree(indexTableIterItem(i)->ccs);
+ // if (ccs1 == NULL) {
+ // *prev = i->next;
+ // } else {
+ // prev = &(i->next);
+ // }
}
if ( (RtsFlags.CcFlags.doCostCentres >= COST_CENTRES_ALL
@@ -833,59 +805,62 @@ pruneCCSTree (CostCentreStack *ccs)
}
}
-static IndexTable*
-insertIndexTableInSortedList(IndexTable* tbl, IndexTable* sortedList)
-{
- StgWord tbl_ticks = tbl->ccs->scc_count;
- char* tbl_label = tbl->ccs->cc->label;
-
- IndexTable *prev = NULL;
- IndexTable *cursor = sortedList;
-
- while (cursor != NULL) {
- StgWord cursor_ticks = cursor->ccs->scc_count;
- char* cursor_label = cursor->ccs->cc->label;
-
- if (tbl_ticks > cursor_ticks ||
- (tbl_ticks == cursor_ticks && strcmp(tbl_label, cursor_label) < 0)) {
- if (prev == NULL) {
- tbl->next = sortedList;
- return tbl;
- } else {
- prev->next = tbl;
- tbl->next = cursor;
- return sortedList;
- }
- } else {
- prev = cursor;
- cursor = cursor->next;
- }
- }
-
- prev->next = tbl;
- return sortedList;
-}
+// static IndexTable*
+// insertIndexTableInSortedList(IndexTable* tbl, IndexTable* sortedList)
+// {
+// StgWord tbl_ticks = tbl->ccs->scc_count;
+// char* tbl_label = tbl->ccs->cc->label;
+
+// IndexTable *prev = NULL;
+// IndexTable *cursor = sortedList;
+
+// while (cursor != NULL) {
+// StgWord cursor_ticks = cursor->ccs->scc_count;
+// char* cursor_label = cursor->ccs->cc->label;
+
+// if (tbl_ticks > cursor_ticks ||
+// (tbl_ticks == cursor_ticks && strcmp(tbl_label, cursor_label) < 0)) {
+// if (prev == NULL) {
+// tbl->next = sortedList;
+// return tbl;
+// } else {
+// prev->next = tbl;
+// tbl->next = cursor;
+// return sortedList;
+// }
+// } else {
+// prev = cursor;
+// cursor = cursor->next;
+// }
+// }
+
+// prev->next = tbl;
+// return sortedList;
+// }
static void
sortCCSTree(CostCentreStack *ccs)
{
if (ccs->indexTable == NULL) return;
- for (IndexTable *tbl = ccs->indexTable; tbl != NULL; tbl = tbl->next)
- if (!tbl->back_edge)
- sortCCSTree(tbl->ccs);
+ for ( IndexTableIter *iter = indexTableIterator(ccs->indexTable)
+ ; indexTableIterNext(iter) != 0
+ ; )
+ if (!indexTableIterItem(iter)->back_edge)
+ sortCCSTree(indexTableIterItem(iter)->ccs);
IndexTable *sortedList = ccs->indexTable;
- IndexTable *nonSortedList = sortedList->next;
- sortedList->next = NULL;
-
- while (nonSortedList != NULL)
- {
- IndexTable *nonSortedTail = nonSortedList->next;
- nonSortedList->next = NULL;
- sortedList = insertIndexTableInSortedList(nonSortedList, sortedList);
- nonSortedList = nonSortedTail;
- }
+ // TODO @fendor: reimplement sorting
+ // IndexTable *nonSortedList = sortedList->next;
+ // sortedList->next = NULL;
+
+ // while (nonSortedList != NULL)
+ // {
+ // IndexTable *nonSortedTail = nonSortedList->next;
+ // nonSortedList->next = NULL;
+ // sortedList = insertIndexTableInSortedList(nonSortedList, sortedList);
+ // nonSortedList = nonSortedTail;
+ // }
ccs->indexTable = sortedList;
}
=====================================
rts/Profiling.h
=====================================
@@ -11,9 +11,9 @@
#include <stdio.h>
#include "Rts.h"
-#if defined(DEBUG)
+// #if defined(DEBUG)
#include "Arena.h"
-#endif
+// #endif
#include "BeginPrivate.h"
@@ -49,9 +49,9 @@ void fprintCCS_stderr (CostCentreStack *ccs, StgClosure *exception, StgTSO *tso)
bool ignoreCCS (CostCentreStack const *ccs);
bool ignoreCC (CostCentre const *cc);
-#if defined(DEBUG)
extern Arena *prof_arena;
+#if defined(DEBUG)
void debugCCS( CostCentreStack *ccs );
#endif
=====================================
rts/include/Rts.h
=====================================
@@ -231,6 +231,7 @@ void _warnFail(const char *filename, unsigned int linenum);
/* Profiling information */
#include "rts/prof/CCS.h"
+#include "rts/prof/IndexTable.h"
#include "rts/prof/Heap.h"
#include "rts/prof/LDV.h"
=====================================
rts/include/rts/prof/CCS.h
=====================================
@@ -99,27 +99,6 @@ void startProfTimer ( void );
/* Constants used to set is_caf flag on CostCentres */
#define CC_IS_CAF true
#define CC_NOT_CAF false
-/* -----------------------------------------------------------------------------
- * Data Structures
- * ---------------------------------------------------------------------------*/
-
-// IndexTable is the list of children of a CCS. (Alternatively it is a
-// cache of the results of pushing onto a CCS, so that the second and
-// subsequent times we push a certain CC on a CCS we get the same
-// 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;
- // 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;
-
/* -----------------------------------------------------------------------------
Pre-defined cost centres and cost centre stacks
=====================================
rts/include/rts/prof/IndexTable.h
=====================================
@@ -0,0 +1,51 @@
+#pragma once
+
+/* -----------------------------------------------------------------------------
+ * Data Structures
+ * ---------------------------------------------------------------------------*/
+
+// IndexTable is the list of children of a CCS. (Alternatively it is a
+// cache of the results of pushing onto a CCS, so that the second and
+// subsequent times we push a certain CC on a CCS we get the same
+// result).
+
+typedef struct IndexTableNode_ {
+ // 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;
+ // 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;
+} IndexTableNode;
+
+typedef struct IndexTableNode_ IndexTableNode;
+
+typedef struct IndexTable_ {
+ // IndexTableNode *node;
+ // // 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;
+ // // 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;
+ struct hashtable *children;
+} IndexTable;
+
+typedef struct IndexTable_ IndexTable;
+
+IndexTable * allocateIndexTable( void );
+void freeIndexTable( IndexTable * );
+CostCentreStack * isInIndexTable ( IndexTable *, CostCentre * );
+IndexTable * addToIndexTable ( IndexTable *, CostCentreStack *,
+ CostCentre *, bool );
+
+typedef struct IndexTableIter_ IndexTableIter;
+
+
+IndexTableIter* indexTableIterator ( IndexTable * );
+int indexTableIterNext ( IndexTableIter * );
+IndexTableNode* indexTableIterItem ( IndexTableIter * );
=====================================
rts/rts.cabal
=====================================
@@ -322,6 +322,7 @@ library
rts/Utils.h
rts/prof/CCS.h
rts/prof/Heap.h
+ rts/prof/IndexTable.h
rts/prof/LDV.h
rts/storage/Block.h
rts/storage/ClosureMacros.h
@@ -436,6 +437,7 @@ library
ProfilerReport.c
ProfilerReportJson.c
Profiling.c
+ IndexTable.c
IPE.c
Proftimer.c
RaiseAsync.c
=====================================
testsuite/tests/perf/should_run/T26147.stdout
=====================================
@@ -1,1001 +1 @@
-Test value: 0
-Test value: 1
-Test value: 2
-Test value: 3
-Test value: 4
-Test value: 5
-Test value: 6
-Test value: 7
-Test value: 8
-Test value: 9
-Test value: 10
-Test value: 11
-Test value: 12
-Test value: 13
-Test value: 14
-Test value: 15
-Test value: 16
-Test value: 17
-Test value: 18
-Test value: 19
-Test value: 20
-Test value: 21
-Test value: 22
-Test value: 23
-Test value: 24
-Test value: 25
-Test value: 26
-Test value: 27
-Test value: 28
-Test value: 29
-Test value: 30
-Test value: 31
-Test value: 32
-Test value: 33
-Test value: 34
-Test value: 35
-Test value: 36
-Test value: 37
-Test value: 38
-Test value: 39
-Test value: 40
-Test value: 41
-Test value: 42
-Test value: 43
-Test value: 44
-Test value: 45
-Test value: 46
-Test value: 47
-Test value: 48
-Test value: 49
-Test value: 50
-Test value: 51
-Test value: 52
-Test value: 53
-Test value: 54
-Test value: 55
-Test value: 56
-Test value: 57
-Test value: 58
-Test value: 59
-Test value: 60
-Test value: 61
-Test value: 62
-Test value: 63
-Test value: 64
-Test value: 65
-Test value: 66
-Test value: 67
-Test value: 68
-Test value: 69
-Test value: 70
-Test value: 71
-Test value: 72
-Test value: 73
-Test value: 74
-Test value: 75
-Test value: 76
-Test value: 77
-Test value: 78
-Test value: 79
-Test value: 80
-Test value: 81
-Test value: 82
-Test value: 83
-Test value: 84
-Test value: 85
-Test value: 86
-Test value: 87
-Test value: 88
-Test value: 89
-Test value: 90
-Test value: 91
-Test value: 92
-Test value: 93
-Test value: 94
-Test value: 95
-Test value: 96
-Test value: 97
-Test value: 98
-Test value: 99
-Test value: 100
-Test value: 101
-Test value: 102
-Test value: 103
-Test value: 104
-Test value: 105
-Test value: 106
-Test value: 107
-Test value: 108
-Test value: 109
-Test value: 110
-Test value: 111
-Test value: 112
-Test value: 113
-Test value: 114
-Test value: 115
-Test value: 116
-Test value: 117
-Test value: 118
-Test value: 119
-Test value: 120
-Test value: 121
-Test value: 122
-Test value: 123
-Test value: 124
-Test value: 125
-Test value: 126
-Test value: 127
-Test value: 128
-Test value: 129
-Test value: 130
-Test value: 131
-Test value: 132
-Test value: 133
-Test value: 134
-Test value: 135
-Test value: 136
-Test value: 137
-Test value: 138
-Test value: 139
-Test value: 140
-Test value: 141
-Test value: 142
-Test value: 143
-Test value: 144
-Test value: 145
-Test value: 146
-Test value: 147
-Test value: 148
-Test value: 149
-Test value: 150
-Test value: 151
-Test value: 152
-Test value: 153
-Test value: 154
-Test value: 155
-Test value: 156
-Test value: 157
-Test value: 158
-Test value: 159
-Test value: 160
-Test value: 161
-Test value: 162
-Test value: 163
-Test value: 164
-Test value: 165
-Test value: 166
-Test value: 167
-Test value: 168
-Test value: 169
-Test value: 170
-Test value: 171
-Test value: 172
-Test value: 173
-Test value: 174
-Test value: 175
-Test value: 176
-Test value: 177
-Test value: 178
-Test value: 179
-Test value: 180
-Test value: 181
-Test value: 182
-Test value: 183
-Test value: 184
-Test value: 185
-Test value: 186
-Test value: 187
-Test value: 188
-Test value: 189
-Test value: 190
-Test value: 191
-Test value: 192
-Test value: 193
-Test value: 194
-Test value: 195
-Test value: 196
-Test value: 197
-Test value: 198
-Test value: 199
-Test value: 200
-Test value: 201
-Test value: 202
-Test value: 203
-Test value: 204
-Test value: 205
-Test value: 206
-Test value: 207
-Test value: 208
-Test value: 209
-Test value: 210
-Test value: 211
-Test value: 212
-Test value: 213
-Test value: 214
-Test value: 215
-Test value: 216
-Test value: 217
-Test value: 218
-Test value: 219
-Test value: 220
-Test value: 221
-Test value: 222
-Test value: 223
-Test value: 224
-Test value: 225
-Test value: 226
-Test value: 227
-Test value: 228
-Test value: 229
-Test value: 230
-Test value: 231
-Test value: 232
-Test value: 233
-Test value: 234
-Test value: 235
-Test value: 236
-Test value: 237
-Test value: 238
-Test value: 239
-Test value: 240
-Test value: 241
-Test value: 242
-Test value: 243
-Test value: 244
-Test value: 245
-Test value: 246
-Test value: 247
-Test value: 248
-Test value: 249
-Test value: 250
-Test value: 251
-Test value: 252
-Test value: 253
-Test value: 254
-Test value: 255
-Test value: 256
-Test value: 257
-Test value: 258
-Test value: 259
-Test value: 260
-Test value: 261
-Test value: 262
-Test value: 263
-Test value: 264
-Test value: 265
-Test value: 266
-Test value: 267
-Test value: 268
-Test value: 269
-Test value: 270
-Test value: 271
-Test value: 272
-Test value: 273
-Test value: 274
-Test value: 275
-Test value: 276
-Test value: 277
-Test value: 278
-Test value: 279
-Test value: 280
-Test value: 281
-Test value: 282
-Test value: 283
-Test value: 284
-Test value: 285
-Test value: 286
-Test value: 287
-Test value: 288
-Test value: 289
-Test value: 290
-Test value: 291
-Test value: 292
-Test value: 293
-Test value: 294
-Test value: 295
-Test value: 296
-Test value: 297
-Test value: 298
-Test value: 299
-Test value: 300
-Test value: 301
-Test value: 302
-Test value: 303
-Test value: 304
-Test value: 305
-Test value: 306
-Test value: 307
-Test value: 308
-Test value: 309
-Test value: 310
-Test value: 311
-Test value: 312
-Test value: 313
-Test value: 314
-Test value: 315
-Test value: 316
-Test value: 317
-Test value: 318
-Test value: 319
-Test value: 320
-Test value: 321
-Test value: 322
-Test value: 323
-Test value: 324
-Test value: 325
-Test value: 326
-Test value: 327
-Test value: 328
-Test value: 329
-Test value: 330
-Test value: 331
-Test value: 332
-Test value: 333
-Test value: 334
-Test value: 335
-Test value: 336
-Test value: 337
-Test value: 338
-Test value: 339
-Test value: 340
-Test value: 341
-Test value: 342
-Test value: 343
-Test value: 344
-Test value: 345
-Test value: 346
-Test value: 347
-Test value: 348
-Test value: 349
-Test value: 350
-Test value: 351
-Test value: 352
-Test value: 353
-Test value: 354
-Test value: 355
-Test value: 356
-Test value: 357
-Test value: 358
-Test value: 359
-Test value: 360
-Test value: 361
-Test value: 362
-Test value: 363
-Test value: 364
-Test value: 365
-Test value: 366
-Test value: 367
-Test value: 368
-Test value: 369
-Test value: 370
-Test value: 371
-Test value: 372
-Test value: 373
-Test value: 374
-Test value: 375
-Test value: 376
-Test value: 377
-Test value: 378
-Test value: 379
-Test value: 380
-Test value: 381
-Test value: 382
-Test value: 383
-Test value: 384
-Test value: 385
-Test value: 386
-Test value: 387
-Test value: 388
-Test value: 389
-Test value: 390
-Test value: 391
-Test value: 392
-Test value: 393
-Test value: 394
-Test value: 395
-Test value: 396
-Test value: 397
-Test value: 398
-Test value: 399
-Test value: 400
-Test value: 401
-Test value: 402
-Test value: 403
-Test value: 404
-Test value: 405
-Test value: 406
-Test value: 407
-Test value: 408
-Test value: 409
-Test value: 410
-Test value: 411
-Test value: 412
-Test value: 413
-Test value: 414
-Test value: 415
-Test value: 416
-Test value: 417
-Test value: 418
-Test value: 419
-Test value: 420
-Test value: 421
-Test value: 422
-Test value: 423
-Test value: 424
-Test value: 425
-Test value: 426
-Test value: 427
-Test value: 428
-Test value: 429
-Test value: 430
-Test value: 431
-Test value: 432
-Test value: 433
-Test value: 434
-Test value: 435
-Test value: 436
-Test value: 437
-Test value: 438
-Test value: 439
-Test value: 440
-Test value: 441
-Test value: 442
-Test value: 443
-Test value: 444
-Test value: 445
-Test value: 446
-Test value: 447
-Test value: 448
-Test value: 449
-Test value: 450
-Test value: 451
-Test value: 452
-Test value: 453
-Test value: 454
-Test value: 455
-Test value: 456
-Test value: 457
-Test value: 458
-Test value: 459
-Test value: 460
-Test value: 461
-Test value: 462
-Test value: 463
-Test value: 464
-Test value: 465
-Test value: 466
-Test value: 467
-Test value: 468
-Test value: 469
-Test value: 470
-Test value: 471
-Test value: 472
-Test value: 473
-Test value: 474
-Test value: 475
-Test value: 476
-Test value: 477
-Test value: 478
-Test value: 479
-Test value: 480
-Test value: 481
-Test value: 482
-Test value: 483
-Test value: 484
-Test value: 485
-Test value: 486
-Test value: 487
-Test value: 488
-Test value: 489
-Test value: 490
-Test value: 491
-Test value: 492
-Test value: 493
-Test value: 494
-Test value: 495
-Test value: 496
-Test value: 497
-Test value: 498
-Test value: 499
-Test value: 500
-Test value: 501
-Test value: 502
-Test value: 503
-Test value: 504
-Test value: 505
-Test value: 506
-Test value: 507
-Test value: 508
-Test value: 509
-Test value: 510
-Test value: 511
-Test value: 512
-Test value: 513
-Test value: 514
-Test value: 515
-Test value: 516
-Test value: 517
-Test value: 518
-Test value: 519
-Test value: 520
-Test value: 521
-Test value: 522
-Test value: 523
-Test value: 524
-Test value: 525
-Test value: 526
-Test value: 527
-Test value: 528
-Test value: 529
-Test value: 530
-Test value: 531
-Test value: 532
-Test value: 533
-Test value: 534
-Test value: 535
-Test value: 536
-Test value: 537
-Test value: 538
-Test value: 539
-Test value: 540
-Test value: 541
-Test value: 542
-Test value: 543
-Test value: 544
-Test value: 545
-Test value: 546
-Test value: 547
-Test value: 548
-Test value: 549
-Test value: 550
-Test value: 551
-Test value: 552
-Test value: 553
-Test value: 554
-Test value: 555
-Test value: 556
-Test value: 557
-Test value: 558
-Test value: 559
-Test value: 560
-Test value: 561
-Test value: 562
-Test value: 563
-Test value: 564
-Test value: 565
-Test value: 566
-Test value: 567
-Test value: 568
-Test value: 569
-Test value: 570
-Test value: 571
-Test value: 572
-Test value: 573
-Test value: 574
-Test value: 575
-Test value: 576
-Test value: 577
-Test value: 578
-Test value: 579
-Test value: 580
-Test value: 581
-Test value: 582
-Test value: 583
-Test value: 584
-Test value: 585
-Test value: 586
-Test value: 587
-Test value: 588
-Test value: 589
-Test value: 590
-Test value: 591
-Test value: 592
-Test value: 593
-Test value: 594
-Test value: 595
-Test value: 596
-Test value: 597
-Test value: 598
-Test value: 599
-Test value: 600
-Test value: 601
-Test value: 602
-Test value: 603
-Test value: 604
-Test value: 605
-Test value: 606
-Test value: 607
-Test value: 608
-Test value: 609
-Test value: 610
-Test value: 611
-Test value: 612
-Test value: 613
-Test value: 614
-Test value: 615
-Test value: 616
-Test value: 617
-Test value: 618
-Test value: 619
-Test value: 620
-Test value: 621
-Test value: 622
-Test value: 623
-Test value: 624
-Test value: 625
-Test value: 626
-Test value: 627
-Test value: 628
-Test value: 629
-Test value: 630
-Test value: 631
-Test value: 632
-Test value: 633
-Test value: 634
-Test value: 635
-Test value: 636
-Test value: 637
-Test value: 638
-Test value: 639
-Test value: 640
-Test value: 641
-Test value: 642
-Test value: 643
-Test value: 644
-Test value: 645
-Test value: 646
-Test value: 647
-Test value: 648
-Test value: 649
-Test value: 650
-Test value: 651
-Test value: 652
-Test value: 653
-Test value: 654
-Test value: 655
-Test value: 656
-Test value: 657
-Test value: 658
-Test value: 659
-Test value: 660
-Test value: 661
-Test value: 662
-Test value: 663
-Test value: 664
-Test value: 665
-Test value: 666
-Test value: 667
-Test value: 668
-Test value: 669
-Test value: 670
-Test value: 671
-Test value: 672
-Test value: 673
-Test value: 674
-Test value: 675
-Test value: 676
-Test value: 677
-Test value: 678
-Test value: 679
-Test value: 680
-Test value: 681
-Test value: 682
-Test value: 683
-Test value: 684
-Test value: 685
-Test value: 686
-Test value: 687
-Test value: 688
-Test value: 689
-Test value: 690
-Test value: 691
-Test value: 692
-Test value: 693
-Test value: 694
-Test value: 695
-Test value: 696
-Test value: 697
-Test value: 698
-Test value: 699
-Test value: 700
-Test value: 701
-Test value: 702
-Test value: 703
-Test value: 704
-Test value: 705
-Test value: 706
-Test value: 707
-Test value: 708
-Test value: 709
-Test value: 710
-Test value: 711
-Test value: 712
-Test value: 713
-Test value: 714
-Test value: 715
-Test value: 716
-Test value: 717
-Test value: 718
-Test value: 719
-Test value: 720
-Test value: 721
-Test value: 722
-Test value: 723
-Test value: 724
-Test value: 725
-Test value: 726
-Test value: 727
-Test value: 728
-Test value: 729
-Test value: 730
-Test value: 731
-Test value: 732
-Test value: 733
-Test value: 734
-Test value: 735
-Test value: 736
-Test value: 737
-Test value: 738
-Test value: 739
-Test value: 740
-Test value: 741
-Test value: 742
-Test value: 743
-Test value: 744
-Test value: 745
-Test value: 746
-Test value: 747
-Test value: 748
-Test value: 749
-Test value: 750
-Test value: 751
-Test value: 752
-Test value: 753
-Test value: 754
-Test value: 755
-Test value: 756
-Test value: 757
-Test value: 758
-Test value: 759
-Test value: 760
-Test value: 761
-Test value: 762
-Test value: 763
-Test value: 764
-Test value: 765
-Test value: 766
-Test value: 767
-Test value: 768
-Test value: 769
-Test value: 770
-Test value: 771
-Test value: 772
-Test value: 773
-Test value: 774
-Test value: 775
-Test value: 776
-Test value: 777
-Test value: 778
-Test value: 779
-Test value: 780
-Test value: 781
-Test value: 782
-Test value: 783
-Test value: 784
-Test value: 785
-Test value: 786
-Test value: 787
-Test value: 788
-Test value: 789
-Test value: 790
-Test value: 791
-Test value: 792
-Test value: 793
-Test value: 794
-Test value: 795
-Test value: 796
-Test value: 797
-Test value: 798
-Test value: 799
-Test value: 800
-Test value: 801
-Test value: 802
-Test value: 803
-Test value: 804
-Test value: 805
-Test value: 806
-Test value: 807
-Test value: 808
-Test value: 809
-Test value: 810
-Test value: 811
-Test value: 812
-Test value: 813
-Test value: 814
-Test value: 815
-Test value: 816
-Test value: 817
-Test value: 818
-Test value: 819
-Test value: 820
-Test value: 821
-Test value: 822
-Test value: 823
-Test value: 824
-Test value: 825
-Test value: 826
-Test value: 827
-Test value: 828
-Test value: 829
-Test value: 830
-Test value: 831
-Test value: 832
-Test value: 833
-Test value: 834
-Test value: 835
-Test value: 836
-Test value: 837
-Test value: 838
-Test value: 839
-Test value: 840
-Test value: 841
-Test value: 842
-Test value: 843
-Test value: 844
-Test value: 845
-Test value: 846
-Test value: 847
-Test value: 848
-Test value: 849
-Test value: 850
-Test value: 851
-Test value: 852
-Test value: 853
-Test value: 854
-Test value: 855
-Test value: 856
-Test value: 857
-Test value: 858
-Test value: 859
-Test value: 860
-Test value: 861
-Test value: 862
-Test value: 863
-Test value: 864
-Test value: 865
-Test value: 866
-Test value: 867
-Test value: 868
-Test value: 869
-Test value: 870
-Test value: 871
-Test value: 872
-Test value: 873
-Test value: 874
-Test value: 875
-Test value: 876
-Test value: 877
-Test value: 878
-Test value: 879
-Test value: 880
-Test value: 881
-Test value: 882
-Test value: 883
-Test value: 884
-Test value: 885
-Test value: 886
-Test value: 887
-Test value: 888
-Test value: 889
-Test value: 890
-Test value: 891
-Test value: 892
-Test value: 893
-Test value: 894
-Test value: 895
-Test value: 896
-Test value: 897
-Test value: 898
-Test value: 899
-Test value: 900
-Test value: 901
-Test value: 902
-Test value: 903
-Test value: 904
-Test value: 905
-Test value: 906
-Test value: 907
-Test value: 908
-Test value: 909
-Test value: 910
-Test value: 911
-Test value: 912
-Test value: 913
-Test value: 914
-Test value: 915
-Test value: 916
-Test value: 917
-Test value: 918
-Test value: 919
-Test value: 920
-Test value: 921
-Test value: 922
-Test value: 923
-Test value: 924
-Test value: 925
-Test value: 926
-Test value: 927
-Test value: 928
-Test value: 929
-Test value: 930
-Test value: 931
-Test value: 932
-Test value: 933
-Test value: 934
-Test value: 935
-Test value: 936
-Test value: 937
-Test value: 938
-Test value: 939
-Test value: 940
-Test value: 941
-Test value: 942
-Test value: 943
-Test value: 944
-Test value: 945
-Test value: 946
-Test value: 947
-Test value: 948
-Test value: 949
-Test value: 950
-Test value: 951
-Test value: 952
-Test value: 953
-Test value: 954
-Test value: 955
-Test value: 956
-Test value: 957
-Test value: 958
-Test value: 959
-Test value: 960
-Test value: 961
-Test value: 962
-Test value: 963
-Test value: 964
-Test value: 965
-Test value: 966
-Test value: 967
-Test value: 968
-Test value: 969
-Test value: 970
-Test value: 971
-Test value: 972
-Test value: 973
-Test value: 974
-Test value: 975
-Test value: 976
-Test value: 977
-Test value: 978
-Test value: 979
-Test value: 980
-Test value: 981
-Test value: 982
-Test value: 983
-Test value: 984
-Test value: 985
-Test value: 986
-Test value: 987
-Test value: 988
-Test value: 989
-Test value: 990
-Test value: 991
-Test value: 992
-Test value: 993
-Test value: 994
-Test value: 995
-Test value: 996
-Test value: 997
-Test value: 998
-Test value: 999
-Test value: 1000
+Test value: 30000
=====================================
testsuite/tests/perf/should_run/all.T
=====================================
@@ -446,7 +446,6 @@ test('T26147',
[ collect_stats('all', 5),
pre_cmd('./genT26147'),
extra_files(['genT26147']),
- extra_run_opts('+RTS -p'),
test_opts_dot_prof,
],
compile_and_run,
=====================================
testsuite/tests/perf/should_run/genT26147
=====================================
@@ -16,7 +16,6 @@ for i in $(seq $NUMFUN); do
costCenter${i} :: Int -> IO ()
costCenter${i} n = do
- putStrLn $ "Test value: " ++ show n
costCenter$((i + 1)) (n+1)
EOF
done
@@ -25,5 +24,7 @@ cat >> T26147.hs << EOF
costCenter$((i + 1)) :: Int -> IO ()
costCenter$((i + 1)) n = do
- putStrLn $ "Test value: " ++ show n
+ if n < $NUMFUN * 30
+ then costCenter1 n
+ else putStrLn $ "Test value: " ++ show n
EOF
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b328b3070cd700ff98957ade4b42bef…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b328b3070cd700ff98957ade4b42bef…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/bump-ci-to-9.10] Bump GHC on darwin CI to 9.10.1
by Hannes Siebenhandl (@fendor) 05 Aug '25
by Hannes Siebenhandl (@fendor) 05 Aug '25
05 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/bump-ci-to-9.10 at Glasgow Haskell Compiler / GHC
Commits:
7c378601 by fendor at 2025-08-05T16:29:18+02:00
Bump GHC on darwin CI to 9.10.1
- - - - -
1 changed file:
- .gitlab/darwin/toolchain.nix
Changes:
=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -16,18 +16,17 @@ let
ghcBindists = let version = ghc.version; in {
aarch64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-d…";
- sha256 = "sha256-c1GTMJf3/yiW/t4QL532EswD5JVlgA4getkfsxj4TaA=";
+ sha256 = "sha256-/6+DtdeossBJIMbjkJwL4h3eJ7rzgNCV+ifoQKOi6AQ=";
};
x86_64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-da…";
- sha256 = "sha256-LrYniMG0phsvyW6dhQC+3ompvzcxnwAe6GezEqqzoTQ=";
+ sha256 = "sha256-jPIhiJMOENesUnDUJeIaPatgavc6ZVSTY5NFIAxlC+k=";
};
};
ghc = pkgs.stdenv.mkDerivation rec {
- # Using 9.6.2 because of #24050
- version = "9.6.2";
+ version = "9.10.1";
name = "ghc";
src = ghcBindists.${pkgs.stdenv.hostPlatform.system};
configureFlags = [
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c37860190cfffe719515be9bee7961…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c37860190cfffe719515be9bee7961…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/backtraces-decoders] Allow users to customise the collection of exception annotations
by Hannes Siebenhandl (@fendor) 05 Aug '25
by Hannes Siebenhandl (@fendor) 05 Aug '25
05 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/backtraces-decoders at Glasgow Haskell Compiler / GHC
Commits:
68d564d7 by fendor at 2025-08-05T15:40:24+02:00
Allow users to customise the collection of exception annotations
Add a global `CollectExceptionAnnotationMechanism` which determines how
`ExceptionAnnotation`s are collected upon throwing an `Exception`.
This API is exposed via `ghc-experimental`.
By overriding how we collect `Backtraces`, we can control how the
`Backtraces` are displayed to the user by newtyping `Backtraces` and
giving a different instance for `ExceptionAnnotation`.
A concrete use-case for this feature is allowing us to experiment with
alternative stack decoders, without having to modify `base`, which take
additional information from the stack frames.
This commit does not modify how `Backtraces` are currently
collected or displayed.
- - - - -
24 changed files:
- + libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
- testsuite/tests/deSugar/should_run/T20024.stderr
- testsuite/tests/deSugar/should_run/dsrun005.stderr
- testsuite/tests/deSugar/should_run/dsrun007.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/deriving/should_run/T9576.stderr
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/type-data/should_run/T22332a.stderr
- testsuite/tests/typecheck/should_run/T10284.stderr
- testsuite/tests/typecheck/should_run/T13838.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- testsuite/tests/unsatisfiable/T23816.stderr
- testsuite/tests/unsatisfiable/UnsatDefer.stderr
Changes:
=====================================
libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
=====================================
@@ -0,0 +1,20 @@
+{-
+Module : GHC.Exception.Backtrace.Experimental
+Copyright : (c) The GHC Team
+License : see libraries/ghc-experimental/LICENSE
+
+Maintainer : ghc-devs(a)haskell.org
+Stability : experimental
+Portability : non-portable (GHC extensions)
+
+This module exposes experimental extensions to the Backtrace mechanism of GHC.
+-}
+module GHC.Exception.Backtrace.Experimental (
+ -- * Collecting exception annotations (like backtraces)
+ CollectExceptionAnnotationMechanism,
+ getCollectExceptionAnnotationMechanism,
+ setCollectExceptionAnnotation,
+ collectExceptionAnnotation,
+ ) where
+
+import GHC.Internal.Exception.Backtrace
=====================================
libraries/ghc-internal/src/GHC/Internal/Exception.hs
=====================================
@@ -70,7 +70,8 @@ import GHC.Internal.Show
import GHC.Internal.Stack.Types
import GHC.Internal.IO.Unsafe
import {-# SOURCE #-} GHC.Internal.Stack (prettyCallStackLines, prettyCallStack, prettySrcLoc, withFrozenCallStack)
-import {-# SOURCE #-} GHC.Internal.Exception.Backtrace (collectBacktraces)
+import {-# SOURCE #-} GHC.Internal.Exception.Backtrace (collectExceptionAnnotation)
+import GHC.Internal.Exception.Context (SomeExceptionAnnotation(..))
import GHC.Internal.Exception.Type
-- | Throw an exception. Exceptions may be thrown from purely
@@ -166,8 +167,8 @@ toExceptionWithBacktrace :: (HasCallStack, Exception e)
=> e -> IO SomeException
toExceptionWithBacktrace e
| backtraceDesired e = do
- bt <- collectBacktraces
- return (addExceptionContext bt (toException e))
+ SomeExceptionAnnotation ea <- collectExceptionAnnotation
+ return (addExceptionContext ea (toException e))
| otherwise = return (toException e)
-- | This is thrown when the user calls 'error'. The @String@ is the
=====================================
libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
=====================================
@@ -12,7 +12,7 @@ import GHC.Internal.IO.Unsafe (unsafePerformIO)
import GHC.Internal.Exception.Context
import GHC.Internal.Ptr
import GHC.Internal.Data.Maybe (fromMaybe)
-import GHC.Internal.Stack.Types as GHC.Stack (CallStack)
+import GHC.Internal.Stack.Types as GHC.Stack (CallStack, HasCallStack)
import qualified GHC.Internal.Stack as HCS
import qualified GHC.Internal.ExecutionStack.Internal as ExecStack
import qualified GHC.Internal.Stack.CloneStack as CloneStack
@@ -86,6 +86,37 @@ setBacktraceMechanismState bm enabled = do
_ <- atomicModifyIORef'_ enabledBacktraceMechanismsRef (setBacktraceMechanismEnabled bm enabled)
return ()
+-- | How to collect 'ExceptionAnnotation's on throwing 'Exception's.
+--
+data CollectExceptionAnnotationMechanism = CollectExceptionAnnotationMechanism
+ { ceaCollectExceptionAnnotationMechanism :: HasCallStack => IO SomeExceptionAnnotation
+ }
+
+defaultCollectExceptionAnnotationMechanism :: CollectExceptionAnnotationMechanism
+defaultCollectExceptionAnnotationMechanism = CollectExceptionAnnotationMechanism
+ { ceaCollectExceptionAnnotationMechanism = SomeExceptionAnnotation `fmap` collectBacktraces
+ }
+
+collectExceptionAnnotationMechanismRef :: IORef CollectExceptionAnnotationMechanism
+collectExceptionAnnotationMechanismRef =
+ unsafePerformIO $ newIORef defaultCollectExceptionAnnotationMechanism
+{-# NOINLINE collectExceptionAnnotationMechanismRef #-}
+
+-- | Returns the current callback for collecting 'ExceptionAnnotation's on throwing 'Exception's.
+--
+getCollectExceptionAnnotationMechanism :: IO CollectExceptionAnnotationMechanism
+getCollectExceptionAnnotationMechanism = readIORef collectExceptionAnnotationMechanismRef
+
+-- | Set the callback for collecting an 'ExceptionAnnotation'.
+--
+setCollectExceptionAnnotation :: ExceptionAnnotation a => (HasCallStack => IO a) -> IO ()
+setCollectExceptionAnnotation collector = do
+ let cea = CollectExceptionAnnotationMechanism
+ { ceaCollectExceptionAnnotationMechanism = fmap SomeExceptionAnnotation collector
+ }
+ _ <- atomicModifyIORef'_ collectExceptionAnnotationMechanismRef (const cea)
+ return ()
+
-- | A collection of backtraces.
data Backtraces =
Backtraces {
@@ -124,6 +155,14 @@ displayBacktraces bts = concat
instance ExceptionAnnotation Backtraces where
displayExceptionAnnotation = displayBacktraces
+-- | Collect 'SomeExceptionAnnotation' based on the configuration of the
+-- global 'CollectExceptionAnnotationMechanism'.
+--
+collectExceptionAnnotation :: HasCallStack => IO SomeExceptionAnnotation
+collectExceptionAnnotation = HCS.withFrozenCallStack $ do
+ cea <- getCollectExceptionAnnotationMechanism
+ ceaCollectExceptionAnnotationMechanism cea
+
-- | Collect a set of 'Backtraces'.
collectBacktraces :: (?callStack :: CallStack) => IO Backtraces
collectBacktraces = HCS.withFrozenCallStack $ do
=====================================
libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
=====================================
@@ -5,11 +5,7 @@ module GHC.Internal.Exception.Backtrace where
import GHC.Internal.Base (IO)
import GHC.Internal.Stack.Types (HasCallStack)
-import GHC.Internal.Exception.Context (ExceptionAnnotation)
-
-data Backtraces
-
-instance ExceptionAnnotation Backtraces
+import GHC.Internal.Exception.Context (SomeExceptionAnnotation)
-- For GHC.Exception
-collectBacktraces :: HasCallStack => IO Backtraces
+collectExceptionAnnotation :: HasCallStack => IO SomeExceptionAnnotation
=====================================
testsuite/tests/arrows/should_compile/T21301.stderr
=====================================
@@ -4,7 +4,7 @@ T21301.hs:(8,7)-(10,6): Non-exhaustive patterns in case
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
=====================================
@@ -4,7 +4,7 @@ DsStrictFail.hs:4:12-23: Non-exhaustive patterns in False
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/T20024.stderr
=====================================
@@ -4,7 +4,7 @@ T20024.hs:2:12-32: Non-exhaustive guards in pattern binding
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:431:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun005.stderr
=====================================
@@ -4,7 +4,7 @@ dsrun005.hs:42:1-18: Non-exhaustive patterns in function f
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun007.stderr
=====================================
@@ -4,7 +4,7 @@ dsrun007.hs:5:23-25: Missing field in record construction
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:432:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun008.stderr
=====================================
@@ -4,7 +4,7 @@ dsrun008.hs:2:32-36: Non-exhaustive patterns in (2, x)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deriving/should_run/T9576.stderr
=====================================
@@ -13,7 +13,7 @@ T9576.hs:6:31: error: [GHC-39999]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/ghci/scripts/Defer02.stderr
=====================================
@@ -71,8 +71,8 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:13:5: error: [GHC-83865]
@@ -82,8 +82,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:17:9: error: [GHC-39999]
@@ -93,8 +93,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
<interactive>:10:11: error: [GHC-83865]
@@ -113,8 +113,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:30:5: error: [GHC-83865]
@@ -127,8 +127,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:33:8: error: [GHC-25897]
@@ -146,8 +146,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:38:17: error: [GHC-83865]
@@ -161,8 +161,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:42:5: error: [GHC-39999]
@@ -172,8 +172,8 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
<interactive>:16:8: error: [GHC-18872]
@@ -192,7 +192,7 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/ghci/scripts/T15325.stderr
=====================================
@@ -24,7 +24,7 @@ T15325.hs:11:9: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/patsyn/should_run/ghci.stderr
=====================================
@@ -2,7 +2,7 @@
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/quotes/LiftErrMsgDefer.stderr
=====================================
@@ -11,7 +11,7 @@ LiftErrMsgDefer.hs:14:12: warning: [GHC-28914] [-Wdeferred-type-errors (in -Wdef
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
=====================================
@@ -4,7 +4,7 @@ SafeLang15.hs:22:9-37: Non-exhaustive patterns in Just p'
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/type-data/should_run/T22332a.stderr
=====================================
@@ -4,7 +4,7 @@ T22332a.hs:18:1-35: Non-exhaustive patterns in Just eq
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T10284.stderr
=====================================
@@ -7,7 +7,7 @@ T10284.hs:7:5: error: [GHC-83865]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T13838.stderr
=====================================
@@ -1,4 +1,4 @@
-T13838.exe: Uncaught exception ghc-internal:GHC.Internal.Control.Exception.Base.TypeError:
+T13838: Uncaught exception ghc-internal:GHC.Internal.Control.Exception.Base.TypeError:
T13838.hs:6:1: error: [GHC-83865]
• Couldn't match expected type: IO t0
@@ -9,7 +9,7 @@ T13838.hs:6:1: error: [GHC-83865]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries\ghc-internal\src\GHC\Internal\Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries\ghc-internal\src\GHC\Internal\Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
- throw, called at libraries\ghc-internal\src\GHC\Internal\Control\Exception\Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
+ throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497a-run.stderr
=====================================
@@ -19,7 +19,7 @@ T9497a-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497b-run.stderr
=====================================
@@ -19,7 +19,7 @@ T9497b-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497c-run.stderr
=====================================
@@ -19,7 +19,7 @@ T9497c-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/unsatisfiable/T23816.stderr
=====================================
@@ -8,7 +8,7 @@ T23816.hs:18:15: error: [GHC-22250]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/unsatisfiable/UnsatDefer.stderr
=====================================
@@ -7,7 +7,7 @@ UnsatDefer.hs:20:7: error: [GHC-22250]
(deferred type error)
HasCallStack backtrace:
- collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception
+ collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
+ toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/68d564d74328a3b7247b13a5532b77f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/68d564d74328a3b7247b13a5532b77f…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
05 Aug '25
Zubin pushed to branch ghc-9.10 at Glasgow Haskell Compiler / GHC
Commits:
a19a7bea by Zubin Duggal at 2025-08-04T17:32:05+05:30
Revert "bump deepseq to 1.5.2.0"
This reverts commit 9eefe6bac30e03eb6685fff4f1e24a7c882eacb2.
- - - - -
293ddd85 by Zubin Duggal at 2025-08-04T17:32:43+05:30
Revert "Take subordinate 'type' specifiers into account"
This reverts commit 418bb5689c06bc59375330c29cbd027ecaf0ac49.
- - - - -
a802551a by Zubin Duggal at 2025-08-05T02:17:52+05:30
Bump text submodule to 2.1.3
- - - - -
52 changed files:
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Utils/Outputable.hs
- docs/users_guide/exts/explicit_namespaces.rst
- libraries/deepseq
- libraries/text
- testsuite/tests/driver/T20604/T20604.stdout
- testsuite/tests/module/T21826.stderr
- testsuite/tests/module/mod81.stderr
- testsuite/tests/module/mod91.stderr
- − testsuite/tests/rename/should_compile/T22581c.hs
- − testsuite/tests/rename/should_compile/T22581c_helper.hs
- − testsuite/tests/rename/should_compile/T22581d.script
- − testsuite/tests/rename/should_compile/T22581d.stdout
- − testsuite/tests/rename/should_compile/T25983a.hs
- − testsuite/tests/rename/should_compile/T25983a.stderr
- − testsuite/tests/rename/should_compile/T25983b.hs
- − testsuite/tests/rename/should_compile/T25983b.stderr
- − testsuite/tests/rename/should_compile/T25983c.hs
- − testsuite/tests/rename/should_compile/T25983c.stderr
- − testsuite/tests/rename/should_compile/T25983d.hs
- − testsuite/tests/rename/should_compile/T25983d.stderr
- − testsuite/tests/rename/should_compile/T25983e.hs
- − testsuite/tests/rename/should_compile/T25983e.stderr
- − testsuite/tests/rename/should_compile/T25983f.hs
- − testsuite/tests/rename/should_compile/T25983f.stderr
- − testsuite/tests/rename/should_compile/T25983g.hs
- − testsuite/tests/rename/should_compile/T25983g.stderr
- − testsuite/tests/rename/should_compile/T25984a.hs
- − testsuite/tests/rename/should_compile/T25984a.stderr
- − testsuite/tests/rename/should_compile/T25984a_helper.hs
- − testsuite/tests/rename/should_compile/T25991a.hs
- − testsuite/tests/rename/should_compile/T25991a_helper.hs
- testsuite/tests/rename/should_compile/all.T
- − testsuite/tests/rename/should_fail/T22581a.hs
- − testsuite/tests/rename/should_fail/T22581a.stderr
- − testsuite/tests/rename/should_fail/T22581a_helper.hs
- − testsuite/tests/rename/should_fail/T22581b.hs
- − testsuite/tests/rename/should_fail/T22581b.stderr
- − testsuite/tests/rename/should_fail/T22581b_helper.hs
- − testsuite/tests/rename/should_fail/T25984b.hs
- − testsuite/tests/rename/should_fail/T25984b.stderr
- − testsuite/tests/rename/should_fail/T25991b1.hs
- − testsuite/tests/rename/should_fail/T25991b1.stderr
- − testsuite/tests/rename/should_fail/T25991b2.hs
- − testsuite/tests/rename/should_fail/T25991b2.stderr
- − testsuite/tests/rename/should_fail/T25991b_helper.hs
- testsuite/tests/rename/should_fail/T9006.stderr
- testsuite/tests/rename/should_fail/all.T
- − testsuite/tests/simplCore/should_compile/T21391.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc5b555001d43af3a0ae990f532ba4…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc5b555001d43af3a0ae990f532ba4…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26258] In TcSShortCut, typechecker plugins should get empty Givens
by Ben Gamari (@bgamari) 05 Aug '25
by Ben Gamari (@bgamari) 05 Aug '25
05 Aug '25
Ben Gamari pushed to branch wip/T26258 at Glasgow Haskell Compiler / GHC
Commits:
fbc34821 by Simon Peyton Jones at 2025-08-05T09:29:54-04:00
In TcSShortCut, typechecker plugins should get empty Givens
Solving in TcShortCut mode means /ignoring the Givens/. So we
should not pass them to typechecker plugins!
Fixes #26258.
This is a fixup to the earlier MR:
commit 1bd12371feacc52394a0e660ef9349f9e8ee1c06
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Mon Jul 21 10:04:49 2025 +0100
Improve treatment of SPECIALISE pragmas -- again!
- - - - -
3 changed files:
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Solve.hs
Changes:
=====================================
compiler/GHC/Tc/Solver/Dict.hs
=====================================
@@ -496,11 +496,15 @@ We could use the Eq [a] superclass of the Ord [a], or we could use the top-level
instance `Eq a => Eq [a]`. But if we did the latter we'd be stuck with an
insoluble constraint (Eq a).
-So the ShortCutSolving rule is this:
+-----------------------------------
+So the ShortCutSolving plan is this:
If we could solve a constraint from a local Given,
- try first to /completely/ solve the constraint using only top-level instances.
+ try first to /completely/ solve the constraint
+ using only top-level instances,
+ /without/ using any local Givens.
- If that succeeds, use it
- If not, use the local Given
+-----------------------------------
An example that succeeds:
@@ -555,7 +559,7 @@ The moving parts are relatively simple:
- `matchLocalInst`, which would otherwise consult Given quantified constraints
- `GHC.Tc.Solver.Instance.Class.matchInstEnv`: when short-cut solving, don't
pick overlappable top-level instances
-
+ - `GHC.Tc.Solver.Solve.runTcPluginsWanted`: don't pass any Givens to the plugin
Some wrinkles:
=====================================
compiler/GHC/Tc/Solver/Monad.hs
=====================================
@@ -897,14 +897,19 @@ for it, so TcS carries a mutable location where the binding can be
added. This is initialised from the innermost implication constraint.
-}
--- | See Note [TcSMode]
-data TcSMode
+data TcSMode -- ^ See Note [TcSMode], where each constructor is documented
= TcSVanilla -- ^ Normal constraint solving
| TcSPMCheck -- ^ Used when doing patterm match overlap checks
| TcSEarlyAbort -- ^ Abort early on insoluble constraints
| TcSShortCut -- ^ Fully solve all constraints, without using local Givens
deriving (Eq)
+instance Outputable TcSMode where
+ ppr TcSVanilla = text "TcSVanilla"
+ ppr TcSPMCheck = text "TcSPMCheck"
+ ppr TcSEarlyAbort = text "TcSEarlyAbort"
+ ppr TcSShortCut = text "TcSShortcut"
+
{- Note [TcSMode]
~~~~~~~~~~~~~~~~~
The constraint solver can operate in different modes:
=====================================
compiler/GHC/Tc/Solver/Solve.hs
=====================================
@@ -1011,9 +1011,17 @@ solveSimpleGivens givens
solveSimpleWanteds :: Cts -> TcS Cts
-- The result is not necessarily zonked
solveSimpleWanteds simples
- = do { traceTcS "solveSimpleWanteds {" (ppr simples)
+ = do { mode <- getTcSMode
; dflags <- getDynFlags
+ ; inerts <- getInertSet
+
+ ; traceTcS "solveSimpleWanteds {" $
+ vcat [ text "Mode:" <+> ppr mode
+ , text "Inerts:" <+> ppr inerts
+ , text "Wanteds to solve:" <+> ppr simples ]
+
; (n,wc) <- go 1 (solverIterations dflags) simples
+
; traceTcS "solveSimpleWanteds end }" $
vcat [ text "iterations =" <+> ppr n
, text "residual =" <+> ppr wc ]
@@ -1663,19 +1671,28 @@ runTcPluginsGiven
-- 'solveSimpleWanteds' should feed the updated wanteds back into the
-- main solver.
runTcPluginsWanted :: Cts -> TcS (Bool, Cts)
-runTcPluginsWanted simples1
- | isEmptyBag simples1
- = return (False, simples1)
+runTcPluginsWanted wanted
+ | isEmptyBag wanted
+ = return (False, wanted)
| otherwise
= do { solvers <- getTcPluginSolvers
- ; if null solvers then return (False, simples1) else
-
- do { given <- getInertGivens
- ; wanted <- TcS.zonkSimples simples1 -- Plugin requires zonked inputs
-
- ; traceTcS "Running plugins (" (vcat [ text "Given:" <+> ppr given
- , text "Wanted:" <+> ppr wanted ])
- ; p <- runTcPluginSolvers solvers (given, bagToList wanted)
+ ; if null solvers then return (False, wanted) else
+
+ do { -- Find the set of Givens to give to the plugin.
+ -- If TcSMode = TcSShortCut, we are solving with
+ -- no Givens so don't return any (#26258)!
+ -- See Note [Shortcut solving] in GHC.Tc.Solver.Dict
+ mode <- getTcSMode
+ ; given <- case mode of
+ TcSShortCut -> return []
+ _ -> getInertGivens
+
+ -- Plugin requires zonked input wanteds
+ ; zonked_wanted <- TcS.zonkSimples wanted
+
+ ; traceTcS "Running plugins {" (vcat [ text "Given:" <+> ppr given
+ , text "Wanted:" <+> ppr zonked_wanted ])
+ ; p <- runTcPluginSolvers solvers (given, bagToList zonked_wanted)
; let (_, solved_wanted) = pluginSolvedCts p
(_, unsolved_wanted) = pluginInputCts p
new_wanted = pluginNewCts p
@@ -1684,9 +1701,6 @@ runTcPluginsWanted simples1
listToBag unsolved_wanted `andCts`
listToBag insols
--- SLPJ: I'm deeply suspicious of this
--- ; updInertCans (removeInertCts $ solved_givens)
-
; mapM_ setEv solved_wanted
; traceTcS "Finished plugins }" (ppr new_wanted)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fbc34821815b0b78d6b97ee44187425…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fbc34821815b0b78d6b97ee44187425…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/t29090] 22 commits: CprAnal: Detect recursive newtypes (#25944)
by Matthew Pickering (@mpickering) 05 Aug '25
by Matthew Pickering (@mpickering) 05 Aug '25
05 Aug '25
Matthew Pickering pushed to branch wip/t29090 at Glasgow Haskell Compiler / GHC
Commits:
4bc78496 by Sebastian Graf at 2025-07-24T16:19:34-04:00
CprAnal: Detect recursive newtypes (#25944)
While `cprTransformDataConWork` handles recursive data con workers, it
did not detect the case when a newtype is responsible for the recursion.
This is now detected in the `Cast` case of `cprAnal`.
The same reproducer made it clear that `isRecDataCon` lacked congruent
handling for `AppTy` and `CastTy`, now fixed.
Furthermore, the new repro case T25944 triggered this bug via an
infinite loop in `cprFix`, caused by the infelicity in `isRecDataCon`.
While it should be much less likely to trigger such an infinite loop now
that `isRecDataCon` has been fixed, I made sure to abort the loop after
10 iterations and emitting a warning instead.
Fixes #25944.
- - - - -
0a583689 by Sylvain Henry at 2025-07-24T16:20:26-04:00
STM: don't create a transaction in the rhs of catchRetry# (#26028)
We don't need to create a transaction for the rhs of (catchRetry#)
because contrary to the lhs we don't need to abort it on retry. Moreover
it is particularly harmful if we have code such as (#26028):
let cN = readTVar vN >> retry
tree = c1 `orElse` (c2 `orElse` (c3 `orElse` ...))
atomically tree
Because it will stack transactions for the rhss and the read-sets of all
the transactions will be iteratively merged in O(n^2) after the
execution of the most nested retry.
- - - - -
a49eca26 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Renaming around predicate types
.. we were (as it turned out) abstracting over
type-class selectors in SPECIALISATION rules!
Wibble isEqPred
- - - - -
f80375dd by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Refactor of Specialise.hs
This patch just tidies up `specHeader` a bit, removing one
of its many results, and adding some comments.
No change in behaviour.
Also add a few more `HasDebugCallStack` contexts.
- - - - -
1bd12371 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Improve treatment of SPECIALISE pragmas -- again!
This MR does another major refactor of the way that SPECIALISE
pragmas work, to fix #26115, #26116, #26117.
* We now /always/ solve forall-constraints in an all-or-nothing way.
See Note [Solving a Wanted forall-constraint] in GHC.Tc.Solver.Solve
This means we might have unsolved quantified constraints, which need
to be reported. See `inert_insts` in `getUnsolvedInerts`.
* I refactored the short-cut solver for type classes to work by
recursively calling the solver rather than by having a little baby
solver that kept being not clever enough.
See Note [Shortcut solving] in GHC.Tc.Solver.Dict
* I totally rewrote the desugaring of SPECIALISE pragmas, again.
The new story is in Note [Desugaring new-form SPECIALISE pragmas]
in GHC.HsToCore.Binds
Both old-form and new-form SPECIALISE pragmas now route through the same
function `dsSpec_help`. The tricky function `decomposeRuleLhs` is now used only
for user-written RULES, not for SPECIALISE pragmas.
* I improved `solveOneFromTheOther` to account for rewriter sets. Previously
it would solve a non-rewritten dict from a rewritten one. For equalities
we were already dealing with this, in
Some incidental refactoring
* A small refactor: `ebv_tcvs` in `EvBindsBar` now has a list of coercions, rather
than a set of tyvars. We just delay taking the free vars.
* GHC.Core.FVs.exprFVs now returns /all/ free vars.
Use `exprLocalFVs` for Local vars.
Reason: I wanted another variant for /evidence/ variables.
* Ues `EvId` in preference to `EvVar`. (Evidence variables are always Ids.)
Rename `isEvVar` to `isEvId`.
* I moved `inert_safehask` out of `InertCans` and into `InertSet` where it
more properly belongs.
Compiler-perf changes:
* There was a palpable bug (#26117) which this MR fixes in
newWantedEvVar, which bypassed all the subtle overlapping-Given
and shortcutting logic. (See the new `newWantedEvVar`.) Fixing this
but leads to extra dictionary bindings; they are optimised away quickly
but they made CoOpt_Read allocate 3.6% more.
* Hpapily T15164 improves.
* The net compiler-allocation change is 0.0%
Metric Decrease:
T15164
Metric Increase:
CoOpt_Read
T12425
- - - - -
953fd8f1 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Solve forall-constraints immediately, or not at all
This MR refactors the constraint solver to solve forall-constraints immediately,
rather than emitting an implication constraint to be solved later.
The most immediate motivation was that when solving quantified constraints
in SPECIALISE pragmas, we really really don't want to leave behind half-
solved implications. Also it's in tune with the approach of the new
short-cut solver, which recursively invokes the solver.
It /also/ saves quite a bit of plumbing; e.g
- The `wl_implics` field of `WorkList` is gone,
- The types of `solveSimpleWanteds` and friends are simplified.
- An EvFun contains binding, rather than an EvBindsVar ref-cell that
will in the future contain bindings. That makes `evVarsOfTerm`
simpler. Much nicer.
It also improves error messages a bit.
All described in Note [Solving a Wanted forall-constraint] in
GHC.Tc.Solver.Solve.
One tiresome point: in the tricky case of `inferConstraintsCoerceBased`
we make a forall-constraint. This we /do/ want to partially solve, so
we can infer a suitable context. (I'd be quite happy to force the user to
write a context, bt I don't want to change behavior.) So we want to generate
an /implication/ constraint in `emitPredSpecConstraints` rather than a
/forall-constraint/ as we were doing before. Discussed in (WFA3) of
the above Note.
Incidental refactoring
* `GHC.Tc.Deriv.Infer.inferConstraints` was consulting the state monad for
the DerivEnv that the caller had just consulted. Nicer to pass it as an
argument I think, so I have done that. No change in behaviour.
- - - - -
6921ab42 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Remove duplicated code in Ast.hs for evTermFreeVars
This is just a tidy up.
- - - - -
1165f587 by Simon Peyton Jones at 2025-07-25T09:49:58+01:00
Small tc-tracing changes only
- - - - -
0776ffe0 by Simon Hengel at 2025-07-26T04:54:20-04:00
Respect `-fdiagnostics-as-json` for core diagnostics (see #24113)
- - - - -
cc1116e0 by Andrew Lelechenko at 2025-07-26T04:55:01-04:00
docs: add since pragma to Data.List.NonEmpty.mapMaybe
- - - - -
ee2dc248 by Simon Hengel at 2025-07-31T06:25:35-04:00
Update comments on `OptKind` to reflect the code reality
- - - - -
b029633a by Wen Kokke at 2025-07-31T06:26:21-04:00
rts: Disable --eventlog-flush-interval unless compiled with -threaded.
This commit fixes issue #26222:
Using --eventlog-flush-interval with the non-threaded RTS leads to eventlog corruption.
https://gitlab.haskell.org/ghc/ghc/-/issues/26222
This commit makes three changes when code is compiled against the non-threaded RTS:
1. It disables the --eventlog-flush-interval flag.
2. It disables the documentation for the --eventlog-flush-interval flag.
3. It disables the relevant state from RtsConfig and code from Timer.
4. It updates the entry for --eventlog-flush-interval in the users guide.
- - - - -
31159f1d by Wen Kokke at 2025-07-31T06:26:21-04:00
rts: Split T20006 into tests with and without -threaded
- - - - -
618687ef by Simon Hengel at 2025-07-31T06:27:03-04:00
docs/users_guide/win32-dlls.rst: Remove references to `readline`
- - - - -
083e40f1 by Rodrigo Mesquita at 2025-08-01T04:38:23-04:00
debugger: Uniquely identify breakpoints by internal id
Since b85b11994e0130ff2401dd4bbdf52330e0bcf776 (support inlining
breakpoints), a breakpoint has been identified at runtime by *two* pairs
of <module,index>.
- The first, aka a 'BreakpointId', uniquely identifies a breakpoint in
the source of a module by using the Tick index. A Tick index can index
into ModBreaks.modBreaks_xxx to fetch source-level information about
where that tick originated.
- When a user specifies e.g. a line breakpoint using :break, we'll reverse
engineer what a Tick index for that line
- We update the `BreakArray` of that module (got from the
LoaderState) at that tick index to `breakOn`.
- A BCO we can stop at is headed by a BRK_FUN instruction. This
instruction stores in an operand the `tick index` it is associated
to. We look it up in the associated `BreakArray` (also an operand)
and check wheter it was set to `breakOn`.
- The second, aka the `ibi_info_mod` + `ibi_info_ix` of the
`InternalBreakpointId`, uniquely index into the `imodBreaks_breakInfo`
-- the information we gathered during code generation about the
existing breakpoint *ocurrences*.
- Note that with optimisation there may be many occurrences of the
same source-tick-breakpoint across different modules. The
`ibi_info_ix` is unique per occurrence, but the `bi_tick_ix` may be
shared. See Note [Breakpoint identifiers] about this.
- Note that besides the tick ids, info ids are also stored in
`BRK_FUN` so the break handler can refer to the associated
`CgBreakInfo`.
In light of that, the driving changes come from the desire to have the
info_id uniquely identify the breakpoint at runtime, and the source tick
id being derived from it:
- An InternalBreakpointId should uniquely identify a breakpoint just
from the code-generation identifiers of `ibi_info_ix` and `ibi_info_mod`.
So we drop `ibi_tick_mod` and `ibi_tick_ix`.
- A BRK_FUN instruction need only record the "internal breakpoint id",
not the tick-level id.
So we drop the tick mod and tick index operands.
- A BreakArray should be indexed by InternalBreakpointId rather than
BreakpointId
That means we need to do some more work when setting a breakpoint.
Specifically, we need to figure out the internal ids (occurrences of a
breakpoint) from the source-level BreakpointId we want to set the
breakpoint at (recall :break refers to breaks at the source level).
Besides this change being an improvement to the handling of breakpoints
(it's clearer to have a single unique identifier than two competing
ones), it unlocks the possibility of generating "internal" breakpoints
during Cg (needed for #26042).
It should also be easier to introduce multi-threaded-aware `BreakArrays`
following this change (needed for #26064).
Se also the new Note [ModBreaks vs InternalModBreaks]
On i386-linux:
-------------------------
Metric Decrease:
interpreter_steplocal
-------------------------
- - - - -
bf03bbaa by Simon Hengel at 2025-08-01T04:39:05-04:00
Don't use MCDiagnostic for `ghcExit`
This changes the error message of `ghcExit` from
```
<no location info>: error:
Compilation had errors
```
to
```
Compilation had errors
```
- - - - -
a889ec75 by Simon Hengel at 2025-08-01T04:39:05-04:00
Respect `-fdiagnostics-as-json` for driver diagnostics (see #24113)
- - - - -
81577fe7 by Ben Gamari at 2025-08-02T04:29:39-04:00
configure: Allow override of CrossCompiling
As noted in #26236, the current inference logic is a bit simplistic. In
particular, there are many cases (e.g. building for a new libc) where
the target and host triples may differ yet we are still able to run the
produced artifacts as native code.
Closes #26236.
- - - - -
01136779 by Andreas Klebinger at 2025-08-02T04:30:20-04:00
rts: Support COFF BigObj files in archives.
- - - - -
1f9e4f54 by Stephen Morgan at 2025-08-03T15:14:08+10:00
refactor: Modify Data.List.sortOn to use (>) instead of compare. (#26184)
This lets a more efficient (>) operation be used if one exists.
This is technically a breaking change for malformed Ord instances, where
x > y is not equivalent to compare x y == GT.
Discussed by the CLC in issue #332: https://github.com/haskell/core-libraries-committee/issues/332
- - - - -
4f6bc9cf by fendor at 2025-08-04T17:50:06-04:00
Revert "base: Expose Backtraces constructor and fields"
This reverts commit 17db44c5b32fff82ea988fa4f1a233d1a27bdf57.
- - - - -
937c41d5 by Matthew Pickering at 2025-08-05T14:05:35+01:00
level imports: Check the level of exported identifiers
The level imports specification states that exported identifiers have to
be at level 0. This patch adds the requird level checks that all
explicitly mentioned identifiers occur at level 0.
For implicit export specifications (T(..) and module B), only level 0
identifiers are selected for re-export.
ghc-proposal: https://github.com/ghc-proposals/ghc-proposals/pull/705
Fixes #26090
- - - - -
148 changed files:
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Breakpoints.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/CmdLine.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Breakpoints.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Runtime/Debugger/Breakpoints.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Rewrite.hs
- compiler/GHC/Tc/Solver/Solve.hs
- + compiler/GHC/Tc/Solver/Solve.hs-boot
- compiler/GHC/Tc/Solver/Types.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Utils/Error.hs
- configure.ac
- docs/users_guide/runtime_control.rst
- docs/users_guide/win32-dlls.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Monad.hs
- libraries/base/changelog.md
- libraries/base/src/Control/Exception/Backtrace.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs
- libraries/ghci/GHCi/Debugger.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/Run.hs
- rts/Disassembler.c
- rts/Exception.cmm
- rts/Interpreter.c
- rts/PrimOps.cmm
- rts/RaiseAsync.c
- rts/RtsFlags.c
- rts/STM.c
- rts/Timer.c
- rts/include/rts/Flags.h
- rts/linker/LoadArchive.c
- testsuite/tests/corelint/T21115b.stderr
- + testsuite/tests/cpranal/sigs/T25944.hs
- + testsuite/tests/cpranal/sigs/T25944.stderr
- testsuite/tests/cpranal/sigs/all.T
- testsuite/tests/deriving/should_compile/T20815.hs
- testsuite/tests/deriving/should_fail/T12768.stderr
- testsuite/tests/deriving/should_fail/T1496.stderr
- testsuite/tests/deriving/should_fail/T5498.stderr
- testsuite/tests/deriving/should_fail/T7148.stderr
- testsuite/tests/deriving/should_fail/T7148a.stderr
- testsuite/tests/hiefile/should_run/HieQueries.stdout
- testsuite/tests/impredicative/T17332.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
- + testsuite/tests/lib/stm/T26028.hs
- + testsuite/tests/lib/stm/T26028.stdout
- + testsuite/tests/lib/stm/all.T
- testsuite/tests/quantified-constraints/T15290a.stderr
- testsuite/tests/quantified-constraints/T19690.stderr
- testsuite/tests/quantified-constraints/T19921.stderr
- testsuite/tests/quantified-constraints/T21006.stderr
- testsuite/tests/roles/should_fail/RolesIArray.stderr
- testsuite/tests/rts/flags/all.T
- + testsuite/tests/simplCore/should_compile/T26115.hs
- + testsuite/tests/simplCore/should_compile/T26115.stderr
- + testsuite/tests/simplCore/should_compile/T26116.hs
- + testsuite/tests/simplCore/should_compile/T26116.stderr
- + testsuite/tests/simplCore/should_compile/T26117.hs
- + testsuite/tests/simplCore/should_compile/T26117.stderr
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/splice-imports/DodgyLevelExport.hs
- + testsuite/tests/splice-imports/DodgyLevelExport.stderr
- + testsuite/tests/splice-imports/DodgyLevelExportA.hs
- + testsuite/tests/splice-imports/LevelImportExports.hs
- + testsuite/tests/splice-imports/LevelImportExports.stdout
- + testsuite/tests/splice-imports/LevelImportExportsA.hs
- testsuite/tests/splice-imports/Makefile
- + testsuite/tests/splice-imports/ModuleExport.hs
- + testsuite/tests/splice-imports/ModuleExport.stderr
- + testsuite/tests/splice-imports/ModuleExportA.hs
- + testsuite/tests/splice-imports/ModuleExportB.hs
- + testsuite/tests/splice-imports/T26090.hs
- + testsuite/tests/splice-imports/T26090.stderr
- + testsuite/tests/splice-imports/T26090A.hs
- testsuite/tests/splice-imports/all.T
- testsuite/tests/typecheck/should_compile/T12427a.stderr
- testsuite/tests/typecheck/should_compile/T23171.hs
- testsuite/tests/typecheck/should_compile/TcSpecPragmas.stderr
- testsuite/tests/typecheck/should_fail/T14605.hs
- testsuite/tests/typecheck/should_fail/T14605.stderr
- testsuite/tests/typecheck/should_fail/T15801.stderr
- testsuite/tests/typecheck/should_fail/T18640a.stderr
- testsuite/tests/typecheck/should_fail/T18640b.stderr
- testsuite/tests/typecheck/should_fail/T19627.stderr
- testsuite/tests/typecheck/should_fail/T21530b.stderr
- testsuite/tests/typecheck/should_fail/T22912.stderr
- testsuite/tests/typecheck/should_fail/tcfail174.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c587eca5575724a2acfb30542b521…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c587eca5575724a2acfb30542b521…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/bump-ci-to-9.10] Bump GHC on dawrin CI to 9.10.1
by Hannes Siebenhandl (@fendor) 05 Aug '25
by Hannes Siebenhandl (@fendor) 05 Aug '25
05 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/bump-ci-to-9.10 at Glasgow Haskell Compiler / GHC
Commits:
186ff578 by fendor at 2025-08-05T14:39:00+02:00
Bump GHC on dawrin CI to 9.10.1
- - - - -
1 changed file:
- .gitlab/darwin/toolchain.nix
Changes:
=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -16,7 +16,7 @@ let
ghcBindists = let version = ghc.version; in {
aarch64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-d…";
- sha256 = "sha256-c1GTMJf3/yiW/t4QL532EswD5JVlgA4getkfsxj4TaA=";
+ sha256 = "sha256-/6+DtdeossBJIMbjkJwL4h3eJ7rzgNCV+ifoQKOi6AQ=";
};
x86_64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-da…";
@@ -26,8 +26,7 @@ let
};
ghc = pkgs.stdenv.mkDerivation rec {
- # Using 9.6.2 because of #24050
- version = "9.6.2";
+ version = "9.10.1";
name = "ghc";
src = ghcBindists.${pkgs.stdenv.hostPlatform.system};
configureFlags = [
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/186ff578f424b5b6087e1b92f4b61cd…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/186ff578f424b5b6087e1b92f4b61cd…
You're receiving this email because of your account on gitlab.haskell.org.
1
0