Subject: [WIP PATCH v2 00/23] Update GHC to 9.6.4

From: Saku Laesvuori <[email-masked]>
Date: Thu, 15 Feb 2024 10:49:41 +0200

This series

- updates ghc-next to 9.4.8
- adds bootstrap dependencies for Hadrian (ghc-9.6 build system)
- adds ghc-9.6
- changes the default ghc to ghc-9.6.

The compiler seems to work (I have built some haskell packages with it
after running `guix refresh` and disabling it's tests) but some tests
fail with weird errors like the following:

```
ld: cannot find \: No such file or directory
ld: cannot find \: No such file or directory
ld: cannot find spaces/testsuite/tests/backpack/cabal/T16219/T16219.run/dist/build/library-a-impl: No such file or directory
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
make: *** [Makefile:12: T16219] Error 1
```

Something seems to be failing due to the tests being run in
'/tmp/guix-build-ghc-9.6.4.drv-0/ghctest-lgjqumae/test   spaces/testsuite/...'
but I can't figure out what it is. I've tried tracing the tests and it
seems that ld is called with arguments '/tmp/.../test' '\' '\' 'spaces/...'
which obviously can't work, but I could not pin down where the escaping
fails. This happens with just ~40 out of almost 10 000 tests which makes
it even more confusing.

Any ideas what could be causing the failures or should I just try
disabling those tests?

I also noticed that hidden packages shadow other packages, for example
the hidden base package from any haskell package can shadow the exposed
version from ghc. I guess I'll try implementing a fix for
https://issues.guix.gnu.org/66347 by adding a new profile hook that
creates a package environment[1] for ghc.

[2]: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/packages.html#package-environments

Saku Laesvuori (23):
  gnu: ghc-next: Update to version 9.4.8
  gnu: Add ghc-js-flot-bootstrap-for-9.6
  gnu: Add ghc-clock-bootstrap-for-9.6
  gnu: Add ghc-extra-bootstrap-for-9.6
  gnu: Add ghc-hashable-bootstrap-for-9.6
  gnu: Add ghc-splitmix-bootstrap-for-9.6
  gnu: Add ghc-random-bootstrap-for-9.6
  gnu: Add ghc-primitive-bootstrap-for-9.6
  gnu: Add ghc-js-jquery-bootstrap-for-9.6
  gnu: Add ghc-utf8-string-bootstrap-for-9.6
  gnu: Add ghc-heaps-bootstrap-for-9.6
  gnu: Add ghc-js-dgtable-bootstrap-for-9.6
  gnu: Add ghc-nats-bootstrap-for-9.6
  gnu: Add ghc-tagged-bootstrap-for-9.6
  gnu: Add ghc-semigroups-bootstrap-for-9.6
  gnu: Add ghc-base16-bytestring-bootstrap-for-9.6
  gnu: Add ghc-cryptohash-sha256-bootstrap-for-9.6
  gnu: Add ghc-unordered-containers-bootstrap-for-9.6
  gnu: Add ghc-filepattern-bootstrap-for-9.6
  gnu: Add ghc-shake-bootstrap-for-9.6
  gnu: Add hadrian-for-ghc-9.6
  gnu: Add ghc-9.6
  gnu: ghc: Update to version 9.6.4

 gnu/packages/haskell.scm                      | 686 +++++++++++++++++-
 .../patches/ghc-9.4-testsuite-fixes.patch     | 119 +++
 2 files changed, 792 insertions(+), 13 deletions(-)
 create mode 100644 gnu/packages/patches/ghc-9.4-testsuite-fixes.patch

base-commit: f2102cb5b9239be2ed2023b908b726af542e0124
-- 
2.41.0