Couldn't create Haskell module because Cabal file can't be found
See original GitHub issueI 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:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
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 usingsudo ln -s /usr/bin/stack /usr/local/bin/stack
and now it works without problems