-
Notifications
You must be signed in to change notification settings - Fork 347
Code duplication between haskell-process-do-type, haskell-process-insert-type #989
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
Comments
Hmm, interesting. I remember Artur working on this and it proved problematic to merge those code paths. I'm not sure what the problem was, though. If you can merge it then great, go ahead! |
I'll be able to have a look tommorow. |
Oh, guys, I'm a greatest lier, apologizes, I have not looked at this yet. Maybe on Thuesday... |
No rush, I have plenty of other projects. =) |
Ok, the difference is if user just wants to see a type, |
I understand the difference in output. I was surprised that this leads to different regexen to match the Haskell identifier, and to decide whether to add parens in the ghci query. I jumped to the conclusion that the two functions should do the same thing up to the point where they output the type differently. Looking now, that may be wrong. Is it documented anywhere that I thought that merging the code up to the point of display might be the first step towards documenting, and possibly expanding, their functionality. If you think they're better off separate, feel free to close this issue, and I'll take a stab at documenting the current behavior, at least. |
Thinking about this issue again it might be more productive for you to contribute to Haskell IDE Engine because it is supposed to fix this and many other problems. |
Yes, that makes sense. Thanks for the advice. |
haskell-process-do-type
has two code paths, one to insert a type, one to show it in the minibuffer. They share no code, and for example use different rules to decide what string to pass to ghci.I'm happy to make a PR refactoring the common code into a single function, if the maintainers agree that this would be an improvement.
The text was updated successfully, but these errors were encountered: