haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

Is HIE working with cabal script files? #1780

Open freeman42x opened 4 years ago

freeman42x commented 4 years ago

Example script file here: https://www.haskell.org/cabal/users-guide/nix-local-build.html#cabal-v2-run And here: https://github.com/haskell/cabal/issues/6122#issue-462558871

When I open Atom HIE is throwing the following error:

Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/setup.hs".
Could not obtain flags for: "src/setup.hs".

This module was not part of any component we are aware of.

Component: ChExeName "haskell-editor-setup" with source directory: ["src"]

To expose a module, refer to:
https://www.haskell.org/cabal/users-guide/developing-packages.html

The error happens regardless whether I place the script file in project root or under src.

fendor commented 4 years ago

Same answer as here: https://github.com/haskell/haskell-language-server/issues/111

EDIT: implicit config will never (at least not right now) succeed, explicit config might work if the mentioned issue is fixed