I have this non-project Haskell project, which is just a single Shakefile.hs. It uses a few other libraries, but is just that one file. All the dependencies are declared in a default.nix that looks like this:
And I can compile the project with just nix-shell --run shake. So far so good. But how can I get the haskell-language-server, or hie-bios, to recognize my project, such that when I load the file in Emacs, it doesn't give me a hundred import errors? I also have direnv set up, and an .envrc that just says use_nix.
I know I can make a .cabal file and have HIE read that to find dependencies. But that seems like overkill, when I don't even have a Main.hs or a src/ directory.
I have this non-project Haskell project, which is just a single Shakefile.hs. It uses a few other libraries, but is just that one file. All the dependencies are declared in a default.nix that looks like this:
And I can compile the project with just
nix-shell --run shake
. So far so good. But how can I get the haskell-language-server, or hie-bios, to recognize my project, such that when I load the file in Emacs, it doesn't give me a hundred import errors? I also have direnv set up, and an .envrc that just saysuse_nix
.I know I can make a
.cabal
file and have HIE read that to find dependencies. But that seems like overkill, when I don't even have a Main.hs or asrc/
directory.I guess you could use a direct cradle and specify
-package lucid
etcnot sure how that works