@@ -565,10 +565,35 @@ workflow does not run. Its intent is to apply Stan to Stack.
565565
566566## Haskell Language Server
567567
568- If you use Stack to build Stack, then you should find that, after having
569- commanded ` stack build ` , command ` stack ghci ` will work as expected.
570- (` stack build ` causes Cabal (the library) to create the automatically generated
571- module ` Stack_build ` .) Consequently, the following
568+ You may be using [ Visual Studio Code] ( https://code.visualstudio.com/ ) (VS Code)
569+ with its
570+ [ Haskell extension] ( https://marketplace.visualstudio.com/items?itemName=haskell.haskell ) ,
571+ which is powered by the
572+ [ Haskell Language Server] ( https://github.com/haskell/haskell-language-server )
573+ (HLS).
574+
575+ If you use Stack to build Stack, command ` stack ghci ` in the root directory of
576+ the Stack project should work as expected, if you have first commanded
577+ ` stack build ` once. ` stack build ` causes Cabal (the library) to create the automatically generated module ` Stack_build ` .
578+
579+ If ` ghc ` is not on your PATH, then Haskell Language Server may report the
580+ following error about ` Stack.Constants.ghcShowOptionsOutput ` :
581+ ~~~ text
582+ • Exception when trying to run compile-time code:
583+ ghc: readCreateProcess: does not exist (No such file or directory)
584+ Code: (TH.runIO (readProcess "ghc" ["--show-options"] "")
585+ >>= TH.lift . lines)
586+ • In the untyped splice:
587+ $(TH.runIO (readProcess "ghc" ["--show-options"] "") >>= TH.lift
588+ . lines)
589+ ~~~
590+
591+ ` ghc ` should be on the PATH if you run VS Code itself in the Stack environment:
592+ ~~~ text
593+ stack exec -- code .
594+ ~~~
595+
596+ Consequently, the following
572597[ cradle (` hie.yaml ` )] ( https://github.com/haskell/hie-bios ) should suffice to
573598configure Haskell Language Server (HLS) explicitly:
574599~~~ yaml
0 commit comments