I'm trying to download the HERMIT tool using the command cabal install hermit
.
I dowloaded Haskell using GHCup. If I try to install with GHC 9.2.5 (recommended version by GHCup), I get errors like the following:
src\Text\PrettyPrint\MarkedHughesPJ.hs:487:43: error:
Ambiguous occurrence `<>'
It could refer to
either `Prelude.<>',
imported from `Prelude' at src\Text\PrettyPrint\MarkedHughesPJ.hs:33:8-38
(and originally defined in `GHC.Base')
or `Text.PrettyPrint.MarkedHughesPJ.<>',
defined at src\Text\PrettyPrint\MarkedHughesPJ.hs:629:3
|
487 | go y (z:zs) = (y <> p) : go z zs
| ^^
cabal-3.6.2.0.exe: Failed to build marked-pretty-1.1.2.1 (which is required by
exe:hermit from hermit-0.7.1.0). See the build log above for details.
Given that the tool is pretty old, my suspicion is that it should work with an older GHC version. GHCup list
gives me versions from 7.10.3 till 9.4.4.
If I run with GHC 7.10.3, I get a different kind of error:
Failed to build kure-2.18.6.
Build log (
C:\cabal\logs\ghc-7.10.3\kure-2.18.6-b07c497f3357de591e4a4906067e2a1c674021a6.log
):
Preprocessing library for kure-2.18.6..
Building library for kure-2.18.6..
Language\KURE\BiTransform.hs:41:8:
Could not find module `Control.Monad.Fail'
It is a member of the hidden package `fail-4.9.0.0@JWbBevols3d7TkSXAGkvyg'.
Perhaps you need to add `fail' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
cabal-3.6.2.0.exe: Failed to build kure-2.18.6 (which is required by
exe:hermit from hermit-1.0.1). See the build log above for details.
Very weird, since GHC 7.10.3 is recommended?
So, having no other options, I continued exploring versions. For GHC 8.0.2, I got yet another error:
Failed to build kure-2.18.6.
Build log (
C:\cabal\logs\ghc-8.0.2\kure-2.18.6-0171a393aff229af835cd303562178192d2a6c3c.log
):
Preprocessing library for kure-2.18.6..
Building library for kure-2.18.6..
[ 1 of 15] Compiling Language.KURE.Combinators.Monad ( Language\KURE\Combinators\Monad.hs, dist\build\Language\KURE\Combinators\Monad.o )
[ 2 of 15] Compiling Language.KURE.MonadCatch ( Language\KURE\MonadCatch.hs, dist\build\Language\KURE\MonadCatch.o )
[ 3 of 15] Compiling Language.KURE.Transform ( Language\KURE\Transform.hs, dist\build\Language\KURE\Transform.o )
Language\KURE\Transform.hs:241:42: error:
Not in scope: type constructor or class `Semigroup'
cabal-3.6.2.0.exe: Failed to build kure-2.18.6 (which is required by
exe:hermit from hermit-0.7.1.0). See the build log above for details.
I even tried installing on a virtual machine on the latest Ubuntu (my host PC is Windows 11), but I was stuck with the same kind of errors.
What should i try next? How to set a GHC in GHCup which is not listed anymore as availible? (an older GHC version may be the answer). Since I get this text back:
PS C:\Users\broland> ghcup install ghc 7.8.4
[ Info ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file C:\ghcup\cache\ghcup-0.0.7.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[ Warn ] New ghc version available. To upgrade, run 'ghcup install ghc 9.4.4'
[ Warn ] New cabal version available. To upgrade, run 'ghcup install cabal 3.8.1.0'
[ Warn ] New stack version available. To upgrade, run 'ghcup install stack 2.9.3'
[ Info ] verifying digest of: gs.exe
[ Error ] Unable to find a download for the requested version/distro.
[ Error ] Also check the logs in C:\ghcup\logs
PS: I would like to stick to GHCup because it makes handling dependencies easy, I also tried downloading binary packages and that way I got stuck in another error...