-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Case splitting features #323
Comments
Just in case the references can help, the feature was included in hie (afaik using ghc-mod underneath and using hare by @Avi-D-coder): haskell/haskell-ide-engine#907 |
@TOTBWF and are tackling this (and other great things!) |
Wow, that looks fabulous! |
Blocked by alanz/ghc-exactprint#91, since it prevents us from to synthesize new terms that respect layout. |
Oh no! Please share the ghcide/HLS branch and maybe someone can find a workaround. |
@pepeiborra sure! I will be forever in your debt if you can. https://github.com/isovector/haskell-language-server/tree/tactics Everything is hooked up and working, but TreeTransform (which uses ExactPrint) runs into this issue when trying to insert the generated terms back into the source. |
Should we reopen this for the latest version? (: |
@santiweight is already working on this, by reviving tactics to work with 9.x and beyond |
We're in a bit of a weird situation here; I was planning on picking up the work from @santiweight due to a possible contract for this feature, but it didn't end up coming through. The work necessary to port things to 9.2 is hairy and thankless and I'm not particularly keen to push it through --- especially without a plan for how we can prevent breakage of this sort in the future. It's not a situation I love, but it is what it is. |
Unfortunately for myself I'm a little too keen to get it done! We have the case splitting functionality completely ported now, and passing all tests. I would like to port the tactics functionality and I expect it will be possible. I will try my best over time to get it done: as Sandy says, it's quite hairy and opaque. Thankfully, I am now quite comfortable with the new exactprint api. The main thing I have left to learn is all of Sandy's fancy judgment features! I think I now have enough knowledge to get the job finished :) |
Wrt to breakage in the future: I agree totally. It gives me a little anxiety... However, the new API, while hard to learn, is quite productive and understandable. As far as I know, this is the only planned change to the exact print infrastructure for the foreseeable future, and so I'm allowing myself to take the risk this time. |
heya! can we expect that this will come back to hls? is there work being done or tracked elsewhere? |
Original Twitter threads: https://twitter.com/Anka213/status/1289724597735063552
Case splitting an equation (in Idris):
How this could be implemented in HLS:
case [..] of
Tools that already do this:
The text was updated successfully, but these errors were encountered: