Ghc-9.8.2 fails to compile QuickCheck-2.14.3 with JS backend
Summary
When trying to compile QuickCheck-2.14.3 (and maybe some other packages) with ghc-9.8.2 (and 9.11.20240323 too), it fails to compile with internal ghc error.
Steps to reproduce
nix build github:sgrb/nixpkgs/66b76946f219f23ee7125b2808e026c6221ebbd9#legacyPackages.x86_64-linux.pkgsCross.ghcjs.haskell.packages.ghc98.QuickCheck
(ghc with js backend is now broken in upstream nixpkgs, so I have made a fork with some fixes)
The compilation fails with the following error:
[ 2 of 16] Compiling Test.QuickCheck.Random ( src/Test/QuickCheck/Random.hs, dist/build/Test/QuickCheck/Random.p_o )
<no location info>: error:
compiler/GHC/StgToJS/Prim.hs:331:18-99: Non-exhaustive patterns in lambda
[ 9 of 16] Compiling Test.QuickCheck.Text ( src/Test/QuickCheck/Text.hs, dist/build/Test/QuickCheck/Text.p_o )
Expected behavior
The package should compile.
Environment
- GHC version used: ghc-9.8.2 with js backend
Optional:
- Operating System: Linux x86-64
- System Architecture: ghcjs