For our labs in uni, we had a few instructions to follow to use CodeWorld and one of them was to run cabal v2-run in the terminal for the file. When I had installed Haskell, it showed warning messages saying that cabal run was partially broken (I don't have the exact error message as of now),but it installed just fine. ghci works too.
However, while running this command, it builds up until a certain patch and then shows this error:
Building blank-canvas-0.7.4 (lib)
Installing patch-0.0.8.2 (lib)
Completed patch-0.0.8.2 (lib)
Failed to build blank-canvas-0.7.4.
Build log (
C:\cabal\logs\ghc-9.2.5\blank-canvas-0.7.4-5a6633f27b307e0e478b425211ca323972f09372.log
):
[ 1 of 17] Compiling Graphics.Blank.Events ( Graphics\Blank\Events.hs, dist\build\Graphics\Blank\Events.o )
ghc-9.2.5.exe: panic! (the 'impossible' happened)
(GHC version 9.2.5:
loadArchive "C:\\ghcup\\ghc\\9.2.5\\mingw\\lib\\libz.dll.a": failed
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
ghc-9.2.5.exe: Could not load `zlib1.dll'. Reason: addDLL: zlib1.dll or dependencies not loaded. (Win32 error 126)
Error: cabal-3.10.2.1.exe: Failed to build blank-canvas-0.7.4 (which is
required by exe:Main from comp1100-lab04-0.1.1). See the build log above for
details.
Is there any way I could resolve this? I have checked that I'm running the command in right directory. This error came up several minutes into the installation. I have uninstalled and reinstalled Haskell recently because this command was showing another error message(Build process terminated with exit code 11), but I don't know if that would be relevant here since I already uninstalled and reinstalled haskell, cabal,and ghcup