Skip to content

Refactor load-or-reload #807

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

Closed
6 tasks
gracjan opened this issue Aug 8, 2015 · 3 comments · Fixed by #992
Closed
6 tasks

Refactor load-or-reload #807

gracjan opened this issue Aug 8, 2015 · 3 comments · Fixed by #992

Comments

@gracjan
Copy link
Contributor

gracjan commented Aug 8, 2015

User interface around load or reload needs a bit of work:

  • Bind C-c C-l directly to haskell-process-load-file
  • Rename haskell-process-reload-file to haskell-process-reload
  • Bind C-c C-r directly to haskell-process-reload
  • Make sure that in case of a lacking session error message are helpful
  • Mark haskell-process-load-or-reload as obsolete
  • Mark haskell-reload-p as obsolete
@deepfire
Copy link
Contributor

deepfire commented Aug 8, 2015

What about it the case when the user doesn't want to think whether he wants to load or reload -- and just wants to "get the latest version into GHC"?

@gracjan
Copy link
Contributor Author

gracjan commented Aug 8, 2015

For your viewing pleasure full source of current haskell-process-load-or-reload function:

(defun haskell-process-load-or-reload (&optional toggle)
  "Load or reload. Universal argument toggles which."
  (interactive "P")
  (if toggle
      (progn (setq haskell-reload-p (not haskell-reload-p))
             (message "%s (No action taken this time)"
                      (if haskell-reload-p
                          "Now running :reload."
                        "Now running :load <buffer-filename>.")))
    (if haskell-reload-p (haskell-process-reload-file) (haskell-process-load-file))))

I do not think this does what you thought it does.

To answer more directly: just use haskell-process-load-file and you will be fine.

@deepfire
Copy link
Contributor

deepfire commented Aug 8, 2015

Oh my god..

bergey added a commit to bergey/haskell-mode that referenced this issue Nov 14, 2015
- Rename haskell-process-reload
- keybindings for -process-load-file & -process-reload
- remove references to -process-load-or-reload
- mark -process-load-or-reload obsolete

closes haskell#807
bergey added a commit to bergey/haskell-mode that referenced this issue Nov 24, 2015
- Rename haskell-process-reload
- keybindings for -process-load-file & -process-reload
- remove references to -process-load-or-reload
- mark -process-load-or-reload obsolete

closes haskell#807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants