Question

I've just done a fresh install of Arch Linux to a virtual machine and installed GHC (7.6.1), and cabal-install is version 1.16.0-2

I'm trying to get an environment setup for haskell coding, including the ghcmod-vim plugin, which of course requires ghc-mod.

Running cabal install ghc-mod gives several errors

Gap.hs:81:19:
    Couldn't match expected type `PprStyle -> String' with `[Char]'
    Expected type: String
      Actual type: PprStyle -> String
    Probable cause: `renderWithStyle' is applied to too few arguments
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:81:35:
    Couldn't match expected type `DynFlags' with actual type `SDoc'
    In the first argument of `renderWithStyle', namely `d'
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:81:37:
    Couldn't match type `SDoc' with `SDoc'
    In the second argument of `renderWithStyle', namely `stl'
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:114:28:
    Couldn't match type `Module' with `ModuleName'
    Expected type: ModSummary -> ModuleName
      Actual type: ModSummary -> Module
    In the second argument of `(.)', namely `ms_mod'
    In the first argument of `map', namely `(IIModule . ms_mod)'
    In the first argument of `(<$>)', namely `map (IIModule . ms_mod)'

I don't really understand how these compiler errors are happening given that ghc-mod 1.11.0 seems to have been put on Hackage in June, and my searches for similar issues has turned up nothing.

Thoughts and solutions on how to fix this?

Était-ce utile?

La solution

You might want to have a look at https://github.com/kazu-yamamoto/ghc-mod. The latest commit is called "GHC 7.6.1 compatibility", so this version might solve your problem.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top