-
Notifications
You must be signed in to change notification settings - Fork 347
merged hi2 (https://github.com/errge/hi2). #483
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
Conversation
Why does it complain about CL functions? |
@kuribas: use cl-find-if, cl-remove-if and friends. It was decided (long time ago) to use |
Yes please. Also, can we take this opportunity to prefix the unprefixed top-level symbols such as Apart from that, as a hi2 user I'm very much +1 on merging this, and will do so when the above changes are done unless I hear otherwise from the other maintainers. |
@purcell: Can we MELPA stable before merging, as this is potentially shockingly great change but a bit involved one? |
@gracjan What do you mean by "can we MELPA stable"? |
@purcell: Tag a stable release before merging hi2. |
Perhaps. When it's been so long since the last numbered release, I doubt that this would be the change that would cause the most breakage if people suddenly start getting a new version with much more recent code: the whole |
Great, isn't it? :-) |
Am I right in thinking this now needs to be rebased against |
I merges cleanly so rebase should be no problem. |
@gracjan Where are your fixes for |
Local only. |
Hey Guys, I just wanted to say that I'm so grateful and happy that @kuribas took this up and is converting my messy hi2 to something that can be contributed back to the original codebase! You rock! It was obviously not my intention to fork haskell-mode, just was annoyed with the indentation stuff and had the idea of having some visual feedback and wanted to practice my elisp skills on a hackathon. After that, reality checked in and I have never found the time to properly contribute back my changes to the community. So a big thank you for everyone involved and especially to @kuribas. My work would not have been possible without his haskell-indentation parser and also would have never been finished without his finishing touches! Once this is merged, please feel free to send a pull request against hi2 that warns the user that my hack is not needed anymore! Cheers, |
|
||
;; Author: Kristof Bastiaensen <[email protected]> | ||
|
||
;; Author: Gergely Risko <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use [email protected] with this merge? I know that I've used [email protected] myself, but I actually prefer [email protected] for haskell projects nowadays!
Conflicts: haskell-indentation.el
@errge thanks, but it wasn't that much work to integrate it, and I really like the changes you made. |
I gave it a couple of days of usage and I think the plan to getting hi2 merged in should be:
|
@gracjan If you tell me the bugs, or file an issue on my repository, I'll try to fix it. A test suite is a good idea. I have been thinking to run it automatically on a large haskell source file (ghc maybe?), preferably containing lots of syntax extensions. It could then report where the parser fails. |
I'll try to create a test suite out of this, for now as a teaser for you issues I found: (Note that this pertains to your merge rebased over current master). |
I made some comments: http://pastebin.com/gU8pr6Tu |
Note that I consider it a bug only when:
Everything else is a feature :-) In theory I'd like it to support all GHC syntax extensions, but in practice people need to file a bug report when they need support for the extension. |
I guess we need 1. and 2. before merging. Other stuff is lower priority. Debugger jumps on me when there is something wrong with the code a screen or two above (invisible). It is pretty annoying. I think that indentation should do something predictable given any garbage as input. That would also ensure that possible future haskell extensions are compatible with haskell-indentation. |
I don't think there is any need to support garbage, but I agree that giving meaningful feedback when the parser fails would be a good idea. |
Btw, the parser looks at the code before point to see how to indent it. It considers all code from the closest line before point that has zero indentation. So if there is any garbage there, it will crash with a parse error. |
@kuribas: 'Support' in the minimal sense of not doing anything super surprising, like messing up whole buffer, hanging or popping up debugger. TAB should not cause damage. TAB should also not cause interactive features. |
@gracjan Does it do anything like that? It shouldn't even enter the debugger for a parser error, since it uses condition-case. |
@kuribas: does for me. I do have
Aquamacs 3.2 GNU Emacs 24.4.51.2 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14) of 2014-11-07 (Aquamacs-3.2) on watson.local |
I've created a branch called 'wip/hi2' that is rebased on master, has cl-xx functions fixed and documents one failing test case (for now). @kuribas: can you have a look at it? |
@kuribas: I've reported an issue nilcons/hi2#15 in @errge repo. I think that when those two are fixed we can merge! |
@kuribas: So I fixed those myself. |
Surprises fixed on wip/hi2, and the 'debugger entered' issues was because of my |
Closing in favor of #502. |
@kuribas: does hi2 reparse current function at every cursor movement? Including left-right? It is slow. |
Yes, because it uses pre-command and post-command hooks. The original mode only parsed after a tab or delete. |
Merge hi2.el changes with haskell-indentation