Windows 10, VS Code, Workflow?

Hey everybody, just curious if there’s a better way to develop Haskell on Windows?

Current workflow:

  • Open VS Code with Haskell Language server extension:
  • Write code, write down fullPathToFile
  • Open command prompt
  • Run command: ghci -w “fullPathToFile”
  • Run module name, see if there were errors, rinse and repeat

I’m thinking there has to be a way to compile and run in VS Code.

1 Like

Hi, vscode should show you any error or warning in the editor itself without having to open a repl session if you dont want to, so maybe it is not working correctly.
It also should let available other interesting features, you can see a list with demos here: Features — haskell-language-server 1.3.0 documentation

If it is not working for you, please, follow those steps to recollect info and open an issue in the hls repo.

Should this be the case even without a cabal or stack project setup? My impression is that OP isn’t using either (although I could be mistaken).

yeah it works for standalone files too, in that case it only needs to have GHC available in PATH