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.

Couldn't create Haskell module because Cabal file can't be found

See original GitHub issue

I am setting up a fresh machine, have installed Stack (and made sure it’s in the PATH), IDEA 2020.2 Beta (because I like living on the edge), and the latest IntelliJ Haskell plugin (v. 1.0.0-beta76).

After trying to import a Stack project, I am being presented with the following error:

Couldn’t create Haskell module because Cabal file can’t be found in W:\Projects\icfpc-2020

After that, an informational message is shown:

Can not add package . as module because W:\Projects\icfpc-2020 does not contain Cabal file or Cabal file can not be parsed

I can’t share the project (yet), because it’s part of my ICFP Contest submission (and will be available in a couple of days), but it’s a pretty standard Stack package - with no Cabal file.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ForNeVeRcommented, Jul 20, 2020

Alright, so this was a corner case, only valid when a project cannot be compiled. Fair enough, in such a case I’ll close the issue. Thanks for explanation!

0reactions
cmarinciacommented, Feb 7, 2021

That happened to me because the Stack executable was not found, mine is in /usr/bin/stack but the extension looks into /usr/local/bin/stack so I created that directory and created a symbolic link using sudo ln -s /usr/bin/stack /usr/local/bin/stack and now it works without problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No Cabal file info" error while creating new Haskell project or ...
Hello! I get a "No Cabal file info. Could not create Haskell module because could not retrieve or parse Cabal file for package...
Read more >
Trouble building a haskell module in IntelliJ - Stack Overflow
cabal file. It is a member of the hidden package `parsec-3.1.3'. Perhaps you need to add `parsec' to the build-depends in ...
Read more >
Could not find module in ghci - Haskell Community
I installed Haskell through image with ghcup. But the package I installed through cabal cannot be loaded in ghci
Read more >
How to fix Stack unable to parse cabal file? : r/haskell - Reddit
Stack through version 1.5.1 was too eager to parse Cabal files The work for extensible snapshots accidentally fixed this, and then we added ......
Read more >
Changelog - The Haskell Tool Stack
We now recommend checking in generated cabal files for repos. ... Fix missing reconfigure check causing errors when a package gets used in...
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