Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC Commits: d7804631 by Wolfgang Jeltsch at 2026-05-28T18:49:08+03:00 Type wobbling - - - - - 1 changed file: - compiler/GHC/ByteCode/Show.hs Changes: ===================================== compiler/GHC/ByteCode/Show.hs ===================================== @@ -1,3 +1,4 @@ +{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -15,7 +16,11 @@ import Data.String (String) import Data.ByteString (ByteString, null, length, unpack) import Numeric (showHex) import System.IO (IO, FilePath) +import GHC.Data.Strict qualified as Strict (maybe) +import GHC.Data.FlatBag (FlatBag) import GHC.Types.SrcLoc (noSrcSpan) +import GHC.Types.Name (Name) +import GHC.Types.SptEntry (SptEntry) import GHC.Types.Error (MessageClass (MCDump)) import GHC.Utils.Logger (Logger, logMsg) import GHC.Utils.Outputable @@ -30,10 +35,12 @@ import GHC.Utils.Outputable withPprStyle, ppr ) -import GHC.ByteCode.Types (CompiledByteCode (..)) +import GHC.ByteCode.Types (UnlinkedBCO, ByteCodeHpcInfo, CompiledByteCode (..)) +import GHC.ByteCode.Breakpoints (InternalModBreaks) import GHC.ByteCode.Binary (OnDiskModuleByteCode (..)) import GHC.ByteCode.Serialize (readOnDiskModuleByteCode) import GHC.Driver.Env.Types (HscEnv) +import GHCi.Message (ConInfoTable) -- | […] showByteCode :: Logger -> HscEnv -> FilePath -> IO () @@ -77,31 +84,31 @@ pprCompiledByteCode CompiledByteCode {..} text "static-pointer table entries:" <+> pprStaticPointerTableEntries bc_spt_entries, text "HPC information:" - <+> pprHPCInfo bc_hpc_info + <+> Strict.maybe (text "<none>") pprHPCInfo bc_hpc_info ] -- | […] -pprByteCodeObjects :: a -> SDoc +pprByteCodeObjects :: FlatBag UnlinkedBCO -> SDoc pprByteCodeObjects = pprByteCodeObjects -- | […] -pprDataConstructorInfoTables :: a -> SDoc +pprDataConstructorInfoTables :: [(Name, ConInfoTable)] -> SDoc pprDataConstructorInfoTables = pprDataConstructorInfoTables -- | […] -pprTopLevelStrings :: a -> SDoc +pprTopLevelStrings :: [(Name, ByteString)] -> SDoc pprTopLevelStrings = pprTopLevelStrings -- | […] -pprInternalBreakPoints :: a -> SDoc +pprInternalBreakPoints :: InternalModBreaks -> SDoc pprInternalBreakPoints = pprInternalBreakPoints -- | […] -pprStaticPointerTableEntries :: a -> SDoc +pprStaticPointerTableEntries :: [SptEntry] -> SDoc pprStaticPointerTableEntries = pprStaticPointerTableEntries -- | […] -pprHPCInfo :: a -> SDoc +pprHPCInfo :: ByteCodeHpcInfo -> SDoc pprHPCInfo = pprHPCInfo -- | […] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d780463106be003328b9b562790bef95... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d780463106be003328b9b562790bef95... You're receiving this email because of your account on gitlab.haskell.org.