Skip to content
Browse files

(inferior-haskell-error-regexp-alist): Add entries for GHCI's excepti…

…ons.

Ignore-this: a043466ee8f7289d8b9668807e2607d3
(inferior-haskell-error-regexp-alist): Add entries for GHCI's exceptions.
(inferior-haskell-mode): Set compilation-first-column.

darcs-hash:20070607195513-c2f2e-08dcca44d4370dccc2d7dd586f493d57e0ea0588.gz
  • Loading branch information...
1 parent cc725e6 commit 5a72afa0144ecc7cd21a9c8a0c08ea4e9289641a monnier committed Jun 7, 2007
Showing with 14 additions and 0 deletions.
  1. +6 −0 ChangeLog
  2. +8 −0 inf-haskell.el
View
6 ChangeLog
@@ -1,3 +1,9 @@
+2007-06-07 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * inf-haskell.el (inferior-haskell-error-regexp-alist): Add entries for
+ GHCI's exceptions.
+ (inferior-haskell-mode): Set compilation-first-column.
+
2007-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
* inf-haskell.el (inferior-haskell-use-cabal): New custom var.
View
8 inf-haskell.el
@@ -59,6 +59,13 @@ The command can include arguments."
;; Format of error messages used by GHCi.
("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n +\\)\\(Warning\\)?"
1 2 4 ,@(if (fboundp 'compilation-fake-loc) '((6))))
+ ;; Runtime exceptions, from ghci.
+ ("^\\*\\*\\* Exception: \\(.+?\\):(\\([0-9]+\\),\\([0-9]+\\))-(\\([0-9]+\\),\\([0-9]+\\)): .*"
+ 1 ,@(if (fboundp 'compilation-fake-loc) '((2 . 4) (3 . 5)) '(2 3)))
+ ;; GHCI uses two different forms for line/col ranges, depending on
+ ;; whether it's all on the same line or not :-(
+ ("^\\*\\*\\* Exception: \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\): .*"
+ 1 2 ,(if (fboundp 'compilation-fake-loc) '(3 . 4) 3))
;; Info xrefs.
,@(if (fboundp 'compilation-fake-loc)
`((,inferior-haskell-info-xref-re
@@ -88,6 +95,7 @@ The format should be the same as for `compilation-error-regexp-alist'.")
;; Setup `compile' support so you can just use C-x ` and friends.
(set (make-local-variable 'compilation-error-regexp-alist)
inferior-haskell-error-regexp-alist)
+ (set (make-local-variable 'compilation-first-column) 0) ;GHCI counts from 0.
(if (and (not (boundp 'minor-mode-overriding-map-alist))
(fboundp 'compilation-shell-minor-mode))
;; If we can't remove compilation-minor-mode bindings, at least try to

0 comments on commit 5a72afa

Please sign in to comment.
Something went wrong with that request. Please try again.