Repository navigation
Install Cabal registrations for base and the packages it bundles - #577
Merged
Merged
Conversation
Packages from Hackage depend on base-4.x, and on bytestring, text, etc., whose modules are part of the base of mhs. MicroCabal knows this from its builtinPackages table, and cabal (haskell/cabal#11392) keeps a copy of the same table. Instead, the installer now writes Cabal registration files next to the installed packages: base at 4.19.1.0, with the modules it does not bundle, and each bundled package with its modules, depending on base and without a package file of its own. Tools can read these instead of keeping a table, and the registrations change along with base. The versions are those of MicroCabal, except for hashable: Data.Hashable has the API of the 1.4 series, and the packages that use it ask for that. generated/install.c is left for the next regen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj
ulysses4ever
added a commit
to haskell/cabal
that referenced
this pull request
Nov 19, 2026
Since 0.17.1.0 (augustss/MicroHs#577), the installer of mhs writes Cabal registration files for its base, at a GHC-era version, and for the packages whose modules base bundles. Read them like any other registration, and drop the table from which Cabal presented base in the same way itself: what base stands for is now up to mhs. Also look up the package file of a registration by its key, which is what mhs names its base after. An older mhs has no registrations, and its base, at the version of mhs, satisfies no package from Hackage. Cabal warns about it. CI installs MicroHs at a commit after augustss/MicroHs#577, as 0.17.1.0 is not released yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj
ulysses4ever
added a commit
to ulysses4ever/cabal-mhs-testsuite
that referenced
this pull request
Nov 19, 2026
The commits of the PR are live on haskell/cabal#11392, so build its head rather than the old head plus the patches, which are kept for runs started by hand. MicroHs is checked out after augustss/MicroHs#577, which writes the registrations of base that the PR now reads, until 0.17.1.0 is released. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is item 1 of #572:
make minstallnow writes Cabal registration files for base and for the packages whose modules base bundles, next to the installed packages in~/.mcabal/mhs-<version>:base-<version>.conf: base at 4.19.1.0 with the modules it does not bundle, and withidandkeybase-<version>, so tools still findpackages/base-<version>.pkg;The table is in
Tools/Install.hs. The versions are those of MicroCabal'sbuiltinPackages, except hashable at 1.4.7.0:Data.Hashablehas the API of the 1.4 series, and packages that use it ask for that. The modules come fromgenerated/base.pkg, read withreadSerializedasmhs -Ldoes.With these files, cabal (haskell/cabal#11392) can read what base stands for instead of keeping its own table: with that table switched off, a package that needs
base >= 4.18, bytestring, text, deepseq, stm, directory and process builds and runs, and without the files it fails in the solver. MicroCabal could read them as well. mhs itself ignores them.I have not regenerated
generated/install.c.Tested on Linux with
make minstallinto a scratch directory: all nine files parse with Cabal's parser, and the installed mhs builds programs as before.🤖 Generated with Claude Code
https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj