Merge ghc-prim and ghc-bignum into ghc-internal
- 2008:
ghc-prim
andinteger
packages were spun offbase
to support severalinteger
libraries (see fcf6b22d) - 2020:
ghc-bignum
replaced the two integer libraries (integer-simple
andinteger-gmp
). Instead bignum backends are selected with cabal flags forghc-bignum
since then. - 2024:
base
has been split intoghc-internal
andbase
The proposal is to merge ghc-bignum
and ghc-prim
packages with ghc-internal
. Reasons:
- The split doesn't serve its initial purpose
- We couldn't merge everything into
base
before (it wasn't supposed to contain GHC internal things), but inghc-internal
we can/should - Having 3 packages adds extra complexity (dependency bounds, hackage uploads, etc.). It's much simpler to explain that everything GHC exposes to Haskell programs comes from
ghc-internal
and that it is the only package tightly bound to a specific GHC (withtemplate-haskell
, but I think we could merge part of it intoghc-internal
too and only expose a stable TH interface fromtemplate-haskell
package). -
ghc-prim
andghc-bignum
have implicit restrictions: they can't depend on anything defined inghc-internal
, yet GHC may introduce references to entities defined inghc-internal
(e.g. exceptions, see #18157). With a single package we could even use.hs-boot
files for real cyclic dependencies like throwing an exception fromghc-bignum
: for now we use a hack (ghc primops---defined in the rts---that raise a (wired-in) exception---defined inghc-internal
).
For backward compatibility we could provide shallow ghc-prim
and ghc-bignum
packages that reexport modules that have been merged into ghc-internal
(for a few releases).