question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using stack marks import as error even the regarding package is specified in .cabal file

See original GitHub issue

I use haskforce together with stack. If I define an import, e.g. import Data.Text, before I define the regarding package text in the .cabal file in the library build-depends section, haskforce marks the import correctly as an error (hidden package). If I add the dependency in the .cabal file and call ‘stack build’ then stack resolves all dependencies, but the error message still remains in the IDE. If I add a further Haskell file and use in the new fileimport Data.Texttoo, everything works fine again in both Haskell modules.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
carymrobbinscommented, Mar 17, 2016

The Haskell Tools Console is now available in the latest release, v0.3-beta.30. If you install the latest release and are able to reproduce the issue, include a paste of the tools console for ghc-modi. From there that should give some insight as to what is going wrong.

0reactions
foofighter2146commented, Mar 29, 2016

Very cool - updating to ghc-mod 5.5.0.0 was the solution! @carymrobbins Thank you very much for your patience to find the answer. And the update of the Haskell Tools Console works well, too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Could not find module" error on local imports #1333 - GitHub
This error message in Neovim's :messages buffer. Could not find module 'My.Module' Use -v to see a list of the files searched for....
Read more >
Failed to build Distribution.Simple package using stack in ...
The error means that you have that package installed, but it is not listed as a dependency in your project. You need to...
Read more >
User's guide (introductory) - The Haskell Tool Stack
In this guide, we'll discuss the bare minimum necessary to understand how to modify a package.yaml file. You can see a full list...
Read more >
7. Package Description — Cabal 3.6.0.0 User's Guide
A package is identified by a globally-unique package name, which consists of one or more alphanumeric words separated by hyphens. To avoid ambiguity,...
Read more >
Changelog for stack-1.9.1 - Hackage - Haskell.org
For packages with internal libraries not depended upon, stack build used to fail the ... Run the Cabal file checking in the sdist...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found