I have created a stack haskell project a few months ago and finished it then. I wanted to add and fix a few issues it has, but when i tried opening the .hs file on vs code (visual studio code) i got the error in the title, the full one is at the bottom of this question. I tried reinstalling stack, but nothing changed. I also updated the stack.yaml resolver to the newest lts build, which is 19.9 using the
resolver: url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/9.yaml
The error appears to be that my project is using an older version of ghc that my machine doesn't have, especially since the folder C:\cabal\store\ghc-8.10.7 doesn't exist on my machine, where this is the only one that exists in that path C:\cabal\store\ghc-9.2.1 So my question is, how can i update the version of my GHC for my specific stack project?
The full error: ghcide compiled by GHC 8.10 failed to load packages: haskell-language-server-8.10.7~1.7.0.0.exe: can't find a package database at C:\cabal\store\ghc-8.10.7\package.db. Please ensure that ghcide is compiled with the same GHC installation as the project.
Stack version: 2.7.5
GHCi/GHC version: 8.10.7
IDE: VS code (visual studio code)