Search code examples
haskellghccabal

Error when executing "cabal install hoogle"


When I run cabal install hoogle, I get the following:

setup: The program happy version >=1.17 is required but it could not be found
cabal: Error: some packages failed to install
haskell-src-exts-1.13.3 failed during the configure step the exeption is ExitFailure 1

$ghc -V
The Glorious Glasgow Haskell Compilation System, version 7.4.1

How to fix such a problem?


Solution

  • Instead of cabal install hoogle, run cabal install alex happy && cabal install hoogle.

    Many packages on hackage require alex and happy, so it is good idea to install them after cabal update.