cabal-install does not retain the version for happy
Asked Answered
T

1

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!

Trews answered 14/5, 2013 at 4:49 Comment(1)
⁺¹ for the point that the happy is a program name, it wasn't obvious.Herra
D
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.

Dense answered 14/5, 2013 at 5:46 Comment(3)
Thanks! Having $HOME/.cabal/bin in the path is what did it, since cabal puts the executables in that directory.Trews
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.Micromillimeter
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 usedConfidence

© 2022 - 2024 — McMap. All rights reserved.