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

Remove scc functions #961

Closed
wants to merge 1 commit into from
Closed

Remove scc functions #961

wants to merge 1 commit into from

Conversation

gracjan
Copy link
Contributor

@gracjan gracjan commented Oct 26, 2015

No description provided.

@ivan-m
Copy link
Contributor

ivan-m commented Oct 27, 2015

Please don't do this; I find these functions quite useful. I tend to use it with:

(defun toggle-scc-at-point (&optional arg)
  "Insert or kill (with universal-argument) an SCC annotation at
point."
  (interactive "P")
  (if (equal arg nil)
      (haskell-mode-insert-scc-at-point)
    (haskell-mode-kill-scc-at-point)))

(define-key haskell-mode-map (kbd "C-c C-s") 'toggle-scc-at-point)

@gracjan
Copy link
Contributor Author

gracjan commented Oct 27, 2015

Well, so part of the functionality is in your personal config file. We need to decide which direction to move, either all of it ends up in haskell-mode or all of it ends up in your config file.

I've written up what is a 'Complete functionality' in the wiki https://github.com/haskell/haskell-mode/wiki/Complete-functionality. Quoting here inline:

  1. functionality is available via a defined keybinding
  2. functionality is available via a menu option
  3. functionality is documented in official manual
  4. functionality does not require additional elisp code from user
  5. functionality works reasonably well with default settings
  6. code implementing the functionality has enough quality to not be a burden on Haskell Community
  7. code is sufficiently general to serve many users
  8. error handling is in place and is user friendly
  9. code is reasonably well covered by unit tests

How do we get there with SCC annotations?

@ivan-m
Copy link
Contributor

ivan-m commented Oct 27, 2015

I think these functions already match criteria 7 at least (though now that I think about it, it might be possible to more automatically determine that if it's in an SCC declaration to remove it).

I can copy these definitions back into my config if you decide that it shouldn't belong in haskell-mode; I just think that utility functions like these are useful enough for a range of people that they might as well be defined once rather than everyone re-defining them.

Maybe some kind of haskell-auxiliary.el file?

@gracjan
Copy link
Contributor Author

gracjan commented Oct 27, 2015

@ivan-m, listen, two unit tests, two paragraphs in documentation, an official keybinding and scc functionality stays with haskell-mode. Can you contribute that?

@ivan-m
Copy link
Contributor

ivan-m commented Oct 28, 2015

I'll have a go this weekend.

@bergey
Copy link
Contributor

bergey commented Nov 11, 2015

I've started working on the necessary docs and cleanup. I still need to write unit tests, and I suppose figure out how to add menu entries.

https://github.com/bergey/haskell-mode/tree/scc

@bergey bergey mentioned this pull request Nov 11, 2015
@bergey
Copy link
Contributor

bergey commented Nov 25, 2015

@gracjan I think that this can be closed now that #986 is merged.

@gracjan gracjan closed this Nov 25, 2015
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

Successfully merging this pull request may close these issues.

3 participants