I get following error in VSCode:
However, when I run this command in shell manually it works fine:
% stack --stack-yaml /home/user/haskell/h5/stack.yaml exec ghc -- --numeric-version
9.8.2
My stack.yaml is minimal:
% cat stack.yaml | grep -v '^\s*#'
snapshot: ghc-9.8.2
packages:
- .

system-ghc: truein your yaml? Lastly, I've more commonly seenresolver: ghc-9.8.2thansnapshot. Not sure any of this will work, so just making a comment.