From f8581c3206e3530c4c472ecdbf26ea15ce6a5dac Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Mon, 16 Jul 2018 12:28:41 +0200 Subject: [PATCH 1/2] Added hlint support for intero users --- modules/lang/haskell/+intero.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index 5dc501743..a99308af9 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -13,4 +13,7 @@ This is necessary because `intero-mode' doesn't do its own error checks." (message "Couldn't find stack. Refusing to enable intero-mode.")))) (add-hook 'haskell-mode-hook #'+haskell|init-intero) :config - (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)) + (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition) + (when (featurep! :feature syntax-checker) + (add-hook! 'intero-mode + (flycheck-add-next-checker 'intero '(warning . haskell-hlint))))) From ab6e18d61b69e33b89cad7550b96eaedbd4f05da Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Mon, 16 Jul 2018 12:50:20 +0200 Subject: [PATCH 2/2] Checks for hlint for dante/intero users --- modules/lang/haskell/doctor.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index df465bc7b..e9e776b0b 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -3,9 +3,7 @@ (when (featurep! +dante) (unless (executable-find "cabal") - (warn! "Couldn't find cabal, haskell-mode may have issues")) - (unless (executable-find "hlint") - (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode"))) + (warn! "Couldn't find cabal, haskell-mode may have issues"))) (when (featurep! +intero) (unless (executable-find "stack") @@ -14,3 +12,8 @@ (unless (executable-find "hindent") (warn! "Couldn't find hindent. hindent-mode won't work")) +(when (or (featurep! +dante) (featurep! +intero)) + (unless (executable-find "hlint") + (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode"))) + +