The overall goal of the reinstallable base project is for the base
library to be replaceable, versioned independently of GHC, and
maintained outside of the GHC repository.
Today, base is effectively part of the compiler: its implementation is
interwoven with GHC internals, it shares a release cycle with GHC, and
it cannot be upgraded, downgraded, patched, or experimentally replaced
without rebuilding GHC itself. If base was reinstallable, it would not
suffer from these issues. It could evolve under its own stewardship with
less coupling between compiler and library development. Users would be
able to upgrade base independently of GHC, which would support in
particular the following workflows:
- The user updates GHC without updating
base. - The user updates
basewithout updating GHC.
This repository acts as the coordination hub for the reinstallable
base effort. It does not yet contain a prototype, but it collects the
problems, design constraints, open questions, and cross-project
coordination tasks that must be addressed before such an implementation
can be feasible. It links together GHC HQ, the Core Libraries Committee,
Cabal maintainers, and external contributors, providing a shared place
to track blockers, document decisions, and plan the sequence of work.
The discussions about reinstallable base that lead to the creation of
this repository took place in the following spaces:
- Why do we want
baseto be reinstallable? What concrete workflows are we trying to improve? - Why does
ghc-internalneed to evolve over time? - How does
ghc-internalevolve in practice? - What does the current process of updating
baselook like in practice?
- Hackage uses of low-level
basemodules with stability risk 3 - An attempt to move module implementations that are not tied to GHC
into
base - An attempt to make the
baseversion of GHC 9.10.2 usable with GHC 9.12.2
Understand whether a meaningful and sustainable boundary between base
and ghc-internal is achievable
Blocking
- How much code can realistically be moved from
ghc-internalintobasewithout addressing known-key items yet? - Which parts of the
baseinterface can be deprecated and removed? - Which code can be moved depending on its category: portable, semi-portable, etc.?
- What technical obstacles remain after such “low-hanging fruit” is reaped?
- What would constitute a promising outcome from a proof-of-concept refactoring?
- What findings would indicate that further disentanglement is unlikely to be possible without addressing known-key items?
Understand the implications of decoupling base versioning from GHC
versioning for tooling and ecosystem conventions
Partially blocking
- Does the ecosystem require a means for library authors to express compiler constraints? What are the reasons for people currently doing this?
- If a single
baseversion can work across multiple GHC versions, how should compiler constraints be expressed? - Are changes required in Cabal or related tooling to support expressing compiler constraints better, and, if so, which?
- Do we need to resolve this issue now, or can we wait until the disentanglement opportunities have been further explored?
Have clarity about expectations around stability boundaries
Deferred
- What stability guarantees do we expect from
basecompared toghc-internal? - Is it realistic to identify a subset of
ghc-internalwith stronger stability guarantees thatbasecan rely on? - How should unavoidable breaking changes be handled when they affect
the
base–ghc-internalboundary? - What do we have to keep in mind when performing this work to ensure a smooth transition for users?
Know the state of contributor workflows and how they need to be adapted
Deferred
- Are current workflows sufficient if
baseremains in the GHC repository? - Which developer experience concerns only arise if
baseis developed in a separate repository? - Which workflow changes are prerequisites for progress, and which are optimizations?
- How should experimental or refactoring work be carried out to minimize disruption?
Understand ownership and responsibility
Deferred
- Who is responsible for maintaining compatibility between
baseand new GHC versions? - Which governance questions only become relevant if
basemoves to its own repository? - How should responsibilities be shared between GHC developers, the CLC, and the wider community?
- What happens if there are no volunteers for certain maintenance tasks
concerning a
baserepository outside the GHC repository?