<!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;">
Matthew Pickering pushed to branch wip/mpickering/get-link-deps 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/d7e582e355926ae61d597bc7244daed447dfc435">d7e582e3</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2025-01-06T15:28:25+00: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;'>driver: Store an ExternalModuleGraph in the EPS
We now store an ExternalModuleGraph in the EPS. When an new interface is
loaded, the module graph is extended with a node for the loaded
interface. The result is a partial module graph. If you want to run
a transitive closure query on the graph you must first force the
transitive closure to be loaded by using `loadExternalGraphBelow`.
The primary advantage (for now) is that the transitive dependency
calculation does not have to be repeated in getLinkDeps. If your module
had many dependencies and many splices, performing this calculation at
every splice site took a significant amount of time.
We might also want to use this module graph in future for considering
questions such as reachability of rules or accessibilty of instance
imported by levelled imported.
This patch removes another place in the compiler where transitive
dependency is calculated in an ad-hoc manner. In general, the transitive
dependency calculation should be cached and computed using a ModuleGraph
abstraction.
The transitive dependency query required by getLinkDeps operates on a
graph without hs-boot nodes. If a linkable from a module in a loop is
needed, then all modules in the loop are necessary to be available to
execute that module. Therefore there is a query in `ModuleGraph` and
`ExternalModuleGraph` which allows a transitive closure query to be
performed on a graph without loops.
-------------------------
Metric Decrease:
MultiLayerModulesTH_Make
MultiLayerModulesTH_OneShot
Metric Increase:
mhu-perf
-------------------------
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#dbce6cb5e8f3d5287103c66d1a56ad63bbbd11a9">
compiler/GHC/Driver/Backpack.hs
</a>
</li>
<li class="file-stats">
<a href="#3177183680205a840465ba6b8d33631394cca2d7">
compiler/GHC/Driver/Errors/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#1dab250036d04cfcf3530f6ff27889f723cc2dda">
compiler/GHC/Driver/Make.hs
</a>
</li>
<li class="file-stats">
<a href="#53557c97f676581665e366694f2931a29d6d76cd">
compiler/GHC/Driver/MakeFile.hs
</a>
</li>
<li class="file-stats">
<a href="#7d51edda4fa76a202cce0bca672ef300249ba8ea">
compiler/GHC/Iface/Load.hs
</a>
</li>
<li class="file-stats">
<a href="#df1fca609f31dac0cde9df4e87ccbac2654de2f7">
compiler/GHC/Linker/Deps.hs
</a>
</li>
<li class="file-stats">
<a href="#5aa3321b0f5c08d7ebfa1a4a3340d4451258988b">
compiler/GHC/Linker/Loader.hs
</a>
</li>
<li class="file-stats">
<a href="#b9e0d5794550deb8be258f90bd07aad8f793d93a">
compiler/GHC/Unit/External.hs
</a>
</li>
<li class="file-stats">
<a href="#c0ba7ae29b32700dc551eeefe583c22d17b4446e">
<span class="new-file">
+
compiler/GHC/Unit/Module/External/Graph.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#8e2fd61802dbf01ed3619fa8bab9f6f81df3de08">
compiler/GHC/Unit/Module/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#73b987d03e42923d39d0eea175d8b7f4652570ce">
<span class="new-file">
+
compiler/GHC/Unit/Module/ModNodeKey.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#0f33fd88c617246c7f89c4477d2d1d24f942df23">
compiler/ghc.cabal.in
</a>
</li>
<li class="file-stats">
<a href="#6cf66918b1c8ebf82da7ab8997365a321e8034ae">
testsuite/tests/backpack/reexport/bkpreex02.stderr
</a>
</li>
<li class="file-stats">
<a href="#73eaa1e78b99da5cd24f7e26c6e2016357f113a2">
testsuite/tests/backpack/reexport/bkpreex03.stdout
</a>
</li>
<li class="file-stats">
<a href="#58ab01f46047bf705df8b285c8b1f7c5b75cfa23">
testsuite/tests/backpack/should_compile/bkp09.stderr
</a>
</li>
<li class="file-stats">
<a href="#790e71080201f425d81e7654c5573afb8a0b5ba0">
testsuite/tests/backpack/should_compile/bkp14.stderr
</a>
</li>
<li class="file-stats">
<a href="#fd87504041fceefd8ee844a66bf65ba67572444b">
testsuite/tests/backpack/should_compile/bkp15.stderr
</a>
</li>
<li class="file-stats">
<a href="#3878ff4dc169c2eec8ab86847657c97aa60f4e27">
testsuite/tests/backpack/should_compile/bkp31.stderr
</a>
</li>
<li class="file-stats">
<a href="#c54a537fc8d560e3f286ab8fa93a37de72ce9fd6">
testsuite/tests/backpack/should_compile/bkp32.stderr
</a>
</li>
<li class="file-stats">
<a href="#95803b35ba97c9a25fac5334fabcf899aba12511">
testsuite/tests/backpack/should_compile/bkp47.stderr
</a>
</li>
<li class="file-stats">
<a href="#ae7462b1725c53ac61a6835eb5f71b1a0b598861">
testsuite/tests/backpack/should_compile/bkp51.stderr
</a>
</li>
<li class="file-stats">
<a href="#a0e3f1fef7140668a4e52294d7f3586d08a9c6c7">
testsuite/tests/backpack/should_compile/bkp61.stderr
</a>
</li>
<li class="file-stats">
<a href="#a11a5bb67270ff8935cede40363411998d517664">
testsuite/tests/backpack/should_fail/bkpfail07.stderr
</a>
</li>
<li class="file-stats">
<a href="#1650a4284bdfba488bf9aa0ca866601468f91d8f">
testsuite/tests/backpack/should_fail/bkpfail09.stderr
</a>
</li>
<li class="file-stats">
<a href="#080072a3cca44f9357be411f72c5e33b117de14a">
testsuite/tests/backpack/should_fail/bkpfail12.stderr
</a>
</li>
<li class="file-stats">
<a href="#da6d85e71fc8a9a998f36b2aabb940925cef4467">
testsuite/tests/backpack/should_fail/bkpfail13.stderr
</a>
</li>
<li class="file-stats">
<a href="#a454495481a8b2211d17bbb808a6280cb0c9b154">
testsuite/tests/backpack/should_fail/bkpfail14.stderr
</a>
</li>
<li class="file-stats">
<a href="#16c61b5a483aff2d4093a8c4995c54c33faddf78">
testsuite/tests/backpack/should_fail/bkpfail15.stderr
</a>
</li>
<li class="file-stats">
<a href="#e9910bb070d3a5a8a5207bd1fdbf770b2569c030">
testsuite/tests/backpack/should_fail/bkpfail21.stderr
</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/-/commit/d7e582e355926ae61d597bc7244daed447dfc435">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>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/-/commit/d7e582e355926ae61d597bc7244daed447dfc435"}}</script>
</p>
</div>
</body>
</html>