19

I've trying to do cabal install hoogle but there is a hickup with the haskell-src-exts-1.13.5 dependency:

Configuring haskell-src-exts-1.13.5...
setup: The program happy version >=1.17 is required but it could not be found.

When I try to do cabal install happy it seems to finish successfully, but cabal-install does not retain the version:

>$ cabal list happy
* happy
    Synopsis: Happy is a parser generator for Haskell
    Default available version: 1.18.10
    Installed versions: [ Unknown ]
    Homepage: http://www.haskell.org/happy/
    License:  BSD3

As you can see the version is [ Unknown ]. It stays unknown, and cabal-install remains oblivious if I try to run cabal install happy again.

What gives?

Thanks in advance!

Alexander Kondratskiy
  • 4,156
  • 2
  • 30
  • 51

1 Answers1

37

Looks like cabal does not show Installed versions for executables, but for libraries only.

Maybe cabal install happy somewhere to your home directory, for example in $HOME/.cabal/bin, and it's not in your PATH. cabal install happy show this path in some last lines. So you can add this path to your PATH and try to install haskell-src-exts again.

Fedor Gogolev
  • 10,391
  • 4
  • 30
  • 36
  • 3
    Thanks! Having $HOME/.cabal/bin in the path is what did it, since cabal puts the executables in that directory. – Alexander Kondratskiy May 14 '13 at 13:34
  • 1
    Thanks for this! On my mac, `happy` was placed in `$HOME/Library/Haskell/bin` incase thats helpful to anyone. I was also confused at why cabal wasn't listing it right after an install. – jsdw Sep 27 '14 at 10:14
  • On MinGHC this meant putting `C:\Users\xxx\AppData\Roaming\cabal\bin` in my path before the MinGHC bin so that the latest version of cabal, happy and alex were used – sumo Dec 23 '14 at 04:17