haskellemacshaskell-modeintero

Update Intero flycheck after changing cabal file


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.


Solution

  • 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.