Skip to content

Remove haskell-indentation-parse-error #997

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
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
18 changes: 3 additions & 15 deletions haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ set and deleted as if they were real tabs."
'haskell-indentation-mode
"2015-05-25")

(defun haskell-indentation-parse-error (&rest args)
"Create error message from ARGS, log it and throw."
(let ((msg (apply 'format args)))
(message "%s" msg)
(throw 'parse-error msg)))

(defvar haskell-literate) ; defined in haskell-mode.el

(defun haskell-indentation-bird-p ()
Expand Down Expand Up @@ -456,10 +450,7 @@ indentation points to the right, we switch going to the left."
(haskell-indentation-first-indentation)
(setq current-token (haskell-indentation-peek-token))
(catch 'parse-end
(haskell-indentation-toplevel)
(unless (eq current-token 'end-tokens)
(haskell-indentation-parse-error
"Illegal token: %s" current-token)))
(haskell-indentation-toplevel))
possible-indentations))))

(defun haskell-indentation-first-indentation ()
Expand Down Expand Up @@ -765,9 +756,7 @@ Skip the keyword or parenthesis." ; FIXME: better description needed
(when end
(throw 'parse-end nil)))
((equal current-token end)
(haskell-indentation-read-next-token)) ; continue
(end (haskell-indentation-parse-error
"Illegal token: %s" current-token))))))
(haskell-indentation-read-next-token))))))

(defun haskell-indentation-case-alternative ()
"" ; FIXME
Expand Down Expand Up @@ -1032,8 +1021,7 @@ layout starts."
left-indent)))))
(throw 'parse-end nil))
(haskell-indentation-phrase-rest (cddr phrase))))
((string= (cadr phrase) "in")) ; fallthrough
(t (haskell-indentation-parse-error "Expecting %s" (cadr phrase))))))
((string= (cadr phrase) "in")))))

(defun haskell-indentation-add-indentation (indent)
"" ; FIXME
Expand Down