<!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: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "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,0.01) 0 0 1px; font-family: var(--default-regular-font, "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;">
Ben Gamari pushed to branch wip/ghc-internals-move 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: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f1c46d309bc0dcea392651f475d5d325fbb378db">f1c46d30</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2024-02-06T19:14:31-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #333238; position: relative; font-family: var(--default-mono-font, "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;'>Move `base` to `ghc-internal`

Here we move a good deal of the implementation of `base` into a new
package, `ghc-internal` such that it can be evolved independently
from the user-visible interfaces of `base`.

While we want to isolate implementation from interfaces, naturally, we
would like to avoid turning `base` into a mere set of module re-exports.
However, this is a non-trivial undertaking for a variety of reasons:

 * `base` contains numerous known-key and wired-in things, requiring
   corresponding changes in the compiler

 * `base` contains a significant amount of C code and corresponding
   autoconf logic, which is very fragile and difficult to break apart

 * `base` has numerous import cycles, which are currently dealt with via
   carefully balanced `hs-boot` files

 * We must not break existing users

To accomplish this migration, I tried the following approaches:

* [Split-GHC.Base]: Break apart the GHC.Base knot to allow incremental
  migration of modules into ghc-internal: this knot is simply too
  intertwined to be easily pulled apart, especially given the rather
  tricky import cycles that it contains)

* [Move-Core]: Moving the "core" connected component of base (roughly
  150 modules) into ghc-internal. While the Haskell side of this seems
  tractable, the C dependencies are very subtle to break apart.

* [Move-Incrementally]:

  1. Move all of base into ghc-internal
  2. Examine the module structure and begin moving obvious modules (e.g.
     leaves of the import graph) back into base
  3. Examine the modules remaining in ghc-internal, refactor as necessary
     to facilitate further moves
  4. Go to (2) iterate until the cost/benefit of further moves is
     insufficient to justify continuing
  5. Rename the modules moved into ghc-internal to ensure that they don't
     overlap with those in base
  6. For each module moved into ghc-internal, add a shim module to base
     with the declarations which should be exposed and any requisite
     Haddocks (thus guaranteeing that base will be insulated from changes
     in the export lists of modules in ghc-internal

Here I am using the [Move-Incrementally] approach, which is empirically
the least painful of the unpleasant options above

Bumps haddock submodule.

Metric Decrease:
    haddock.Cabal
    haddock.base
Metric Increase:
    MultiComponentModulesRecomp
    T16875
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#a5cc2925ca8258af241be7e5b0381edf30266302">
.gitignore
</a>
</li>
<li class="file-stats">
<a href="#0887cf39c5cdf9cf8d6758f410d7dab3023c0d77">
compiler/GHC/Builtin/Names.hs
</a>
</li>
<li class="file-stats">
<a href="#2dac8ed1c1274db5dcf76b9799c739cd3fbf6714">
compiler/GHC/StgToJS/Rts/Rts.hs
</a>
</li>
<li class="file-stats">
<a href="#5938b47c4cbf0df07fe6b3b3771017f306a32634">
compiler/GHC/Unit/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#87db583be5c13c1f7b3c958b10e03d67b6a2ca06">
configure.ac
</a>
</li>
<li class="file-stats">
<a href="#f4586df19410cf938856031e0d26a0589dfe63ca">
hadrian/src/Rules/SourceDist.hs
</a>
</li>
<li class="file-stats">
<a href="#5df44436e00349378bf0552a1f5109a7387c8663">
hadrian/src/Settings/Warnings.hs
</a>
</li>
<li class="file-stats">
<a href="#b7cfb47853ef95330e499ca0c5b90964744d101f">
libraries/base/base.cabal
</a>
</li>
<li class="file-stats">
<a href="#ebf6ac42b5a7178afb2d4d9e86a90069ef8fafb9">
libraries/base/src/Control/Applicative.hs
</a>
</li>
<li class="file-stats">
<a href="#2e0f17331daaae33659159abd77d62332dfa8a9d">
libraries/base/src/Control/Concurrent.hs
</a>
</li>
<li class="file-stats">
<a href="#6f2e719a3408d1aab23528486b93f1a489c6d9d8">
libraries/base/src/Data/Complex.hs
</a>
</li>
<li class="file-stats">
<a href="#68d643353c591e76c6239dd2abb39123dbc1ad3c">
libraries/base/src/Data/Semigroup.hs
</a>
</li>
<li class="file-stats">
<a href="#dc56deb1b12d95786a16d5cfae55285a1b356e77">
<span class="new-file">
+
libraries/base/src/Dummy.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#a0cab315b584781c015039b650bde65c0d9994cc">
libraries/base/src/System/CPUTime/Posix/Times.hsc
</a>
</li>
<li class="file-stats">
<a href="#c77b0a56875ecf7ea869e929cffd11441afaa725">
libraries/base/.authorspellings

libraries/ghc-internal/.authorspellings
</a>
</li>
<li class="file-stats">
<a href="#5d4f12384681c9acbbddb528df463bcd9d4845d9">
libraries/base/.gitignore

libraries/ghc-internal/.gitignore
</a>
</li>
<li class="file-stats">
<a href="#58378a1fa1edc1d367b1e85842426fec153abc75">
libraries/base/.hlint.yaml

libraries/ghc-internal/.hlint.yaml
</a>
</li>
<li class="file-stats">
<a href="#ca3de93fbafa14d94c513e5cb10cc3174984e06a">
libraries/ghc-internal/LICENSE
</a>
</li>
<li class="file-stats">
<a href="#cb3d53cae47ba0184c013248e7fb8a171dee22e8">
libraries/base/Setup.hs

libraries/ghc-internal/Setup.hs
</a>
</li>
<li class="file-stats">
<a href="#51f2993cb11a925a8d722d5c60a0d440d7ab1d28">
libraries/base/aclocal.m4

libraries/ghc-internal/aclocal.m4
</a>
</li>
<li class="file-stats">
<a href="#e89ea7c3841f6c84614ba0995ede87216a4b5a66">
libraries/base/cbits/CastFloatWord.cmm

libraries/ghc-internal/cbits/CastFloatWord.cmm
</a>
</li>
<li class="file-stats">
<a href="#cdeb88761d403c1febbeed8dce0ef194f27bc112">
libraries/base/cbits/DarwinUtils.c

libraries/ghc-internal/cbits/DarwinUtils.c
</a>
</li>
<li class="file-stats">
<a href="#3a1f5dc1029cee51c3fbc57c84464af1b3c2d8ee">
libraries/base/cbits/IOutils.c

libraries/ghc-internal/cbits/IOutils.c
</a>
</li>
<li class="file-stats">
<a href="#da996e9092f9a63c7c4fa555cabed6745f75ddf5">
libraries/base/cbits/PrelIOUtils.c

libraries/ghc-internal/cbits/PrelIOUtils.c
</a>
</li>
<li class="file-stats">
<a href="#6accd00a81d617ad27aec0eb94649bf37aa9e5a1">
libraries/base/cbits/SetEnv.c

libraries/ghc-internal/cbits/SetEnv.c
</a>
</li>
<li class="file-stats">
<a href="#a2167ed100abb8ecdee0491ae04b068e0322bd51">
libraries/base/cbits/StackCloningDecoding.cmm

libraries/ghc-internal/cbits/StackCloningDecoding.cmm
</a>
</li>
<li class="file-stats">
<a href="#ef004d78b578b2fbfd556cb74f251d9a61d4c9c0">
libraries/base/cbits/Win32Utils.c

libraries/ghc-internal/cbits/Win32Utils.c
</a>
</li>
<li class="file-stats">
<a href="#018a4c23db9483f235a721a2edbcb6b173e9b43b">
libraries/base/cbits/consUtils.c

libraries/ghc-internal/cbits/consUtils.c
</a>
</li>
<li class="file-stats">
<a href="#97608a452a4e5e25b25034ae2c0efe9d0a3d301f">
libraries/base/cbits/iconv.c

libraries/ghc-internal/cbits/iconv.c
</a>
</li>
<li class="file-stats">
<a href="#ae1827f24cafdaaffac89867cf5fb8aaf97cfae6">
libraries/base/cbits/inputReady.c

libraries/ghc-internal/cbits/inputReady.c
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: 0.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/f1c46d309bc0dcea392651f475d5d325fbb378db">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/f1c46d309bc0dcea392651f475d5d325fbb378db"}}</script>


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