[Haskell-cafe] HLS in VS Code is identifying problems that don't when I run stack on the command line

Dennis Raddle dennis.raddle at gmail.com
Sat Jan 7 09:00:03 UTC 2023


I'm trying to get HLS set up with a stack project on VS Code. I'm getting
messages like this:

Could not load module ‘Control.Monad.Except’
It is a member of the hidden package ‘mtl-2.2.2’.
You can run ‘:set -package mtl’ to expose it.
(Note: this unloads all the modules in the current scope.)

But these are in the "Problems" tab of VS Code (and show as red underlines).

When I run stack clean, stack build I don't see any error like this at all.

And yes, I made sure mtl was added everywhere in cac.cabal. (I'm using
cac.cabal not stack.yaml... is that my problem?)

I tried stack clean; stack build; restart HLS several times.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20230107/fcdef3b4/attachment.html>


More information about the Haskell-Cafe mailing list