Skip to content

Applying hints fails #328

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
C-alcium opened this issue Dec 7, 2020 · 7 comments
Closed

Applying hints fails #328

C-alcium opened this issue Dec 7, 2020 · 7 comments
Labels
type: bug A bug or unintended effect

Comments

@C-alcium
Copy link

C-alcium commented Dec 7, 2020

The plugin wants to apply reduction here
image

When I click on the quick fix option
image

It then hangs indefinitely
image

I imagine it's something that I'm doing wrong but I can't really see anything extra in the documentation that I need to do to get hints working. Anything I can do to get this working?

@jneira
Copy link
Member

jneira commented Dec 7, 2020

Hi, apply-refact is failing and keeping the alert opened, like

The root cause probable is

which fortunately has a workaround

@jneira jneira added type: bug A bug or unintended effect responsibility: server labels Dec 7, 2020
@david9991
Copy link

david9991 commented Jan 22, 2021

Same issue here if specified pragma.
{-# LANGUAGE OverloadedStrings, LambdaCase #-}

Got following error:

2021-01-22 14:56:44.911783 [ThreadId 49696] - finish: hlint (took 0.00s)
[Error - 2:56:44 PM] Request workspace/executeCommand failed.
  Message: (RealSrcSpan SrcSpanOneLine "template0" 11 17 21,"Illegal lambda-case (use -XLambdaCase)")
CallStack (from HasCallStack):
  error, called at src/Refact/Internal.hs:84:13 in pply-rfct-0.8.2.1-68f8d423:Refact.Internal
  Code: -32603 

@jneira
Copy link
Member

jneira commented Jan 22, 2021

hls master already has the fix for this, so the next release will have too

@michaelschufi
Copy link

michaelschufi commented Feb 28, 2021

@jneira The extension now uses HLS 1.0.0 but I'm still experiencing the issue. Any idea why?

Edit: For me it's not stuck, but it just doesn't do anything.

@jneira
Copy link
Member

jneira commented Feb 28, 2021

@michaelschufi thanks for reporting it, i am afraid that it was fixed in hls-0.8.0 for ghc < 8.10, after the last comment in this issue and it has reproduced again for hls-1.0.0 and ghc == 8.10
But, good news, it is fixed again, only in master (again), so the next release will have too (again) 😄

@michaelschufi
Copy link

Cool. Thank you 👍
Just starting to learn the language and the linter's hints are really great for this. But I'm excited to apply the hints automatically :P

@jneira
Copy link
Member

jneira commented Mar 9, 2021

The bug is fixed in master and it would be included in the next release

@jneira jneira closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A bug or unintended effect
Projects
None yet
Development

No branches or pull requests

4 participants