문제

I'm using Windows 7 with cygwin too.

I'd installed happstack-hsp fine with the Haskell Platform from February.

I just installed the Haskell Platform from April. I tried installing happstack-hsp package, through cabal and get the following error:

$cabal install happstack-hsp
Resolving dependencies...
Configuring hsp-0.7.1...
Building hsp-0.7.1...
Preprocessing library hsp-0.7.1...
ghc.exe: could not execute: trhsx
cabal.exe: Error: some packages failed to install:
happstack-hsp-7.1.1 depends on hsp-0.7.1 which failed to install.
hsp-0.7.1 failed during the building phase. The exception was:
ExitFailure 1

I tried to to then install trhsx, and got this error:

$cabal install trhsx
Resolving dependencies...
Configuring trhsx-0.2.2...
Building trhsx-0.2.2...
Preprocessing library trhsx-0.2.2...

Trhsx.hs:1:1:
    Could not find module `Prelude'
    It is a member of the hidden package `base'.
    Perhaps you need to add `base' to the build-depends in your .cabal file.
    It is a member of the hidden package `haskell2010-1.1.0.1'.
    Perhaps you need to add `haskell2010' to the build-depends in your .cabal file.
    It is a member of the hidden package `haskell98-2.0.0.1'.
    Perhaps you need to add `haskell98' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
cabal.exe: Error: some packages failed to install:
trhsx-0.2.2 failed during the building phase. The exception was:
ExitFailure 1

I tried this in cmd too, and got the same outcome. It's been many years since I used haskell, and it's changed quite a bit, any ideas?

도움이 되었습니까?

해결책

trhsx comes from the hsx package now. The reason for the error is that cabal installs the executable in $HOME/.cabal/bin by default. But, $HOME/.cabal/bin is not in your $PATH by default.

If you add that to your $PATH, then everything should be ok.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top