[Git][ghc/ghc][wip/sjakobi/nonmoving-gc-timeout] rts: Reinitialize nonmoving GC worker after fork
by Simon Jakobi (@sjakobi) 22 Jul '26
by Simon Jakobi (@sjakobi) 22 Jul '26
22 Jul '26
Simon Jakobi pushed to branch wip/sjakobi/nonmoving-gc-timeout at Glasgow Haskell Compiler / GHC
Commits:
45952452 by Simon Jakobi at 2026-07-22T23:36:29+02:00
rts: Reinitialize nonmoving GC worker after fork
The persistent nonmoving GC worker is not copied into the child of a
forkProcess call. Consequently, child shutdown waits indefinitely for a
worker which does not exist.
Wait for concurrent marking to become idle before forking. Avoid the
capability/GC lock-order inversion and recreate the worker in the child.
Make T12903 wait for the child so that the testsuite observes this bug.
Assisted-by: gpt-5.6-sol via Codex CLI
- - - - -
4 changed files:
- rts/Schedule.c
- rts/sm/NonMoving.c
- rts/sm/NonMoving.h
- testsuite/tests/rts/T12903.hs
Changes:
=====================================
rts/Schedule.c
=====================================
@@ -2051,7 +2051,26 @@ forkProcess(HsStablePtr *entry
waitForCapability(&cap, task);
#if defined(THREADED_RTS)
- stopAllCapabilities(&cap, task);
+ while (true) {
+ stopAllCapabilities(&cap, task);
+
+ // The nonmoving collector's worker is not copied by fork(). Only
+ // proceed when it is idle, keeping its lock held to prevent another
+ // collection from starting before the fork. We must not wait for an
+ // active mark while holding capabilities since the mark may need to
+ // synchronize with the mutator before it can finish.
+ if (nonmovingBlockConcurrentMark(false)) {
+ break;
+ }
+
+ releaseAllCapabilities(n_capabilities, NULL, task);
+ CHECK(nonmovingBlockConcurrentMark(true));
+ nonmovingUnblockConcurrentMark();
+ cap = NULL;
+ waitForCapability(&cap, task);
+ }
+#else
+ CHECK(nonmovingBlockConcurrentMark(false));
#endif
// no funny business: hold locks while we fork, otherwise if some
@@ -2089,6 +2108,8 @@ forkProcess(HsStablePtr *entry
if (pid) { // parent
+ nonmovingUnblockConcurrentMark();
+
RELEASE_LOCK(&sched_mutex);
RELEASE_LOCK(&sm_mutex);
RELEASE_LOCK(&stable_ptr_mutex);
@@ -2213,6 +2234,10 @@ forkProcess(HsStablePtr *entry
generations[g].threads = END_TSO_QUEUE;
}
+ // The persistent nonmoving collector worker is an OS thread and was
+ // not copied by fork(). Recreate it before running the child action.
+ nonmovingInitAfterFork();
+
// The timer thread is not present in the child process, so we need
// to initialise the timer again.
initTimer();
=====================================
rts/sm/NonMoving.c
=====================================
@@ -754,6 +754,12 @@ void nonmovingInit(void)
nonmovingMarkInit();
}
+void nonmovingInitAfterFork(void)
+{
+ if (! RtsFlags.GcFlags.useNonmoving) return;
+ nonmovingInitConcurrentWorker();
+}
+
void nonmovingExit(void)
{
if (! RtsFlags.GcFlags.useNonmoving) return;
=====================================
rts/sm/NonMoving.h
=====================================
@@ -150,6 +150,7 @@ extern struct NonmovingHeap nonmovingHeap;
extern memcount nonmoving_segment_live_words;
void nonmovingInit(void);
+void nonmovingInitAfterFork(void);
void nonmovingExit(void);
bool nonmovingConcurrentMarkIsRunning(void);
=====================================
testsuite/tests/rts/T12903.hs
=====================================
@@ -1,5 +1,6 @@
import Control.Concurrent
import Control.Exception
+import System.Exit
import System.IO
import System.Posix
import System.Posix.IO
@@ -19,3 +20,5 @@ main = do
"registered" <- hGetLine hdl
signalProcess sigINT pid
putStrLn =<< hGetLine hdl
+ Just (Exited ExitSuccess) <- getProcessStatus True False pid
+ return ()
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4595245280273f0cfef9dc3c8cbe85a…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4595245280273f0cfef9dc3c8cbe85a…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/io-manager-deadlock-detection] 21 commits: Improve error messages for invalid record wildcards
by Duncan Coutts (@dcoutts) 22 Jul '26
by Duncan Coutts (@dcoutts) 22 Jul '26
22 Jul '26
Duncan Coutts pushed to branch wip/io-manager-deadlock-detection at Glasgow Haskell Compiler / GHC
Commits:
c2f6dcd4 by Sasha Bogicevic at 2026-07-20T10:31:56+02:00
Improve error messages for invalid record wildcards
Record wildcard hints are now shown in more contexts and include
constructor arity; matching with `..` on a fieldless constructor
now produces a dedicated error message.
Fixes #21101
- - - - -
4c02e76b by Duncan Coutts at 2026-07-21T10:37:21-04:00
Mark test T27105 as fragile, citing issue #27522
Scheduler fairness is fine, except when it isn't. And it isn't on CI
machines surprisingly often! See the issue for details.
- - - - -
43dd2b15 by Recursion Ninja at 2026-07-21T17:09:53-04:00
Resolving many TTG related orphan type-class instances
This is part a technical debt removal effort made possible now
that separating out the AST via TTG has come to a close.
As the AST in 'L.H.S' has been incrementally separated from the GHC internals,
there are many accumulated orphan instance of 'Binary', 'NFData', 'Outputable',
and 'Uniquable'. The orphan instance of data-types from within 'L.H.S' have had
their orphan instances moved to either:
1. The module which defines the data-type
2. The module which defines the type-class;
i.e. moving an orphan 'Binary' instance to 'GHC.Utils.Binary'
Orphan instances resolved (37):
| Data-type | Resolved instance(s) | Former orphan module(s) |
| -------------------- | -------------------------- | ------------------------- |
| Role | Binary, NFData, Outputable | GHC.Core.Coercion.Axiom |
| SrcStrictness | Binary, NFData, Outputable | GHC.Core.DataCon |
| SrcUnpackedness | Binary, NFData, Outputable | GHC.Core.DataCon |
| Fixity | Binary, Outputable | GHC.Hs.Basic |
| FixityDirection | Binary, Outputable | GHC.Hs.Basic |
| LexicalFixity | Outputable | GHC.Hs.Basic |
| CCallTarget | NFData | GHC.Hs.Decls.Foreign |
| CType | NFData | GHC.Hs.Decls.Foreign |
| Header | NFData | GHC.Hs.Decls.Foreign |
| OverlapMode | Binary, NFData | GHC.Hs.Decls.Overlap |
| WithHsDocIdentifiers | NFData, Outputable | GHC.Hs.Doc |
| HsDocString | NFData | GHC.Hs.DocString |
| HsDocStringChunk | Binary, Outputable | GHC.Hs.DocString |
| HsDocStringDecorator | Binary, Outputable | GHC.Hs.DocString |
| NamespaceSpecifier | Outputable | GHC.Hs.ImpExp |
| ForAllTyFlag | Binary, NFData, Outputable | GHC.Hs.Specificity |
| Specificity | Binary, NFData | GHC.Hs.Specificity |
| PromotionFlag | Binary, Outputable | GHC.Types.Basic |
| FieldLabelString | Outputable, Uniquable | GHC.Types.FieldLabel |
| InlinePragma | Binary | GHC.Types.InlinePragma |
-------------------------
Metric Decrease:
hard_hole_fits
-------------------------
Closes #21262, #27469
- - - - -
ab9ab895 by Cheng Shao at 2026-07-21T17:10:53-04:00
rts: always use StgInt to represent cost center id
Currently cost center id is modeled as `Int` and it should be `StgInt`
uniformly in the RTS, hence this patch. Fixes #27524.
- - - - -
94d8f83b by Cheng Shao at 2026-07-22T11:30:40-04:00
hadrian: clean up stale cabal package flags in the tree
This patch cleans up stale cabal package flags in the tree and related
hadrian/autoconf logic. Closes #27474.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
0bf1d8c9 by Sasha Bogicevic at 2026-07-22T11:31:21-04:00
parser: don't suggest ImportQualifiedPost when it is already enabled
-Wprepositive-qualified-module unconditionally attached a hint to
enable ImportQualifiedPost, even when the extension was already on
(as it is by default under GHC2021). Record the extension's state in
the PsWarnImportPreQualified diagnostic and drop the hint when it is
already enabled.
Fixes #27380
- - - - -
4adc95d8 by Duncan Coutts at 2026-07-22T22:25:40+01:00
Make signal handling be a respondibility of the I/O manager(s)
Previously it was scattered between I/O managers and the scheduler, and
especially the scheduler's deadlock detection.
Previously the scheduler would poll for pending signals each iteration
of the scheduler loop. The scheduler also had some hairy signal
functionality in the deadlock detection: in the non-threaded RTS (only)
if there were still no threads running after deadlock detection then it
would block waiting for signals.
But signals can and (in my opinion) should be thought of as just a funny
kind of I/O, and thus should be a responsibility of the I/O manager.
So now we have the I/O managers poll for signals when they are polling
for I/O completion (and removing the separate poll in the scheduler).
And when I/O managers block waiting for I/O then they now also start
signal handlers if they get interrupted by a signal. Crucially, if there
is no pending I/O or timers, the awaitCompletedTimeoutsOrIO will still
block waiting for signals.
This patch puts us into an intermediate state: it temporarily breaks
deadlock detection in the non-threaded RTS. The waiting on I/O currently
happens before deadlock detection. This means we'll now wait forever on
signals before doing deadlock detection. We need to move waiting after
deadlock detection. We'll do that in a later patch.
- - - - -
2d9e8f4c by Duncan Coutts at 2026-07-22T22:25:40+01:00
Clean up the RTS internal signal handling API
Now that the I/O manager is responsible for signals, we can simplify the
API we present for signal handling.
We now just need startPendingSignalHandlers, which is called from the
I/O managers. We can get rid of awaitUserSignals. We also don't need
RtsSignals.h to re-export the platform-specific posix/Signals.h or
win32/ConsoleHandler.h
We can also hide more of the implementation of signals. Less has to be
exposed in posix/Signals.h or win32/ConsoleHandler.h. Indeed,
posix/Signals.h becomes empty and we remove it. Partly this is because
we don't need inline functions (or macros) in the interface.
Also remove signal_handlers from RTS ABI exported symbols list. It does
not appear to have any users in the core libs, and its really an
internal implementation detail. It should not be exposed unless it's
really necessary.
- - - - -
8ca2b02f by Duncan Coutts at 2026-07-22T22:25:40+01:00
In the scheduler, move I/O blocking after deadlock detection
To make deadlock detection effective in the non-threaded RTS when there
are deadlocked threads and other unrelated threads waiting on I/O, we
need to arrange to do deadlock detection before we block in scheduler
to wait on I/O.
The solution is to:
1. adjust scheduleFindWork, which runs before deadlock detection, to
only poll for I/O and not block; and
2. add a step after deadlock detection to wait on I/O if there are
still no threads to run (and there's any I/O or timeouts outstanding)
The scheduleCheckBlockedThreads is now so simple that it made more sense
to inline it into scheduleFindWork.
- - - - -
6ce87e56 by Duncan Coutts at 2026-07-22T22:25:40+01:00
Remove bogus anyPendingTimeoutsOrIO guard from scheduleDetectDeadlock
The deadlock detection was only invoked if both of these conditions
hold:
1. the run queue is empty
2. there is no pending I/O or timeouts
The second condition is unnecessary. The deadlock detection mechanism
can find deadlocks even if there are other threads waiting on I/O or
timers. Having this extra condition means that we fail to detect
blocked threads if there are any threads waiting on I/O or timers.
Part of fixing issue #26408
- - - - -
493186c8 by Duncan Coutts at 2026-07-22T22:25:40+01:00
Don't consider pending I/O for early context switch optimisation
Context switches are normally initiated by the timer signal. If however
the user specifies "context switch as often as possible", with +RTS -C0
then the scheduler arranges for an early context switch (when it's just
about to run a Haskell thread).
Context switching very often is expensive, so as an optimisation there
cases where we do not arrange an early context switch:
1. if there's no other threads to run
2. if there is no pending I/O or timers
This patch eliminates case 2, leaving only case 1.
The rationale is as follows. The use of this was inconsistent across
platforms and threaded/non-threaded RTS ways. It only worked on the
non-threaded RTS and on Windows only worked for the win32-legacy I/O
manager. On all other combinations anyPendingTimeoutsOrIO would always
return false. The fact that nobody noticed and complained about this
inconsistency suggests that the feature is not relied upon.
If however it turns out that applications do rely on this, then the
proper thing to do is not to restore this check, but to add a new I/O
manager hint function that returns if there is any pending events that
are likely to happen *soon*: for example timeouts expiring within one
timeslice, or I/O waits on things likely to complete soon like disk I/O,
but not for example socket/pipe I/O.
The motivation to avoid this use of anyPendingTimeoutsOrIO is to
allow us to eliminate anyPendingTimeoutsOrIO entirely. All other uses
of this are just guards on {await,poll}CompletedTimeoutsOrIO and
the guards can safely be folded into those functions. This will better
cope with some I/O managers having no proper implementation of
anyPendingTimeoutsOrIO.
Ultimately this will let us simplify the scheduler which currently has
to have special #ifdef mingw32_HOST_OS cases to cope with the lack of a
working anyPendingTimeoutsOrIO for some Windows I/O managers
- - - - -
8f14388f by Duncan Coutts at 2026-07-22T22:25:40+01:00
Remove anyPendingTimeoutsOrIO guarding {poll,await}CompletedTimeoutsOrIO
Previously the API of the I/O manager used a two step process: check
anyPendingTimeoutsOrIO and then call {poll,await}CompletedTimeoutsOrIO.
This was primarily there as a performance thing, to cheaply check if we
need to do anything.
And then because anyPendingTimeoutsOrIO existed, it was used for other
things too. We have now eliminated the other uses, and are just left
with the performance pattern.
But this was problematic because not all I/O managers correctly
implement anyPendingTimeoutsOrIO (specifically the win32 ones), and now
that we also make I/O managers responsible for signals then we need to
poll/await even if there is no pending I/O or timeouts. If there is no
pending I/O or timeouts then poll/await needs to degenerate to just
waiting forever for any signals.
- - - - -
e7215008 by Duncan Coutts at 2026-07-22T22:25:40+01:00
Remove anyPendingTimeoutsOrIO, it is no longer used
And this avoids the problems arising from the win32 I/O managers having
had a bogus implementation.
- - - - -
91de2781 by Duncan Coutts at 2026-07-22T22:25:40+01:00
Remove second scheduler call to awaitCompletedTimeoutsOrIO
Previously awaitCompletedTimeoutsOrIO was called both before and after
deadlock detection in the scheduler. The reason for that was that the
win32 I/O managers had a bogus implementation of anyPendingTimeoutsOrIO
and this was used to guard the call of awaitCompletedTimeoutsOrIO prior
to deadlock detection. This meant the first call site was never actually
called when using the win32 I/O managers. This was the reason for the
second call: the first one was never used. What a mess.
So now we have a simple design in the scheduler:
1. poll for completed I/O, timers or signals
2. if no runnable threads: do deadlock detection
3. if still no runnable threads: block waiting for I/O, timers or
signals.
- - - - -
b010b8cf by Duncan Coutts at 2026-07-22T22:25:41+01:00
Lift emptyRunQueue guard out of scheduleDetectDeadlock
this improved the clarity of the logic when reading the scheduler code.
- - - - -
ec67de61 by Duncan Coutts at 2026-07-22T22:25:41+01:00
Make non-threaded deadlock detection also rely on idle GC
Only do deadlock detection GC when idle GC kicks in. This also relies on
using wakeUpRts, so now do this unconditionally. Previously wakeUpRts
was for the threaded rts only.
- - - - -
a0b28ada by Duncan Coutts at 2026-07-22T22:25:41+01:00
Enable idle GC by default on non-threaded RTS
The behaviour is now uniform between the threaded and non-threaded RTS
ways. The deadlock detection now relies on idle GC for both threaded
and non-threaded ways. Previously deadlock detection did not rely on
idle GC for the non-threaded way.
Also tweak test T7275 to account for idle GC. This test's output is
sensitive to the number of major GCs run. Since this commit enables idle
GC for the non-threaded RTS, for this test that increases the number of
major GCs, since the test program is frequently idle for more than 300ms.
- - - - -
fed6f5fc by Duncan Coutts at 2026-07-22T22:25:41+01:00
Fix state of idle GC control vars with +RTS -V0
Currently when the user uses +RTS -I0, then doIdleGC is set to false.
But if the master tick interval -V is set to 0 then the idleGCDelayTime
was being set to 0 but doIdleGC was not being set to false, which is
inconsistent, and almost certainly buggy.
- - - - -
3215f347 by Duncan Coutts at 2026-07-22T22:25:41+01:00
Add a long Note [Deadlock detection]
It describes the historical and modern designs and their trade-offs.
The point is we've now unified the code for deadlock detection between
the threaded and non-threaded ways, by changing the non-threaded to
follow the same design as the threaded.
- - - - -
56ef9726 by Duncan Coutts at 2026-07-22T22:25:41+01:00
Add a test for deadlock detection, issue #26408
- - - - -
db5f2658 by Duncan Coutts at 2026-07-22T22:25:41+01:00
Update the user guide with the revised idle GC behaviour
i.e. it's now not just for the threaded RTS, but general.
Also document the fact that disabling idle GC also disables deadlock
detection.
And add a changelog entry.
- - - - -
90 changed files:
- + changelog.d/21101
- + changelog.d/27380
- + changelog.d/idle-gc-and-deadlock-detection
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Hs/Basic.hs
- compiler/GHC/Hs/Decls/Overlap.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/DocString.hs
- compiler/GHC/Hs/ImpExp.hs
- − compiler/GHC/Hs/Specificity.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/FieldLabel.hs
- compiler/GHC/Types/Fixity.hs
- compiler/GHC/Types/ForeignCall.hs
- compiler/GHC/Types/GREInfo.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/InlinePragma.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Utils/Binary.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/Language/Haskell/Syntax/Basic.hs
- compiler/Language/Haskell/Syntax/Decls/Foreign.hs
- compiler/Language/Haskell/Syntax/Doc.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- compiler/Language/Haskell/Syntax/Specificity.hs
- compiler/ghc.cabal.in
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/runtime_control.rst
- hadrian/cfg/system.config.host.in
- hadrian/cfg/system.config.target.in
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Settings/Packages.hs
- m4/fp_check_pthreads.m4
- rts/IOManager.c
- rts/IOManager.h
- rts/Linker.c
- rts/Profiling.c
- rts/RtsFlags.c
- rts/RtsSignals.h
- rts/RtsStartup.c
- rts/RtsSymbols.c
- rts/Schedule.c
- rts/Schedule.h
- rts/Timer.c
- rts/Trace.c
- rts/Trace.h
- rts/eventlog/EventLog.c
- rts/eventlog/EventLog.h
- rts/posix/Poll.c
- rts/posix/Poll.h
- rts/posix/Select.c
- rts/posix/Signals.c
- − rts/posix/Signals.h
- rts/rts.cabal
- rts/win32/AwaitEvent.c
- rts/win32/ConsoleHandler.c
- rts/win32/ConsoleHandler.h
- testsuite/tests/concurrent/should_run/T27105.hs
- testsuite/tests/concurrent/should_run/all.T
- testsuite/tests/count-deps/CountDepsParser.stdout
- + testsuite/tests/module/T27380.hs
- + testsuite/tests/module/T27380.stderr
- testsuite/tests/module/all.T
- testsuite/tests/module/mod184.stderr
- testsuite/tests/profiling/should_run/Makefile
- + testsuite/tests/rename/should_fail/T21101.hs
- + testsuite/tests/rename/should_fail/T21101.stderr
- testsuite/tests/rename/should_fail/T9815.stderr
- testsuite/tests/rename/should_fail/T9815b.stderr
- testsuite/tests/rename/should_fail/T9815bghci.stderr
- testsuite/tests/rename/should_fail/T9815ghci.stderr
- testsuite/tests/rename/should_fail/all.T
- + testsuite/tests/rts/T26408.hs
- + testsuite/tests/rts/T26408.stderr
- testsuite/tests/rts/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d645cc9e79315d67bc46671e71767b…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d645cc9e79315d67bc46671e71767b…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
22 Jul '26
Simon Jakobi pushed new branch wip/sjakobi/T12903 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/sjakobi/T12903
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/jeltsch/textual-bytecode-output] Fix the terminology around “pointers”
by Wolfgang Jeltsch (@jeltsch) 22 Jul '26
by Wolfgang Jeltsch (@jeltsch) 22 Jul '26
22 Jul '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC
Commits:
cfd3b3fb by Wolfgang Jeltsch at 2026-07-22T20:44:07+03:00
Fix the terminology around “pointers”
- - - - -
4 changed files:
- compiler/GHC/ByteCode/Show.hs
- testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout
- testsuite/tests/show-bytecode/show-bytecode-hpc.stdout
- testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout
Changes:
=====================================
compiler/GHC/ByteCode/Show.hs
=====================================
@@ -148,9 +148,9 @@ pprByteCodeObject current_module byte_code_object = case byte_code_object of
UnlinkedBCO {..}
-> entry (text "ordinary object" <+> quotes (ppr unlinkedBCOName)) $
vcat [
- pprArity $ unlinkedBCOArity,
- pprLiterals current_module $ unlinkedBCOLits,
- pprPointers current_module $ unlinkedBCOPtrs
+ pprArity $ unlinkedBCOArity,
+ pprLiterals current_module $ unlinkedBCOLits,
+ pprUsedItems current_module $ unlinkedBCOPtrs
]
UnlinkedStaticCon {..}
-> entry (
@@ -159,10 +159,10 @@ pprByteCodeObject current_module byte_code_object = case byte_code_object of
)
$
vcat [
- pprDataConstructorName $ unlinkedStaticConDataConName,
- pprLiftedness $ isLifted,
- pprLiterals current_module $ unlinkedStaticConLits,
- pprPointers current_module $ unlinkedStaticConPtrs
+ pprDataConstructorName $ unlinkedStaticConDataConName,
+ pprLiftedness $ isLifted,
+ pprLiterals current_module $ unlinkedStaticConLits,
+ pprUsedItems current_module $ unlinkedStaticConPtrs
]
where
@@ -251,22 +251,22 @@ pprInternalBreakpointID current_module InternalBreakpointId {..}
indexDoc :: SDoc
indexDoc = ppr ibi_info_index
--- | Constructs textual information about pointers.
-pprPointers :: Module -- ^ The enclosing module
- -> FlatBag BCOPtr -- ^ The pointers
- -> SDoc -- ^ The textual information
-pprPointers current_module = entry (text "utilized items") .
- vcatOrNone .
- map (pprPointer current_module) .
- elemsFlatBag
-
--- | Constructs textual information about a single pointer.
-pprPointer :: Module -- ^ The enclosing module
- -> BCOPtr -- ^ The pointer
- -> SDoc -- ^ The textual information
-pprPointer current_module pointer = case pointer of
+-- | Constructs textual information about used items.
+pprUsedItems :: Module -- ^ The enclosing module
+ -> FlatBag BCOPtr -- ^ The used items
+ -> SDoc -- ^ The textual information
+pprUsedItems current_module = entry (text "used items") .
+ vcatOrNone .
+ map (pprUsedItem current_module) .
+ elemsFlatBag
+
+-- | Constructs textual information about a single used item.
+pprUsedItem :: Module -- ^ The enclosing module
+ -> BCOPtr -- ^ The used item
+ -> SDoc -- ^ The textual information
+pprUsedItem current_module usedItem = case usedItem of
BCOPtrName name
- -> text "item named" <+> quotes (ppr name)
+ -> text "named item" <+> quotes (ppr name)
BCOPtrPrimOp primOp
-> text "primitive operation" <+> quotes (ppr primOp)
BCOPtrBCO byte_code_object
=====================================
testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout
=====================================
@@ -8,61 +8,61 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 0
- utilized items:
+ used items:
break array of module ‘Example’
- item named ‘static_ptr1’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr1’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘primes’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 27
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 20
- utilized items: <none>
+ used items: <none>
ordinary object ‘primes’:
arity: 0
literals:
@@ -70,7 +70,7 @@ objects:
top-level string "main"
cost center of breakpoint 2
info table of ‘:’
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘primes_sat_@name_suffix@’:
arity: 0
@@ -78,39 +78,39 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 1
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘primes_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘primes_sat_@name_suffix@’:
arity: 0
literals:
word 3
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
- item named ‘$fEnumNatural’
- item named ‘enumFrom’
- item named ‘isPrime_@name_suffix@’
- item named ‘filter’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
ordinary object ‘primes_sat_@name_suffix@’:
arity: 0
literals:
word 2
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
ordinary object ‘isPrime_@name_suffix@’:
arity: 1
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 9
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
@@ -118,7 +118,7 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 8
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
@@ -126,7 +126,7 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 7
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
@@ -134,7 +134,7 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 6
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 0
@@ -144,118 +144,118 @@ objects:
cost center of breakpoint 5
word 2
info table of ‘IS’
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fIntegralInteger’
- item named ‘$fNumNatural’
- item named ‘^’
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘^’
ordinary object ‘pap_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
+ used items: <none>
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 4
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fOrdNatural’
- item named ‘<=’
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘<=’
ordinary object ‘pap_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
- item named ‘.’
- item named ‘primes’
- item named ‘takeWhile’
+ used items: <none>
+ named item ‘.’
+ named item ‘primes’
+ named item ‘takeWhile’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 3
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘pap_@name_suffix@’:
arity: 2
literals: <none>
- utilized items:
- item named ‘$fIntegralNatural’
- item named ‘divides’
- item named ‘$fFoldableList’
- item named ‘any’
- item named ‘not’
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
ordinary object ‘fibonaccisPtr’:
arity: 0
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 10
- utilized items:
+ used items:
break array of module ‘Example’
- item named ‘static_ptr’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘fibonaccis’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 15
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 24
- utilized items: <none>
+ used items: <none>
ordinary object ‘fibonaccis’:
arity: 0
literals:
@@ -263,17 +263,17 @@ objects:
top-level string "main"
cost center of breakpoint 11
info table of ‘:’
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘fibonaccis_sat_@name_suffix@’:
arity: 0
literals:
word 0
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
- item named ‘positiveFibonaccis_@name_suffix@’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘positiveFibonaccis_@name_suffix@’
ordinary object ‘positiveFibonaccis_@name_suffix@’:
arity: 0
literals:
@@ -281,7 +281,7 @@ objects:
top-level string "main"
cost center of breakpoint 13
info table of ‘:’
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘positiveFibonaccis_sat_@name_suffix@’:
arity: 0
@@ -289,44 +289,44 @@ objects:
top-level string "Example"
top-level string "main"
cost center of breakpoint 12
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘positiveFibonaccis_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fNumNatural’
- item named ‘+’
- item named ‘positiveFibonaccis_@name_suffix@’
- item named ‘fibonaccis’
- item named ‘zipWith’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘+’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘fibonaccis’
+ named item ‘zipWith’
ordinary object ‘positiveFibonaccis_sat_@name_suffix@’:
arity: 0
literals:
word 1
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
ordinary object ‘$dTypeable2_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$dTypeable_@name_suffix@’
- item named ‘$dTypeable1_@name_suffix@’
- item named ‘mkTrAppChecked’
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
ordinary object ‘$dTypeable1_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcList’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
ordinary object ‘$dTypeable_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcNatural’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
static-construction object ‘$tc'Nested’:
data constructor name: TyCon
lifted: yes
@@ -334,36 +334,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Nested2_@name_suffix@’
- item named ‘$krep17_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Nested2_@name_suffix@’
+ named item ‘$krep17_@name_suffix@’
static-construction object ‘$tc'Nested2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Nested1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep17_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep16_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep16_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep15_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
static-construction object ‘$krep15_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep4_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tc'PerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -371,36 +371,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'PerfectTree2_@name_suffix@’
- item named ‘$krep14_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'PerfectTree2_@name_suffix@’
+ named item ‘$krep14_@name_suffix@’
static-construction object ‘$tc'PerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'PerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep14_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep13_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep12_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
static-construction object ‘$krep12_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcPerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -408,15 +408,15 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcPerfectTree2_@name_suffix@’
- item named ‘krep$*Arr*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
static-construction object ‘$tcPerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcPerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$tc'Node’:
data constructor name: TyCon
lifted: yes
@@ -424,36 +424,36 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Node2_@name_suffix@’
- item named ‘$krep11_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Node2_@name_suffix@’
+ named item ‘$krep11_@name_suffix@’
static-construction object ‘$tc'Node2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Node1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep11_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep10_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
static-construction object ‘$krep10_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘$krep9_@name_suffix@’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
static-construction object ‘$krep9_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor name: TyCon
lifted: yes
@@ -461,43 +461,43 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Leaf2_@name_suffix@’
- item named ‘$krep8_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Leaf2_@name_suffix@’
+ named item ‘$krep8_@name_suffix@’
static-construction object ‘$tc'Leaf2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Leaf1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep8_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$krep7_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcBinTree’
- item named ‘$krep6_@name_suffix@’
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
static-construction object ‘$krep6_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep5_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
static-construction object ‘$krep5_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcBinTree’:
data constructor name: TyCon
lifted: yes
@@ -505,127 +505,127 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcBinTree2_@name_suffix@’
- item named ‘krep$*->*->*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
static-construction object ‘$tcBinTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcBinTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep4_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcTuple2’
- item named ‘$krep3_@name_suffix@’
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
static-construction object ‘$krep3_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep2_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
static-construction object ‘$krep2_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$krep1_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 0
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 1
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule’:
data constructor name: Module
lifted: yes
literals: <none>
- utilized items:
- item named ‘$trModule2_@name_suffix@’
- item named ‘$trModule4_@name_suffix@’
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
static-construction object ‘$trModule4_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule3_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
ordinary object ‘divides’:
arity: 3
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dReal_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dNum_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dEq_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dEq1_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘bcprep_@name_suffix@’:
arity: 5
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 15
- utilized items:
+ used items:
break array of module ‘Example’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 1
literals:
word 0
info table of ‘IS’
- utilized items: item named ‘fromInteger’
+ used items: named item ‘fromInteger’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 3
literals:
top-level string "Example"
top-level string "main"
cost center of breakpoint 14
- utilized items:
+ used items:
break array of module ‘Example’
- item named ‘mod’
- item named ‘==’
- item named ‘$p1Ord’
- item named ‘$p2Real’
- item named ‘$p1Real’
- item named ‘$p1Integral’
+ named item ‘mod’
+ named item ‘==’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Real’
+ named item ‘$p1Integral’
ordinary object ‘Node’:
arity: 3
literals: info table of ‘Node’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Leaf’:
arity: 1
literals: info table of ‘Leaf’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Nested’:
arity: 1
literals: info table of ‘Nested’
- utilized items: <none>
+ used items: <none>
ordinary object ‘PerfectTree’:
arity: 1
literals: info table of ‘PerfectTree’
- utilized items: <none>
+ used items: <none>
data constructor info tables:
info table of ‘PerfectTree’:
number of words for pointers: 1
=====================================
testsuite/tests/show-bytecode/show-bytecode-hpc.stdout
=====================================
@@ -7,336 +7,336 @@ objects:
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
- item named ‘static_ptr1’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr1’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 27
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 20
- utilized items: <none>
+ used items: <none>
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘primes’
+ used items: named item ‘primes’
ordinary object ‘primes2_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘primes2_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘primes2_sat_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 3
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
- item named ‘$fEnumNatural’
- item named ‘enumFrom’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
ordinary object ‘primes2_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘isPrime_@name_suffix@’
- item named ‘filter’
+ used items: named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
ordinary object ‘isPrime_@name_suffix@’:
arity: 1
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘primes’
+ used items: named item ‘primes’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
- item named ‘$fIntegralInteger’
- item named ‘$fNumNatural’
- item named ‘^’
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘^’
ordinary object ‘v1_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 2
info table of ‘IS’
- utilized items: <none>
+ used items: <none>
ordinary object ‘pap_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
+ used items: <none>
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
- item named ‘$fOrdNatural’
- item named ‘<=’
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘<=’
ordinary object ‘v1_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: <none>
+ used items: <none>
ordinary object ‘pap_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
- item named ‘.’
- item named ‘takeWhile’
+ used items: <none>
+ named item ‘.’
+ named item ‘takeWhile’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘pap_@name_suffix@’:
arity: 2
literals: <none>
- utilized items:
- item named ‘$fIntegralNatural’
- item named ‘divides’
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
ordinary object ‘v1_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: <none>
+ used items: <none>
ordinary object ‘pap_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
- item named ‘$fFoldableList’
- item named ‘any’
- item named ‘not’
+ used items: <none>
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
ordinary object ‘primes’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘:’
- utilized items:
- item named ‘primes2_@name_suffix@’
- item named ‘primes1_@name_suffix@’
+ used items:
+ named item ‘primes2_@name_suffix@’
+ named item ‘primes1_@name_suffix@’
ordinary object ‘primes1_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 2
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
ordinary object ‘fibonaccisPtr’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
- item named ‘static_ptr’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 15
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 24
- utilized items: <none>
+ used items: <none>
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘fibonaccis’
+ used items: named item ‘fibonaccis’
ordinary object ‘positiveFibonaccis1_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘:’
- utilized items:
- item named ‘positiveFibonaccis2_@name_suffix@’
- item named ‘positiveFibonaccis_@name_suffix@’
+ used items:
+ named item ‘positiveFibonaccis2_@name_suffix@’
+ named item ‘positiveFibonaccis_@name_suffix@’
ordinary object ‘positiveFibonaccis2_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘positiveFibonaccis2_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘positiveFibonaccis1_@name_suffix@’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
ordinary object ‘positiveFibonaccis2_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘fibonaccis’
+ used items: named item ‘fibonaccis’
ordinary object ‘positiveFibonaccis2_sat_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘+’
- item named ‘zipWith’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘+’
+ named item ‘zipWith’
ordinary object ‘fibonaccis’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘:’
- utilized items:
- item named ‘fibonaccis2_@name_suffix@’
- item named ‘fibonaccis1_@name_suffix@’
+ used items:
+ named item ‘fibonaccis2_@name_suffix@’
+ named item ‘fibonaccis1_@name_suffix@’
ordinary object ‘fibonaccis2_@name_suffix@’:
arity: 0
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: item named ‘positiveFibonaccis1_@name_suffix@’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
ordinary object ‘positiveFibonaccis_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 1
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
ordinary object ‘fibonaccis1_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 0
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
ordinary object ‘$dTypeable2_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$dTypeable_@name_suffix@’
- item named ‘$dTypeable1_@name_suffix@’
- item named ‘mkTrAppChecked’
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
ordinary object ‘$dTypeable1_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcList’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
ordinary object ‘$dTypeable_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcNatural’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
static-construction object ‘$tc'Nested’:
data constructor name: TyCon
lifted: yes
@@ -344,36 +344,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Nested2_@name_suffix@’
- item named ‘$krep17_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Nested2_@name_suffix@’
+ named item ‘$krep17_@name_suffix@’
static-construction object ‘$tc'Nested2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Nested1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep17_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep16_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep16_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep15_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
static-construction object ‘$krep15_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep4_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tc'PerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -381,36 +381,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'PerfectTree2_@name_suffix@’
- item named ‘$krep14_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'PerfectTree2_@name_suffix@’
+ named item ‘$krep14_@name_suffix@’
static-construction object ‘$tc'PerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'PerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep14_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep13_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep12_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
static-construction object ‘$krep12_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcPerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -418,15 +418,15 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcPerfectTree2_@name_suffix@’
- item named ‘krep$*Arr*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
static-construction object ‘$tcPerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcPerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$tc'Node’:
data constructor name: TyCon
lifted: yes
@@ -434,36 +434,36 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Node2_@name_suffix@’
- item named ‘$krep11_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Node2_@name_suffix@’
+ named item ‘$krep11_@name_suffix@’
static-construction object ‘$tc'Node2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Node1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep11_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep10_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
static-construction object ‘$krep10_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘$krep9_@name_suffix@’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
static-construction object ‘$krep9_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor name: TyCon
lifted: yes
@@ -471,43 +471,43 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Leaf2_@name_suffix@’
- item named ‘$krep8_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Leaf2_@name_suffix@’
+ named item ‘$krep8_@name_suffix@’
static-construction object ‘$tc'Leaf2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Leaf1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep8_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$krep7_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcBinTree’
- item named ‘$krep6_@name_suffix@’
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
static-construction object ‘$krep6_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep5_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
static-construction object ‘$krep5_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcBinTree’:
data constructor name: TyCon
lifted: yes
@@ -515,125 +515,125 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcBinTree2_@name_suffix@’
- item named ‘krep$*->*->*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
static-construction object ‘$tcBinTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcBinTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep4_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcTuple2’
- item named ‘$krep3_@name_suffix@’
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
static-construction object ‘$krep3_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep2_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
static-construction object ‘$krep2_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$krep1_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 0
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 1
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule’:
data constructor name: Module
lifted: yes
literals: <none>
- utilized items:
- item named ‘$trModule2_@name_suffix@’
- item named ‘$trModule4_@name_suffix@’
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
static-construction object ‘$trModule4_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule3_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
ordinary object ‘divides’:
arity: 3
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dReal_@name_suffix@’:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 1
literals:
label ‘_hpc_tickboxes_Example_hpc’
word 0
info table of ‘IS’
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘fromInteger’
- item named ‘$p1Real’
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 3
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: <none>
+ used items: <none>
ordinary object ‘divides_sat_@name_suffix@’:
arity: 1
literals: label ‘_hpc_tickboxes_Example_hpc’
- utilized items: <none>
- item named ‘mod’
+ used items: <none>
+ named item ‘mod’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘==’
- item named ‘$p1Ord’
- item named ‘$p2Real’
- item named ‘$p1Integral’
+ used items: named item ‘==’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
ordinary object ‘Node’:
arity: 3
literals: info table of ‘Node’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Leaf’:
arity: 1
literals: info table of ‘Leaf’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Nested’:
arity: 1
literals: info table of ‘Nested’
- utilized items: <none>
+ used items: <none>
ordinary object ‘PerfectTree’:
arity: 1
literals: info table of ‘PerfectTree’
- utilized items: <none>
+ used items: <none>
data constructor info tables:
info table of ‘PerfectTree’:
number of words for pointers: 1
=====================================
testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout
=====================================
@@ -5,279 +5,279 @@ objects:
ordinary object ‘primesPtr’:
arity: 0
literals: <none>
- utilized items:
- item named ‘static_ptr1’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr1’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘primes’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr1_sat_@name_suffix@’
- item named ‘static_ptr1_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘static_ptr1_sat_@name_suffix@’
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 27
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 20
- utilized items: <none>
+ used items: <none>
ordinary object ‘primes2_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘primes2_sat_@name_suffix@’
- item named ‘isPrime_@name_suffix@’
- item named ‘filter’
+ used items:
+ named item ‘primes2_sat_@name_suffix@’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
ordinary object ‘isPrime_@name_suffix@’:
arity: 1
literals: <none>
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: <none>
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals: <none>
- utilized items:
+ used items:
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 1
literals:
word 2
info table of ‘IS’
- utilized items:
+ used items:
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fIntegralInteger’
- item named ‘$fNumNatural’
- item named ‘^’
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘^’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
+ used items: <none>
ordinary object ‘v_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fOrdNatural’
- item named ‘<=’
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘<=’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: <none>
- item named ‘.’
- item named ‘primes’
- item named ‘takeWhile’
+ used items: <none>
+ named item ‘.’
+ named item ‘primes’
+ named item ‘takeWhile’
ordinary object ‘isPrime_sat_@name_suffix@’:
arity: 2
literals: <none>
- utilized items:
- item named ‘$fIntegralNatural’
- item named ‘divides’
- item named ‘$fFoldableList’
- item named ‘any’
- item named ‘not’
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
static-construction object ‘primes’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘primes1_@name_suffix@’
- item named ‘primes2_@name_suffix@’
+ used items:
+ named item ‘primes1_@name_suffix@’
+ named item ‘primes2_@name_suffix@’
ordinary object ‘primes2_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘primes2_sat_@name_suffix@’:
arity: 0
literals:
word 3
info table of ‘IS’
- utilized items:
- item named ‘$fNumNatural’
- item named ‘fromInteger’
- item named ‘$fEnumNatural’
- item named ‘enumFrom’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
ordinary object ‘primes1_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘primes1_sat_@name_suffix@’
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘primes1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
static-construction object ‘primes1_sat_@name_suffix@’:
data constructor name: IS
lifted: yes
literals: word 2
- utilized items: <none>
+ used items: <none>
ordinary object ‘fibonaccisPtr’:
arity: 0
literals: <none>
- utilized items:
- item named ‘static_ptr’
- item named ‘$dTypeable2_@name_suffix@’
- item named ‘$fIsStaticStaticPtr’
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
static-construction object ‘static_ptr’:
data constructor name: StaticPtr
lifted: yes
literals:
word @large_word@
word @large_word@
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘fibonaccis’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: StaticPtrInfo
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "Example"
- utilized items:
+ used items:
ordinary object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘unpackCString#’
+ used items: named item ‘unpackCString#’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: (,)
lifted: yes
literals: <none>
- utilized items:
- item named ‘static_ptr_sat_@name_suffix@’
- item named ‘static_ptr_sat_@name_suffix@’
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘static_ptr_sat_@name_suffix@’
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 15
- utilized items: <none>
+ used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor name: I#
lifted: yes
literals: word 24
- utilized items: <none>
+ used items: <none>
ordinary object ‘positiveFibonaccis2_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘positiveFibonaccis1_@name_suffix@’
- item named ‘fibonaccis’
- item named ‘positiveFibonaccis2_sat_@name_suffix@’
- item named ‘zipWith’
+ used items:
+ named item ‘positiveFibonaccis1_@name_suffix@’
+ named item ‘fibonaccis’
+ named item ‘positiveFibonaccis2_sat_@name_suffix@’
+ named item ‘zipWith’
static-construction object ‘positiveFibonaccis1_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘positiveFibonaccis_@name_suffix@’
- item named ‘positiveFibonaccis2_@name_suffix@’
+ used items:
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘positiveFibonaccis2_@name_suffix@’
static-construction object ‘fibonaccis’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘fibonaccis1_@name_suffix@’
- item named ‘positiveFibonaccis1_@name_suffix@’
+ used items:
+ named item ‘fibonaccis1_@name_suffix@’
+ named item ‘positiveFibonaccis1_@name_suffix@’
ordinary object ‘positiveFibonaccis2_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$fNumNatural’
- item named ‘+’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘+’
ordinary object ‘positiveFibonaccis_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘positiveFibonaccis_sat_@name_suffix@’
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘positiveFibonaccis_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
static-construction object ‘positiveFibonaccis_sat_@name_suffix@’:
data constructor name: IS
lifted: yes
literals: word 1
- utilized items: <none>
+ used items: <none>
ordinary object ‘fibonaccis1_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘fibonaccis1_sat_@name_suffix@’
- item named ‘$fNumNatural’
- item named ‘fromInteger’
+ used items:
+ named item ‘fibonaccis1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
static-construction object ‘fibonaccis1_sat_@name_suffix@’:
data constructor name: IS
lifted: yes
literals: word 0
- utilized items: <none>
+ used items: <none>
ordinary object ‘$dTypeable2_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
- item named ‘$dTypeable_@name_suffix@’
- item named ‘$dTypeable1_@name_suffix@’
- item named ‘mkTrAppChecked’
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
ordinary object ‘$dTypeable1_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcList’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
ordinary object ‘$dTypeable_@name_suffix@’:
arity: 0
literals: info table of ‘[]’
- utilized items:
- item named ‘$tcNatural’
- item named ‘mkTrCon’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
static-construction object ‘$tc'Nested’:
data constructor name: TyCon
lifted: yes
@@ -285,36 +285,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Nested2_@name_suffix@’
- item named ‘$krep17_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Nested2_@name_suffix@’
+ named item ‘$krep17_@name_suffix@’
static-construction object ‘$tc'Nested2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Nested1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep17_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep16_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep16_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep15_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
static-construction object ‘$krep15_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep4_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tc'PerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -322,36 +322,36 @@ objects:
word @large_word@
word @large_word@
word 1
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'PerfectTree2_@name_suffix@’
- item named ‘$krep14_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'PerfectTree2_@name_suffix@’
+ named item ‘$krep14_@name_suffix@’
static-construction object ‘$tc'PerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'PerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep14_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep13_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
static-construction object ‘$krep13_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcPerfectTree’
- item named ‘$krep12_@name_suffix@’
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
static-construction object ‘$krep12_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcPerfectTree’:
data constructor name: TyCon
lifted: yes
@@ -359,15 +359,15 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcPerfectTree2_@name_suffix@’
- item named ‘krep$*Arr*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
static-construction object ‘$tcPerfectTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcPerfectTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$tc'Node’:
data constructor name: TyCon
lifted: yes
@@ -375,36 +375,36 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Node2_@name_suffix@’
- item named ‘$krep11_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Node2_@name_suffix@’
+ named item ‘$krep11_@name_suffix@’
static-construction object ‘$tc'Node2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Node1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep11_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep10_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
static-construction object ‘$krep10_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘$krep9_@name_suffix@’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
static-construction object ‘$krep9_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep7_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor name: TyCon
lifted: yes
@@ -412,43 +412,43 @@ objects:
word @large_word@
word @large_word@
word 2
- utilized items:
- item named ‘$trModule’
- item named ‘$tc'Leaf2_@name_suffix@’
- item named ‘$krep8_@name_suffix@’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tc'Leaf2_@name_suffix@’
+ named item ‘$krep8_@name_suffix@’
static-construction object ‘$tc'Leaf2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tc'Leaf1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep8_@name_suffix@’:
data constructor name: KindRepFun
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep7_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
static-construction object ‘$krep7_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcBinTree’
- item named ‘$krep6_@name_suffix@’
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
static-construction object ‘$krep6_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep5_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
static-construction object ‘$krep5_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$tcBinTree’:
data constructor name: TyCon
lifted: yes
@@ -456,113 +456,113 @@ objects:
word @large_word@
word @large_word@
word 0
- utilized items:
- item named ‘$trModule’
- item named ‘$tcBinTree2_@name_suffix@’
- item named ‘krep$*->*->*’
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
static-construction object ‘$tcBinTree2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$tcBinTree1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep4_@name_suffix@’:
data constructor name: KindRepTyConApp
lifted: yes
literals: <none>
- utilized items:
- item named ‘$tcTuple2’
- item named ‘$krep3_@name_suffix@’
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
static-construction object ‘$krep3_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘$krep2_@name_suffix@’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
static-construction object ‘$krep2_@name_suffix@’:
data constructor name: :
lifted: yes
literals: <none>
- utilized items:
- item named ‘$krep1_@name_suffix@’
- item named ‘[]’
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
static-construction object ‘$krep1_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 0
- utilized items: <none>
+ used items: <none>
static-construction object ‘$krep_@name_suffix@’:
data constructor name: KindRepVar
lifted: yes
literals: word 1
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule’:
data constructor name: Module
lifted: yes
literals: <none>
- utilized items:
- item named ‘$trModule2_@name_suffix@’
- item named ‘$trModule4_@name_suffix@’
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
static-construction object ‘$trModule4_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule3_@name_suffix@’
- utilized items: <none>
+ used items: <none>
static-construction object ‘$trModule2_@name_suffix@’:
data constructor name: TrNameS
lifted: yes
literals: address ‘$trModule1_@name_suffix@’
- utilized items: <none>
+ used items: <none>
ordinary object ‘divides’:
arity: 3
literals: <none>
- utilized items:
+ used items:
ordinary object ‘$dReal_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 1
literals:
word 0
info table of ‘IS’
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘fromInteger’
- item named ‘$p1Real’
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 3
literals: <none>
- utilized items: item named ‘mod’
+ used items: named item ‘mod’
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items:
+ used items:
ordinary object ‘divides_sat_@name_suffix@’:
arity: 0
literals: <none>
- utilized items: item named ‘==’
- item named ‘$p1Ord’
- item named ‘$p2Real’
- item named ‘$p1Integral’
+ used items: named item ‘==’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
ordinary object ‘Node’:
arity: 3
literals: info table of ‘Node’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Leaf’:
arity: 1
literals: info table of ‘Leaf’
- utilized items: <none>
+ used items: <none>
ordinary object ‘Nested’:
arity: 1
literals: info table of ‘Nested’
- utilized items: <none>
+ used items: <none>
ordinary object ‘PerfectTree’:
arity: 1
literals: info table of ‘PerfectTree’
- utilized items: <none>
+ used items: <none>
data constructor info tables:
info table of ‘PerfectTree’:
number of words for pointers: 1
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cfd3b3fbbe66b372e8ee7e904edbe85…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cfd3b3fbbe66b372e8ee7e904edbe85…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/27323] Don't report -XStrict-generated bangs under -Wredundant-bang-patterns
by Sasha Bogicevic (@Bogicevic) 22 Jul '26
by Sasha Bogicevic (@Bogicevic) 22 Jul '26
22 Jul '26
Sasha Bogicevic pushed to branch wip/27323 at Glasgow Haskell Compiler / GHC
Commits:
708c671a by Sasha Bogicevic at 2026-07-22T19:35:14+02:00
Don't report -XStrict-generated bangs under -Wredundant-bang-patterns
XBangPat GhcTc is now Origin: user bangs are FromSource, bangs added
by decideBangHood are Generated. The pattern-match checker attaches
no SrcInfo to generated bangs, so they are divergence-checked but
never reported as redundant.
Fixes #27323
- - - - -
9 changed files:
- + changelog.d/T27323
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc/Check.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Tc/Gen/Pat.hs
- + testsuite/tests/pmcheck/should_compile/T27323.hs
- testsuite/tests/pmcheck/should_compile/all.T
Changes:
=====================================
changelog.d/T27323
=====================================
@@ -0,0 +1,15 @@
+section: compiler
+synopsis: Don't report compiler-generated bang patterns under -Wredundant-bang-patterns
+description:
+ With ``-XStrict``, GHC inserts bang patterns on binders. When such a bang
+ cannot force anything - for instance on a binder of unlifted type such as
+ ``Int#`` - it was reported by ``-Wredundant-bang-patterns``, even though
+ there is no bang in the source to remove. The warning now only reports
+ bangs the user actually wrote.
+
+ As part of this change, the ``XBangPat GhcTc`` extension field of
+ ``BangPat`` changed from ``NoExtField`` to ``Origin``, recording whether a
+ bang was user-written or compiler-generated. GHC API users constructing or
+ matching typechecked bang patterns may need a one-line adjustment.
+mrs: !16395
+issues: #27323
=====================================
compiler/GHC/Hs/Pat.hs
=====================================
@@ -102,7 +102,11 @@ type instance XParPat GhcTc = NoExtField
type instance XBangPat GhcPs = EpToken "!"
type instance XBangPat GhcRn = NoExtField
-type instance XBangPat GhcTc = NoExtField
+-- | Was this bang written by the user, or inserted by 'decideBangHood'
+-- because of -XStrict? Consulted by the pattern-match checker, which
+-- only reports user-written bangs under -Wredundant-bang-patterns.
+-- See Note [Dead bang patterns] in GHC.HsToCore.Pmc.Check.
+type instance XBangPat GhcTc = Origin
type instance XListPat GhcPs = AnnList ()
-- After parsing, ListPat can refer to a built-in Haskell list pattern
=====================================
compiler/GHC/HsToCore/Match.hs
=====================================
@@ -414,7 +414,7 @@ tidy1 :: Id -- The Id being scrutinised
tidy1 v g (ParPat _ pat) = tidy1 v g (unLoc pat)
tidy1 v g (SigPat _ pat _) = tidy1 v g (unLoc pat)
tidy1 _ _ (WildPat ty) = return (idDsWrapper, WildPat ty)
-tidy1 v g (BangPat _ (L l p)) = tidy_bang_pat v g l p
+tidy1 v g (BangPat o (L l p)) = tidy_bang_pat v g o l p
tidy1 v g (ModifiedPat _ _ pat) = tidy1 v g (unLoc pat)
-- case v of { x -> mr[] }
@@ -530,30 +530,30 @@ tidy1 _ _ non_interesting_pat
= return (idDsWrapper, non_interesting_pat)
--------------------
-tidy_bang_pat :: Id -> Bool -> SrcSpanAnnA -> Pat GhcTc
+tidy_bang_pat :: Id -> Bool -> Origin -> SrcSpanAnnA -> Pat GhcTc
-> DsM (DsWrapper, Pat GhcTc)
-- Discard par/sig under a bang
-tidy_bang_pat v g _ (ParPat _ (L l p)) = tidy_bang_pat v g l p
-tidy_bang_pat v g _ (SigPat _ (L l p) _) = tidy_bang_pat v g l p
+tidy_bang_pat v g o _ (ParPat _ (L l p)) = tidy_bang_pat v g o l p
+tidy_bang_pat v g o _ (SigPat _ (L l p) _) = tidy_bang_pat v g o l p
-- Push the bang-pattern inwards, in the hope that
-- it may disappear next time
-tidy_bang_pat v g l (AsPat x v' p)
- = tidy1 v g (AsPat x v' (L l (BangPat noExtField p)))
-tidy_bang_pat v g l (XPat (CoPat w p t))
- = tidy1 v g (XPat $ CoPat w (BangPat noExtField (L l p)) t)
-tidy_bang_pat v g l (OrPat x (p:|ps)) -- push bang into first pat alt
- = tidy1 v g (OrPat x (L l (BangPat noExtField p) :| ps))
+tidy_bang_pat v g o l (AsPat x v' p)
+ = tidy1 v g (AsPat x v' (L l (BangPat o p)))
+tidy_bang_pat v g o l (XPat (CoPat w p t))
+ = tidy1 v g (XPat $ CoPat w (BangPat o (L l p)) t)
+tidy_bang_pat v g o l (OrPat x (p:|ps)) -- push bang into first pat alt
+ = tidy1 v g (OrPat x (L l (BangPat o p) :| ps))
-- Discard bang around strict pattern
-tidy_bang_pat v g _ p@(LitPat {}) = tidy1 v g p
-tidy_bang_pat v g _ p@(ListPat {}) = tidy1 v g p
-tidy_bang_pat v g _ p@(TuplePat {}) = tidy1 v g p
-tidy_bang_pat v g _ p@(SumPat {}) = tidy1 v g p
+tidy_bang_pat v g _ _ p@(LitPat {}) = tidy1 v g p
+tidy_bang_pat v g _ _ p@(ListPat {}) = tidy1 v g p
+tidy_bang_pat v g _ _ p@(TuplePat {}) = tidy1 v g p
+tidy_bang_pat v g _ _ p@(SumPat {}) = tidy1 v g p
-- Data/newtype constructors
-tidy_bang_pat v g l p@(ConPat { pat_con = L _ (RealDataCon dc)
+tidy_bang_pat v g o l p@(ConPat { pat_con = L _ (RealDataCon dc)
, pat_args = args
, pat_con_ext = ConPatTc
{ cpt_arg_tys = arg_tys
@@ -562,7 +562,7 @@ tidy_bang_pat v g l p@(ConPat { pat_con = L _ (RealDataCon dc)
-- Newtypes: push bang inwards (#9844)
=
if isNewTyCon (dataConTyCon dc)
- then tidy1 v g (p { pat_args = push_bang_into_newtype_arg l (scaledThing ty) args })
+ then tidy1 v g (p { pat_args = push_bang_into_newtype_arg l o (scaledThing ty) args })
else tidy1 v g p -- Data types: discard the bang
where
(ty:_) = dataConInstArgTys dc arg_tys
@@ -582,28 +582,29 @@ tidy_bang_pat v g l p@(ConPat { pat_con = L _ (RealDataCon dc)
--
-- NB: SigPatIn, ConPatIn should not happen
-tidy_bang_pat _ _ l p = return (idDsWrapper, BangPat noExtField (L l p))
+tidy_bang_pat _ _ o l p = return (idDsWrapper, BangPat o (L l p))
-------------------
push_bang_into_newtype_arg :: SrcSpanAnnA
+ -> Origin
-> Type -- The type of the argument we are pushing
-- onto
-> HsConPatDetails GhcTc -> HsConPatDetails GhcTc
-- See Note [Bang patterns and newtypes]
-- We are transforming !(N p) into (N !p)
-push_bang_into_newtype_arg l _ty (PrefixCon x (arg:args))
+push_bang_into_newtype_arg l o _ty (PrefixCon x (arg:args))
= assert (null args) $
- PrefixCon x [L l (BangPat noExtField arg)]
-push_bang_into_newtype_arg l _ty (RecCon x rf)
+ PrefixCon x [L l (BangPat o arg)]
+push_bang_into_newtype_arg l o _ty (RecCon x rf)
| HsRecFields { rec_flds = L lf fld : flds } <- rf
, HsFieldBind { hfbRHS = arg } <- fld
= assert (null flds) $
RecCon x (rf { rec_flds = [L lf (fld { hfbRHS
- = L l (BangPat noExtField arg) })] })
-push_bang_into_newtype_arg l ty (RecCon _ rf) -- If a user writes !(T {})
+ = L l (BangPat o arg) })] })
+push_bang_into_newtype_arg l o ty (RecCon _ rf) -- If a user writes !(T {})
| HsRecFields { rec_flds = [] } <- rf
- = PrefixCon noExtField [L l (BangPat noExtField (noLocA (WildPat ty)))]
-push_bang_into_newtype_arg _ _ cd
+ = PrefixCon noExtField [L l (BangPat o (noLocA (WildPat ty)))]
+push_bang_into_newtype_arg _ _ _ cd
= pprPanic "push_bang_into_newtype_arg" (pprConArgs cd)
{-
=====================================
compiler/GHC/HsToCore/Pmc/Check.hs
=====================================
@@ -128,7 +128,9 @@ checkGrd grd = CA $ \inc -> case grd of
div <- addPhiCtNablas inc (PhiBotCt x)
matched <- addPhiCtNablas inc (PhiNotBotCt x)
-- See Note [Dead bang patterns]
- -- mb_info = Just info <==> PmBang originates from bang pattern in source
+ -- mb_info = Just info <==> the PmBang originates from a user-written
+ -- bang pattern. Bangs inserted by -XStrict carry no info and are thus
+ -- never reported as redundant (#27323).
let bangs | Just info <- mb_info = unitOL (div, info)
| otherwise = NilOL
tracePm "check:Bang" (ppr x <+> ppr div)
@@ -267,6 +269,22 @@ dead. So for a source bang, we add the refined Nabla and the source info to
the 'RedSet's 'rs_bangs'. When collecting stuff to warn, we test that Nabla for
inhabitants. If it's empty, we'll warn that it's redundant.
+Crucially, we only ever warn about bangs the user wrote. With -XStrict, the
+compiler inserts bangs itself ('decideBangHood' in GHC.HsToCore.Utils), and
+such a bang is often dead. Consider (#27323)
+
+ {-# LANGUAGE MagicHash, Strict #-}
+ idInt# :: Int# -> Int#
+ idInt# x = x
+
+The binder `x` has unlifted type, so the bang that -XStrict inserts on it can
+never force anything. But warning would be deeply confusing: there is no bang
+in the source to delete! Whether a bang was user-written is recorded in the
+'XBangPat GhcTc' extension field ('Origin'); generated bangs desugar to a
+'PmBang' with no 'SrcInfo', so they still take part in divergence checking
+(that matters for the inaccessible-RHS warnings of #21761) but never end up
+in 'rs_bangs'.
+
Note that we don't want to warn for a dead bang that appears on a redundant
clause. That is because in that case, we recommend to delete the clause wholly,
including its leading pattern match.
=====================================
compiler/GHC/HsToCore/Pmc/Desugar.hs
=====================================
@@ -18,6 +18,7 @@ import GHC.Data.FastString (unpackFS, lengthFS, mkFastStringShortText)
import GHC.Driver.DynFlags
import GHC.Hs
import GHC.Tc.Utils.TcMType (shortCutLit)
+import GHC.Types.Basic (isGenerated)
import GHC.Types.Id
import GHC.Core.ConLike
import GHC.Types.Name
@@ -154,11 +155,11 @@ desugarPat x pat = case pat of
VarPat _ y -> pure (mkPmLetVar (unLoc y) x)
ParPat _ p -> desugarLPat x p
LazyPat _ _ -> pure GdEnd -- like a wildcard
- BangPat _ p@(L l p') ->
+ BangPat orig p@(L l p') ->
-- Add the bang in front of the list, because it will happen before any
-- nested stuff.
consGrdDag (PmBang x pm_loc) <$> desugarLPat x p
- where pm_loc = Just (SrcInfo (L (locA l) (ppr p')))
+ where pm_loc = if isGenerated orig then Nothing else Just (SrcInfo (L (locA l) (ppr p')))
-- (x@pat) ==> Desugar pat with x as match var and handle impedance
-- mismatch with incoming match var
@@ -649,4 +650,12 @@ user *had* written a bang:
+ In an equation for ‘idV’: idV !v = ...
So we live with the duplication.
+
+There is one wrinkle (#27323): the bang inserted by 'decideBangHood' is
+compiler-generated, marked 'Generated' in its 'XBangPat GhcTc' field. When
+'desugarPat' sees such a bang, it emits a 'PmBang' without 'SrcInfo', so
+that the checker performs the usual divergence check (giving the
+inaccessible-RHS warning above) but never reports the bang under
+-Wredundant-bang-patterns. See Note [Dead bang patterns] in
+GHC.HsToCore.Pmc.Check.
-}
=====================================
compiler/GHC/HsToCore/Utils.hs
=====================================
@@ -53,6 +53,7 @@ import GHC.HsToCore.Monad
import GHC.Core.Utils
import GHC.Core.Make
+import GHC.Types.Basic (Origin(Generated), GenReason(OtherExpansion), DoPmc(..))
import GHC.Types.Id.Make
import GHC.Types.Id
import GHC.Types.Literal
@@ -956,6 +957,12 @@ Specifically:
!pat => !pat -- always
pat => !pat -- when -XStrict
pat => pat -- otherwise
+
+The bangs we add here are compiler-generated: we record 'Generated' in the
+'XBangPat GhcTc' extension field, whereas a user-written bang is typechecked
+to 'FromSource' (GHC.Tc.Gen.Pat). The pattern-match checker consults this
+field so that -Wredundant-bang-patterns only reports bangs that the user
+actually wrote (#27323). See Note [Dead bang patterns] in GHC.HsToCore.Pmc.Check.
-}
@@ -975,7 +982,7 @@ decideBangHood dflags lpat
ParPat x p -> L l (ParPat x (go p))
LazyPat _ lp' -> lp'
BangPat _ _ -> lp
- _ -> L l (BangPat noExtField lp)
+ _ -> L l (BangPat (Generated OtherExpansion DoPmc) lp)
isTrueLHsExpr :: LHsExpr GhcTc -> Maybe (CoreExpr -> DsM CoreExpr)
=====================================
compiler/GHC/Tc/Gen/Pat.hs
=====================================
@@ -31,6 +31,7 @@ import GHC.Tc.Gen.Sig( TcPragEnv, lookupPragEnv, addInlinePrags )
import GHC.Tc.Utils.Monad
import GHC.Tc.Utils.Instantiate
import GHC.Types.FieldLabel
+import GHC.Types.Basic (Origin (FromSource))
import GHC.Types.Id
import GHC.Types.Var
import GHC.Types.Name
@@ -627,9 +628,9 @@ tc_pat scaled_exp_pat_ty@(Scaled w_pat exp_pat_ty) penv ps_pat thing_inside =
{ (pat', res) <- tc_lpat scaled_exp_pat_ty penv pat thing_inside
; return (ParPat x pat', res) }
- BangPat x pat -> do
+ BangPat _ pat -> do
{ (pat', res) <- tc_lpat scaled_exp_pat_ty penv pat thing_inside
- ; return (BangPat x pat', res) }
+ ; return (BangPat FromSource pat', res) }
OrPat _ pats -> do -- See Note [Implementation of OrPatterns], Typechecker (1)
{ let pats_list = NE.toList pats
=====================================
testsuite/tests/pmcheck/should_compile/T27323.hs
=====================================
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash, Strict #-}
+{-# OPTIONS_GHC -Wredundant-bang-patterns #-}
+
+import GHC.Prim (Int#)
+
+idInt# :: Int# -> Int#
+idInt# x = x
+
+main = pure ()
=====================================
testsuite/tests/pmcheck/should_compile/all.T
=====================================
@@ -190,4 +190,5 @@ test('T24845', [], compile, [overlapping_incomplete])
test('T22652', [], compile, [overlapping_incomplete])
test('T22652a', [], compile, [overlapping_incomplete])
test('T24867', [], compile_fail, [overlapping_incomplete])
+test('T27323', normal, compile, ['-Wredundant-bang-patterns'])
test('T27360', normal, compile, [overlapping_incomplete + '-g3'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/708c671a5d57bc746d8c11c5ff01a60…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/708c671a5d57bc746d8c11c5ff01a60…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
Sasha Bogicevic pushed new branch wip/27323 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/27323
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/io-manager-deadlock-detection] Try fixing test T7275
by Duncan Coutts (@dcoutts) 22 Jul '26
by Duncan Coutts (@dcoutts) 22 Jul '26
22 Jul '26
Duncan Coutts pushed to branch wip/io-manager-deadlock-detection at Glasgow Haskell Compiler / GHC
Commits:
d645cc9e by Duncan Coutts at 2026-07-22T16:51:48+01:00
Try fixing test T7275
The hypothesis is that this test's output is sensitive to the number of
major GCs run, since these are the profiling samples. This MR makes idle
GC work in the non-threaded RTS, and for this test that increases the
number of major GCs, since the test program is frequently idle for more
than 300ms.
TODO: squash into a previous commit if this works.
- - - - -
1 changed file:
- testsuite/tests/profiling/should_run/Makefile
Changes:
=====================================
testsuite/tests/profiling/should_run/Makefile
=====================================
@@ -7,10 +7,13 @@ DECIMAL_REGEXP = [0-9]\+.[0-9]\+
.PHONY: T7275
T7275:
"$(TEST_HC)" -prof -v0 -rtsopts T7275.hs
- ./T7275 +RTS -hc -i0
+ ./T7275 +RTS -hc -i0 -I0
# Suzanne should appear here, despite having produced only pinned
# allocations. Strip off the actual amounts and cost-center numbers since
# they will be non-determinstic.
+ # Note also that this test is sensitive to the number of major GC's
+ # performed. The use of -i0 and -I0 above are intended to make this
+ # deterministic, but it is still sensitive to implementation changes.
grep suzanne T7275.hp | cut -f1 -d' ' | sed -re 's/\([0-9]+\)//'
.PHONY: T11489
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d645cc9e79315d67bc46671e71767b3…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d645cc9e79315d67bc46671e71767b3…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][master] parser: don't suggest ImportQualifiedPost when it is already enabled
by Marge Bot (@marge-bot) 22 Jul '26
by Marge Bot (@marge-bot) 22 Jul '26
22 Jul '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
0bf1d8c9 by Sasha Bogicevic at 2026-07-22T11:31:21-04:00
parser: don't suggest ImportQualifiedPost when it is already enabled
-Wprepositive-qualified-module unconditionally attached a hint to
enable ImportQualifiedPost, even when the extension was already on
(as it is by default under GHC2021). Record the extension's state in
the PsWarnImportPreQualified diagnostic and drop the hint when it is
already enabled.
Fixes #27380
- - - - -
8 changed files:
- + changelog.d/27380
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- + testsuite/tests/module/T27380.hs
- + testsuite/tests/module/T27380.stderr
- testsuite/tests/module/all.T
- testsuite/tests/module/mod184.stderr
Changes:
=====================================
changelog.d/27380
=====================================
@@ -0,0 +1,7 @@
+section: compiler
+synopsis: Don't suggest enabling ``ImportQualifiedPost`` when it is already enabled.
+ The :ghc-flag:`-Wprepositive-qualified-module` warning no longer suggests
+ enabling the extension if it is already in effect (as it is by default
+ under GHC2021).
+issues: #27380
+mrs: !16376
=====================================
compiler/GHC/Parser/Errors/Ppr.hs
=====================================
@@ -113,7 +113,7 @@ instance Diagnostic PsMessage where
<> if null prag then empty else text ":" <+> text prag
PsWarnMisplacedPragma prag
-> mkSimpleDecorated $ text "Misplaced" <+> pprFileHeaderPragmaType prag <+> text "pragma"
- PsWarnImportPreQualified
+ PsWarnImportPreQualified _iqp_on
-> mkSimpleDecorated $
text "Found" <+> quotes (text "qualified")
<+> text "in prepositive position"
@@ -603,7 +603,7 @@ instance Diagnostic PsMessage where
PsWarnStarIsType -> WarningWithFlag Opt_WarnStarIsType
PsWarnUnrecognisedPragma{} -> WarningWithFlag Opt_WarnUnrecognisedPragmas
PsWarnMisplacedPragma{} -> WarningWithFlag Opt_WarnMisplacedPragmas
- PsWarnImportPreQualified -> WarningWithFlag Opt_WarnPrepositiveQualifiedModule
+ PsWarnImportPreQualified{} -> WarningWithFlag Opt_WarnPrepositiveQualifiedModule
PsWarnViewPatternSignatures{} -> WarningWithFlag Opt_WarnViewPatternSignatures
PsErrLexer{} -> ErrorWithoutFlag
PsErrCmmLexer -> ErrorWithoutFlag
@@ -735,8 +735,10 @@ instance Diagnostic PsMessage where
then noHints
else [SuggestCorrectPragmaName suggestions]
PsWarnMisplacedPragma{} -> [SuggestPlacePragmaInHeader]
- PsWarnImportPreQualified -> [ SuggestQualifiedAfterModuleName
- , suggestExtension LangExt.ImportQualifiedPost]
+ PsWarnImportPreQualified iqp_on | iqp_on -> [ SuggestQualifiedAfterModuleName ]
+ | otherwise -> [ SuggestQualifiedAfterModuleName
+ , suggestExtension LangExt.ImportQualifiedPost
+ ]
PsWarnViewPatternSignatures{} -> [SuggestParenthesizePatternRHS]
PsErrLexer{} -> noHints
PsErrCmmLexer -> noHints
=====================================
compiler/GHC/Parser/Errors/Types.hs
=====================================
@@ -133,7 +133,7 @@ data PsMessage
| PsWarnStarIsType
-- | Pre qualified import with 'WarnPrepositiveQualifiedModule' enabled
- | PsWarnImportPreQualified
+ | PsWarnImportPreQualified !Bool -- is 'ImportQualifiedPost' enabled?
| PsWarnOperatorWhitespaceExtConflict !OperatorWhitespaceSymbol
=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -1326,7 +1326,7 @@ checkImportDecl mPre mPost preLevel postLevel = do
-- Warn if 'qualified' found in prepositive position and
-- 'Opt_WarnPrepositiveQualifiedModule' is enabled.
whenJust mPre $ \pre ->
- warnPrepositiveQualifiedModule (tokenSpan pre)
+ warnPrepositiveQualifiedModule (tokenSpan pre) importQualifiedPostEnabled
return (qualSpec, levelSpec)
@@ -3498,9 +3498,9 @@ isImpExpQcWildcard _ = False
-----------------------------------------------------------------------------
-- Warnings and failures
-warnPrepositiveQualifiedModule :: SrcSpan -> P ()
-warnPrepositiveQualifiedModule span =
- addPsMessage span PsWarnImportPreQualified
+warnPrepositiveQualifiedModule :: SrcSpan -> Bool -> P ()
+warnPrepositiveQualifiedModule span qualifiedPostEnabled =
+ addPsMessage span $ PsWarnImportPreQualified qualifiedPostEnabled
failNotEnabledImportQualifiedPost :: SrcSpan -> P ()
failNotEnabledImportQualifiedPost loc =
=====================================
testsuite/tests/module/T27380.hs
=====================================
@@ -0,0 +1,7 @@
+{-# LANGUAGE NoImportQualifiedPost #-}
+{-# OPTIONS_GHC -Wprepositive-qualified-module #-}
+-- Negative control for #27380: with the extension explicitly disabled,
+-- the ImportQualifiedPost suggestion must still appear.
+import qualified System.IO
+main :: IO ()
+main = System.IO.print "hi"
=====================================
testsuite/tests/module/T27380.stderr
=====================================
@@ -0,0 +1,6 @@
+T27380.hs:5:8: warning: [GHC-07924] [-Wprepositive-qualified-module]
+ Found ‘qualified’ in prepositive position
+ Suggested fixes:
+ • Place ‘qualified’ after the module name.
+ • Perhaps you intended to use the ‘ImportQualifiedPost’ extension
+
=====================================
testsuite/tests/module/all.T
=====================================
@@ -295,3 +295,4 @@ test('T21826', normal, compile_fail, [''])
test('T20007', normal, compile_fail, [''])
test('T25901_imp_plain_wc', normal, compile_fail, [''])
test('T25901_exp_plain_wc', normal, compile_fail, [''])
+test('T27380', normal, compile, [''])
=====================================
testsuite/tests/module/mod184.stderr
=====================================
@@ -1,6 +1,4 @@
-
mod184.hs:6:8: warning: [GHC-07924] [-Wprepositive-qualified-module]
Found ‘qualified’ in prepositive position
- Suggested fixes:
- • Place ‘qualified’ after the module name.
- • Perhaps you intended to use the ‘ImportQualifiedPost’ extension
+ Suggested fix: Place ‘qualified’ after the module name.
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0bf1d8c98baea8bc6a5fd3a39c8668d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0bf1d8c98baea8bc6a5fd3a39c8668d…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][master] hadrian: clean up stale cabal package flags in the tree
by Marge Bot (@marge-bot) 22 Jul '26
by Marge Bot (@marge-bot) 22 Jul '26
22 Jul '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
94d8f83b by Cheng Shao at 2026-07-22T11:30:40-04:00
hadrian: clean up stale cabal package flags in the tree
This patch cleans up stale cabal package flags in the tree and related
hadrian/autoconf logic. Closes #27474.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
9 changed files:
- configure.ac
- distrib/configure.ac.in
- hadrian/cfg/system.config.host.in
- hadrian/cfg/system.config.target.in
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Settings/Packages.hs
- m4/fp_check_pthreads.m4
- rts/rts.cabal
Changes:
=====================================
configure.ac
=====================================
@@ -894,10 +894,7 @@ dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
dnl for math functions or not
dnl (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
-AC_CHECK_LIB(m, atan, UseLibm=YES, UseLibm=NO)
-AC_SUBST([UseLibm])
-TargetHasLibm=$UseLibm
-AC_SUBST(TargetHasLibm)
+AC_CHECK_LIB(m, atan, TargetHasLibm=YES, TargetHasLibm=NO)
FP_BFD_FLAG
AC_SUBST([UseLibbfd])
@@ -911,10 +908,6 @@ AC_SUBST(UseSystemLibFFI)
AC_SUBST(FFILibDir)
AC_SUBST(FFIIncludeDir)
-dnl ** check whether we need -ldl to get dlopen()
-AC_CHECK_LIB([dl], [dlopen], UseLibdl=YES, UseLibdl=NO)
-AC_SUBST([UseLibdl])
-
dnl ** check for leading underscores in symbol names
FP_LEADING_UNDERSCORE
AC_SUBST([LeadingUnderscore], [`echo $fptools_cv_leading_underscore | sed 'y/yesno/YESNO/'`])
@@ -923,9 +916,6 @@ dnl ** check for librt
AC_CHECK_LIB([rt], [clock_gettime], UseLibrt=YES, UseLibrt=NO)
AC_SUBST([UseLibrt])
-FP_CHECK_PTHREAD_LIB
-AC_SUBST([UseLibpthread])
-
GHC_ADJUSTORS_METHOD([Target])
AC_SUBST([UseLibffiForAdjustors])
=====================================
distrib/configure.ac.in
=====================================
@@ -32,7 +32,6 @@ bootstrap_target=@TargetPlatform@
bootstrap_llvm_target=@LlvmTarget@
TargetHasLibm=@TargetHasLibm@
-AC_SUBST(TargetHasLibm)
UseLibffiForAdjustors=@UseLibffiForAdjustors@
AC_SUBST(UseLibffiForAdjustors)
=====================================
hadrian/cfg/system.config.host.in
=====================================
@@ -58,10 +58,7 @@ libzstd-lib-dir =
use-lib-zstd = NO
static-lib-zstd = NO
use-lib-numa = NO
-use-lib-m = YES
use-lib-rt = YES
-use-lib-dl = YES
use-lib-bfd = NO
-use-lib-pthread = NO
need-libatomic = NO
=====================================
hadrian/cfg/system.config.target.in
=====================================
@@ -64,10 +64,7 @@ libzstd-lib-dir = @LibZstdLibDir@
use-lib-zstd = @UseLibZstd@
static-lib-zstd = @UseStaticLibZstd@
use-lib-numa = @UseLibNuma@
-use-lib-m = @UseLibm@
use-lib-rt = @UseLibrt@
-use-lib-dl = @UseLibdl@
use-lib-bfd = @UseLibbfd@
-use-lib-pthread = @UseLibpthread@
need-libatomic = @NeedLibatomic@
=====================================
hadrian/src/Oracles/Flag.hs
=====================================
@@ -33,13 +33,9 @@ data BuildFlag = CcLlvmBackend
| UseLibnuma
| UseLibzstd
| StaticLibzstd
- | UseLibm
| UseLibrt
- | UseLibdl
| UseLibbfd
- | UseLibpthread
| NeedLibatomic
- | TargetHasLibm
parseFlagResult :: String -> String -> Bool
parseFlagResult key value =
@@ -70,13 +66,9 @@ buildFlag f st =
UseLibnuma -> "use-lib-numa"
UseLibzstd -> "use-lib-zstd"
StaticLibzstd -> "static-lib-zstd"
- UseLibm -> "use-lib-m"
UseLibrt -> "use-lib-rt"
- UseLibdl -> "use-lib-dl"
UseLibbfd -> "use-lib-bfd"
- UseLibpthread -> "use-lib-pthread"
NeedLibatomic -> "need-libatomic"
- TargetHasLibm -> "use-lib-m"
in parseFlagResult key <$> (lookupStageBuildConfig key st)
-- | Get a configuration setting.
=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -440,7 +440,7 @@ bindistRules = do
, interpolateSetting "ProjectVersion" ProjectVersion
, interpolateVar "EnableDistroToolchain" $ interp (staged (lookupStageBuildConfig "settings-use-distro-mingw"))
, interpolateVar "TablesNextToCode" $ yesNo <$> getTarget tgtTablesNextToCode
- , interpolateVar "TargetHasLibm" $ yesNo <$> interp (staged (buildFlag TargetHasLibm))
+ , interpolateVar "TargetHasLibm" $ yesNo <$> getTarget tgtHasLibm
, interpolateVar "TargetPlatform" $ getTarget targetPlatformTriple
, interpolateVar "BuildPlatform" $ interp $ queryBuild targetPlatformTriple
, interpolateVar "HostPlatform" $ interp $ queryHost targetPlatformTriple
=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -92,7 +92,6 @@ packageArgs = do
-- target code, otherwise enable for stage2 since that runs on
-- the target and can use target's own ghci object linker
[ andM [expr (ghcWithInterpreter stage), orM [expr (notM cross), stage2]] `cabalFlag` "internal-interpreter"
- , orM [ notM cross, haveCurses ] `cabalFlag` "terminfo"
, arg "-build-tool-depends"
, staged (buildFlag UseLibzstd) `cabalFlag` "with-libzstd"
-- ROMES: While the boot compiler is not updated wrt -this-unit-id
@@ -126,10 +125,6 @@ packageArgs = do
]
]
- -------------------------------- ghcPkg --------------------------------
- , package ghcPkg ?
- builder (Cabal Flags) ? orM [ notM cross, haveCurses ] `cabalFlag` "terminfo"
-
-------------------------------- ghcBoot ------------------------------
, package ghcBoot ?
builder (Cabal Flags) ? (stage0 `cabalFlag` "bootstrap")
@@ -408,12 +403,9 @@ rtsPackageArgs = package rts ? do
, any (wayUnit Debug) rtsWays `cabalFlag` "debug"
, any (wayUnit Dynamic) rtsWays `cabalFlag` "dynamic"
, any (wayUnit Threaded) rtsWays `cabalFlag` "threaded"
- , buildFlag UseLibm stage `cabalFlag` "libm"
, buildFlag UseLibrt stage `cabalFlag` "librt"
- , buildFlag UseLibdl stage `cabalFlag` "libdl"
, useSystemFfi `cabalFlag` "use-system-libffi"
, targetUseLibffiForAdjustors stage `cabalFlag` "libffi-adjustors"
- , buildFlag UseLibpthread stage `cabalFlag` "need-pthread"
, buildFlag UseLibbfd stage `cabalFlag` "libbfd"
, buildFlag NeedLibatomic stage `cabalFlag` "need-atomic"
, useLibdw stage `cabalFlag` "libdw"
@@ -423,7 +415,6 @@ rtsPackageArgs = package rts ? do
, queryTargetTarget stage tgtSymbolsHaveLeadingUnderscore `cabalFlag` "leading-underscore"
, ghcUnreg `cabalFlag` "unregisterised"
, ghcEnableTNC `cabalFlag` "tables-next-to-code"
- , Debug `wayUnit` way `cabalFlag` "find-ptr"
]
, builder (Cabal Setup) ? mconcat
[ useLibdw stage ? cabalExtraDirs (fromMaybe "" libdwIncludeDir) (fromMaybe "" libdwLibraryDir)
=====================================
m4/fp_check_pthreads.m4
=====================================
@@ -1,9 +1,6 @@
# FP_CHECK_PTHREAD_LIB
# ----------------------------------
# Check whether -lpthread is needed for pthread.
-#
-# Sets variables:
-# - UseLibpthread: [YES|NO]
AC_DEFUN([FP_CHECK_PTHREAD_LIB],
[
dnl Some platforms (e.g. Android's Bionic) have pthreads support available
=====================================
rts/rts.cabal
=====================================
@@ -64,9 +64,6 @@ flag tables-next-to-code
flag smp
default: True
manual: True
-flag find-ptr
- default: False
- manual: True
-- Some cabal flags used to control the flavours we want to produce
-- for libHSrts in hadrian. By default, we just produce vanilla and
-- threaded. The flags "compose": if you enable debug and profiling,
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/94d8f83bb930dc5004d43e91b4e37fd…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/94d8f83bb930dc5004d43e91b4e37fd…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/sjakobi/T27534] testsuite: Fix T17088 flakiness and restore bug coverage
by Simon Jakobi (@sjakobi2) 22 Jul '26
by Simon Jakobi (@sjakobi2) 22 Jul '26
22 Jul '26
Simon Jakobi pushed to branch wip/sjakobi/T27534 at Glasgow Haskell Compiler / GHC
Commits:
2e31845d by Simon Jakobi at 2026-07-22T17:25:04+02:00
testsuite: Fix T17088 flakiness and restore bug coverage
T17088 reads and prints a byte from an uninitialized array. Debug RTS
ways fill allocated memory with 0xaa, so the test can fail due to an
output mismatch unrelated to the pointer-tagging bug it covers.
Initialize the byte to zero to make the output deterministic.
The original bug requires the compacting collector and particular
compiler and RTS settings. Run the test only in the compacting_gc way
with -O1 and -A128k. Also disable STG lambda lifting because it removes
the closure shape needed to reproduce the pointer-tagging failure.
This makes the test reliable while ensuring it remains an effective
reproducer for #17088.
Closes #27534.
Assisted-by: gpt-5.6-sol via Codex CLI
- - - - -
2 changed files:
- testsuite/tests/rts/T17088.hs
- testsuite/tests/rts/all.T
Changes:
=====================================
testsuite/tests/rts/T17088.hs
=====================================
@@ -2,6 +2,9 @@
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
+-- Lambda lifting removes the closure shape needed to reproduce #17088.
+{-# OPTIONS_GHC -fno-stg-lift-lams #-}
+
module Main (main) where
import Data.Word
@@ -27,7 +30,9 @@ instance Show Bytes where
bytesAllocRet :: Int -> IO Bytes
bytesAllocRet (I# sz) =
IO $ \s -> case newAlignedPinnedByteArray# sz 8# s of
- (# s', mba #) -> (# s', Bytes mba #)
+ (# s', mba #) ->
+ case writeWord8Array# mba 0# (wordToWord8# 0##) s' of
+ s'' -> (# s'', Bytes mba #)
------------------------------------------------------------------------
=====================================
testsuite/tests/rts/all.T
=====================================
@@ -540,8 +540,11 @@ test('RestartEventLogging',
compile_and_run, ['RestartEventLogging_c.c'])
test('T17088',
- [extra_ways(['compacting_gc']), extra_run_opts('+RTS -A256k -RTS')],
- compile_and_run, ['-rtsopts -O2'])
+ [ only_ways(['compacting_gc'])
+ , extra_ways(['compacting_gc'])
+ , extra_run_opts('+RTS -A128k -RTS')
+ ],
+ compile_and_run, ['-rtsopts -O1'])
test('T15427', js_broken(22374), compile_and_run, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2e31845de0c7db63506b70ad8604593…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2e31845de0c7db63506b70ad8604593…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0