From a7b457b53db0aa0c04218a165ddcebcca99284fb Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Fri, 26 Aug 2016 14:03:15 +0200 Subject: [PATCH 1/2] Fix inferior-haskell warning font lock for GHC 8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GHC 8.0 uses an error message of the form ``` /home/alanz/mysrc/github/alanz/ghc-exactprint/tests/Test.hs:99:3: warning: [-Wunused-matches] Defined but not used: ‘prettyRoundTripTests’ ``` The word "warning" no longer has an initial capital letter. --- inf-haskell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inf-haskell.el b/inf-haskell.el index 88e3da781..a7e9d8f5a 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -81,7 +81,7 @@ The command can include arguments." ;; The format of error messages used by Hugs. `(("^ERROR \"\\(.+?\\)\"\\(:\\| line \\)\\([0-9]+\\) - " 1 3) ;; Format of error messages used by GHCi. - ("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\(Warning\\)?" + ("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\(.arning\\)?" 1 2 4 ,@(if (fboundp 'compilation-fake-loc) '((6) nil (5 '(face nil font-lock-multiline t))))) ;; Runtime exceptions, from ghci. From 98c37fe7bf20810ec8cff0ba9c881ef0ef5e30f3 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 27 Aug 2016 14:03:09 +0200 Subject: [PATCH 2/2] Make warning detection regex more readable --- inf-haskell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inf-haskell.el b/inf-haskell.el index a7e9d8f5a..9dcb420a3 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -81,7 +81,7 @@ The command can include arguments." ;; The format of error messages used by Hugs. `(("^ERROR \"\\(.+?\\)\"\\(:\\| line \\)\\([0-9]+\\) - " 1 3) ;; Format of error messages used by GHCi. - ("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\(.arning\\)?" + ("^\\(.+?\\):\\([0-9]+\\):\\(\\([0-9]+\\):\\)?\\( \\|\n *\\)\\([Ww]arning\\)?" 1 2 4 ,@(if (fboundp 'compilation-fake-loc) '((6) nil (5 '(face nil font-lock-multiline t))))) ;; Runtime exceptions, from ghci.