2

I am using Intero under emacs to edit my new Haskell project. I added an import to a third-party library to my code to see if Intero would automatically add the necessary dependency, but it didn't. So I edited the .cabal file manually to add the necessary dependency. Now what do I do - short of restarting emacs?

I've tried running cabal install --dependencies-only; cabal configure at the command line and they ran successfully, but the flycheck buffer still shows an error.

Robin Green
  • 32,079
  • 16
  • 104
  • 187

1 Answers1

5

All that is necessary is to run

M-x intero-restart

in emacs.

Intero uses stack which has its own private sandbox for each package you are developing, so cabal install --dependencies-only isn't needed or useful.

Robin Green
  • 32,079
  • 16
  • 104
  • 187
  • I knew about `intero-restart` but it doesn't seem to affect an open intero-ghci session. I currently need to close the buffer to force the ghci buffer to pick the changes. Do you know anything about that ? – Pierre R Aug 11 '16 at 09:03
  • I don't think ghci can reload binary dependencies, so it would be necessary to restart ghci in any case. – Robin Green Aug 11 '16 at 09:28
  • I'm having a similar issue: I added new dependencies in cabal file and can't get my module to pass compilation. When I do `C-c C-l` I get compilation error. I've tried to do `intero-restart` but didn't work... Any ideas? – Galder Zamarreño Jun 12 '17 at 12:51
  • Here's the [output](https://gist.github.com/galderz/20696510d29ab68348b9a36f479bba79). – Galder Zamarreño Jun 12 '17 at 12:52
  • Actually, my bad, I had put the file in the wrong place. – Galder Zamarreño Jun 12 '17 at 13:14