<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<h3 style="margin-top: 20px; margin-bottom: 10px;">
Rodrigo Mesquita pushed to branch wip/romes/exceptions-propagate at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/dff0d55963d36d7a9d6a964260af663dd014fa35">dff0d559</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:30+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>exceptions: Improve the message layout as per #285

This commit fixes the layout of the additional information included when
displaying an exception, namely the type of the exception.

It also fixes the default handler's heading message to work well
together with the improved display message of SomeException.

CLC proposal#285
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1207736e7794a06f4bb73b101d00246610c64d86">1207736e</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:30+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Display type and callstack of exception on handler

This commit changes the Exception instance of SomeException to *simply*
display the underlying exception in `displayException`. The augmented
exception message that included the type and backtrace of the exception
are now only printed on a call to `displayExceptionWithInfo`.

At a surface level, existing programs should behave the same since the
`uncaughtExceptionHandler`, which is responsible for printing out uncaught
exceptions to the user, will use `displayExceptionWithInfo` by default.

However, unlike the instance's `displayException` method, the
`uncaughtExceptionHandler` can be overriden with
`setUncaughtExceptionHandler`. This makes the extra information opt-in
without fixing it the instance, which can be valuable if your program
wants to display uncaught exceptions to users in a user-facing way
(ie without backtraces).

This is what was originally agreed for CLC#231 or CLC#261 with regard to
the type of the exception information.

The call stack also becoming part of the default handler rather than the
Exception instance is an ammendment to CLC#164.

Discussion of the ammendment is part of CLC#285.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/99bfaf190c30801327d3e9a383e26355758a303e">99bfaf19</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:30+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Remove redundant CallStack from exceptions

Before the exception backtraces proposal was implemented, ErrorCall
accumulated its own callstack via HasCallStack constraints, but
ExceptionContext is now accumulated automatically.

The original ErrorCall mechanism is now redundant and we get a duplicate
CallStack

Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall

CLC proposal#285

Fixes #25283
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9866ca0423484a167bc80f7b19d4640ca4c80924">9866ca04</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:30+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Freeze call stack in error throwing functions

CLC proposal#285
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3d3657f7313f3938e554ed8c7e5fc73d2581fb71">3d3657f7</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:30+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>De-duplicate displayContext and displayExceptionContext

The former was unused except for one module where it was essentially
re-defining displayExceptionContext.

Moreover, this commit extends the fix from
bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too,
which was missing.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/518aef2b959cd3b659d1f8c72ebcde080a53e41a">518aef2b</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:31+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Re-export NoBacktrace from Control.Exception

This was originally proposed and accepted in section
    "2.7   Capturing Backtraces on Exceptions"
of the CLC proposal for exception backtraces.

However, the implementation missed this re-export, which this commit now
fixes.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/27a207643d6aa19aa526be75cb1935ff310690b0">27a20764</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-10-17T12:14:31+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Fix exception backtraces from GHCi

When running the program with `runhaskell`/`runghc` the backtrace should
match the backtrace one would get by compiling and running the program.
But currently, an exception thrown in a program interpreted with
`runhaskell` will:

    * Not include the original exception backtrace at all
    * Include the backtrace from the internal GHCi/ghc rethrowing of the
      original exception

This commit fixes this divergence by not annotating the ghc(i) backtrace
(with NoBacktrace) and making sure that the backtrace of the original
exception is serialized across the boundary and rethrown with the
appropriate context.

Fixes #25116

The !13301 MR (not this commit in particular) improves performance of
MultiLayerModulesRecomp:

-------------------------
Metric Decrease:
    MultiLayerModulesRecomp
-------------------------
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#24c58f4447a259104c534fcb40cce7e31fb8df08">
compiler/GHC/Utils/Panic/Plain.hs
</a>
</li>
<li class="file-stats">
<a href="#57d22eb49f269b51f07e23c509834d85e25f691e">
ghc/GHCi/UI/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#d1f7a79361ae6cdc4939449936139b5703ca4c3d">
libraries/base/src/Control/Exception.hs
</a>
</li>
<li class="file-stats">
<a href="#4e178ecdf45714edd8cff9e89da07ead424c958d">
libraries/base/src/GHC/Exception.hs
</a>
</li>
<li class="file-stats">
<a href="#b124dcfde008dfa24cbacddbdbf78662f8c9a1fd">
libraries/base/tests/IO/T21336/T21336a.stderr
</a>
</li>
<li class="file-stats">
<a href="#98c998f50be784db9ebf3f7d7cc3381b08a4ed7f">
libraries/base/tests/IO/T21336/T21336b.stderr
</a>
</li>
<li class="file-stats">
<a href="#6006e1ae32823cb3154ac0b6ac4db1557c24448f">
libraries/base/tests/IO/T4808.stderr
</a>
</li>
<li class="file-stats">
<a href="#e568ef08382fdbbe133494fb14a9e6d96000c96b">
libraries/base/tests/IO/mkdirExists.stderr
</a>
</li>
<li class="file-stats">
<a href="#db536dd42d23af99a81aac016d61b71f80f8f4ea">
libraries/base/tests/IO/openFile002.stderr
</a>
</li>
<li class="file-stats">
<a href="#ef6c34e2bb03ea733ab26c35340fffd6d1c8fa88">
libraries/base/tests/IO/openFile002.stderr-mingw32
</a>
</li>
<li class="file-stats">
<a href="#fb6c1c19fc7bb6f4f5ba85e8b9f006477ba0bd9f">
libraries/base/tests/IO/withBinaryFile001.stderr
</a>
</li>
<li class="file-stats">
<a href="#c38b63478bba4419616823fe2c5d0cb91c96c752">
libraries/base/tests/IO/withBinaryFile002.stderr
</a>
</li>
<li class="file-stats">
<a href="#b7064d6743bd22d40dbeabdd98ee51a82fd883c8">
libraries/base/tests/IO/withFile001.stderr
</a>
</li>
<li class="file-stats">
<a href="#7a08f3bd51e8b0054ae6f6f0e00580deddfe6225">
libraries/base/tests/IO/withFile002.stderr
</a>
</li>
<li class="file-stats">
<a href="#7d385ab1064e418a0b4159db1082b481b60f6fab">
libraries/base/tests/IO/withFileBlocking001.stderr
</a>
</li>
<li class="file-stats">
<a href="#a2262a3c39b721ec88b4330d683a4f4925204571">
libraries/base/tests/IO/withFileBlocking002.stderr
</a>
</li>
<li class="file-stats">
<a href="#582dfe030c20c9a85f522b3b4fa585d2cbe4e07d">
libraries/base/tests/T15349.stderr
</a>
</li>
<li class="file-stats">
<a href="#fa2b8644c6c49949a13bf645712113ed8bf6e0ea">
libraries/base/tests/T16111.stderr
</a>
</li>
<li class="file-stats">
<a href="#839c13786b361f4dc01e52a7ac079c768f8e3ae3">
libraries/base/tests/T19288.stderr
</a>
</li>
<li class="file-stats">
<a href="#dad99a46ecedc43a3b72908bfffdac8a3ff256d5">
libraries/base/tests/T24807.stderr
</a>
</li>
<li class="file-stats">
<a href="#b817c80cbb15890d9a6df41e91d15d7442471f3c">
libraries/base/tests/all.T
</a>
</li>
<li class="file-stats">
<a href="#221c6623fbe167ed66be532811b5901dc4182a3a">
libraries/base/tests/assert.stderr
</a>
</li>
<li class="file-stats">
<a href="#fa18f8c8dab603a60575f6c79c91dd05f6abca38">
libraries/base/tests/readFloat.stderr
</a>
</li>
<li class="file-stats">
<a href="#55f2acbca5ea131272343057079bac4dbeda13fa">
<span class="deleted-file">

libraries/base/tests/topHandler04.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#43a92b432921c3df697ef5b674fc72c825518b06">
<span class="deleted-file">

libraries/base/tests/topHandler04.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#962ae117e5b76e9ab93480bb3d5d278f9d8cda96">
libraries/ghc-compact/tests/compact_function.stderr
</a>
</li>
<li class="file-stats">
<a href="#cc4d7adb1f9e1b92e18312ea772a864c89755bbd">
libraries/ghc-compact/tests/compact_mutable.stderr
</a>
</li>
<li class="file-stats">
<a href="#389cf09db1700336c704432308db5a032dfc370d">
libraries/ghc-compact/tests/compact_pinned.stderr
</a>
</li>
<li class="file-stats">
<a href="#b22bdffb3acea29197f94c03c2259501a8199650">
libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs
</a>
</li>
<li class="file-stats">
<a href="#af30c6b99312124f2098e256a7a9eb43d6d40011">
libraries/ghc-internal/src/GHC/Internal/Exception.hs
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: .875rem;">
The diff was not included because it is too large.
</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/68b4fe075d2847f1ef7b49cd51a4cdcaff77c31a...27a207643d6aa19aa526be75cb1935ff310690b0">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>



</p>
</div>
</body>
</html>