Skip to content

Conversation

wolfgangwalther
Copy link
Member

Compared to #3866, this also enables building the static executable for Linux aarch64, but keeping Template Haskell around. This is based on upstream work to make Template Haskell work with GHC 9.6+ in Nixpkgs. It's currently based off my personal branch, which is subject to change and disappear eventually. Thus, this is not ready to merge, yet. But it works.

Also, the release process around the docker image still needs to be tested.

Note: This does not mean we can suddenly start using Template Haskell everywhere again. The main problem of Template Haskell is still there: We can't cross-compile it. And we'll still want to cross-compile static executables to FreeBSD, eventually. And maybe even Windows. So the long-term goal should still be to get rid of Template Haskell.

Also, we can only do this update here, because we pin hsie to use GHC 9.4 in the second commit. We will fall over this eventually, when GHC 9.4 is not supported in Nixpkgs anymore - or when we start using syntax that is GHC 9.6+ only at some point. hsie is tightly coupled to internal GHC APIs to do its thing, so non-trivial to update. @taimoorzaeem maybe you can look into that? Since we can separate the pin for hsie easily, it might make sense - depending on the required changes - to just jump to e.g. GHC 9.12 immediately and don't even work with the intermediate versions. Or, if it's easier do it one version at a time - whatever works best, I guess.

@taimoorzaeem
Copy link
Collaborator

[...] we start using syntax that is GHC 9.6+ only at some point. hsie is tightly coupled to internal GHC APIs to do its thing, so non-trivial to update. @taimoorzaeem maybe you can look into that?

Sure, I can look into that. I'll put this in my backlog. Is nixpkgs dropping support for GHC 9.4 anytime soon?

@wolfgangwalther
Copy link
Member Author

Sure, I can look into that. I'll put this in my backlog. Is nixpkgs dropping support for GHC 9.4 anytime soon?

I don't think so, no. Pretty sure that this will not happen before November this year, but maybe even not well into next year. So a lot of time there :)

@wolfgangwalther wolfgangwalther force-pushed the ghc-9-6 branch 2 times, most recently from 48bed6e to 2998546 Compare August 16, 2025 08:29
This branch contains fixes to build TemplateHaskell with GHC 9.6+.
This needs more involved changes in the hsie source code, which can be
deferred to later.
Also makes the aarch64 variant of the docker image consist of a single
static executable, similar to the x86_64 variant.
We don't need an impure environment anymore, because we can't run the
test suite via stack anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants