Search code examples
macoshaskellcabalhoogle

hoogle 4.2.34 install error on Mac w "Couldn't match expected type ‘CompilerId’"


Warning: new Haskell user here

I'm trying to install the CLI version of Hoogle on Haskell Platform 2014.2.0.0 for Mac OS X Maverick, 64 bit. I have installed cabal 1.21.0.0 with ghcjs support and ghc 7.8.3.

The following is the output from running $cabal install hoogle

[25 of 75] Compiling Web.Page         ( src/Web/Page.hs, dist/build/hoogle/hoogle-tmp/Web/Page.o )
[26 of 75] Compiling Recipe.Haddock   ( src/Recipe/Haddock.hs, dist/build/hoogle/hoogle-tmp/Recipe/Haddock.o )
[27 of 75] Compiling Recipe.Cabal     ( src/Recipe/Cabal.hs, dist/build/hoogle/hoogle-tmp/Recipe/Cabal.o )

src/Recipe/Cabal.hs:33:74:
    Couldn't match expected type ‘CompilerId’
                with actual type ‘Maybe CompilerId -> CompilerId’
Probable cause: ‘comp’ is applied to too few arguments
    In the fourth argument of ‘finalizePackageDescription’, namely
      ‘comp’
    In the expression:
      finalizePackageDescription [] (const True) plat comp [] pkg
cabal: Error: some packages failed to install:
hoogle-4.2.34 failed during the building phase. The exception was:
ExitFailure 1

Solution

  • I've opened up an issue about this: https://github.com/ndmitchell/hoogle/issues/84. I'm trying to put together a pull request to fix it now.

    EDIT Never mind, this isn't a bug in Hoogle. Both you and I had an experimental Cabal installed with a breaking change. There's no way to tweak Hoogle for this yet. If you want to install, just use cabal install hoogle --constraint 'Cabal < 1.21'.