Skip to content

Build with MicroHs (mhs) - #27

Merged
dmjio merged 4 commits into
mainfrom
mhs
Oct 1, 2026
Merged

dmjio merged 4 commits into
mainfrom
mhs

Conversation

@dmjio

@dmjio dmjio commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Adds a way to build the sampler with MicroHs, using the mhs dev shell from miso's flake.

$ nix develop .#mhs --command bash -c "make mhs"
$ nix develop .#mhs --command bash -c "make serve"
  • flake.nix: devShells.mhs, from miso's flake like the other shells.
  • flake.lock: the miso input is updated to master, which has the MicroHs support. This also moves the other shells forward (the ghcjs shell is now GHC 9.14.1).
  • Makefile: make mhs builds with mcabal --options=-tbrowser build and copies the output to public/index.js, next to the files from static. make clean also removes dist-mcabal. build-js no longer hardcodes the GHC version in the path to all.js.
  • .gitignore: .mcabal and .emcache, which the shell creates in the project directory.
  • CI builds it, before the JS build, so the deployed pages are unchanged.
  • README: a "Build (MicroHs)" section.
  • cabal.project: constraints: aeson >= 2. Unrelated to MicroHs: the JS build had started to fail because the solver picked aeson-0.8.0.2 (for ghcjs-base), which does not compile with GHC 9.12.

Not built locally (the shell's nixpkgs has no x86_64-darwin); CI builds it.

Add an mhs dev shell, taken from the microhs branch of miso, and a
'make mhs' target that builds the app for the browser with mcabal and
emscripten:

    nix develop .#mhs --command bash -c "make mhs"

The result is a single public/index.js, served like the other builds
with 'make serve'.  CI builds it too.
@dmjio

dmjio commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

dmjio/miso#1663

dmjio added 2 commits October 1, 2026 08:00
The solver had started to pick aeson-0.8.0.2 (for ghcjs-base), which
does not compile with GHC 9.12.
MicroHs support has been merged, so the separate miso-mhs input is
gone and the miso input is updated to master.  The ghcjs shell is now
GHC 9.14.1, so build-js no longer hardcodes the GHC version in the
path to all.js.
For the ghcjs shell fix (dmjio/miso#1666) and the MicroHs rev bump
(dmjio/miso#1665).
@dmjio
dmjio merged commit de78e0c into main Oct 1, 2026
2 checks passed
@dmjio
dmjio deleted the mhs branch October 1, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant