Skip to content
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

Apply hint: redundant lambda breaks block identation #95

Open
jneira opened this issue Nov 13, 2020 · 10 comments
Open

Apply hint: redundant lambda breaks block identation #95

jneira opened this issue Nov 13, 2020 · 10 comments

Comments

@jneira
Copy link
Contributor

jneira commented Nov 13, 2020

Hi, using hls-hlint-plugin an user has detected that apply "redundant lambda" breaks the block identantion.

Same versions that previous issues: #93 and #94

Test cases has been aded by @soiamsoNG: #92

@jneira jneira changed the title Apply hint: redundant lambda lambda breaks block identantion Apply hint: redundant lambda lambda breaks block identation Nov 13, 2020
@jneira jneira changed the title Apply hint: redundant lambda lambda breaks block identation Apply hint: redundant lambda breaks block identation Nov 14, 2020
@zliu41
Copy link
Collaborator

zliu41 commented Nov 14, 2020

Thanks for reporting the bug. This one seems tricky to fix without modifying ghc-exactprint. See alanz/ghc-exactprint#97.

Worst can we can disable refactoring of this hint in HLint.

@zliu41
Copy link
Collaborator

zliu41 commented Nov 23, 2020

I've disabled refactoring for this hint, if the body is an HsCase. ndmitchell/hlint#1171
@jneira I can make a release of 0.9.0.0 now. Do you see anything else that needs to be included in the release?

@jneira
Copy link
Contributor Author

jneira commented Nov 23, 2020

@zliu41
The unique thing i would like to fix is the hardcoded path to the ghc libdir induced by ghc-exactprint: alanz/ghc-exactprint#96 (although i am not totally sure at 100% that it is the cause)
I am afraid it supposes a non trivial change in ghc-exactprint.

Otoh i have a hls branch that already uses apply-refact master that compiles (but not tested) so the actual api is usable by hls: haskell/haskell-language-server@master...jneira:apply-refact-exts. I hope at least the interface would not need to be changed. 🤞

So yeah, a release lo leverage your late amazing work here would be great.

@jneira
Copy link
Contributor Author

jneira commented Nov 24, 2020

@zliu41 I am afraid the workaround for the ghc libdir hardcoded path in windows has become almost unnaceptable. I have to fix it asap and it will suppose changes in ghc-exactprint (i'll try to make it backwards compatible to no break other packages) and here.
What do you think in wait to fix #87 and the hardcoded path before a release? If you think actual changes worths a independent release i will be fine too.

@zliu41
Copy link
Collaborator

zliu41 commented Nov 24, 2020

Yeah, I'd like to fix #87 before a release. And perhaps more importantly, if alanz/ghc-exactprint#96 needs to be fixed, I should wait for that too, because apply-refact calls ghcWrapper, so it needs to be changed to whatever the fixed version is.

@jneira
Copy link
Contributor Author

jneira commented Jan 12, 2021

@zliu41 hi! i've falmost finished the pr in hls to leverage your nice last changes. However dont know when i will be able to tacke alanz/ghc-exactprint#96. What do you think about make a release with the actual version?
I could use master in the pr but i would prefer to use a released version (no problem if you think is better to wait)

@zliu41
Copy link
Collaborator

zliu41 commented Jan 13, 2021

@jneira Yeah, I think a release is due. The issue we were discussing before (#87), it seems best to be fixed in ghc-exactprint.

There are two more issues I'd like to take a look to see if they can be easily fixed: ndmitchell/hlint#1179 and alanz/ghc-exactprint#97. But I'll definitely make a release this week.

@zliu41
Copy link
Collaborator

zliu41 commented Jan 16, 2021

@jneira 0.9.0.0 is out 🙂

@jneira
Copy link
Contributor Author

jneira commented Jan 31, 2022

@zliu41 hi! any progress in this issue? thanks

@zliu41
Copy link
Collaborator

zliu41 commented Feb 4, 2022

Hi @jneira! I haven't looked at this one since a year ago 😄 . I think this requires some changes to ghc-exactprint, which I'm happy to look into soon, but I don't know how easy it is to fix it so I don't have an ETA.

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

2 participants