ghc-imported-from icon indicating copy to clipboard operation
ghc-imported-from copied to clipboard

Fails to build

Open mdorman opened this issue 9 years ago • 4 comments

Using ghc-7.10.3 on nixos, I get the following error:

Language/Haskell/GhcImportedFrom.hs:797:54:
    No instance for (Language.Haskell.GhcMod.Monad.Log.GmLog IO)
      arising from a use of ‘findCradle’
    In the second argument of ‘($)’, namely ‘findCradle’
    In a stmt of a 'do' block:
      cradle <- runGmOutT GhcModTypes.defaultOptions $ findCradle
    In the expression:
      do { cradle <- runGmOutT GhcModTypes.defaultOptions $ findCradle;
           let currentDir = cradleCurrentDir cradle
               workDir = cradleRootDir cradle;
           setCurrentDirectory workDir;
           let targetFile = currentDir </> _targetFile;
           .... }

mdorman avatar Jan 24 '16 01:01 mdorman

This is probably an issue with building against ghc-mod-5.5.0---I assumed this was the "latest" referred to in the recent commit.

mdorman avatar Jan 24 '16 01:01 mdorman

I checked and I built against ghc-mod-5.4.0.0, so I'll try 5.5.0 and see if I can fix it.

carlohamalainen avatar Jan 24 '16 02:01 carlohamalainen

I've uploaded 0.2.1.1 with a fix for building against ghc-mod-5.5.0.0: https://hackage.haskell.org/package/ghc-imported-from-0.2.1.1

Let me know if it works for you.

In the cabal file I set ghc-mod == 5.5.0.0 - is this ok for Nix? I'm guessing that Nix generates its build config using my cabal file?

Thanks.

carlohamalainen avatar Jan 24 '16 03:01 carlohamalainen

Oh, excellent. I'll give it a try soon.

And yes, Nix generates its build expression from the cabal file, so that will work fine.

mdorman avatar Jan 24 '16 12:01 mdorman