From 7627b04f1828ab0f16c7ed6281482f37d6e6c960 Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Sat, 23 Jun 2018 15:59:03 +0200 Subject: [PATCH] Refactored dante feature. --- modules/lang/haskell/+dante.el | 15 +++------------ modules/lang/haskell/doctor.el | 5 ++--- modules/lang/haskell/packages.el | 4 +--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/modules/lang/haskell/+dante.el b/modules/lang/haskell/+dante.el index e3687fd2b..2eb5645f5 100644 --- a/modules/lang/haskell/+dante.el +++ b/modules/lang/haskell/+dante.el @@ -2,17 +2,8 @@ ;;;###if (featurep! +dante) (def-package! dante - :after haskell-mode :hook (haskell-mode . dante-mode) :config - (add-hook 'haskell-mode-hook #'interactive-haskell-mode)) - - -(def-package! company-ghc - :when (featurep! :completion company) - :after haskell-mode - :init - (add-hook 'haskell-mode-hook #'ghc-comp-init) - :config - (setq company-ghc-show-info 'oneline) - (set-company-backend! 'haskell-mode #'company-ghc)) + (when (featurep! :feature syntax-checker) + (add-hook! 'dante-mode-hook + (flycheck-add-next-checker 'haskell-dante '(warning . haskell-hlint))))) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index f803ea3d2..b62d40aa1 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -4,9 +4,8 @@ (when (featurep! +dante) (unless (executable-find "cabal") (warn! "Couldn't find cabal, haskell-mode may have issues")) - - (unless (executable-find "ghc-mod") - (warn! "Couldn't find ghc-mod on PATH. Code completion will not work"))) + (unless (executable-find "hlint") + (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode/"))) (when (featurep! +intero) (unless (executable-find "stack") diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 2b637c3f8..541ed0bcd 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -5,9 +5,7 @@ ;; (cond ((featurep! +dante) - (package! dante) - (when (featurep! :completion company) - (package! company-ghc))) + (package! dante)) (t (package! intero) (package! hindent)))