[Git][ghc/ghc][master] Add a frozen callstack to throwGhcException

Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: b968e1c1 by Rodrigo Mesquita at 2025-06-18T15:36:18-04:00 Add a frozen callstack to throwGhcException Fixes #25956 - - - - - 1 changed file: - compiler/GHC/Utils/Panic.hs Changes: ===================================== compiler/GHC/Utils/Panic.hs ===================================== @@ -177,7 +177,7 @@ showGhcException ctx = showPlainGhcException . \case PprProgramError str sdoc -> PlainProgramError $ concat [str, "\n\n", renderWithContext ctx sdoc] -throwGhcException :: GhcException -> a +throwGhcException :: HasCallStack => GhcException -> a throwGhcException = Exception.throw throwGhcExceptionIO :: GhcException -> IO a @@ -192,7 +192,7 @@ pprPanic s doc = withFrozenCallStack $ panicDoc s (doc $$ callStackDoc) -- | Throw an exception saying "bug in GHC" panicDoc :: HasCallStack => String -> SDoc -> a -panicDoc x doc = throwGhcException (PprPanic x doc) +panicDoc x doc = withFrozenCallStack $ throwGhcException (PprPanic x doc) -- | Throw an exception saying "this isn't finished yet" sorryDoc :: String -> SDoc -> a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b968e1c1100eaebd89b69970b9e9fcc9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b968e1c1100eaebd89b69970b9e9fcc9... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)