<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>How are you launching VSCode? Make sure you open the root of the
project in VSCode.<br>
Opening VSCode from the cli via `code .` when you are in the
correct directory is the most reliable.</p>
<p>Further, on the cli, try running HLS like this:
`haskell-language-server-wrapper --debug
<some-path-to-a-source-file>` from the root of your project.<br>
Does this report the same error? If yes, more info about the
project is needed like the .cabal file and the logs. Otherwise, it
is a problem with the editor (e.g., PATH variable shenanigans).</p>
<p>Best regards,<br>
Fendor<br>
</p>
<div class="moz-cite-prefix">On 07/01/2023 10:00, Dennis Raddle
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKxLvoqAPLKTU4+N-GnEcYEHL=EJd7zOX6aCticwdmjNA3FnCA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I'm trying to get HLS set up with a stack project on VS
Code. I'm getting messages like this:</div>
<div><br>
</div>
<div>Could not load module ‘Control.Monad.Except’<br>
It is a member of the hidden package ‘mtl-2.2.2’.<br>
You can run ‘:set -package mtl’ to expose it.<br>
(Note: this unloads all the modules in the current scope.)</div>
<div><br>
</div>
<div>But these are in the "Problems" tab of VS Code (and show as
red underlines).</div>
<div><br>
</div>
<div>When I run stack clean, stack build I don't see any error
like this at all. <br>
</div>
<div><br>
</div>
<div>And yes, I made sure mtl was added everywhere in cac.cabal.
(I'm using cac.cabal not stack.yaml... is that my problem?)</div>
<div><br>
</div>
<div>I tried stack clean; stack build; restart HLS several
times.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>