Skip to content

Does the version of the Haskell Language Server used include the hls-eval-plugin? If not, could it? #824

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
toddobryan opened this issue Feb 25, 2023 · 5 comments

Comments

@toddobryan
Copy link

I'm trying to do this in VSCode:

https://haskell-language-server.readthedocs.io/en/latest/features.html#evaluation-code-snippets-in-comments

It doesn't seem to work.

Does the version of the HLS that the extension uses include this plugin? Is there a way for me to add it? Would you consider including it by default?

@jhrcek
Copy link

jhrcek commented Feb 25, 2023

What version of GHC are you trying to use HLS with?
Based on the plugin support tiers eval plugin is not yet working with ghc 9.4 and newer in the latest release of hls.

However just a few days ago this PR was merged which should make it work with ghc 9.4: haskell/haskell-language-server#3391
You could either wait for new release of HLS containing this change to be released, or you could install hls from source using ghcup. Something like ghcup compile hls -g master --ghc 9.4.4 --cabal-update

@toddobryan
Copy link
Author

I got an error trying to run that.

[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref master (this may take a while)
[ Info  ] Examining git ref master
[ ...   ]   HLS version (from cabal file): 1.9.1.0
[ ...   ]   commit hash: 50799fecb450babf252ac87986a1a073aa709ae9
[ Info  ] Building HLS 1.9.1.0 for GHC version 9.4.4
[ cabal ] 
[ cabal ] Error: cabal: Failed to build zlib-0.6.3.0 (which is required by
[ cabal ] exe:haskell-language-server-wrapper from haskell-language-server-1.9.1.0 and
[ cabal ] exe:haskell-language-server from haskell-language-server-1.9.1.0). See the
[ cabal ] build log above for details.
[ cabal ] 

Relative Haskell newbie here, so how do I specify which version of GHC to use?

@hasufell
Copy link
Member

@jhrcek
Copy link

jhrcek commented Feb 26, 2023

Relative Haskell newbie here, so how do I specify which version of GHC to use?

Did you setup your haskell environment using ghcup (recommended)?
You can check using ghcup list or using its terminal UI ghcup tui.

If not, it dependes on whether you're using stack or cabal to build your project.
If you're using cabal, you're most likely using GHC that's on your path.
Just run ghc --version

If you're using stack, the version of ghc you're using depends on your project's stack configuration.
Go to your project directory containing stack.yaml and run stack ghc -- --version

@fendor
Copy link
Collaborator

fendor commented Aug 17, 2023

Closing since I think this is resolved

@fendor fendor closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants