Closed BillyBadBoy closed 6 years ago
I can fix the problem by adding a module declaration at the top of my spec.hs
file. The initial version created by stack just includes a main function.
Is this expected behaviour for haskell-ghc-mod ?
So, one caveat with stack: it doesn't enable tests by default. So you need to build your tests (once) for ghc-mod to work with them. Another caveat: stack will remove tests when you rebuild not-tests.
If you're using ide-haskell-cabal, one way around that is to specifically choose your test-suite as a build target, then stack will build everything including tests.
If you leave it at 'All: Auto', ide-haskell-cabal builds only the target to which currently open file belongs, so if you run build with test sources open, it will build tests and all will be good (well, until you close tests, change library or executable, rebuild those, and then come back to tests)
Thanks for the clarification.
I'm not sure if this is a bug or just a problem with my setup, but I cannot get atom to display type info inside my test files.
I have a stack project with the default directory structure. The types display OK in all my source files but not in my test file (which lives under the
test
folder). I get the message:Any idea what the problem is ?