Closed dspies-leapyear closed 6 years ago
I'm afraid this won't work as you expect it to. ghc-mod is somewhat dumb when it comes to setups like this, frankly. A simple example:
$ cat stack.yaml
resolver: lts-9.1
packages:
- ghc-mod
$ ls
stack.yaml
ghc-mod/
$ ghc-mod check $PWD/ghc-mod/GhcMod.hs
ghc-mod/GhcMod.hs:72:1:Failed to load interface for ‘GhcMod.Exe.Boot’Use -v to see a list of the files searched for.
...
ghc-mod/GhcMod.hs:92:1:Failed to load interface for ‘GhcMod.Types’Use -v to see a list of the files searched for.
Reason being, ghc-mod doesn't seem to look for cabalfile in descendant directories, only in parent ones. So... yeah, that's why Atom runs ghc-mod where cabalfile is.
Closing. Let me know if there's something to discuss here.
I have a stack project with multiple packages each with their own .cabal file and a single stack.yaml in the parent directory. Can I get atom to run
ghc-mod
from the root directory (which also happens to be the Atom project root directory) rather than from the one where the cabal file is?