Skip to content

How to change the GHC version the extension uses for stand alone files #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
h2df opened this issue Sep 11, 2021 · 2 comments
Closed

How to change the GHC version the extension uses for stand alone files #455

h2df opened this issue Sep 11, 2021 · 2 comments
Labels
type: question Questions about anything

Comments

@h2df
Copy link

h2df commented Sep 11, 2021

Hi,
Currently I'm using an unsupported verion of stack ghc so I get this error message:

haskell-language-server 1.3.0 for GHC 8.10.6 is not available on Windows_NT. See the list of supported versions here

I'm new to the language and the tool chain so I wonder where the extension is picking the GHC version from. I would guess it's the global configuration at C:\sr\global-project\stack.yaml. But changing the resolver value in that file to 8.10.5 is not picked by the extension.

Changing my stand alone files into a project fixes the issue, the project stack.yaml (with supported resolver version) will be horored. But as a beginer I'm would love to avoid dealing with the hassle of all the meta files in a project.

Is there a way to make the extension pick up a GHC version I specify for stand alone files, so that I can give it a version it supports?

Thanks!

@jneira
Copy link
Member

jneira commented Sep 11, 2021

Hi, thanks for your question, which might help other ones.
For now the ghc used for standalone files is the ghc in $PATH, so change it should work. Ideally opening standalone files should be consistent with projects and we have an issue to track it: haskell/haskell-language-server#692

@jneira jneira added the type: question Questions about anything label Sep 11, 2021
@h2df
Copy link
Author

h2df commented Sep 11, 2021

Thanks a lot for the information.

@h2df h2df closed this as completed Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Questions about anything
Projects
None yet
Development

No branches or pull requests

2 participants