Prelude.chr: bad argument
Summary
Trying to build an older code base reports a GHC error.
I'm trying to return to an older code base that I haven't touched in a couple of years. Yes, I agree that this is not good practice.
Even though I'm sure that most of the issue is my own fault, I'm dutifully reporting the error because the error message tells me to do so.
Steps to reproduce
Clone this repository: https://github.com/ploeh/FAlgebras. Then try to build it:
$ git clean -xdf
Removing .stack-work/
Removing stack.yaml.lock
$ stack build
ghc.exe: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-unknown-mingw32):
Prelude.chr: bad argument: 2634022915
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Error: [S-6374]
While building simple Setup.hs (scroll up to its section to see the error) using:
C:\Users\mark\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\bin\ghc-8.4.3.exe -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 C:\Users\mark\AppData\Roaming\stack\setup-exe-src\setup-9p6GVs8J.hs C:\Users\mark\AppData\Roaming\stack\setup-exe-src\setup-shim-9p6GVs8J.hs -o C:\Users\mark\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_9p6GVs8J_2.2.0.1_ghc-8.4.3.exe
Process exited with code: ExitFailure 1
Expected behavior
I'd expect the code to compile. It used to do.
Environment
- GHC version used: 8.4.3 (I think)
As you can see, I'm using Stack, so I'm usually not that aware of the GHC version I'm using.
I'm well aware that this is an old version, so perhaps this issue is going to be closed with a won't fix. If so, that's not a problem for me. I can easily update the code base to use a more recent version of GHC.
Thus, I'm mostly reporting this issue because the error message instructs me to do so - in case this turns out to be important.
Optional:
- Operating System: Windows 11 Pro 22H2
- System Architecture: x64, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz 2.11 GHz, 16 GB RAM