Skip to content

Use haskell-process-load-file, not -load-or-reload #992

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

Merged
merged 1 commit into from
Nov 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions haskell-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ default (please follow GHCi-ng README available at URL

\\<haskell-interactive-mode-map>
To make this function works sometimes you need to load the file in REPL
first using command `haskell-process-load-or-reload' bound to
\\[haskell-process-load-or-reload].
first using command `haskell-process-load-file' bound to
\\[haskell-process-load-file].

Optional argument INSERT-VALUE indicates that
recieved type signature should be inserted (but only if nothing
Expand Down
16 changes: 13 additions & 3 deletions haskell.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

(defvar interactive-haskell-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key map (kbd "C-c C-l") 'haskell-process-load-file)
(define-key map (kbd "C-c C-r") 'haskell-process-reload)
(define-key map (kbd "C-c C-t") 'haskell-process-do-type)
(define-key map (kbd "C-c C-i") 'haskell-process-do-info)
(define-key map (kbd "M-.") 'haskell-mode-jump-to-def-or-tag)
Expand Down Expand Up @@ -394,13 +395,19 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
(current-buffer)))

;;;###autoload
(defun haskell-process-reload-file ()
(defun haskell-process-reload ()
"Re-load the current buffer file."
(interactive)
(save-buffer)
(haskell-interactive-mode-reset-error (haskell-session))
(haskell-process-file-loadish "reload" t (current-buffer)))

;;;###autoload
(defun haskell-process-reload-file () (haskell-process-reload))

(make-obsolete 'haskell-process-reload-file 'haskell-process-reload
"2015-11-14")

;;;###autoload
(defun haskell-process-load-or-reload (&optional toggle)
"Load or reload. Universal argument toggles which."
Expand All @@ -411,7 +418,10 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
(if haskell-reload-p
"Now running :reload."
"Now running :load <buffer-filename>.")))
(if haskell-reload-p (haskell-process-reload-file) (haskell-process-load-file))))
(if haskell-reload-p (haskell-process-reload) (haskell-process-load-file))))

(make-obsolete 'haskell-process-load-or-reload 'haskell-process-load-file
"2015-11-14")

;;;###autoload
(defun haskell-process-cabal-build ()
Expand Down