Simon Peyton Jones pushed new branch wip/T27557 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T27557
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
Apoorv Ingle pushed to branch wip/ani/T27156 at Glasgow Haskell Compiler / GHC
Commits:
ba9730bd by Apoorv Ingle at 2026-07-31T16:51:29-05:00
revert th test
- - - - -
2 changed files:
- testsuite/tests/th/T18102b.hs
- testsuite/tests/th/T18102b_aux.hs
Changes:
=====================================
testsuite/tests/th/T18102b.hs
=====================================
@@ -1,47 +1,9 @@
-{-# LANGUAGE TemplateHaskell, RebindableSyntax #-}
+{-# LANGUAGE TemplateHaskell #-}
-import Prelude
import T18102b_aux
-x1 :: Int
-x1 = $$(intQuote_TTH)
-
-z1 :: Int
-z1 = $(intQuote_TH)
-
-x2 :: Char
-x2 = $$(charQuote_TTH)
-
-z2 :: Char
-z2 = $(charQuote_TH)
-
-x3 :: [Int]
-x3 = $$(seqQuote_TTH)
-
-z3 :: [Int]
-z3 = $(seqQuote_TH)
-
-x4 :: [Int]
-x4 = $$(listQuote_TTH)
-
-z4 :: [Int]
-z4 = $(listQuote_TH)
-
+x :: Int
+x = $$(intQuote)
main :: IO ()
-main = do
- print t1
- print x1
- print z1
-
- print t2
- print x2
- print z2
-
- print t3
- print x3
- print z3
-
- print t4
- print x4
- print z4
+main = print x
=====================================
testsuite/tests/th/T18102b_aux.hs
=====================================
@@ -1,60 +1,11 @@
-{-# LANGUAGE RebindableSyntax, TemplateHaskell, OverloadedLists #-}
+{-# LANGUAGE RebindableSyntax, TemplateHaskell #-}
module T18102b_aux where
-import Prelude hiding ((>>=), return )
+import Prelude
import Language.Haskell.TH.Syntax
-
-
ifThenElse :: Bool -> Int -> Int -> Int
ifThenElse _ a b = a+b
-intQuote_TTH :: Code Q Int
-intQuote_TTH = [|| if True then 10 else 15 ||]
-
-intQuote_TH :: Quote m => m Exp
-intQuote_TH = [| if True then 10 else 15 |]
-
-t1 :: Int
-t1 = if True then 10 else 15
-
-
-(>>=) :: a -> ((forall b . b) -> c) -> c
-a >>= f = f undefined
-return _ = 'b'
-fail s = undefined
-
-t2 :: Char
-t2 = do { return 'k' }
-
-charQuote_TTH :: Code Q Char
-charQuote_TTH = [|| do { return 'k' } ||]
-
-charQuote_TH :: Quote m => m Exp
-charQuote_TH = [| do { return 'k' } |]
-
-fromListN :: Int -> [Int] -> [Int]
-fromListN _ l = replicate (length l) (length l)
-
-fromList :: [Int] -> [Int]
-fromList x = replicate (length x) (length x)
-
-
-t3 :: [Int]
-t3 = [2..7]
-
-seqQuote_TTH :: Code Q [Int]
-seqQuote_TTH = [|| [2..7] ||]
-
-seqQuote_TH :: Quote m => m Exp
-seqQuote_TH = [| [2..7] |]
-
-
-t4 :: [Int]
-t4 = [1,2,3]
-
-listQuote_TTH :: Code Q [Int]
-listQuote_TTH = [|| [1,2,3] ||]
-
-listQuote_TH :: Quote m => m Exp
-listQuote_TH = [| [1,2,3] |]
+intQuote :: Code Q Int
+intQuote = [|| if True then 10 else 15 ||]
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ba9730bd09cdde5164950bceb035768…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ba9730bd09cdde5164950bceb035768…
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/ani/T27156] 18 commits: Introduce global unit database cache
by Apoorv Ingle (@ani) 31 Jul '26
by Apoorv Ingle (@ani) 31 Jul '26
31 Jul '26
Apoorv Ingle pushed to branch wip/ani/T27156 at Glasgow Haskell Compiler / GHC
Commits:
5d0ab71a by fendor at 2026-07-27T17:31:05-04:00
Introduce global unit database cache
As a first step for better sharing of `UnitInfo` across `UnitEnv`,
we introduce a new datatype called `ExternalUnitDatabases`.
It primarily serves as an in-memory representation of *all*
`UnitDatabase`s across `UnitEnv`. This means, if multiple `HomeUnitEnv`s
depend on the same database, one way or another, we make sure that we
don't parse from disk every time.
Instead, we store the in-memory representation in `ExternalUnitDatabases`.
`ExternalUnitDatabaseCache` is the equivalent of `ExternalUnitState` in
the `UnitEnv`. It is a mutable variable wrapping `ExternalUnitDatabases`.
The mutable `ExternalUnitDatabaseCache` is used in `initUnits` to make
sure we don't parse the same unit database multiple times.
Almost by accident, we change the semantics of `initUnits` to honour
modifications to `packageDBFlags`.
The inability to change `packageDBFlags` while also reusing the already
parsed `UnitDatabase`s was reported in #26423 as a bug.
Hence, we think this behaviour change is warranted and acceptable,
especially since it comes with a breaking change to the `initUnits` API.
Add regression test for #26423
Closes #26423
- - - - -
6cce494a by fendor at 2026-07-27T17:31:05-04:00
Introduce UnitIndex for global external unit caching
`UnitInfo`s have been observed to cause a lot of memory usage in #27500.
Especially with multiple home units, as the same (external) units are
processed from scratch, even though most of the time we end up with
exactly the same `UnitInfo`.
We introduce a `UnitEnv` global cache that allows us to store external
unit information that is used across all `HomeUnitEnv`s.
The most important change in this commit is the introduction of the `UnitIndex`.
It stores a global mapping of `UnitId` -> `UnitInfo`, and `initUnits`
always uses the cached `UnitInfo` entry to populate each
`HomeUnitEnv`'s `UnitState`.
This allows us to ensure the following property:
> Each `UnitInfo` should be alive exactly once in GHC.
All `UnitState`s should reference 'UnitInfo's stored in the 'UnitIndex'.
This ensured by calling 'initUnits' with the 'UnitIndex'.
In addition, the `ExternalUnitDatabases` may also hold a reference
to each on-disk representation of `UnitInfo`.
This means, we impose an hard upper bound on the number of `UnitInfo`s
alive in the GHC session:
> The number of alive `UnitInfo`s closure objects must be the
> sum of all loaded unit database times two.
We add performance regression tests that make sure the number of live
`UnitInfo` cannot exceed this threshold.
Closes #27500
-------------------------
Metric Decrease:
MultiComponentModules
MultiComponentModulesRecomp
MultiComponentModulesRecomp100
mhu-perf
LinkableUsage02
-------------------------
These metrics increases are especially notable, as we are not even
sharing anything big but merely the global package database with 50
entries.
It shows how careful sharing of `UnitInfo` can improve memory usage.
We expect this to be much more notable when the whole cabal package
database is shared across multiple home units.
`LinkableUsage02` metric decreases on unreg and i386 platform, only.
---
Technical details
To share the `UnitInfo`s correctly, it is important that we extract
the `WireMap` into the `UnitIndex`. At the moment of writing, `WireMap`
must be globally the same for all `HomeUnitEnv`s.
This is important, as we could otherwise not cache the "fully-resolved"
`UnitInfo`, as we don't change the `UnitId` or `unitAbiHash` when
resolving wired-in units. Thus, there could be ambiguities, when the
`WireMap` is not the same for all `UnitState`s across the `UnitEnv`.
We consider a `UnitInfo` fully-resolved, if wired-in units have been
updated, the `UnitInfo` has been validated and variables in the unit
config, such as `${pkgroot}` have been resolved.
Updating the wired-in units requires the `WireMap` to be globally the
same.
- - - - -
f8e3bee9 by Zubin Duggal at 2026-07-27T17:31:49-04:00
testsuite: skip runtime stats tests on debugged compilers
Debugged flavours build the boot libraries without optimisation, so the
runtime numbers do not match the baselines.
- - - - -
1e326770 by Zubin Duggal at 2026-07-27T17:31:50-04:00
testsuite: mark #20706 tests fragile rather than broken
Whether the static linux linker issues manifest depends on the host
toolchain.
- - - - -
c0b13cbe by Zubin Duggal at 2026-07-27T17:31:50-04:00
testsuite: exclude libnuma from mostly-static
It needs static system libraries (libnuma.a) that many platforms do not
ship.
Fixes #26914
- - - - -
bee1913d by Alan Zimmerman at 2026-07-28T16:42:29-04:00
EPA: ClsInstDecl with decls as [LHsDecl GhcPs] in GhcPs
Similar to 4fdfe75731e01dad7d7fa474c2703d0d3965afb1, this commit
changes the as-parsed representation of class instance declarations to
[LHsDecl GhcPs], and only separates them by type from the renamer onward.
This also allows us to remove all the AnnSortKey machinery for exact
printing, as it is now no longer needed.
- - - - -
72c55eee by Cheng Shao at 2026-07-28T16:43:11-04:00
hadrian: implement and use writeFileAtomic to fix race condition
This patch implements `writeFileAtomic` in hadrian and change all
invocations of shake non-atomic `writeFile'` to use `writeFileAtomic`,
to avoid multiple hadrian concurrent invocations overwriting the same
in-tree generated file not in the build root directory. Fixes #27536.
Additional notes:
- `writeFileChanged`/`writeFileChangedBS` cannot be made atomic since
it involves reading the file's older version, so their uses are left
alone. It doesn't affect #27536 given their outputs are contained in
the build root directory.
- It's possible to shrink this patch by only making writes outside the
build root directory atomic. But I think it's not worth the effort
for fine grained distinction here, and atomic writes within the
build root directory should also improve robustness of a hadrian
build.
- In the longer term we do want to make a ghc build only generate
files within the build root directory, though that's a lot of work
and outside the scope of this particular bugfix.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
46d4f963 by Sylvain Henry at 2026-07-29T06:38:40-04:00
RTS: correctly mark slop bytes when shrinking large arrays (#19048)
Correctly mark slop bytes even when profiling is off so that heap census
doesn't traverse garbage-collected closures.
- - - - -
4762a8bf by Simon Jakobi at 2026-07-29T06:39:23-04:00
Add -XLazyFieldAnnotations (GHC proposal 752)
Unbundle the prefix `~` lazy field annotation syntax from StrictData. The
new LazyFieldAnnotations extension controls whether `~` is accepted on
constructor fields. StrictData (and Strict, transitively) imply the new
extension.
See https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0752-l….
Closes #24455.
Assisted-by: Claude Opus 4.8
- - - - -
0b6dcc84 by Simon Jakobi at 2026-07-29T06:40:04-04:00
testsuite: Relax T24471 residency tolerance
T24471 peak residency fluctuates enough on i386 to cause spurious
failures. Use the standard residency tolerance while retaining the
existing allocation threshold.
See https://gitlab.haskell.org/ghc/ghc/-/work_items/24471#note_682303.
Assisted-by: gpt-5.6-sol via Codex CLI
- - - - -
90e95b34 by Cheng Shao at 2026-07-29T06:40:45-04:00
compiler: fix missing top-level procedure labels in cmm dumps
This patch fixes missing top-level procedure labels in some
intermediate Cmm pass dumps. Fixes #27553.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
360a5946 by sheaf at 2026-07-29T06:41:35-04:00
Add some type-family-heavy performance tests
FamAppCachePerf stress-tests the performance of lookups in the
type family application cache.
T27336 is a minimisation extracted from the reported reproducer.
SimplCastPerf is a measure of coercion growth due to the simplifier
calling mkTransCo without re-optimising the result.
- - - - -
3ec9e2b9 by Mike Pilgrem at 2026-07-31T08:21:33-04:00
GHC Guide: Improve docs on response files
- - - - -
e5b2a1f7 by sheaf at 2026-07-31T08:22:23-04:00
Disable Core Lint for TcPlugin_RewritePerf
This is a compiler performance test, but the test source hard-coded
-dcore-lint, defeating the measurement.
-------------------------
Metric Decrease:
TcPlugin_RewritePerf
-------------------------
- - - - -
122e97c6 by Apoorv Ingle at 2026-07-31T16:23:49-05:00
Work on #27156
- Add `RebindableSyntaxTable` to store function/operator names while renaming in the XBlah fields
- Expand the following expressions right before typechecking instead of in the renamer
* OverloadedLabel
* RecordDotSyntax: HsGetField and HsProjection
* ExplicitList
* RecordUpd
* HsIf
* HsDo (Vanilla cases)
- - - - -
0582455a by Apoorv Ingle at 2026-07-31T16:23:49-05:00
update notes
- - - - -
c9ce3acb by Apoorv Ingle at 2026-07-31T16:23:49-05:00
rebase changes
- - - - -
61e96c18 by Apoorv Ingle at 2026-07-31T16:23:49-05:00
revert th test
- - - - -
156 changed files:
- + changelog.d/T26423
- + changelog.d/T27156
- + changelog.d/fix-cmm-dump-labels
- + changelog.d/fix-heap-census-large-arrays-19048
- + changelog.d/lazy-field-annotations
- + changelog.d/unit-index
- compiler/GHC.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main/Hsc.hs
- compiler/GHC/Driver/Main/Interactive.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Driver/Session/Units.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Stats.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Do.hs
- compiler/GHC/Tc/Gen/Expand.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Unit/Env.hs
- + compiler/GHC/Unit/External/Database.hs
- + compiler/GHC/Unit/External/Index.hs
- + compiler/GHC/Unit/External/ModuleOrigin.hs
- + compiler/GHC/Unit/External/Providers.hs
- + compiler/GHC/Unit/External/Query.hs
- + compiler/GHC/Unit/External/Substitution.hs
- + compiler/GHC/Unit/External/Validate.hs
- + compiler/GHC/Unit/External/Visibility.hs
- + compiler/GHC/Unit/External/Wired.hs
- compiler/GHC/Unit/Home/Graph.hs
- compiler/GHC/Unit/Info.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/State.hs-boot
- compiler/GHC/Unit/Types.hs
- compiler/Language/Haskell/Syntax/Decls.hs
- compiler/ghc.cabal.in
- docs/users_guide/exts/strict.rst
- docs/users_guide/using.rst
- ghc/GHCi/UI.hs
- hadrian/src/Hadrian/Builder/Ar.hs
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/CabalReinstall.hs
- hadrian/src/Rules/Documentation.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Library.hs
- hadrian/src/Rules/Nofib.hs
- hadrian/src/Rules/Program.hs
- hadrian/src/Rules/Register.hs
- hadrian/src/Rules/Rts.hs
- hadrian/src/Rules/SourceDist.hs
- hadrian/src/Rules/Test.hs
- hadrian/src/Rules/ToolArgs.hs
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- rts/Apply.cmm
- rts/ZeroSlop.c → rts/MarkSlop.c
- rts/PrimOps.cmm
- rts/Printer.c
- rts/ProfHeap.c
- rts/RtsFlags.c
- rts/ThreadPaused.c
- rts/include/Cmm.h
- rts/include/rts/storage/ClosureMacros.h
- rts/rts.cabal
- rts/sm/NonMovingMark.c
- rts/sm/Sanity.c
- rts/sm/Storage.c
- testsuite/driver/testlib.py
- testsuite/tests/count-deps/CountDepsParser.stdout
- + testsuite/tests/deSugar/should_run/LazyFieldAnnotationsSemantics.hs
- + testsuite/tests/deSugar/should_run/LazyFieldAnnotationsSemantics.stdout
- testsuite/tests/deSugar/should_run/all.T
- + testsuite/tests/driver/T26423/Hello.hs
- + testsuite/tests/driver/T26423/Makefile
- + testsuite/tests/driver/T26423/T26423.hs
- + testsuite/tests/driver/T26423/T26423.stderr
- + testsuite/tests/driver/T26423/T26423.stdout
- + testsuite/tests/driver/T26423/all.T
- + testsuite/tests/driver/T26423/test/Test.hs
- + testsuite/tests/driver/T26423/test/test.pkg
- testsuite/tests/driver/T4437.hs
- + testsuite/tests/driver/TUnitInfo/Foo.hs
- + testsuite/tests/driver/TUnitInfo/Makefile
- + testsuite/tests/driver/TUnitInfo/all.T
- + testsuite/tests/driver/TUnitInfo/genMhu.sh
- + testsuite/tests/driver/TUnitInfo/generic-unit-info-space-mhu.stdout
- + testsuite/tests/driver/TUnitInfo/generic-unit-info-space-single.stdout
- + testsuite/tests/driver/TUnitInfo/generic-unit-info-space.hs
- + testsuite/tests/driver/TUnitInfo/generic-unit-info-space.stdout
- testsuite/tests/driver/all.T
- testsuite/tests/driver/mostly-static/Makefile
- testsuite/tests/ghc-api/T25121_status.stdout
- testsuite/tests/ghci/T13786/all.T
- testsuite/tests/ghci/linking/all.T
- testsuite/tests/ghci/linking/dyn/all.T
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/package/T20010/all.T
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail9.stderr
- + testsuite/tests/perf/compiler/FamAppCachePerf.hs
- + testsuite/tests/perf/compiler/SimplCastPerf.hs
- + testsuite/tests/perf/compiler/T27336.hs
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/plugins/all.T
- testsuite/tests/printer/Test24533.stdout
- testsuite/tests/rebindable/T19918.stdout
- + testsuite/tests/rts/T19048.hs
- + testsuite/tests/rts/T19048.stdout
- testsuite/tests/rts/all.T
- testsuite/tests/rts/linker/all.T
- testsuite/tests/tcplugins/TcPlugin_RewritePerf.hs
- testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr
- testsuite/tests/th/T18102b.stdout
- + testsuite/tests/typecheck/should_compile/LazyFieldAnnotations.hs
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/typecheck/should_fail/LazyFieldsDisabled.stderr
- + testsuite/tests/typecheck/should_fail/LazyFieldsDisabledStrictData.hs
- + testsuite/tests/typecheck/should_fail/LazyFieldsDisabledStrictData.stderr
- testsuite/tests/typecheck/should_fail/all.T
- utils/check-exact/ExactPrint.hs
- utils/check-exact/Utils.hs
- utils/haddock/haddock-api/src/Haddock.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs
- utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Create.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fb071d3919c96382b2770649389f7b…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fb071d3919c96382b2770649389f7b…
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/az/epa-tidy-locatedxxx-10] 3 commits: GHC Guide: Improve docs on response files
by Alan Zimmerman (@alanz) 31 Jul '26
by Alan Zimmerman (@alanz) 31 Jul '26
31 Jul '26
Alan Zimmerman pushed to branch wip/az/epa-tidy-locatedxxx-10 at Glasgow Haskell Compiler / GHC
Commits:
3ec9e2b9 by Mike Pilgrem at 2026-07-31T08:21:33-04:00
GHC Guide: Improve docs on response files
- - - - -
e5b2a1f7 by sheaf at 2026-07-31T08:22:23-04:00
Disable Core Lint for TcPlugin_RewritePerf
This is a compiler performance test, but the test source hard-coded
-dcore-lint, defeating the measurement.
-------------------------
Metric Decrease:
TcPlugin_RewritePerf
-------------------------
- - - - -
85b10c00 by Alan Zimmerman at 2026-07-31T22:09:47+01:00
EPA: Remove LocatedP from OverlapMode
We have
type LocatedP = GenLocated SrcSpanAnnP
type SrcSpanAnnP = EpAnn AnnPragma
As the first step in removing this in favour of LocatedA which only
captures location, comments and trailing annotations, we remove it
from OverlapMode
We do this by moving the AnnPragma into the TTG extension point
instead.
- - - - -
13 changed files:
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Decls/Overlap.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/ThToHs.hs
- docs/users_guide/using.rst
- testsuite/tests/tcplugins/TcPlugin_RewritePerf.hs
- testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
Changes:
=====================================
compiler/GHC/Hs/Decls.hs
=====================================
@@ -1158,20 +1158,25 @@ ppDerivStrategy mb =
Nothing -> empty
Just (L _ ds) -> ppr ds
-ppOverlapPragma :: Maybe (LocatedP (OverlapMode (GhcPass p))) -> SDoc
+ppOverlapPragma :: forall p. IsPass p => Maybe (LocatedA (OverlapMode (GhcPass p))) -> SDoc
ppOverlapPragma mb =
case mb of
Nothing -> empty
- Just (L _ (NoOverlap s)) -> maybe_stext s "{-# NO_OVERLAP #-}"
- Just (L _ (Overlappable s)) -> maybe_stext s "{-# OVERLAPPABLE #-}"
- Just (L _ (Overlapping s)) -> maybe_stext s "{-# OVERLAPPING #-}"
- Just (L _ (Overlaps s)) -> maybe_stext s "{-# OVERLAPS #-}"
- Just (L _ (Incoherent s)) -> maybe_stext s "{-# INCOHERENT #-}"
- Just (L _ (NonCanonical s)) -> maybe_stext s "{-# INCOHERENT #-}" -- No surface syntax for NONCANONICAL yet
+ Just (L _ (NoOverlap s)) -> maybe_stext (stext s) "{-# NO_OVERLAP #-}"
+ Just (L _ (Overlappable s)) -> maybe_stext (stext s) "{-# OVERLAPPABLE #-}"
+ Just (L _ (Overlapping s)) -> maybe_stext (stext s) "{-# OVERLAPPING #-}"
+ Just (L _ (Overlaps s)) -> maybe_stext (stext s) "{-# OVERLAPS #-}"
+ Just (L _ (Incoherent s)) -> maybe_stext (stext s) "{-# INCOHERENT #-}"
+ Just (L _ (NonCanonical s)) -> maybe_stext (stext s) "{-# INCOHERENT #-}" -- No surface syntax for NONCANONICAL yet
where
maybe_stext NoSourceText alt = text alt
maybe_stext (SourceText src) _ = ftext src <+> text "#-}"
+ stext :: XOverlapMode (GhcPass p) -> SourceText
+ stext s = case (ghcPass @p, s) of
+ (GhcPs, (s,_)) -> s
+ (GhcRn, (s,_)) -> s
+ (GhcTc, s) -> s
instance (OutputableBndrId p) => Outputable (InstDecl (GhcPass p)) where
ppr (ClsInstD { cid_inst = decl }) = ppr decl
@@ -1593,7 +1598,7 @@ type instance Anno (ClsInstDecl (GhcPass p)) = SrcSpanAnnA
type instance Anno (InstDecl (GhcPass p)) = SrcSpanAnnA
type instance Anno (DocDecl (GhcPass p)) = SrcSpanAnnA
type instance Anno (DerivDecl (GhcPass p)) = SrcSpanAnnA
-type instance Anno (OverlapMode (GhcPass p)) = SrcSpanAnnP
+type instance Anno (OverlapMode (GhcPass p)) = SrcSpanAnnA
type instance Anno (DerivStrategy (GhcPass p)) = EpAnnCO
type instance Anno (DefaultDecl (GhcPass p)) = SrcSpanAnnA
type instance Anno (ForeignDecl (GhcPass p)) = SrcSpanAnnA
=====================================
compiler/GHC/Hs/Decls/Overlap.hs
=====================================
@@ -26,6 +26,8 @@ import GHC.Prelude
import GHC.Hs.Extension
+import GHC.Parser.Annotation ( AnnPragma )
+
import Language.Haskell.Syntax.Decls.Overlap
import Language.Haskell.Syntax.Extension
@@ -65,7 +67,9 @@ instance NFData OverlapFlag where
instance Outputable OverlapFlag where
ppr flag = ppr (overlapMode flag) <+> pprSafeOverlap (isSafeOverlap flag)
-type instance XOverlapMode (GhcPass _) = SourceText
+type instance XOverlapMode GhcPs = (SourceText, AnnPragma)
+type instance XOverlapMode GhcRn = (SourceText, AnnPragma)
+type instance XOverlapMode GhcTc = SourceText
type instance XXOverlapMode (GhcPass _) = DataConCantHappen
=====================================
compiler/GHC/Iface/Ext/Ast.hs
=====================================
@@ -1752,7 +1752,7 @@ instance ToHie (RScoped (LocatedAn NoEpAnns (DerivStrategy GhcRn))) where
NewtypeStrategy _ -> []
ViaStrategy s -> [ toHie (TS (ResolvedScopes [sc]) s) ]
-instance ToHie (LocatedP (OverlapMode GhcRn)) where
+instance ToHie (LocatedA (OverlapMode GhcRn)) where
toHie (L span _) = locOnly (locA span)
instance ToHie (LocatedA (ConDecl GhcRn)) where
=====================================
compiler/GHC/Parser.y
=====================================
@@ -1471,15 +1471,15 @@ inst_decl :: { LInstDecl GhcPs }
(fmap reverse $7)
(AnnDataDefn [] [] NoEpTok tnewtype tdata (epTok $2) dcolon twhere oc cc NoEpTok)}}
-overlap_pragma :: { Maybe (LocatedP (OverlapMode GhcPs)) }
- : '{-# OVERLAPPABLE' '#-}' {% fmap Just $ amsr (sLL $1 $> (Overlappable (getOVERLAPPABLE_PRAGs $1)))
- (AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn) }
- | '{-# OVERLAPPING' '#-}' {% fmap Just $ amsr (sLL $1 $> (Overlapping (getOVERLAPPING_PRAGs $1)))
- (AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn) }
- | '{-# OVERLAPS' '#-}' {% fmap Just $ amsr (sLL $1 $> (Overlaps (getOVERLAPS_PRAGs $1)))
- (AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn) }
- | '{-# INCOHERENT' '#-}' {% fmap Just $ amsr (sLL $1 $> (Incoherent (getINCOHERENT_PRAGs $1)))
- (AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn) }
+overlap_pragma :: { Maybe (LocatedA (OverlapMode GhcPs)) }
+ : '{-# OVERLAPPABLE' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlappable (getOVERLAPPABLE_PRAGs $1,
+ AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ | '{-# OVERLAPPING' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlapping (getOVERLAPPING_PRAGs $1,
+ AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ | '{-# OVERLAPS' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Overlaps (getOVERLAPS_PRAGs $1,
+ AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
+ | '{-# INCOHERENT' '#-}' {% fmap Just $ amsA' (sLL $1 $> (Incoherent (getINCOHERENT_PRAGs $1,
+ AnnPragma (glR $1) (epTok $2) noAnn noAnn noAnn noAnn noAnn))) }
| {- empty -} { Nothing }
deriv_strategy_no_via :: { LDerivStrategy GhcPs }
=====================================
compiler/GHC/Tc/Deriv.hs
=====================================
@@ -11,7 +11,7 @@
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-- | Handles @deriving@ clauses on @data@ declarations.
-module GHC.Tc.Deriv ( tcDeriving, DerivInfo(..) ) where
+module GHC.Tc.Deriv ( tcDeriving, DerivInfo(..), tcOverlapMode ) where
import GHC.Prelude
@@ -776,12 +776,12 @@ deriveStandalone (L loc (DerivDecl (warn, _) deriv_ty mb_lderiv_strat overlap_mo
tcOverlapMode :: OverlapMode GhcRn -> OverlapMode GhcTc
tcOverlapMode = \case
- NoOverlap s -> NoOverlap s
- Overlappable s -> Overlappable s
- Overlapping s -> Overlapping s
- Overlaps s -> Overlaps s
- Incoherent s -> Incoherent s
- NonCanonical s -> NonCanonical s
+ NoOverlap s -> NoOverlap (fst s)
+ Overlappable s -> Overlappable (fst s)
+ Overlapping s -> Overlapping (fst s)
+ Overlaps s -> Overlaps (fst s)
+ Incoherent s -> Incoherent (fst s)
+ NonCanonical s -> NonCanonical (fst s)
-- Typecheck the type in a standalone deriving declaration.
--
=====================================
compiler/GHC/Tc/TyCl/Instance.hs
=====================================
@@ -558,7 +558,7 @@ tcClsInstDecl (L loc (ClsInstDecl { cid_poly_ty = hs_ty
-- Dfun location is that of instance *header*
; let warn = fmap unLoc lwarn
- ; ispec <- newClsInst (fmap unLoc overlap_mode) dfun_name
+ ; ispec <- newClsInst (fmap (tcOverlapMode . unLoc) overlap_mode) dfun_name
tyvars theta clas inst_tys warn
; let inst_binds = InstBindings
=====================================
compiler/GHC/Tc/Utils/Instantiate.hs
=====================================
@@ -72,7 +72,6 @@ import GHC.Rename.Utils( mkRnSyntaxExpr )
import GHC.Types.Id.Make( mkDictFunId )
import GHC.Types.Arity ( Arity, VisArity )
import GHC.Types.Basic ( TypeOrKind(..) )
-import GHC.Types.SourceText
import GHC.Types.SrcLoc as SrcLoc
import GHC.Types.Var.Env
import GHC.Types.Id
@@ -912,7 +911,7 @@ hasFixedRuntimeRepRes std_nm user_expr ty = mapM_ do_check mb_arity
************************************************************************
-}
-getOverlapFlag :: Maybe (OverlapMode (GhcPass p)) -- User pragma if any
+getOverlapFlag :: Maybe (OverlapMode GhcTc) -- User pragma if any
-> TcM OverlapFlag
-- Construct the OverlapFlag from the global module flags,
-- but if the overlap_mode argument is (Just m),
@@ -936,9 +935,9 @@ getOverlapFlag overlap_mode_prag
overlap_mode
| Just m <- overlap_mode_prag = m
- | incoherent_ok = Incoherent NoSourceText
- | overlap_ok = Overlaps NoSourceText
- | otherwise = NoOverlap NoSourceText
+ | incoherent_ok = Incoherent noAnn
+ | overlap_ok = Overlaps noAnn
+ | otherwise = NoOverlap noAnn
-- final_overlap_mode: the `-fspecialise-incoherents` flag controls the
-- meaning of the `Incoherent` overlap mode: as either an Incoherent overlap
@@ -964,7 +963,7 @@ tcGetInsts :: TcM [ClsInst]
-- Gets the local class instances.
tcGetInsts = fmap tcg_insts getGblEnv
-newClsInst :: Maybe (OverlapMode (GhcPass p)) -- User pragma
+newClsInst :: Maybe (OverlapMode GhcTc) -- User pragma
-> Name -> [TyVar] -> ThetaType
-> Class -> [Type] -> Maybe (WarningTxt GhcRn) -> TcM ClsInst
newClsInst overlap_mode dfun_name tvs theta clas tys warn
=====================================
compiler/GHC/ThToHs.hs
=====================================
@@ -356,10 +356,10 @@ cvtDec (InstanceD o ctxt ty decs)
where
overlap pragma =
case pragma of
- TH.Overlaps -> Hs.Overlaps (SourceText $ fsLit "{-# OVERLAPS")
- TH.Overlappable -> Hs.Overlappable (SourceText $ fsLit "{-# OVERLAPPABLE")
- TH.Overlapping -> Hs.Overlapping (SourceText $ fsLit "{-# OVERLAPPING")
- TH.Incoherent -> Hs.Incoherent (SourceText $ fsLit "{-# INCOHERENT")
+ TH.Overlaps -> Hs.Overlaps (SourceText $ fsLit "{-# OVERLAPS", noAnn)
+ TH.Overlappable -> Hs.Overlappable (SourceText $ fsLit "{-# OVERLAPPABLE", noAnn)
+ TH.Overlapping -> Hs.Overlapping (SourceText $ fsLit "{-# OVERLAPPING", noAnn)
+ TH.Incoherent -> Hs.Incoherent (SourceText $ fsLit "{-# INCOHERENT", noAnn)
=====================================
docs/users_guide/using.rst
=====================================
@@ -58,9 +58,10 @@ Windows.
Options overview
----------------
-GHC's behaviour is controlled by options, which for historical reasons
-are also sometimes referred to as command-line flags or arguments.
-Options can be specified in three ways:
+GHC's behaviour is controlled by options. Options can be specified in four ways:
+(1) directly on the command line; (2) via files (response files); (3) in source
+files, using a pragma; and (4) when using GHCi, from within GHCi.
+
Command-line arguments
~~~~~~~~~~~~~~~~~~~~~~
@@ -76,7 +77,8 @@ An invocation of GHC takes the following form:
ghc [argument...]
-Command-line arguments are either options or file names.
+Command-line arguments are either options, file names or response file arguments
+(see further below).
Command-line options begin with ``-``. They may *not* be grouped:
``-vO`` is different from ``-v -O``. Options need not precede filenames:
@@ -111,16 +113,47 @@ to the files ``Foo.hs`` and ``Bar.hs``.
Command-line arguments in response files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In addition to passing arguments via the command-line, arguments can be passed
-via GNU-style response files. For instance,
+GHC's use of response files is similar to that of GCC. A response file argument
+is ``@`` followed immediately by the absolute or relative path identifying the
+response file.
+
+.. note::
+
+ In PowerShell, ``@`` is used to identify a splatting variable. Consequently,
+ GHC response file arguments must be enclosed in quotation marks on the
+ command line to avoid parsing errors.
+
+A response file argument is equivalent to the command-line arguments in the
+response file in the order that they appear in the file. A response file can
+include a response file argument.
+
+In a response file:
+
+* any unescaped whitespace is assumed to separate command-line arguments and is
+ otherwise ignored;
+* a backslash character (``\``) always escapes the following character; and
+* matching pairs of unescaped single quote (``'``) or double quote (``"``)
+ characters escape blocks of characters.
+
+For example,
.. code-block:: bash
- $ cat response-file
+ $ cat response-file1
-O1
+ @response-file2
+
+ $ cat response-file2
Hello.hs
-o Hello
- $ ghc @response-file
+
+ $ ghc @response-file1
+
+is equivalent to,
+
+.. code-block:: bash
+
+ $ ghc -O1 Hello.hs -o Hello
.. _source-file-options:
=====================================
testsuite/tests/tcplugins/TcPlugin_RewritePerf.hs
=====================================
@@ -2,7 +2,6 @@
-- Testing performance of type-checking rewriting plugins.
-- Test based on T9872b.
-{-# OPTIONS_GHC -dcore-lint #-}
{-# OPTIONS_GHC -freduction-depth=400 #-}
{-# OPTIONS_GHC -fplugin RewritePerfPlugin #-}
=====================================
testsuite/tests/tcplugins/TcPlugin_RewritePerf.stderr
=====================================
@@ -1,8 +1,7 @@
[1 of 4] Compiling RewritePerfDefs ( RewritePerfDefs.hs, RewritePerfDefs.o )
[2 of 4] Compiling RewritePerfPlugin ( RewritePerfPlugin.hs, RewritePerfPlugin.o )
[3 of 4] Compiling Main ( TcPlugin_RewritePerf.hs, TcPlugin_RewritePerf.o )
-
-TcPlugin_RewritePerf.hs:25:8: error: [GHC-39999]
+TcPlugin_RewritePerf.hs:24:8: error: [GHC-39999]
• No instance for ‘Show
(Proxy
[['Cube G B W R B G, 'Cube W G B W R R, 'Cube R W R B G R,
@@ -25,3 +24,4 @@ TcPlugin_RewritePerf.hs:25:8: error: [GHC-39999]
• In the expression: print (Proxy :: Proxy (Solutions Cubes))
In an equation for ‘main’:
main = print (Proxy :: Proxy (Solutions Cubes))
+
=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -2246,40 +2246,40 @@ instance ExactPrint (TyFamInstDecl GhcPs) where
-- ---------------------------------------------------------------------
-instance Typeable p => ExactPrint (LocatedP (OverlapMode (GhcPass p))) where
- getAnnotationEntry = entryFromLocatedA
- setAnnotationAnchor = setAnchorAn
+instance ExactPrint (OverlapMode GhcPs) where
+ getAnnotationEntry _ = NoEntryVal
+ setAnnotationAnchor a _ _ _ = a
-- NOTE: NoOverlap is only used in the typechecker
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (NoOverlap src)) = do
+ exact (NoOverlap (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# NO_OVERLAP"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (NoOverlap src))
+ return (NoOverlap (src, AnnPragma o' c' s l1 l2 t m))
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (Overlappable src)) = do
+ exact (Overlappable (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPPABLE"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (Overlappable src))
+ return (Overlappable (src, AnnPragma o' c' s l1 l2 t m))
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (Overlapping src)) = do
+ exact (Overlapping (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPPING"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (Overlapping src))
+ return (Overlapping (src, AnnPragma o' c' s l1 l2 t m))
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (Overlaps src)) = do
+ exact (Overlaps (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# OVERLAPS"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (Overlaps src))
+ return (Overlaps (src, AnnPragma o' c' s l1 l2 t m))
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (Incoherent src)) = do
+ exact (Incoherent (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# INCOHERENT"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (Incoherent src))
+ return (Incoherent (src, AnnPragma o' c' s l1 l2 t m))
- exact (L (EpAnn l (AnnPragma o c s l1 l2 t m) cs) (NonCanonical src)) = do
+ exact (NonCanonical (src, AnnPragma o c s l1 l2 t m)) = do
o' <- markAnnOpen'' o src "{-# INCOHERENT"
c' <- markEpToken c
- return (L (EpAnn l (AnnPragma o' c' s l1 l2 t m) cs) (Incoherent src))
+ return (Incoherent (src, AnnPragma o' c' s l1 l2 t m))
-- ---------------------------------------------------------------------
=====================================
utils/haddock/haddock-api/src/Haddock/Types.hs
=====================================
@@ -836,7 +836,7 @@ type instance Anno (FamilyResultSig DocNameI) = EpAnn NoEpAnns
type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA
type instance Anno (HsSigType DocNameI) = SrcSpanAnnA
type instance Anno (BooleanFormula DocNameI) = SrcSpanAnnBF
-type instance Anno (OverlapMode DocNameI) = EpAnn AnnPragma
+type instance Anno (OverlapMode DocNameI) = SrcSpanAnnA
type instance Anno (CType DocNameI) = EpAnn AnnPragma
type instance Anno (Header DocNameI) = EpAnn AnnPragma
type instance Anno (HsModifierOf (LocatedA (HsType DocNameI)) DocNameI) = SrcSpanAnnA
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73ae25e111f979caf78f9ebca86966…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73ae25e111f979caf78f9ebca86966…
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/sg/enter-taggable-invariant] rts: keep checkEnteredTaggable in the linker symbol table
by Sebastian Graf (@sgraf812) 31 Jul '26
by Sebastian Graf (@sgraf812) 31 Jul '26
31 Jul '26
Sebastian Graf pushed to branch wip/sg/enter-taggable-invariant at Glasgow Haskell Compiler / GHC
Commits:
58128884 by Sebastian Graf at 2026-07-31T21:51:30+02:00
rts: keep checkEnteredTaggable in the linker symbol table
checkEnteredTaggable is public RTS API (rts/include/rts/Messages.h) and
compiled object code calls it directly, so the RTS linker lists it
alongside the stg_enteredTaggable stub. Dropping it broke every
interactive-linking test: GHCi failed to resolve the symbol when
loading libraries whose constructor entries reference it.
- - - - -
1 changed file:
- rts/RtsSymbols.c
Changes:
=====================================
rts/RtsSymbols.c
=====================================
@@ -543,6 +543,7 @@ extern char **environ;
SymI_HasProto(sbarf) \
SymI_HasProto(ssbarf) \
SymI_HasProto(stg_enteredTaggable) \
+ SymI_HasProto(checkEnteredTaggable) \
SymI_HasProto(tagClosureIfConstr) \
SymI_HasProto(startEventLogging) \
SymI_HasProto(endEventLogging) \
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/58128884dca9d8d7623a8ce50685e9c…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/58128884dca9d8d7623a8ce50685e9c…
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] Add test output for WASM
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
31 Jul '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC
Commits:
4c933f62 by Wolfgang Jeltsch at 2026-07-31T23:12:38+03:00
Add test output for WASM
- - - - -
3 changed files:
- + testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-ws
- + testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-ws
- + testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-ws
Changes:
=====================================
testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-ws
=====================================
@@ -0,0 +1,832 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 0
+ used items:
+ break array of module ‘Example’
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘primes’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 2
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 1
+ used items:
+ break array of module ‘Example’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 2
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 9
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 8
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 7
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 6
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 5
+ word 2
+ info table of ‘IS’
+ used items:
+ break array of module ‘Example’
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 4
+ used items:
+ break array of module ‘Example’
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘primes’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 3
+ used items:
+ break array of module ‘Example’
+ object ‘pap_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 10
+ used items:
+ break array of module ‘Example’
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘fibonaccis’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 11
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘fibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 0
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 13
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 12
+ used items:
+ break array of module ‘Example’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘fibonaccis’
+ named item ‘zipWith’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 1
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dNum_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dEq_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dEq1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘bcprep_@name_suffix@’:
+ arity: 5
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 15
+ used items:
+ break array of module ‘Example’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 0
+ info table of ‘IS’
+ used items: named item ‘fromInteger’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 14
+ used items:
+ break array of module ‘Example’
+ named item ‘mod’
+ named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints:
+ source breakpoints:
+ source breakpoint 0:
+ source span: Example.hs:29:17-25
+ declaration path: divides
+ free variables:
+ k
+ n
+ source breakpoint 1:
+ source span: Example.hs:29:17-30
+ declaration path: divides
+ free variables:
+ k
+ n
+ source breakpoint 2:
+ source span: Example.hs:35:27-37
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 3:
+ source span: Example.hs:35:53-56
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 4:
+ source span: Example.hs:35:62-64
+ declaration path:
+ primes
+ isPrime
+ free variables: <none>
+ source breakpoint 5:
+ source span: Example.hs:35:52-65
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 6:
+ source span: Example.hs:35:41-73
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 7:
+ source span: Example.hs:35:22-74
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 8:
+ source span: Example.hs:35:17-75
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 9:
+ source span: Example.hs:32:14-34
+ declaration path: primes
+ free variables: isPrime
+ source breakpoint 10:
+ source span: Example.hs:32:10-34
+ declaration path: primes
+ free variables: isPrime
+ source breakpoint 11:
+ source span: Example.hs:38:13-25
+ declaration path: primesPtr
+ free variables: <none>
+ source breakpoint 12:
+ source span: Example.hs:23:30-70
+ declaration path:
+ fibonaccis
+ positiveFibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 13:
+ source span: Example.hs:23:26-70
+ declaration path:
+ fibonaccis
+ positiveFibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 14:
+ source span: Example.hs:20:14-35
+ declaration path: fibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 15:
+ source span: Example.hs:26:17-33
+ declaration path: fibonaccisPtr
+ free variables: <none>
+ bytecode breakpoints:
+ bytecode breakpoint 0:
+ type: StaticPtr [Natural]
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 11
+ bytecode breakpoint 1:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 9
+ bytecode breakpoint 2:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 10
+ bytecode breakpoint 3:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 2
+ bytecode breakpoint 4:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 3
+ bytecode breakpoint 5:
+ type: Natural -> Natural
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 4
+ bytecode breakpoint 6:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 5
+ bytecode breakpoint 7:
+ type: [Natural]
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 6
+ bytecode breakpoint 8:
+ type: Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 7
+ bytecode breakpoint 9:
+ type: Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 8
+ bytecode breakpoint 10:
+ type: StaticPtr [Natural]
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 15
+ bytecode breakpoint 11:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 14
+ bytecode breakpoint 12:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 12
+ bytecode breakpoint 13:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 13
+ bytecode breakpoint 14:
+ type: a
+ type variables: a :: *
+ variables:
+ %'Many eta :: a
+ %'Many eta1 :: a
+ corresponding source breakpoint: 0
+ bytecode breakpoint 15:
+ type: Bool
+ type variables: a :: *
+ variables:
+ %'Many eta :: a
+ %'Many eta1 :: a
+ corresponding source breakpoint: 1
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information: <none>
+
=====================================
testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-ws
=====================================
@@ -0,0 +1,662 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘primes’
+ object ‘primes2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘primes’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘v1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 2
+ info table of ‘IS’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘v1_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘pap_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ object ‘v1_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ object ‘primes’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘primes2_@name_suffix@’
+ named item ‘primes1_@name_suffix@’
+ object ‘primes1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 2
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘fibonaccis’
+ object ‘positiveFibonaccis1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘positiveFibonaccis2_@name_suffix@’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ object ‘positiveFibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘fibonaccis’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ named item ‘zipWith’
+ object ‘fibonaccis’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘fibonaccis2_@name_suffix@’
+ named item ‘fibonaccis1_@name_suffix@’
+ object ‘fibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 1
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘fibonaccis1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 0
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 0
+ info table of ‘IS’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ named item ‘mod’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints: <none>
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information:
+ hash: @hash@
+ tick box: _hpc_tickboxes_Example_hpc
+ number of ticks: 45
+
=====================================
testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-ws
=====================================
@@ -0,0 +1,597 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘primes2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘primes2_sat_@name_suffix@’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 2
+ info table of ‘IS’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘primes’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ static-construction object ‘primes’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘primes1_@name_suffix@’
+ named item ‘primes2_@name_suffix@’
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ object ‘primes1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘primes1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘primes1_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 2
+ used items: <none>
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘positiveFibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ 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: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘positiveFibonaccis2_@name_suffix@’
+ static-construction object ‘fibonaccis’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘fibonaccis1_@name_suffix@’
+ named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘positiveFibonaccis_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘positiveFibonaccis_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ object ‘fibonaccis1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘fibonaccis1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘fibonaccis1_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 0
+ info table of ‘IS’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: named item ‘mod’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints: <none>
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information: <none>
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c933f62aa466a1dc960925b4c40c1b…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c933f62aa466a1dc960925b4c40c1b…
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/sg/enter-taggable-invariant] 8 commits: Compile-time perf: convey only correctness-relevant LFInfos at -O0
by Sebastian Graf (@sgraf812) 31 Jul '26
by Sebastian Graf (@sgraf812) 31 Jul '26
31 Jul '26
Sebastian Graf pushed to branch wip/sg/enter-taggable-invariant at Glasgow Haskell Compiler / GHC
Commits:
550057da by Simon Jakobi at 2026-07-31T19:15:49+02:00
Compile-time perf: convey only correctness-relevant LFInfos at -O0
Attaching LFInfo to every IfaceId at every optimisation level (needed so
imported value references carry their pointer tag) regressed compiler
allocations at -O0. Only LFCon/LFScalar/LFPrim are correctness-relevant
(values without enterable entry code); functions and thunks are safely
enterable and their LFInfo is a mere optimisation, so omit it under
-fomit-interface-pragmas, and restore the pre-existing gating of CAF-info
and tag sigs. Also drop a dead warnPprTrace in updateDecl.
Measured (quick flavour): T1969 -0.26%; most of the remaining regression
comes from the enforcement code itself (see the MR discussion).
Assisted-by: Claude Fable 5
- - - - -
a15d734e by Sebastian Graf at 2026-07-31T19:15:49+02:00
testsuite: LFCon must reach importers at -O0 (T23173a)
A module cases on an imported statically evaluated constructor at -O0,
running under --fatal-enter-taggable. The exporting interface carries
LFCon despite -fomit-interface-pragmas, so the importer tags the
reference; a compiler that omits it makes the importer enter the
constructor and the test aborts.
- - - - -
447b76be by Simon Jakobi at 2026-07-31T19:16:09+02:00
Don't emit the enter-taggable check when profiling
LDV profiling relies on entering closures to mark them as used, so under
profiling the RTS deliberately does not shortcut ENTER() on the tag
(rts/include/Cmm.h) and tagged constructors are legitimately entered.
With checkEnteredTaggable in every taggable constructor's entry code this
aborted (under the temporary fatal default) or warned in every profiled
program.
Emit the check only when not profiling. The tag-test in emitEnter is kept
under profiling: the scrutinee path (AssignTo) has always had one, so LDV
never saw those enters anyway.
Assisted-by: Claude Fable 5
- - - - -
f844fada by Simon Jakobi at 2026-07-31T19:16:09+02:00
Enter-taggable check: changelog entry, relaxed atomics, wasm note
Add the changelog.d entry for --fatal-enter-taggable, use relaxed
atomics for checkEnteredTaggable's one-shot warning latch, and document
that the wasm dynamic linker path hands out untagged constructor
closures.
Assisted-by: Claude Fable 5
- - - - -
0f1742f6 by Simon Jakobi at 2026-07-31T19:16:09+02:00
Enter-taggable check: share the report code in a single RTS stub
The check emitted into every taggable constructor's entry code (#23173)
was a C call with a per-constructor descr string, which costs both
compile time (T1969 +3%) and code size. Since the constructor name and
tag are both derivable from the info table, the entry code can instead
be a single tail-jump to a shared RTS stub, stg_enteredTaggable, which
reports the violation and self-returns the value tagged.
T1969 compiler allocations: -2.8%; T18304: -1.4%.
Assisted-by: Claude Fable 5
- - - - -
d9c6cc7e by Simon Jakobi at 2026-07-31T19:16:09+02:00
testsuite: accept T21710a output for the shared stg_enteredTaggable stub
The expected output still had the per-constructor checkEnteredTaggable
ccall plus return call; each constructor entry now makes a single call
to the shared stg_enteredTaggable stub.
Assisted-by: Claude Fable 5
- - - - -
00cefb86 by Simon Jakobi at 2026-07-31T19:16:30+02:00
wasm: untag the Weak# obtained through a StablePtr in rts_promiseThrowTo
Same defect class as the hs_try_putmvar fixes: the Weak# created around
a JSFFI export's TSO carries tag 1 (#23173) and makeStablePtr# stores it
tagged, so rts_promiseThrowTo read all StgWeak fields one byte off and
crashed in throwToMsg. The resolve/reject paths were already covered by
the hs_try_putmvar_with_value fix.
Assisted-by: Claude Fable 5
- - - - -
b9c37398 by Simon Jakobi at 2026-07-31T19:16:30+02:00
rts: sanity-check pointer tags at rest (#23173)
The enter-taggable invariant is otherwise enforced only by crashing entry
code, so a GC path that strips a tag goes unnoticed until something happens
to enter the stripped pointer. Add checkPtrTag to the sanity checker
(+RTS -DS): every traversed user-level pointer field must carry the tag
implied by its target's info table, catching tag-stripping pointer-rewriting
paths mechanically on every sanity-checked GC.
See Note [Sanity-checking pointer tags] in rts/sm/Sanity.c for the rules
and the exemptions:
- Stack slots and PAP/AP payloads get relaxed rules (tag 0 accepted):
bitmap-walked frames such as the stg_gc_prim_p* heap-check-retry frames
save primop pointer arguments that codegen untags at the Cmm call
boundary, and hand-written Cmm keeps untagged working pointers live.
- C-finalizer nodes are linked untagged into StgWeak.cfinalizers and
walked raw by the RTS (exempted via C_FINALIZER_LIST).
- ghc-heap's Box wraps pointer words captured verbatim by heap/stack
introspection, so its field may hold an untagged constructor pointer;
it is recognized via a new Box_con_info entry in the RTS/ghc-internal
interface.
Assisted-by: Claude Fable 5
- - - - -
20 changed files:
- + changelog.d/enter-taggable-invariant-23173
- compiler/GHC/Iface/Make.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/Utils.hs
- libraries/ghc-internal/include/RtsIfaceSymbols.h
- libraries/ghci/GHCi/ObjLink.hs
- rts/Prelude.h
- rts/RtsMessages.c
- rts/RtsSymbols.c
- rts/StgMiscClosures.cmm
- rts/include/rts/Messages.h
- rts/include/rts/RtsToHsIface.h
- rts/include/stg/MiscClosures.h
- rts/sm/Sanity.c
- rts/wasm/JSFFI.c
- testsuite/tests/codeGen/should_compile/T21710a.stderr
- + testsuite/tests/codeGen/should_run/T23173a.hs
- + testsuite/tests/codeGen/should_run/T23173a.stdout
- + testsuite/tests/codeGen/should_run/T23173a_A.hs
- testsuite/tests/codeGen/should_run/all.T
Changes:
=====================================
changelog.d/enter-taggable-invariant-23173
=====================================
@@ -0,0 +1,20 @@
+section: codegen
+synopsis: Pointers to boxed unlifted primitives (``ByteArray#``, ``Array#``,
+ ``MVar#``, ...) are now tagged, and entering a taggable normal form is
+ reported.
+issues: #23173
+mrs: !16259
+
+description: {
+ References to boxed unlifted primitive values such as ``ByteArray#``,
+ ``Array#`` or ``MVar#`` now carry pointer tag 1, like single-constructor
+ data types. Together with this, GHC now enforces the invariant that the
+ entry code of a taggable normal form is unreachable: entering such a
+ closure prints a one-shot warning at runtime, or aborts the program when
+ the new RTS flag ``--fatal-enter-taggable`` is given.
+
+ ``foreign import prim`` callees receive unlifted boxed arguments untagged
+ and return unlifted boxed results with their pointer tag (1 for primitive
+ objects). C code that obtains an unlifted boxed value, e.g. an ``MVar#``,
+ through a ``StablePtr`` strips the tag before dereferencing the pointer.
+}
=====================================
compiler/GHC/Iface/Make.hs
=====================================
@@ -68,7 +68,6 @@ import GHC.Types.TyThing
import GHC.Types.CompleteMatch
import GHC.Types.Name.Cache
-import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Utils.Logger
import GHC.Utils.Binary
@@ -139,7 +138,12 @@ mkFullIface hsc_env partial_iface mb_stg_infos mb_cmm_infos stubs foreign_files
-- value must carry the value's pointer tag, which needs its LambdaFormInfo),
-- not an inlining pragma. Attach it regardless of -fomit-interface-pragmas
-- so imported value references are tagged at every optimisation level.
- let decls = updateDecl (mi_decls partial_iface) mb_stg_infos mb_cmm_infos
+ -- (At -O0 the code generator only conveys the correctness-relevant
+ -- LFInfos; see generatedInfo in GHC.StgToCmm.) CAF-info and tag sigs
+ -- remain ordinary pragmas, omitted under -fomit-interface-pragmas.
+ let omit_prags = gopt Opt_OmitInterfacePragmas (hsc_dflags hsc_env)
+ mb_stg_infos' = if omit_prags then Nothing else mb_stg_infos
+ decls = updateDecl (mi_decls partial_iface) mb_stg_infos' omit_prags mb_cmm_infos
-- See Note [Foreign stubs and TH bytecode linking]
mi_simplified_core <- for (mi_simplified_core partial_iface) $ \simpl_core -> do
@@ -189,13 +193,15 @@ shareIface nc compressionLevel mi = do
initBinMemSize :: Int
initBinMemSize = 1024 * 1024 -- 1 MB
-updateDecl :: [IfaceDecl] -> Maybe StgCgInfos -> Maybe CmmCgInfos -> [IfaceDecl]
-updateDecl decls Nothing Nothing = decls
-updateDecl decls m_stg_infos m_cmm_infos
+updateDecl :: [IfaceDecl] -> Maybe StgCgInfos -> Bool -> Maybe CmmCgInfos -> [IfaceDecl]
+updateDecl decls Nothing _ Nothing = decls
+updateDecl decls m_stg_infos omit_prags m_cmm_infos
= map update_decl decls
where
(non_cafs,lf_infos) = maybe (mempty, mempty)
- (\cmm_info -> (ncs_nameSet (cgNonCafs cmm_info), cgLFInfos cmm_info))
+ (\cmm_info -> ( if omit_prags then mempty
+ else ncs_nameSet (cgNonCafs cmm_info)
+ , cgLFInfos cmm_info ))
m_cmm_infos
tag_sigs = fromMaybe mempty m_stg_infos
@@ -203,9 +209,8 @@ updateDecl decls m_stg_infos m_cmm_infos
| let not_caffy = elemNameSet nm non_cafs
, let mb_lf_info = lookupNameEnv lf_infos nm
, let sig = lookupNameEnv tag_sigs nm
- -- NB: with LFInfo now attached at every optimisation level, a missing
- -- LFInfo is unremarkable (e.g. at -O0), so we do not trace it here.
- , warnPprTrace False "updateDecl" (text "Name without LFInfo:" <+> ppr nm) True
+ -- A missing LFInfo is unremarkable: at -O0 only the
+ -- correctness-relevant LFInfos are conveyed (see GHC.StgToCmm).
-- Only allocate a new IfaceId if we're going to update the infos
, isJust mb_lf_info || not_caffy || isJust sig
= IfaceId nm ty details $
=====================================
compiler/GHC/StgToCmm.hs
=====================================
@@ -21,9 +21,11 @@ import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Config
import GHC.StgToCmm.Ticky
-import GHC.StgToCmm.Types (ModuleLFInfos)
+import GHC.StgToCmm.Types (ModuleLFInfos, LambdaFormInfo(..))
import GHC.StgToCmm.CgUtils (CgStream)
+import GHC.Platform.Profile (profileIsProfiling)
+
import GHC.Cmm
import GHC.Cmm.Utils
import GHC.Cmm.CLabel
@@ -137,11 +139,21 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) tycons
!lf = cg_lf info
-- LFInfo is part of the STG-ABI (a reference to an imported value
- -- must carry its pointer tag), not an inlining pragma, so collect
- -- it for every binding regardless of -fomit-interface-pragmas.
- -- (Only LFInfo is conveyed here, never unfoldings.)
+ -- must carry its pointer tag), not an inlining pragma, so even
+ -- under -fomit-interface-pragmas we must convey the LFInfos that
+ -- pointer-tagging correctness depends on: values without entry
+ -- code that may be entered (LFCon under the tag-test in
+ -- emitEnter; LFScalar/LFPrim never). Functions and thunks are
+ -- safely enterable, so their LFInfo remains a mere optimisation
+ -- and is omitted at -O0 to keep interfaces small.
+ keep_lf_info lf = case lf of
+ LFCon{} -> True
+ LFScalar -> True
+ LFPrim -> True
+ _ -> not (stgToCmmOmitIfPragmas cfg)
!generatedInfo
- = mkNameEnv (Prelude.map extractInfo (nonDetEltsUFM cg_id_infos))
+ = mkNameEnv [ i | i@(_, lf) <- Prelude.map extractInfo (nonDetEltsUFM cg_id_infos)
+ , keep_lf_info lf ]
; rn_mapping <- liftIO (readIORef uniqRnRef)
; liftIO $ debugTraceMsg logger 3 (text "DetRnM mapping:" <+> ppr rn_mapping)
@@ -370,15 +382,21 @@ cgDataCon mn data_con
; tickyReturnOldCon (length arg_reps)
-- A taggable (small-family) normal form should never be entered:
-- every reference to it carries the constructor's pointer tag, so
- -- reaching this entry code is an invariant violation. We report it
- -- (aborting under +RTS --fatal-enter-taggable, otherwise warning once)
- -- and then self-return the value tagged with the constructor tag.
+ -- reaching this entry code is an invariant violation. We jump to
+ -- a shared RTS stub that reports it (aborting under +RTS
+ -- --fatal-enter-taggable, otherwise warning once) and self-returns
+ -- the value tagged with the constructor tag; sharing the stub keeps
+ -- the per-constructor entry code to a single tail-jump.
-- Larger families have no spare tag, so their values are entered
-- as normal and the entry returns them tagged with the
-- family-saturating tag.
- ; when taggable $
- emitCheckEnteredTaggable (showPprUnsafe data_con)
- ; void $ emitReturn
- [cmmOffsetB platform node (fromDynTag (tagForCon platform data_con))]
+ -- When profiling, entering tagged constructors is sanctioned:
+ -- LDV profiling relies on it to mark closures as used (ENTER()
+ -- in rts/include/Cmm.h does not shortcut on the tag), so the
+ -- check would fire on every constructor use.
+ ; if taggable && not (profileIsProfiling profile)
+ then emitJumpEnteredTaggable node
+ else void $ emitReturn
+ [cmmOffsetB platform node (fromDynTag (tagForCon platform data_con))]
}
}
=====================================
compiler/GHC/StgToCmm/Utils.hs
=====================================
@@ -10,7 +10,7 @@
module GHC.StgToCmm.Utils (
emitDataLits, emitRODataLits,
emitDataCon,
- emitRtsCall, emitRtsCallWithResult, emitRtsCallGen, emitCheckEnteredTaggable,
+ emitRtsCall, emitRtsCallWithResult, emitRtsCallGen, emitJumpEnteredTaggable,
emitBarf,
assignTemp, newTemp,
@@ -193,11 +193,16 @@ emitBarf msg = do
-- Call from a taggable normal form's entry code (which the pointer-tagging
-- invariant makes unreachable). It aborts under +RTS --fatal-enter-taggable and
-- otherwise warns once; the entry then self-returns the tagged value.
-emitCheckEnteredTaggable :: String -> FCode ()
-emitCheckEnteredTaggable con = do
- strLbl <- newStringCLit con
- emitRtsCall rtsUnitId (fsLit "checkEnteredTaggable")
- [(CmmLit strLbl, AddrHint)] False
+-- Tail-jump to the RTS's shared entry code for taggable normal forms
+-- (stg_enteredTaggable in rts/StgMiscClosures.cmm), which reports the
+-- invariant violation and self-returns the value tagged with its
+-- constructor tag (both derived from the info table).
+emitJumpEnteredTaggable :: CmmExpr -> FCode ()
+emitJumpEnteredTaggable node = do
+ profile <- getProfile
+ updfr_off <- getUpdFrameOff
+ let lbl = mkCmmCodeLabel rtsUnitId (fsLit "stg_enteredTaggable")
+ emit (mkJump profile NativeNodeCall (CmmLit (CmmLabel lbl)) [node] updfr_off)
emitRtsCall :: UnitId -> FastString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode ()
emitRtsCall pkg fun = emitRtsCallGen [] (mkCmmCodeLabel pkg fun) CmmMayReturn
=====================================
libraries/ghc-internal/include/RtsIfaceSymbols.h
=====================================
@@ -59,6 +59,7 @@ CLOSURE(GHCziInternalziExceptionziType, underflowException_closure)
CLOSURE(GHCziInternalziExceptionziType, overflowException_closure)
INFO_TBL(GHCziInternalziCString, unpackCStringzh_info)
INFO_TBL(GHCziInternalziCString, unpackCStringUtf8zh_info)
+INFO_TBL(GHCziInternalziHeapziClosures, Box_con_info)
#if defined(wasm32_HOST_ARCH) && defined(__PIC__)
CLOSURE(GHCziInternalziWasmziPrimziImports, raiseJSException_closure)
INFO_TBL(GHCziInternalziWasmziPrimziTypes, JSVal_con_info)
=====================================
libraries/ghci/GHCi/ObjLink.hs
=====================================
@@ -302,6 +302,10 @@ isWindowsHost = False
#endif
#if defined(wasm32_HOST_ARCH)
+-- The wasm dynamic linker resolves symbols out of process, so the RTS
+-- helper below is unavailable; looked-up constructor closures stay
+-- untagged and forcing one triggers the (non-fatal) enter-taggable
+-- warning.
tagClosurePtr :: Ptr a -> Ptr a
tagClosurePtr = id
#else
=====================================
rts/Prelude.h
=====================================
@@ -84,3 +84,4 @@ extern StgClosure ZCMain_main_closure;
#define FunPtr_con_info ghc_hs_iface->FunPtr_con_info
#define StablePtr_static_info ghc_hs_iface->StablePtr_static_info
#define StablePtr_con_info ghc_hs_iface->StablePtr_con_info
+#define Box_con_info ghc_hs_iface->Box_con_info
=====================================
rts/RtsMessages.c
=====================================
@@ -88,9 +88,9 @@ checkEnteredTaggable(const char *con)
ssbarf("entered a taggable normal form: %s", con);
// ssbarf does not return
}
- static int warned = 0;
- if (!warned) {
- warned = 1;
+ static StgWord warned = 0;
+ if (!RELAXED_LOAD(&warned)) {
+ RELAXED_STORE(&warned, 1);
debugBelch("warning: entered a taggable normal form: %s\n"
"(further occurrences suppressed; rerun with "
"+RTS --fatal-enter-taggable to abort)\n",
@@ -98,6 +98,16 @@ checkEnteredTaggable(const char *con)
}
}
+// Backing for stg_enteredTaggable (StgMiscClosures.cmm), the shared entry
+// code of taggable normal forms: report the violation and hand back the
+// pointer retagged with its constructor tag so the entry can self-return.
+StgClosure *
+enteredTaggableClosure(StgClosure *p)
+{
+ checkEnteredTaggable(GET_CON_DESC(get_con_itbl(p)));
+ return tagConstr(p);
+}
+
void
_assertFail(const char*filename, unsigned int linenum)
{
=====================================
rts/RtsSymbols.c
=====================================
@@ -542,7 +542,7 @@ extern char **environ;
SymI_HasProto(barf) \
SymI_HasProto(sbarf) \
SymI_HasProto(ssbarf) \
- SymI_HasProto(checkEnteredTaggable) \
+ SymI_HasProto(stg_enteredTaggable) \
SymI_HasProto(tagClosureIfConstr) \
SymI_HasProto(startEventLogging) \
SymI_HasProto(endEventLogging) \
=====================================
rts/StgMiscClosures.cmm
=====================================
@@ -103,6 +103,19 @@ INFO_TABLE_RET (stg_restore_cccs_eval, RET_SMALL, W_ info_ptr, W_ cccs)
jump stg_ap_0_fast(ret);
}
+/* Shared entry code for taggable normal forms, which the pointer-tagging
+ invariant makes unreachable: every taggable data constructor's entry code
+ tail-jumps here (see cgDataCon in GHC.StgToCmm) instead of carrying its own
+ report call. Reports the violation (aborting under +RTS
+ --fatal-enter-taggable, otherwise warning once) and self-returns the value
+ tagged with its constructor tag; name and tag come from the info table. */
+stg_enteredTaggable (P_ node)
+{
+ P_ tagged;
+ (tagged) = ccall enteredTaggableClosure(node "ptr");
+ return (tagged);
+}
+
/* ----------------------------------------------------------------------------
Support for the bytecode interpreter.
------------------------------------------------------------------------- */
=====================================
rts/include/rts/Messages.h
=====================================
@@ -49,11 +49,15 @@ void pbarf(const char *fmt, void *p)
void ssbarf(const char *fmt, const char *s)
STG_NORETURN;
-/* Called from a taggable normal form's entry code (which the pointer-tagging
- invariant makes unreachable). Aborts under +RTS --fatal-enter-taggable, otherwise
- warns once and lets the entry self-return the tagged value. */
+/* Report that a taggable normal form was entered (its entry code is
+ unreachable under the pointer-tagging invariant). Aborts under +RTS
+ --fatal-enter-taggable, otherwise warns once. */
void checkEnteredTaggable(const char *con);
+/* Backing for stg_enteredTaggable: report the violation and return the
+ closure pointer retagged with its constructor tag. */
+StgClosure *enteredTaggableClosure(StgClosure *p);
+
// declared in Rts.h:
// extern void _assertFail(const char *filename, unsigned int linenum)
// STG_NORETURN;
=====================================
rts/include/rts/RtsToHsIface.h
=====================================
@@ -60,6 +60,7 @@ typedef struct {
StgClosure *overflowException_closure; // GHC.Internal.Exception.Type.overflowException_closure
const StgInfoTable *unpackCStringzh_info; // GHC.Internal.CString.unpackCStringzh_info
const StgInfoTable *unpackCStringUtf8zh_info; // GHC.Internal.CString.unpackCStringUtf8zh_info
+ const StgInfoTable *Box_con_info; // GHC.Internal.Heap.Closures.Box_con_info
#if defined(wasm32_HOST_ARCH)
StgClosure *raiseJSException_closure; // GHC.Internal.Wasm.Prim.Imports.raiseJSException_closure
const StgInfoTable *JSVal_con_info; // GHC.Internal.Wasm.Prim.Types.JSVal_con_info
=====================================
rts/include/stg/MiscClosures.h
=====================================
@@ -477,6 +477,7 @@ RTS_FUN_DECL(stg_raiseIOzh);
RTS_FUN_DECL(stg_paniczh);
RTS_FUN_DECL(stg_keepAlivezh);
RTS_FUN_DECL(stg_absentErrorzh);
+RTS_FUN_DECL(stg_enteredTaggable);
RTS_FUN_DECL(stg_newPromptTagzh);
RTS_FUN_DECL(stg_promptzh);
=====================================
rts/sm/Sanity.c
=====================================
@@ -25,6 +25,7 @@
#include "Sanity.h"
#include "Schedule.h"
#include "Apply.h"
+#include "Prelude.h"
#include "Printer.h"
#include "Arena.h"
#include "RetainerProfile.h"
@@ -42,6 +43,7 @@ int isHeapAlloced ( StgPtr p);
static void checkSmallBitmap ( StgPtr payload, StgWord bitmap, uint32_t );
static void checkLargeBitmap ( StgPtr payload, StgLargeBitmap*, uint32_t );
static void checkClosureShallow ( const StgClosure * );
+static void checkPtrTag ( const StgClosure *, bool );
static void checkCompactObjects (bdescr *bd);
@@ -72,6 +74,7 @@ checkSmallBitmap( StgPtr payload, StgWord bitmap, uint32_t size )
for(i = 0; i < size; i++, bitmap >>= 1 ) {
if ((bitmap & 1) == 0) {
checkClosureShallow((StgClosure *)payload[i]);
+ checkPtrTag((StgClosure *)payload[i], false);
}
}
}
@@ -89,11 +92,126 @@ checkLargeBitmap( StgPtr payload, StgLargeBitmap* large_bitmap, uint32_t size )
for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) {
if ((bitmap & 1) == 0) {
checkClosureShallow((StgClosure *)payload[i]);
+ checkPtrTag((StgClosure *)payload[i], false);
}
}
}
}
+/* Note [Sanity-checking pointer tags]
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ * checkPtrTag asserts the pointer-tagging invariant (#23173) at rest: a
+ * pointer to a constructor carries its constructor tag (see tagConstr in
+ * ClosureMacros.h and get_iptr_tag in sm/Compact.c), and a pointer to a boxed
+ * unlifted primitive (MVar#, MutVar#, the arrays, ...) carries tag 1 (see
+ * Note [Pointer tagging of unlifted boxed primitives] in GHC.StgToCmm.Prim).
+ * The invariant is otherwise enforced only by crashing entry code, which
+ * catches a stripped tag only if the pointer is subsequently entered; this
+ * check catches tag-stripping pointer-rewriting paths (Evac, Compact,
+ * NonMovingShortcut, ...) mechanically on every sanity-checked GC.
+ *
+ * It is called only on user-level fields (stack bitmap slots, PAP/AP
+ * payloads, constructor/fun/thunk payloads, array elements, MutVar/TVar/MVar
+ * values, IND indirectees), because the RTS also holds internal untagged
+ * links. The rules exempt:
+ *
+ * - static constructors: RTS sentinels (stg_END_TSO_QUEUE_closure, ...) are
+ * CONSTR_NOCAFs that C code stores untagged, e.g. as an empty MVar's
+ * value, so only heap-allocated constructors are checked;
+ *
+ * - large-family constructors (con_tag >= TAG_MASK): tag is capped at
+ * TAG_MASK, so no exact requirement is asserted;
+ *
+ * - WEAK, TSO, STACK, BLOCKING_QUEUE, PRIM, MUT_PRIM: user-level references
+ * (Weak#, ThreadId#, ...) to these are tagged, but legitimate untagged
+ * RTS-internal links (weak_ptr_list, run queues, tso->_link, STM
+ * structures) reach the same traversals;
+ *
+ * - C_FINALIZER_LIST nodes: although their info table is a CONSTR, they
+ * are RTS-internal. All references to them — StgWeak.cfinalizers and the
+ * nodes' link fields — are untagged links built by stg_addCFinalizerToWeakzh
+ * (PrimOps.cmm) and walked raw by runCFinalizers (Weak.c); user code never
+ * holds a reference to one. (The compacting GC preserves untaggedness:
+ * unthread re-applies get_iptr_tag only to originally-tagged references.)
+ *
+ * - fields of ghc-heap's Box (GHC.Internal.Heap.Closures): `data Box = Box
+ * Any` wraps a pointer word captured verbatim by heap/stack introspection
+ * (unpackClosure#, ghc-heap's stack decoding), so it carries whatever tag
+ * the source bits had — possibly none. Box is recognized via
+ * ghc_hs_iface->Box_con_info, NULL-guarded since sanity checks can run
+ * before ghc-internal registers the interface;
+ *
+ * - BLACKHOLE indirectees (no call site on that field): tag 0 there means
+ * "not yet updated". Plain IND indirectees are checked;
+ *
+ * - bitmap-walked slots (stack frames, PAP/AP payloads; heap_field =
+ * false): hand-written Cmm legitimately stores untagged pointers there.
+ * Codegen untags unlifted boxed primop arguments at the Cmm call
+ * boundary, and generic RTS frames save those already-untagged arguments
+ * on the stack (the stg_block_{take,read,put}mvar frames and the
+ * stg_gc_prim_* heap-check-retry frames in HeapStackCheck.cmm); Cmm code
+ * also keeps deliberately untagged working pointers live across calls
+ * (e.g. stg_compactAddWorkerzh's "p"), landing them in return-frame
+ * slots. Such slots hence get no constructor rule, and the unlifted-
+ * primitive rule is relaxed to tag 0-or-1 (still catching corrupt tags).
+ * The strict rules apply to heap fields, where all the tag-stripping GC
+ * bugs lived.
+ */
+static void
+checkPtrTag( const StgClosure *q, bool heap_field )
+{
+ const StgClosure *p = UNTAG_CONST_CLOSURE(q);
+ const StgInfoTable *raw_info = ACQUIRE_LOAD(&p->header.info);
+ if (IS_FORWARDING_PTR(raw_info)) return;
+ const StgInfoTable *info = INFO_PTR_TO_STRUCT(raw_info);
+
+ switch (info->type) {
+ case CONSTR:
+ case CONSTR_1_0:
+ case CONSTR_0_1:
+ case CONSTR_2_0:
+ case CONSTR_1_1:
+ case CONSTR_0_2:
+ case CONSTR_NOCAF:
+ {
+ // RTS-internal untagged links; see the C_FINALIZER_LIST bullet in
+ // Note [Sanity-checking pointer tags].
+ if (raw_info == &stg_C_FINALIZER_LIST_info) {
+ break;
+ }
+ StgWord con_tag = (StgWord)info->srt + 1;
+ if (heap_field && con_tag <= TAG_MASK && HEAP_ALLOCED((StgPtr)p)) {
+ ASSERT(GET_CLOSURE_TAG(q) == con_tag);
+ }
+ break;
+ }
+
+ case ARR_WORDS:
+ case MUT_ARR_PTRS_CLEAN:
+ case MUT_ARR_PTRS_DIRTY:
+ case MUT_ARR_PTRS_FROZEN_CLEAN:
+ case MUT_ARR_PTRS_FROZEN_DIRTY:
+ case SMALL_MUT_ARR_PTRS_CLEAN:
+ case SMALL_MUT_ARR_PTRS_DIRTY:
+ case SMALL_MUT_ARR_PTRS_FROZEN_CLEAN:
+ case SMALL_MUT_ARR_PTRS_FROZEN_DIRTY:
+ case MUT_VAR_CLEAN:
+ case MUT_VAR_DIRTY:
+ case MVAR_CLEAN:
+ case MVAR_DIRTY:
+ case TVAR:
+ if (heap_field) {
+ ASSERT(GET_CLOSURE_TAG(q) == 1);
+ } else {
+ ASSERT(GET_CLOSURE_TAG(q) <= 1);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
/*
* check that it looks like a valid closure - without checking its payload
* used to avoid recursion between checking PAPs and checking stack
@@ -102,6 +220,8 @@ checkLargeBitmap( StgPtr payload, StgLargeBitmap* large_bitmap, uint32_t size )
static void
checkClosureShallow( const StgClosure* p )
{
+ // No checkPtrTag here: checkCompactObjects calls this on raw
+ // (necessarily untagged) object addresses, not on stored pointers.
ASSERT(LOOKS_LIKE_CLOSURE_PTR(UNTAG_CONST_CLOSURE(p)));
}
@@ -129,10 +249,12 @@ checkStackFrame( StgPtr c )
case STOP_FRAME:
case RET_SMALL:
case ANN_FRAME:
+ {
size = BITMAP_SIZE(info->i.layout.bitmap);
checkSmallBitmap((StgPtr)c + 1,
BITMAP_BITS(info->i.layout.bitmap), size);
return 1 + size;
+ }
case RET_BCO: {
StgBCO *bco;
@@ -377,6 +499,8 @@ checkClosure( const StgClosure* p )
ASSERT(LOOKS_LIKE_CLOSURE_PTR(mvar->head));
ASSERT(LOOKS_LIKE_CLOSURE_PTR(mvar->tail));
ASSERT(LOOKS_LIKE_CLOSURE_PTR(mvar->value));
+ // head/tail are RTS-internal TSO queue links; only value is user-level
+ checkPtrTag(mvar->value, true);
return sizeofW(StgMVar);
}
@@ -390,6 +514,7 @@ checkClosure( const StgClosure* p )
uint32_t i;
for (i = 0; i < info->layout.payload.ptrs; i++) {
ASSERT(LOOKS_LIKE_CLOSURE_PTR(((StgThunk *)p)->payload[i]));
+ checkPtrTag(((StgThunk *)p)->payload[i], true);
}
return thunk_sizeW_fromITBL(info);
}
@@ -407,14 +532,33 @@ checkClosure( const StgClosure* p )
case CONSTR_1_1:
case CONSTR_0_2:
case CONSTR_2_0:
- case BLACKHOLE:
- case PRIM:
- case MUT_PRIM:
case MUT_VAR_CLEAN:
case MUT_VAR_DIRTY:
case TVAR:
case THUNK_STATIC:
case FUN_STATIC:
+ {
+ // ghc-heap's Box holds a raw captured pointer word; see the Box
+ // bullet in Note [Sanity-checking pointer tags].
+ bool box = ghc_hs_iface != NULL
+ && ACQUIRE_LOAD(&p->header.info) == Box_con_info;
+ uint32_t i;
+ for (i = 0; i < info->layout.payload.ptrs; i++) {
+ ASSERT(LOOKS_LIKE_CLOSURE_PTR(p->payload[i]));
+ if (!box) {
+ checkPtrTag(p->payload[i], true);
+ }
+ }
+ return sizeW_fromITBL(info);
+ }
+
+ // As above, but without checkPtrTag: a BLACKHOLE indirectee legitimately
+ // carries tag 0 ("not yet updated"), and PRIM/MUT_PRIM/COMPACT_NFDATA
+ // payloads are RTS-internal links.
+ // See Note [Sanity-checking pointer tags].
+ case BLACKHOLE:
+ case PRIM:
+ case MUT_PRIM:
case COMPACT_NFDATA:
{
uint32_t i;
@@ -480,6 +624,7 @@ checkClosure( const StgClosure* p )
*/
StgInd *ind = (StgInd *)p;
ASSERT(LOOKS_LIKE_CLOSURE_PTR(ind->indirectee));
+ checkPtrTag(ind->indirectee, true);
return sizeofW(StgInd);
}
@@ -529,6 +674,7 @@ checkClosure( const StgClosure* p )
uint32_t i;
for (i = 0; i < a->ptrs; i++) {
ASSERT(LOOKS_LIKE_CLOSURE_PTR(a->payload[i]));
+ checkPtrTag(a->payload[i], true);
}
return mut_arr_ptrs_sizeW(a);
}
@@ -541,6 +687,7 @@ checkClosure( const StgClosure* p )
StgSmallMutArrPtrs *a = (StgSmallMutArrPtrs *)p;
for (uint32_t i = 0; i < a->ptrs; i++) {
ASSERT(LOOKS_LIKE_CLOSURE_PTR(a->payload[i]));
+ checkPtrTag(a->payload[i], true);
}
return small_mut_arr_ptrs_sizeW(a);
}
=====================================
rts/wasm/JSFFI.c
=====================================
@@ -297,7 +297,9 @@ __attribute__((export_name("rts_promiseThrowTo")))
void rts_promiseThrowTo(HsStablePtr, HsJSVal);
void rts_promiseThrowTo(HsStablePtr sp, HsJSVal js_err) {
Capability *cap = &MainCapability;
- StgWeak *w = (StgWeak *)deRefStablePtr(sp);
+ // Weak# pointers carry tag 1; see Note [Pointer tagging of unlifted boxed
+ // primitives] in GHC.StgToCmm.Prim. (The key field is stored untagged.)
+ StgWeak *w = (StgWeak *)UNTAG_CLOSURE((StgClosure *)deRefStablePtr(sp));
if (w->header.info == &stg_DEAD_WEAK_info) {
return;
}
=====================================
testsuite/tests/codeGen/should_compile/T21710a.stderr
=====================================
@@ -53,35 +53,34 @@
}
{offset
cqw: // global
- if ((Sp + -8) < SpLim) (likely: False) goto cqx; else goto cqy; // CmmCondBranch
+ if ((Sp + -8) < SpLim) (likely: False) goto cqx; else goto cqy;
cqx: // global
- R1 = M.foo_closure; // CmmAssign
- call (stg_gc_fun)(R2, R1) args: 8, res: 0, upd: 8; // CmmCall
+ R1 = M.foo_closure;
+ call (stg_gc_fun)(R2, R1) args: 8, res: 0, upd: 8;
cqy: // global
- I64[Sp - 8] = cqo; // CmmStore
- R1 = R2; // CmmAssign
- Sp = Sp - 8; // CmmAssign
- if (R1 & 7 != 0) goto cqo; else goto cqp; // CmmCondBranch
+ I64[Sp - 8] = cqo;
+ R1 = R2;
+ Sp = Sp - 8;
+ if (R1 & 7 != 0) goto cqo; else goto cqp;
cqp: // global
- call (I64![R1])(R1) returns to cqo, args: 8, res: 8, upd: 8; // CmmCall
+ call (I64![R1])(R1) returns to cqo, args: 8, res: 8, upd: 8;
cqo: // global
- _cqv::P64 = R1 & 7; // CmmAssign
- if (_cqv::P64 != 1) goto n0; else goto cqt; // CmmCondBranch
+ _cqv::P64 = R1 & 7;
+ if (_cqv::P64 != 1) goto n0; else goto cqt;
n0: // global
- if (_cqv::P64 != 2) goto cqs; else goto cqu; // CmmCondBranch
+ if (_cqv::P64 != 2) goto cqs; else goto cqu;
cqs: // global
- // dataToTagSmall#
- R1 = R1 & 7 - 1; // CmmAssign
- Sp = Sp + 8; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ R1 = R1 & 7 - 1;
+ Sp = Sp + 8;
+ call (P64[Sp])(R1) args: 8, res: 0, upd: 8;
cqu: // global
- R1 = 42; // CmmAssign
- Sp = Sp + 8; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ R1 = 42;
+ Sp = Sp + 8;
+ call (P64[Sp])(R1) args: 8, res: 0, upd: 8;
cqt: // global
- R1 = 2; // CmmAssign
- Sp = Sp + 8; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ R1 = 2;
+ Sp = Sp + 8;
+ call (P64[Sp])(R1) args: 8, res: 0, upd: 8;
}
},
section ""data" . M.foo_closure" {
@@ -92,27 +91,7 @@
==================== Output Cmm ====================
-[section ""cstring" . cqJ_str" {
- cqJ_str:
- I8[] "A"
- },
- section ""cstring" . cqL_str" {
- cqL_str:
- I8[] "B"
- },
- section ""cstring" . cqN_str" {
- cqN_str:
- I8[] "C"
- },
- section ""cstring" . cqP_str" {
- cqP_str:
- I8[] "D"
- },
- section ""cstring" . cqR_str" {
- cqR_str:
- I8[] "E"
- },
- section ""relreadonly" . M.E_closure_tbl" {
+[section ""relreadonly" . M.E_closure_tbl" {
M.E_closure_tbl:
const M.A_closure+1;
const M.B_closure+2;
@@ -121,73 +100,63 @@
const M.E_closure+5;
},
M.A_con_entry() { // []
- { info_tbls: [(cqK,
+ { info_tbls: [(cqJ,
label: M.A_con_info
rep: HeapRep 1 nonptrs { Con {tag: 0 descr:"main:M.A"} }
srt: Nothing)]
stack_info: arg_space: 8
}
{offset
- cqK: // global
- call "ccall" arg hints: [PtrHint] result hints: [] checkEnteredTaggable(cqJ_str); // CmmUnsafeForeignCall
- R1 = R1 + 1; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ cqJ: // global
+ call stg_enteredTaggable(R1) args: 8, res: 0, upd: 8;
}
},
M.B_con_entry() { // []
- { info_tbls: [(cqM,
+ { info_tbls: [(cqK,
label: M.B_con_info
rep: HeapRep 1 nonptrs { Con {tag: 1 descr:"main:M.B"} }
srt: Nothing)]
stack_info: arg_space: 8
}
{offset
- cqM: // global
- call "ccall" arg hints: [PtrHint] result hints: [] checkEnteredTaggable(cqL_str); // CmmUnsafeForeignCall
- R1 = R1 + 2; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ cqK: // global
+ call stg_enteredTaggable(R1) args: 8, res: 0, upd: 8;
}
},
M.C_con_entry() { // []
- { info_tbls: [(cqO,
+ { info_tbls: [(cqL,
label: M.C_con_info
rep: HeapRep 1 nonptrs { Con {tag: 2 descr:"main:M.C"} }
srt: Nothing)]
stack_info: arg_space: 8
}
{offset
- cqO: // global
- call "ccall" arg hints: [PtrHint] result hints: [] checkEnteredTaggable(cqN_str); // CmmUnsafeForeignCall
- R1 = R1 + 3; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ cqL: // global
+ call stg_enteredTaggable(R1) args: 8, res: 0, upd: 8;
}
},
M.D_con_entry() { // []
- { info_tbls: [(cqQ,
+ { info_tbls: [(cqM,
label: M.D_con_info
rep: HeapRep 1 nonptrs { Con {tag: 3 descr:"main:M.D"} }
srt: Nothing)]
stack_info: arg_space: 8
}
{offset
- cqQ: // global
- call "ccall" arg hints: [PtrHint] result hints: [] checkEnteredTaggable(cqP_str); // CmmUnsafeForeignCall
- R1 = R1 + 4; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ cqM: // global
+ call stg_enteredTaggable(R1) args: 8, res: 0, upd: 8;
}
},
M.E_con_entry() { // []
- { info_tbls: [(cqS,
+ { info_tbls: [(cqN,
label: M.E_con_info
rep: HeapRep 1 nonptrs { Con {tag: 4 descr:"main:M.E"} }
srt: Nothing)]
stack_info: arg_space: 8
}
{offset
- cqS: // global
- call "ccall" arg hints: [PtrHint] result hints: [] checkEnteredTaggable(cqR_str); // CmmUnsafeForeignCall
- R1 = R1 + 5; // CmmAssign
- call (P64[Sp])(R1) args: 8, res: 0, upd: 8; // CmmCall
+ cqN: // global
+ call stg_enteredTaggable(R1) args: 8, res: 0, upd: 8;
}
}]
=====================================
testsuite/tests/codeGen/should_run/T23173a.hs
=====================================
@@ -0,0 +1,11 @@
+module Main where
+
+import T23173a_A
+
+-- Cases on an imported evaluated constructor at -O0. With LFCon conveyed in
+-- the interface the reference is tagged and never entered; without it the
+-- scrutinee is entered and --fatal-enter-taggable aborts.
+main :: IO ()
+main = case x of
+ Just b -> print b
+ Nothing -> putStrLn "nothing"
=====================================
testsuite/tests/codeGen/should_run/T23173a.stdout
=====================================
@@ -0,0 +1 @@
+True
=====================================
testsuite/tests/codeGen/should_run/T23173a_A.hs
=====================================
@@ -0,0 +1,8 @@
+module T23173a_A where
+
+-- A statically evaluated constructor value. Its interface must carry LFCon
+-- even at -O0 (where -fomit-interface-pragmas is on), so importers tag
+-- references to it. See Note [Pointer tagging of unlifted boxed primitives]
+-- in GHC.StgToCmm.Prim and mkFullIface in GHC.Iface.Make.
+x :: Maybe Bool
+x = Just True
=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -172,6 +172,8 @@ test('T12622', normal, multimod_compile_and_run, ['T12622', '-O'])
# present even at -O0) and survives hs-boot indirections. Compiled at -O0,
# where a dropped tag manifests.
test('T24136', normal, multimod_compile_and_run, ['T24136', ''])
+test('T23173a', extra_run_opts('+RTS --fatal-enter-taggable -RTS'),
+ multimod_compile_and_run, ['T23173a', ''])
test('T12757', normal, compile_and_run, [''])
test('T12855', normal, compile_and_run, [''])
test('T9577', [ unless(arch('x86_64') or arch('i386'),skip),
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3f7072d7e2d356829a3278794de537…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3f7072d7e2d356829a3278794de537…
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/ghc-9-14-building-base] Switch to GHC 9.14.2
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
31 Jul '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/ghc-9-14-building-base at Glasgow Haskell Compiler / GHC
Commits:
374e8c66 by Wolfgang Jeltsch at 2026-07-31T20:15:49+03:00
Switch to GHC 9.14.2
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1159,7 +1159,7 @@ base-with-other-ghcs-linux:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:$DOCKER_REV"
tags:
- x86_64-linux
- script: .gitlab/base-ci.sh x86_64-deb12-linux 9.14.1
+ script: .gitlab/base-ci.sh x86_64-deb12-linux 9.14.2
rules:
- *full-ci
@@ -1176,7 +1176,7 @@ base-with-other-ghcs-windows:
image: null
tags:
- x86_64-windows
- script: bash .gitlab/base-ci.sh x86_64-unknown-mingw32 9.14.1
+ script: bash .gitlab/base-ci.sh x86_64-unknown-mingw32 9.14.2
rules:
- *full-ci
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/374e8c66d214362b1201d2812ab48ca…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/374e8c66d214362b1201d2812ab48ca…
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] 5 commits: Document features that the example Haskell module uses
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
by Wolfgang Jeltsch (@jeltsch) 31 Jul '26
31 Jul '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC
Commits:
48d1dfd5 by Wolfgang Jeltsch at 2026-07-31T16:14:08+03:00
Document features that the example Haskell module uses
- - - - -
67a76a06 by Wolfgang Jeltsch at 2026-07-31T16:17:16+03:00
Lower the threshold for a word being considered large
- - - - -
61c11620 by Wolfgang Jeltsch at 2026-07-31T16:46:22+03:00
Make test output independent of the word size
- - - - -
5bb1d01e by Wolfgang Jeltsch at 2026-07-31T18:07:11+03:00
Add Note [Guidelines for the output of @--show-byte-code@]
- - - - -
23abd3fa by Wolfgang Jeltsch at 2026-07-31T20:06:44+03:00
Add test output for JavaScript
- - - - -
9 changed files:
- compiler/GHC/ByteCode/Show.hs
- testsuite/tests/show-bytecode/Example.hs
- testsuite/tests/show-bytecode/Makefile
- testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout
- + testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-javascript-unknown-ghcjs
- testsuite/tests/show-bytecode/show-bytecode-hpc.stdout
- + testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-javascript-unknown-ghcjs
- testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout
- + testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-javascript-unknown-ghcjs
Changes:
=====================================
compiler/GHC/ByteCode/Show.hs
=====================================
@@ -77,6 +77,36 @@ import Data.Array (bounds, indices, elems)
import Numeric (showHex)
import GHC.Exts (Int (I#), Word (W#), int2Word#)
+{-
+
+Note [Guidelines for the output of @--show-byte-code@]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The output of @--show-byte-code@ shall be shaped according to the following
+rules:
+
+ * The output is not a complete textual representation of the contents of a
+ bytecode file. Parts that are likely of little or no interest to a human
+ reader are left out. An example of such a “missing” part is the array of
+ instructions in a bytecode object.
+
+ * The shape of the output corresponds to a forest, whose structure closely
+ follows the structure of the bytecode representation within the compiler.
+ The textual representation of each subtree of this forest is generated using
+ the 'entry' operation defined in this module.
+
+ * Single quotes are put around items (using the 'quotes' operation) where this
+ makes it easier to distinguish the items from surrounding text. Examples of
+ items with quotes around them are names and types. Integer and string
+ literals are output without quotes, because they stick out by themselves.
+
+ * Infix operators are output with parentheses around them. To ensure that this
+ is always the case, all textual representations of names are generated using
+ the 'pprName' operation, defined in this module, instead of the 'ppr'
+ operation.
+
+-}
+
-- | Outputs textual information about the contents of a bytecode file.
showByteCode :: Logger -> HscEnv -> FilePath -> IO ()
showByteCode logger env path = do
@@ -85,6 +115,8 @@ showByteCode logger env path = do
MCDump
noSrcSpan
(withPprStyle defaultDumpStyle $ pprOnDiskModuleByteCode byteCode)
+-- The output generated by 'showByteCode' shall follow some general guidelines.
+-- See Note [Guidelines for the output of @--show-byte-code@] for details.
-- | Constructs textual information about the contents of a bytecode file.
pprOnDiskModuleByteCode :: OnDiskModuleByteCode -> SDoc
=====================================
testsuite/tests/show-bytecode/Example.hs
=====================================
@@ -1,5 +1,14 @@
{-# LANGUAGE StaticPointers #-}
+-- | This module uses in particular the following features:
+--
+-- * Local variables defined in `where` clauses
+-- * Integer literals
+-- * Infix operators
+-- * Recursion
+-- * Static pointers
+-- * Algebraic-datatype declarations
+-- * Foreign import declarations
module Example where
import Numeric.Natural (Natural)
=====================================
testsuite/tests/show-bytecode/Makefile
=====================================
@@ -2,14 +2,25 @@ TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
-compile = '$(TEST_HC)' $(TEST_HC_OPTS) -fbyte-code -fwrite-byte-code -no-link
-show = '$(TEST_HC)' $(TEST_HC_OPTS) --show-byte-code
-normalize = sed -E -e ' \
- s/_r[[:alnum:]]+/_@name_suffix@/g; \
- s/^( *hash: )[[:xdigit:]]+/\1@hash@/g; \
- s/^( *)[[:xdigit:]]+:/\1@hash@:/g; \
- s/word [[:digit:]]{4}[[:digit:]]*/word @large_word@/ \
- '
+compile = '$(TEST_HC)' $(TEST_HC_OPTS) \
+ -fbyte-code -fwrite-byte-code -no-link
+show = '$(TEST_HC)' $(TEST_HC_OPTS) \
+ --show-byte-code
+stabilize = sed -E -e ' \
+ s/_r[[:alnum:]]+/_@name_suffix@/g; \
+ s/^( *hash: )[[:xdigit:]]+/\1@hash@/g; \
+ s/^( *)[[:xdigit:]]+:/\1@hash@:/g; \
+ s/word [[:digit:]]{2}[[:digit:]]*/word @large_word@/ \
+ '
+universalize = sed -E -e ' \
+ s/UInt[[:digit:]]+/UInt@word_size@/; \
+ s/W[[:digit:]]+#/W@word_size@#/ \
+ ' | \
+ uniq
+normalize = $(stabilize) | $(universalize)
+# The invocation of `uniq` in `$(universalize)` is merely for collapsing
+# adjacent entries of `word @large_word@`, whose number may depend on the word
+# size.
show-bytecode-vanilla:
$(compile) Example.hs
=====================================
testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout
=====================================
@@ -18,7 +18,6 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
used items:
named item ‘static_ptr1_sat_@name_suffix@’
named item ‘primes’
@@ -28,8 +27,6 @@ objects:
literals: <none>
used items:
named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -52,16 +49,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 29
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 20
+ literals: word @large_word@
used items: <none>
object ‘primes’:
arity: 0
@@ -211,7 +207,6 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
used items:
named item ‘static_ptr_sat_@name_suffix@’
named item ‘fibonaccis’
@@ -221,8 +216,6 @@ objects:
literals: <none>
used items:
named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -245,16 +238,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 17
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 24
+ literals: word @large_word@
used items: <none>
object ‘fibonaccis’:
arity: 0
@@ -336,17 +328,16 @@ objects:
literals:
label ‘strlen’
word 0
- foreign function of type ‘Pointer -> UInt64’
+ foreign function of type ‘Pointer -> UInt@word_size@’
used items:
object ‘wild_@name_suffix@’:
arity: 0
- literals: info table of ‘W64#’
+ literals: info table of ‘W@word_size@#’
used items: <none>
static-construction object ‘$tc'Nested’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -383,7 +374,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -420,7 +410,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
@@ -436,7 +425,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -468,12 +456,10 @@ objects:
literals: <none>
used items:
named item ‘$krep7_@name_suffix@’
- named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -517,7 +503,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
@@ -666,89 +651,89 @@ top-level strings:
breakpoints:
source breakpoints:
source breakpoint 0:
- source span: Example.hs:20:17-25
+ source span: Example.hs:29:17-25
declaration path: divides
free variables:
k
n
source breakpoint 1:
- source span: Example.hs:20:17-30
+ source span: Example.hs:29:17-30
declaration path: divides
free variables:
k
n
source breakpoint 2:
- source span: Example.hs:26:27-37
+ source span: Example.hs:35:27-37
declaration path:
primes
isPrime
free variables: n
source breakpoint 3:
- source span: Example.hs:26:53-56
+ source span: Example.hs:35:53-56
declaration path:
primes
isPrime
free variables: n
source breakpoint 4:
- source span: Example.hs:26:62-64
+ source span: Example.hs:35:62-64
declaration path:
primes
isPrime
free variables: <none>
source breakpoint 5:
- source span: Example.hs:26:52-65
+ source span: Example.hs:35:52-65
declaration path:
primes
isPrime
free variables: n
source breakpoint 6:
- source span: Example.hs:26:41-73
+ source span: Example.hs:35:41-73
declaration path:
primes
isPrime
free variables: n
source breakpoint 7:
- source span: Example.hs:26:22-74
+ source span: Example.hs:35:22-74
declaration path:
primes
isPrime
free variables: n
source breakpoint 8:
- source span: Example.hs:26:17-75
+ source span: Example.hs:35:17-75
declaration path:
primes
isPrime
free variables: n
source breakpoint 9:
- source span: Example.hs:23:14-34
+ source span: Example.hs:32:14-34
declaration path: primes
free variables: isPrime
source breakpoint 10:
- source span: Example.hs:23:10-34
+ source span: Example.hs:32:10-34
declaration path: primes
free variables: isPrime
source breakpoint 11:
- source span: Example.hs:29:13-25
+ source span: Example.hs:38:13-25
declaration path: primesPtr
free variables: <none>
source breakpoint 12:
- source span: Example.hs:14:30-70
+ source span: Example.hs:23:30-70
declaration path:
fibonaccis
positiveFibonaccis
free variables: positiveFibonaccis
source breakpoint 13:
- source span: Example.hs:14:26-70
+ source span: Example.hs:23:26-70
declaration path:
fibonaccis
positiveFibonaccis
free variables: positiveFibonaccis
source breakpoint 14:
- source span: Example.hs:11:14-35
+ source span: Example.hs:20:14-35
declaration path: fibonaccis
free variables: positiveFibonaccis
source breakpoint 15:
- source span: Example.hs:17:17-33
+ source span: Example.hs:26:17-33
declaration path: fibonaccisPtr
free variables: <none>
bytecode breakpoints:
=====================================
testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-javascript-unknown-ghcjs
=====================================
@@ -0,0 +1,832 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 0
+ used items:
+ break array of module ‘Example’
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘primes’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 2
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 1
+ used items:
+ break array of module ‘Example’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘primes_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 2
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 9
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 8
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 7
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 6
+ used items:
+ break array of module ‘Example’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 5
+ word 2
+ info table of ‘IS’
+ used items:
+ break array of module ‘Example’
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 4
+ used items:
+ break array of module ‘Example’
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘primes’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 3
+ used items:
+ break array of module ‘Example’
+ object ‘pap_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 10
+ used items:
+ break array of module ‘Example’
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘fibonaccis’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 11
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘fibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 0
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 13
+ info table of ‘(:)’
+ used items:
+ break array of module ‘Example’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 12
+ used items:
+ break array of module ‘Example’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘fibonaccis’
+ named item ‘zipWith’
+ object ‘positiveFibonaccis_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 1
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dNum_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dEq_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘$dEq1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘bcprep_@name_suffix@’:
+ arity: 5
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 15
+ used items:
+ break array of module ‘Example’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 0
+ info table of ‘IS’
+ used items: named item ‘fromInteger’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals:
+ top-level string "Example"
+ top-level string "main"
+ cost center of breakpoint 14
+ used items:
+ break array of module ‘Example’
+ named item ‘mod’
+ named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints:
+ source breakpoints:
+ source breakpoint 0:
+ source span: Example.hs:29:17-25
+ declaration path: divides
+ free variables:
+ k
+ n
+ source breakpoint 1:
+ source span: Example.hs:29:17-30
+ declaration path: divides
+ free variables:
+ k
+ n
+ source breakpoint 2:
+ source span: Example.hs:35:27-37
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 3:
+ source span: Example.hs:35:53-56
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 4:
+ source span: Example.hs:35:62-64
+ declaration path:
+ primes
+ isPrime
+ free variables: <none>
+ source breakpoint 5:
+ source span: Example.hs:35:52-65
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 6:
+ source span: Example.hs:35:41-73
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 7:
+ source span: Example.hs:35:22-74
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 8:
+ source span: Example.hs:35:17-75
+ declaration path:
+ primes
+ isPrime
+ free variables: n
+ source breakpoint 9:
+ source span: Example.hs:32:14-34
+ declaration path: primes
+ free variables: isPrime
+ source breakpoint 10:
+ source span: Example.hs:32:10-34
+ declaration path: primes
+ free variables: isPrime
+ source breakpoint 11:
+ source span: Example.hs:38:13-25
+ declaration path: primesPtr
+ free variables: <none>
+ source breakpoint 12:
+ source span: Example.hs:23:30-70
+ declaration path:
+ fibonaccis
+ positiveFibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 13:
+ source span: Example.hs:23:26-70
+ declaration path:
+ fibonaccis
+ positiveFibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 14:
+ source span: Example.hs:20:14-35
+ declaration path: fibonaccis
+ free variables: positiveFibonaccis
+ source breakpoint 15:
+ source span: Example.hs:26:17-33
+ declaration path: fibonaccisPtr
+ free variables: <none>
+ bytecode breakpoints:
+ bytecode breakpoint 0:
+ type: StaticPtr [Natural]
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 11
+ bytecode breakpoint 1:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 9
+ bytecode breakpoint 2:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 10
+ bytecode breakpoint 3:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 2
+ bytecode breakpoint 4:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 3
+ bytecode breakpoint 5:
+ type: Natural -> Natural
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 4
+ bytecode breakpoint 6:
+ type: Natural -> Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 5
+ bytecode breakpoint 7:
+ type: [Natural]
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 6
+ bytecode breakpoint 8:
+ type: Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 7
+ bytecode breakpoint 9:
+ type: Bool
+ type variables: <none>
+ variables: %'Many n :: Natural
+ corresponding source breakpoint: 8
+ bytecode breakpoint 10:
+ type: StaticPtr [Natural]
+ type variables: <none>
+ variables: <none>
+ corresponding source breakpoint: 15
+ bytecode breakpoint 11:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 14
+ bytecode breakpoint 12:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 12
+ bytecode breakpoint 13:
+ type: [Natural]
+ type variables: <none>
+ variables: <unknown>
+ corresponding source breakpoint: 13
+ bytecode breakpoint 14:
+ type: a
+ type variables: a :: *
+ variables:
+ %'Many eta :: a
+ %'Many eta1 :: a
+ corresponding source breakpoint: 0
+ bytecode breakpoint 15:
+ type: Bool
+ type variables: a :: *
+ variables:
+ %'Many eta :: a
+ %'Many eta1 :: a
+ corresponding source breakpoint: 1
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information: <none>
+
=====================================
testsuite/tests/show-bytecode/show-bytecode-hpc.stdout
=====================================
@@ -6,7 +6,6 @@ objects:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
- label ‘_hpc_tickboxes_Example_hpc’
used items:
named item ‘static_ptr1’
named item ‘$dTypeable2_@name_suffix@’
@@ -16,18 +15,14 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
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: StaticPtrInfo
lifted: yes
literals: <none>
used items:
named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -50,16 +45,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 29
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 20
+ literals: word @large_word@
used items: <none>
object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
@@ -93,7 +87,6 @@ objects:
arity: 1
literals:
label ‘_hpc_tickboxes_Example_hpc’
- label ‘_hpc_tickboxes_Example_hpc’
used items:
object ‘isPrime_sat_@name_suffix@’:
arity: 1
@@ -181,7 +174,6 @@ objects:
object ‘primes’:
arity: 0
literals:
- label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘(:)’
used items:
@@ -200,7 +192,6 @@ objects:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
- label ‘_hpc_tickboxes_Example_hpc’
used items:
named item ‘static_ptr’
named item ‘$dTypeable2_@name_suffix@’
@@ -210,18 +201,14 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
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: StaticPtrInfo
lifted: yes
literals: <none>
used items:
named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -244,16 +231,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 17
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 24
+ literals: word @large_word@
used items: <none>
object ‘static_ptr_sat_@name_suffix@’:
arity: 0
@@ -262,7 +248,6 @@ objects:
object ‘positiveFibonaccis1_@name_suffix@’:
arity: 0
literals:
- label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘(:)’
used items:
@@ -290,7 +275,6 @@ objects:
object ‘fibonaccis’:
arity: 0
literals:
- label ‘_hpc_tickboxes_Example_hpc’
label ‘_hpc_tickboxes_Example_hpc’
info table of ‘(:)’
used items:
@@ -346,17 +330,16 @@ objects:
literals:
label ‘strlen’
word 0
- foreign function of type ‘Pointer -> UInt64’
+ foreign function of type ‘Pointer -> UInt@word_size@’
used items:
object ‘wild_@name_suffix@’:
arity: 0
- literals: info table of ‘W64#’
+ literals: info table of ‘W@word_size@#’
used items: <none>
static-construction object ‘$tc'Nested’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -393,7 +376,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -430,7 +412,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
@@ -446,7 +427,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -478,12 +458,10 @@ objects:
literals: <none>
used items:
named item ‘$krep7_@name_suffix@’
- named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -527,7 +505,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
@@ -595,7 +572,6 @@ objects:
arity: 0
literals:
label ‘_hpc_tickboxes_Example_hpc’
- label ‘_hpc_tickboxes_Example_hpc’
used items:
object ‘divides_sat_@name_suffix@’:
arity: 1
=====================================
testsuite/tests/show-bytecode/show-bytecode-hpc.stdout-javascript-unknown-ghcjs
=====================================
@@ -0,0 +1,662 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘primes’
+ object ‘primes2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘primes’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘v1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 2
+ info table of ‘IS’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘v1_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘pap_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ object ‘v1_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘pap_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ object ‘primes’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘primes2_@name_suffix@’
+ named item ‘primes1_@name_suffix@’
+ object ‘primes1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 2
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘fibonaccis’
+ object ‘positiveFibonaccis1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘positiveFibonaccis2_@name_suffix@’
+ named item ‘positiveFibonaccis_@name_suffix@’
+ object ‘positiveFibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘fibonaccis’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ named item ‘zipWith’
+ object ‘fibonaccis’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ info table of ‘(:)’
+ used items:
+ named item ‘fibonaccis2_@name_suffix@’
+ named item ‘fibonaccis1_@name_suffix@’
+ object ‘fibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 1
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘fibonaccis1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 0
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ label ‘_hpc_tickboxes_Example_hpc’
+ word 0
+ info table of ‘IS’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals: label ‘_hpc_tickboxes_Example_hpc’
+ used items: <none>
+ named item ‘mod’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints: <none>
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information:
+ hash: @hash@
+ tick box: _hpc_tickboxes_Example_hpc
+ number of ticks: 45
+
=====================================
testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout
=====================================
@@ -14,7 +14,6 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
used items:
named item ‘static_ptr1_sat_@name_suffix@’
named item ‘primes’
@@ -24,8 +23,6 @@ objects:
literals: <none>
used items:
named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
- named item ‘static_ptr1_sat_@name_suffix@’
object ‘static_ptr1_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -48,16 +45,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 29
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr1_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 20
+ literals: word @large_word@
used items: <none>
object ‘primes2_@name_suffix@’:
arity: 0
@@ -162,7 +158,6 @@ objects:
lifted: yes
literals:
word @large_word@
- word @large_word@
used items:
named item ‘static_ptr_sat_@name_suffix@’
named item ‘fibonaccis’
@@ -172,8 +167,6 @@ objects:
literals: <none>
used items:
named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
- named item ‘static_ptr_sat_@name_suffix@’
object ‘static_ptr_sat_@name_suffix@’:
arity: 0
literals: top-level string "main"
@@ -196,16 +189,15 @@ objects:
literals: <none>
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: I#
lifted: yes
- literals: word 17
+ literals: word @large_word@
used items: <none>
static-construction object ‘static_ptr_sat_@name_suffix@’:
data constructor: I#
lifted: yes
- literals: word 24
+ literals: word @large_word@
used items: <none>
object ‘positiveFibonaccis2_@name_suffix@’:
arity: 0
@@ -287,17 +279,16 @@ objects:
literals:
label ‘strlen’
word 0
- foreign function of type ‘Pointer -> UInt64’
+ foreign function of type ‘Pointer -> UInt@word_size@’
used items:
object ‘wild_@name_suffix@’:
arity: 0
- literals: info table of ‘W64#’
+ literals: info table of ‘W@word_size@#’
used items: <none>
static-construction object ‘$tc'Nested’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -334,7 +325,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 1
used items:
@@ -371,7 +361,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
@@ -387,7 +376,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -419,12 +407,10 @@ objects:
literals: <none>
used items:
named item ‘$krep7_@name_suffix@’
- named item ‘$krep7_@name_suffix@’
static-construction object ‘$tc'Leaf’:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 2
used items:
@@ -468,7 +454,6 @@ objects:
data constructor: TyCon
lifted: yes
literals:
- word @large_word@
word @large_word@
word 0
used items:
=====================================
testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-javascript-unknown-ghcjs
=====================================
@@ -0,0 +1,597 @@
+[1 of 1] Compiling Example ( Example.hs, Example.gbc )
+module: Example
+hash: @hash@
+objects:
+ object ‘primesPtr’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘static_ptr1’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr1’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ named item ‘primes’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr1_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr1_sat_@name_suffix@’
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr1_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘primes2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘primes2_sat_@name_suffix@’
+ named item ‘isPrime_@name_suffix@’
+ named item ‘filter’
+ object ‘isPrime_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals: <none>
+ used items:
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 2
+ info table of ‘IS’
+ used items:
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fIntegralInteger’
+ named item ‘$fNumNatural’
+ named item ‘(^)’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ object ‘v_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fOrdNatural’
+ named item ‘(<=)’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: <none>
+ named item ‘(.)’
+ named item ‘primes’
+ named item ‘takeWhile’
+ object ‘isPrime_sat_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ used items:
+ named item ‘$fIntegralNatural’
+ named item ‘divides’
+ named item ‘$fFoldableList’
+ named item ‘any’
+ named item ‘not’
+ static-construction object ‘primes’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘primes1_@name_suffix@’
+ named item ‘primes2_@name_suffix@’
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘primes2_sat_@name_suffix@’:
+ arity: 0
+ literals:
+ word 3
+ info table of ‘IS’
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ named item ‘$fEnumNatural’
+ named item ‘enumFrom’
+ object ‘primes1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘primes1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘primes1_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 2
+ used items: <none>
+ object ‘fibonaccisPtr’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘static_ptr’
+ named item ‘$dTypeable2_@name_suffix@’
+ named item ‘$fIsStaticStaticPtr’
+ static-construction object ‘static_ptr’:
+ data constructor: StaticPtr
+ lifted: yes
+ literals:
+ word @large_word@
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ named item ‘fibonaccis’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: StaticPtrInfo
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "main"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: top-level string "Example"
+ used items:
+ object ‘static_ptr_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘unpackCString#’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: (,)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘static_ptr_sat_@name_suffix@’
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ static-construction object ‘static_ptr_sat_@name_suffix@’:
+ data constructor: I#
+ lifted: yes
+ literals: word @large_word@
+ used items: <none>
+ object ‘positiveFibonaccis2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ 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: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘positiveFibonaccis_@name_suffix@’
+ named item ‘positiveFibonaccis2_@name_suffix@’
+ static-construction object ‘fibonaccis’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘fibonaccis1_@name_suffix@’
+ named item ‘positiveFibonaccis1_@name_suffix@’
+ object ‘positiveFibonaccis2_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$fNumNatural’
+ named item ‘(+)’
+ object ‘positiveFibonaccis_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘positiveFibonaccis_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘positiveFibonaccis_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ object ‘fibonaccis1_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘fibonaccis1_sat_@name_suffix@’
+ named item ‘$fNumNatural’
+ named item ‘fromInteger’
+ static-construction object ‘fibonaccis1_sat_@name_suffix@’:
+ data constructor: IS
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ object ‘$dTypeable2_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ named item ‘$dTypeable_@name_suffix@’
+ named item ‘$dTypeable1_@name_suffix@’
+ named item ‘mkTrAppChecked’
+ object ‘$dTypeable1_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcList’
+ named item ‘mkTrCon’
+ object ‘$dTypeable_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘[]’
+ used items:
+ named item ‘$tcNatural’
+ named item ‘mkTrCon’
+ object ‘cstrlen’:
+ arity: 2
+ literals: <none>
+ used items:
+ object ‘ds1_@name_suffix@’:
+ arity: 0
+ literals:
+ label ‘strlen’
+ word 0
+ foreign function of type ‘Pointer -> UInt@word_size@’
+ used items:
+ object ‘wild_@name_suffix@’:
+ arity: 0
+ literals: info table of ‘W@word_size@#’
+ used items: <none>
+ static-construction object ‘$tc'Nested’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Nested1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep17_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep16_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep16_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep15_@name_suffix@’
+ static-construction object ‘$krep15_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep4_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tc'PerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ used items: named item ‘cstrlen1_@name_suffix@’
+ object ‘cstrlen1_@name_suffix@’:
+ arity: 2
+ literals: <none>
+ literals:
+ word @large_word@
+ word 1
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'PerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep14_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep13_@name_suffix@’
+ static-construction object ‘$krep13_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcPerfectTree’
+ named item ‘$krep12_@name_suffix@’
+ static-construction object ‘$krep12_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcPerfectTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcPerfectTree2_@name_suffix@’
+ named item ‘krep$*Arr*’
+ static-construction object ‘$tcPerfectTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcPerfectTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$tc'Node’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Node1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep11_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ named item ‘$krep10_@name_suffix@’
+ static-construction object ‘$krep10_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘$krep9_@name_suffix@’
+ static-construction object ‘$krep9_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$tc'Leaf’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 2
+ 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: TrNameS
+ lifted: yes
+ literals: address ‘$tc'Leaf1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep8_@name_suffix@’:
+ data constructor: KindRepFun
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep7_@name_suffix@’
+ static-construction object ‘$krep7_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcBinTree’
+ named item ‘$krep6_@name_suffix@’
+ static-construction object ‘$krep6_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep5_@name_suffix@’
+ static-construction object ‘$krep5_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$tcBinTree’:
+ data constructor: TyCon
+ lifted: yes
+ literals:
+ word @large_word@
+ word 0
+ used items:
+ named item ‘$trModule’
+ named item ‘$tcBinTree2_@name_suffix@’
+ named item ‘krep$*->*->*’
+ static-construction object ‘$tcBinTree2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$tcBinTree1_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$krep4_@name_suffix@’:
+ data constructor: KindRepTyConApp
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$tcTuple2’
+ named item ‘$krep3_@name_suffix@’
+ static-construction object ‘$krep3_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘$krep2_@name_suffix@’
+ static-construction object ‘$krep2_@name_suffix@’:
+ data constructor: (:)
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$krep1_@name_suffix@’
+ named item ‘[]’
+ static-construction object ‘$krep1_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 0
+ used items: <none>
+ static-construction object ‘$krep_@name_suffix@’:
+ data constructor: KindRepVar
+ lifted: yes
+ literals: word 1
+ used items: <none>
+ static-construction object ‘$trModule’:
+ data constructor: Module
+ lifted: yes
+ literals: <none>
+ used items:
+ named item ‘$trModule2_@name_suffix@’
+ named item ‘$trModule4_@name_suffix@’
+ static-construction object ‘$trModule4_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule3_@name_suffix@’
+ used items: <none>
+ static-construction object ‘$trModule2_@name_suffix@’:
+ data constructor: TrNameS
+ lifted: yes
+ literals: address ‘$trModule1_@name_suffix@’
+ used items: <none>
+ object ‘divides’:
+ arity: 3
+ literals: <none>
+ used items:
+ object ‘$dReal_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 1
+ literals:
+ word 0
+ info table of ‘IS’
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘fromInteger’
+ named item ‘$p1Real’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 3
+ literals: <none>
+ used items: named item ‘mod’
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items:
+ object ‘divides_sat_@name_suffix@’:
+ arity: 0
+ literals: <none>
+ used items: named item ‘(==)’
+ named item ‘$p1Ord’
+ named item ‘$p2Real’
+ named item ‘$p1Integral’
+ object ‘Node’:
+ arity: 3
+ literals: info table of ‘Node’
+ used items: <none>
+ object ‘Leaf’:
+ arity: 1
+ literals: info table of ‘Leaf’
+ used items: <none>
+ object ‘Nested’:
+ arity: 1
+ literals: info table of ‘Nested’
+ used items: <none>
+ object ‘PerfectTree’:
+ arity: 1
+ literals: info table of ‘PerfectTree’
+ used items: <none>
+data constructor info tables:
+ info table of ‘PerfectTree’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Nested’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Leaf’:
+ number of words for pointers: 1
+ number of words for non-pointers: 0
+ info table of ‘Node’:
+ number of words for pointers: 3
+ number of words for non-pointers: 0
+top-level strings:
+ $tc'Nested1_@name_suffix@: "'Nested"
+ $tc'PerfectTree1_@name_suffix@: "'PerfectTree"
+ $tcPerfectTree1_@name_suffix@: "PerfectTree"
+ $tc'Node1_@name_suffix@: "'Node"
+ $tc'Leaf1_@name_suffix@: "'Leaf"
+ $tcBinTree1_@name_suffix@: "BinTree"
+ $trModule3_@name_suffix@: "Example"
+ $trModule1_@name_suffix@: "main"
+breakpoints: <none>
+static-pointer table entries:
+ @hash@: static_ptr
+ @hash@: static_ptr1
+HPC information: <none>
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/190a66f48204a923d766f9ebd71b8c…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/190a66f48204a923d766f9ebd71b8c…
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/T27455] base: Don't drop exception context in SomeException(toException)
by sheaf (@sheaf) 31 Jul '26
by sheaf (@sheaf) 31 Jul '26
31 Jul '26
sheaf pushed to branch wip/T27455 at Glasgow Haskell Compiler / GHC
Commits:
d955fe1e by Ben Gamari at 2026-07-31T18:56:19+02:00
base: Don't drop exception context in SomeException(toException)
For reasons that are lost to time, the implementation of [CLC #200]
that was merged inappropriately dropped `ExceptionContext` in the
`toException` implementation given to `SomeException`.
Fix this infelicity.
[CLC #200]: https://github.com/haskell/core-libraries-committee/issues/200
- - - - -
4 changed files:
- + changelog.d/T27455
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- testsuite/tests/ghc-e/should_run/ghc-e005.stderr
Changes:
=====================================
changelog.d/T27455
=====================================
@@ -0,0 +1,8 @@
+section: base
+issues: #27455
+mrs: !16274
+synopsis:
+ Don't drop `ExceptionContext` in `SomeException(toException)`
+description:
+ Previously the implementation of ``Exception(toException)`` given to `SomeException` would inappropriately drop the carried `ExceptionContext`. Now ``toException = id``, faithfully implementing the semantics proposed in :ref:`CLC Proposal #200 <https://github.com/haskell/core-libraries-committee/issues/200>`.
+
=====================================
libraries/base/changelog.md
=====================================
@@ -33,6 +33,7 @@
* Evaluate backtraces for "error" exceptions at the moment they are thrown. ([CLC proposal #383](https://github.com/haskell/core-libraries-committee/issues/383))
* Hide implementation details when throwing exceptions in throw and throwSTM. ([CLC proposal #387](https://github.com/haskell/core-libraries-committee/issues/387))
* Change `hIsReadable` and `hIsWritable` such that they always throw a respective exception when encountering a closed or semi-closed handle, not just in the case of a file handle. ([CLC proposal #371](github.com/haskell/core-libraries-committee/issues/371))
+ * The implementation of `toException` in `SomeException`'s `Exception` instance no longer drops exception context, in keeping with the behavior originally proposed in [CLC Proposal #200](https://github.com/haskell/core-libraries-committee/issues/200).
* Annotate `onException` continuation with `WhileHandling`. ([CLC Proposal #397](https://github.com/haskell/core-libraries-committee/issues/397))
* Improve error message for `Data.Char.chr`. ([CLC Proposal #384](https://github.com/haskell/core-libraries-committee/issues/384))
=====================================
libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
=====================================
@@ -55,7 +55,7 @@ import GHC.Internal.Data.Maybe
import GHC.Internal.Data.Typeable (Typeable, TypeRep, cast)
import qualified GHC.Internal.Data.Typeable as Typeable
-- loop: GHC.Internal.Data.Typeable -> GHC.Internal.Err -> GHC.Internal.Exception
-import GHC.Internal.Base (String, Void, fmap, return, ($), (.), (++))
+import GHC.Internal.Base (String, Void, fmap, return, ($), (.), (++), id)
import GHC.Internal.Show
import GHC.Internal.Types (Bool(..))
import GHC.Internal.Exception.Context
@@ -208,7 +208,16 @@ Caught MismatchedParentheses
-}
class (Typeable e, Show e) => Exception e where
- -- | @toException@ should produce a 'SomeException' with no attached 'ExceptionContext'.
+ -- | 'toException' converts an exception into the existential 'SomeException'
+ -- wrapper type.
+ --
+ -- In doing so, 'toException' should not /add/ an 'ExceptionContext'.
+ --
+ -- - In most cases, the exception does not store its own 'ExceptionContext'.
+ -- The default implementation of 'toException' (which does not store any
+ -- 'ExceptionContext') is suitable for these cases.
+ -- - In the rare case that the exception itself stores an 'ExceptionContext',
+ -- this context should be preserved by 'toException'.
toException :: e -> SomeException
fromException :: SomeException -> Maybe e
@@ -231,13 +240,11 @@ class (Typeable e, Show e) => Exception e where
-- | @since base-4.8.0.0
instance Exception Void
--- | This drops any attached 'ExceptionContext'.
+-- | NB: this instance preserves the attached 'ExceptionContext'.
--
-- @since base-3.0
instance Exception SomeException where
- toException (SomeException e) =
- let ?exceptionContext = emptyExceptionContext
- in SomeException e
+ toException = id
fromException = Just
backtraceDesired (SomeException e) = backtraceDesired e
displayException (SomeException e) = displayException e
=====================================
testsuite/tests/ghc-e/should_run/ghc-e005.stderr
=====================================
@@ -4,3 +4,8 @@ foo
HasCallStack backtrace:
error, called at ghc-e005.hs:12:10 in main:Main
+
+
+HasCallStack backtrace:
+ throwIO, called at ghc\GHCi\UI.hs:1655:31 in ghc-bin-10.1.20260629-inplace:GHCi.UI
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d955fe1e7197fecca6fd319ff55318e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d955fe1e7197fecca6fd319ff55318e…
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